{"id":21630111,"url":"https://github.com/virtualritz/r-display","last_synced_at":"2025-04-11T13:51:39.616Z","repository":{"id":52401990,"uuid":"239724318","full_name":"virtualritz/r-display","owner":"virtualritz","description":"NSI/RenderMan® OpenEXR display driver with support for OIDN denoising; written in Rust.","archived":false,"fork":false,"pushed_at":"2023-05-24T13:57:19.000Z","size":10724,"stargazers_count":4,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T10:04:57.705Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/virtualritz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-11T09:33:04.000Z","updated_at":"2023-12-12T15:24:01.000Z","dependencies_parsed_at":"2023-01-20T17:46:16.758Z","dependency_job_id":null,"html_url":"https://github.com/virtualritz/r-display","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualritz%2Fr-display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualritz%2Fr-display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualritz%2Fr-display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/virtualritz%2Fr-display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/virtualritz","download_url":"https://codeload.github.com/virtualritz/r-display/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248411966,"owners_count":21099036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T02:09:47.961Z","updated_at":"2025-04-11T13:51:39.590Z","avatar_url":"https://github.com/virtualritz.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# r-display\n\n[NSI](https://nsi.readthedocs.io/)/[RenderMan®](https://renderman.pixar.com/)\n[OpenEXR](http://www.openexr.com/) display driver with Open Image\nDenoise support written in Rust.\n\nBuild instructions should work for **Linux** and **macOS**. On **Windows** your\nmileage my vary.\n\n## Building\n\nYou need a copy of Intel® Open Image Denoise (OIDN). Grab a package\nfrom their\n[download section](https://www.openimagedenoise.org/downloads.html).\nUnpack this somewhere. We refer to this below as the *OIDN location*.\n\n### Linux\n\nExport the OIDN location for the build to find the headers \u0026 libraries.\nFor example:\n```shell\nexport OIDN_DIR=$HOME/Downloads/oidn-1.3.0.x86_64.linux/\n```\n\nBuild the display driver:\n```shell\n./build-linux.sh\n```\n\n### macOS\n\nExport the OIDN location for the build to find the headers \u0026 libraries.\nFor example:\n```shell\nexport OIDN_DIR=$HOME/Downloads/oidn-1.3.0.x86_64.macos/\n```\n\nBuild the display driver:\n```shell\n./build-macos.sh\n```\n\n### Windows\n\n#### Brief\n\nWe assume you are using PowerShell. You need to have LLVM installed\nsomewhere.\nExport the OIDN location for the build to find the headers \u0026 libraries.\nFor example (using PowerShell):\n```powershell\nset OIDN_DIR='C:\\Downloads\\oidn-1.3.0.x64.vc14.windows\\oidn-1.3.0.x64.vc14.windows'\n```\nSet the he LLVM installation directory. For example:\n```powershell\n$Env:LIBCLANG_PATH = \"C:\\Program Files\\LLVM\\bin\\\"\n```\nBuild the display driver:\n```powershell\ncargo build --release\n```\n\n#### Detailed (For Non-Technical Peeps)\n\nYou need to have PowerShell 2 or later installed. To install it click\nthe lower left corner Windows icon and start typing `PowerShell`.\n[Install Chocolatey](https://chocolatey.org/install). It is a package\nmanager that will make installing the rest of the stuff you need painless.\n\nOpen PowerShell and follow the instructions.\n\n1. Install `git`:\n    ```powershell\n    choco install git\n    ```\n2. Install [Visual C++ Build Tools](https://visualstudio.microsoft.com/ru/visual-cpp-build-tools/):\n   ```powershell\n   choco install visualcpp-build-tools\n   ```\n3. Install [Rust](https://www.rust-lang.org/):\n   ```powershell\n   choco install rust-ms\n   ```\n4. Install [LLVM](https://llvm.org/):\n    ```powershell\n    choco install llvm\n    ```\n5. Set the LLVM location:\n    ```powershell\n    $Env:LIBCLANG_PATH = \"C:\\ProgramData\\Chocolatey\\bin\"\n    ```\n6. Set the OIDN location you choose [above](##Building). For example:\n    ```powershell\n    $Env:OIDN_DIR = \"C:\\Downloads\\oidn-1.3.0.x64.vc14.windows\\oidn-1.3.0.x64.vc14.windows\"\n    ```\n7. Create some folder to host the repository during build and change to\n    there. Note that you can delete this later.\n    ```powershell\n    md -Path \"C:\\MyProjects\"\n    cd \"C:\\MyProjects\"\n    ```\n8. Clone the r-display repository and hop into it:\n    ```powershell\n    git clone https://github.com/virtualritz/r-display\n    cd r-display\n    ```\n9. Build the display driver:\n    ```powershell\n    cargo build --release\n    ```\n10. Copy the result to the 3Delight display folder:\n    ```powershell\n    cp target\\release\\r-display.dll $Env:DELIGHT\\displays\n    ```\n\n## How To\n\nThere is an example app in `examples/denoise.rs`. This shows how to add\nthe two optional auxiliary AOVs for albedo \u0026 normal when instancing the\ndisplay driver through the [NSI crate](https://crates.io/crates/nsi).\n\nFor this to work you need to download \u0026 install a\n[3Delight](https://www.3delight.com/) package for your platform.\n\nTo run the example:\n```shell\ncargo run --example denoise\n```\n\nThis will launch the render and dump the raw data of a render with\n*one* sample per pixel to 3Delight Display. It will save a denoised\nversion to `test_0001samples.exr`.\n\n## Parameters\n\n### Denoising\n\n![Comparispon of denoising results|ɴsɪ](test.jpg)\n\nThe display driver uses\n[Intel® Open Image Denoise](https://www.openimagedenoise.org/)\nto denoise the 1st set of RGB channels. This is **switched on by\ndefault**.\n\nUse the `denoise` (`float`) parameter to control this.\n\nSetting this to **zero** switches denoising *off*.\n\nSetting this to a value above *0* and below *1* linearly blends the\ndenoised image with the original.\n\nSetting it to **one** (or above) switches denosing on. This means the\noriginal pixels will be discarded and replaced with denoised ones.\n\nIf you want support for keeping the original image in a separate layer\nof the EXR open an issue and I see what can be done.\n\nYou can use **albedo** and **normal** (requires the former) layers to\nimprove the denoising.\n\n### Compression\n\nThis display driver supports the following OpenEXR compression methods\nwhich are set by the `compression` (`string`) parameter:\n\n-   [x] `none` uncompressed\n-   [x] `zip` (lossless)\n-   [x] `rle` (lossless)\n-   [x] `piz` (lossless)\n-   [x] `pxr24` (lossy)\n-   [ ] `b44`, `b44a` not yet supported (could be added since there is support in the `exr` crate for this now)\n-   [ ] `dwaa`, `dwab` not yet supported\n\n### Other\n\nWhen `premultiply` (`integer`) is set to **zero** the image will be\nwritten out *unpremultiplied*.\n\nA `line_order` parameter can be used to set this explicitly to e.g.\nstore the image bottom-top. Accepted values are `increasing` and\n`decreasing`. If unspecified the driver will choose a line order\nmatching the compression.\n\nA `tile_size` (`integer[2]`) parameter can be specified to set the\nwidth and height of the tiles the image is stored in.\nIf unspecified the driver will choose a tile size matching the\ncompression.\n\n## Caveats\n\nThe display driver needs work if one wanted to use it for multi-layer\nEXRs (e.g. writing a single EXR that contains a bunch of AOVs as\nlayers).\n\nWhat would be needed was a way to designate which input layers should\nbe denoised and maybe also a way to filter out utility passes only\nadded for the denoiser so they don’t take up disk space.\n\nIf you want to use this in production and need those features ping me.\n\n### Metadata\n\nThe display driver exports some metadata that is common to EXR files:\n\n-   [x] `pixel aspect`\n-   [x] `world to camera`\n-   [x] `world to normalized device`\n-   [x] `near clip plane`\n-   [x] `far clip plane`\n-   [x] `software name`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtualritz%2Fr-display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvirtualritz%2Fr-display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvirtualritz%2Fr-display/lists"}