{"id":24954261,"url":"https://github.com/akihiko47/Red-Eye-Path-Tracer","last_synced_at":"2025-10-18T03:30:44.548Z","repository":{"id":274227408,"uuid":"915606512","full_name":"akihiko47/Path-Tracing","owner":"akihiko47","description":"Multithreaded path tracer with YAML scenes parser, normal mapping and bilateral filtering.","archived":false,"fork":false,"pushed_at":"2025-02-02T15:53:50.000Z","size":124099,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T16:22:35.154Z","etag":null,"topics":["computer-graphics","cross-platform","multithreading","path-tracing","pbr","yaml"],"latest_commit_sha":null,"homepage":"","language":"C++","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/akihiko47.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-12T10:19:49.000Z","updated_at":"2025-02-02T15:53:53.000Z","dependencies_parsed_at":"2025-01-25T21:27:28.635Z","dependency_job_id":null,"html_url":"https://github.com/akihiko47/Path-Tracing","commit_stats":null,"previous_names":["akihiko47/path-tracing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akihiko47%2FPath-Tracing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akihiko47%2FPath-Tracing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akihiko47%2FPath-Tracing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akihiko47%2FPath-Tracing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akihiko47","download_url":"https://codeload.github.com/akihiko47/Path-Tracing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236892794,"owners_count":19221239,"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":["computer-graphics","cross-platform","multithreading","path-tracing","pbr","yaml"],"created_at":"2025-02-03T04:49:36.804Z","updated_at":"2025-10-18T03:30:44.543Z","avatar_url":"https://github.com/akihiko47.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Red Eye Path Tracer\n![banner](output/readme/banner-mirrors.png)\n![banner](output/readme/banner-skybox.png)\n![banner](output/readme/banner-moon.png)\n\nMultithreaded path tracer with [YAML](https://yaml.org/) scenes description. \nThis format is human-readable, which makes it easy to modify and create new scenes. \n\n## Features\n- Multithreading\n- Cross platform\n- [YAML](https://yaml.org/) scenes description\n- Normal mapping\n- Bilateral filtering\n- Defocus blur\n- Reflections and refractions\n- Cubemaps and panoramic textures\n- Stratification and antialiasing\n\n## How to build\n*(In root directory after downloading or copying)*\n```\nmkdir build\ncd build/\ncmake ..\n```\nBuild files will be in `build/` folder. \nAfter that you can use `make` or launch solution in `Visual Studio`. \nAlternatively, you can use `cmake --build .` to build this project.\n\n## Usage\nThis project should be used as command line application. \nAfter building you will see executable file `RedEye` that can be launched from terminal. \nIf you launch this executable without arguments you will see something like this:\n```\n=== Red Eye Path Tracer ===\n\nUsage:   ./RedEye \u003cscene-name\u003e\nExample: ./RedEye example\n\nUsage:   ./RedEye filter \u003cimage-name\u003e \u003ckernel-size\u003e \u003csigma\u003e \u003cb-sigma\u003e\nExample: ./RedEye filter example-scene.png 15 10 0.1\n\nNone: default search directories are 'project-root/scenes/' and 'project-root/output/'\n(but you can specify absolute path to yaml scene file or image)\nResulting image will be saved in 'project-root/output/'\n\nFor more info see README\n\n===========================\n```\n### Rendering mode\nThis mode will render [YAML](https://yaml.org/) scene file to png image. \nDefault search directory for `.yaml` files is `scenes/` directory inside project's root, \nbut you can specify absolute path. \nYou don't need to specify `.yaml` extension for file. \nImage will be saved inside `output/` directory with name specified inside scene file's output section.\n```\n./RedEye \u003cscene-name\u003e\n```\n\nYou can try rendering example scene using this command: \n```\n./RedEye example\n```\n\n### Filtering mode\nThis mode applies [bilateral filtering](https://en.wikipedia.org/wiki/Bilateral_filter) to denoise specified image. \nBilateral filtering is a non-linear, edge-preserving smoothing technique that reduces noise \nwhile preserving sharp edges.\n```\n./RedEye filter \u003cimage-name\u003e \u003ckernel-size\u003e \u003csigma\u003e \u003cb-sigma\u003e\n```\nThe parameters are:\n1) `image-name` - the name of the input image file to be denoised. Image extension must be preserved. \nDefault search directory is `output/` inside project's root. Absolute path can be used.\n2) `kernel-size` - the size of the kernel (or filter window) used during bilateral filtering. \nThis defines the neighborhood around each pixel that will be considered for smoothing. \nLarger values result in stronger smoothing but may also blur finer details.\n3) `sigma` - the standard deviation of the Gaussian kernel used for spatial weighting. \nThis controls how much influence neighboring pixels have based on their distance from the center pixel. \nA higher value means pixels farther away will contribute more to the smoothing.\n4) `b-sigma` - the standard deviation of the Gaussian kernel used for range weighting (intensity difference). \nThis controls how much influence neighboring pixels have based on their intensity difference from the center pixel. \nThe higher `b-sigma` is, the larger features get smoothened.\n\nHere is an example of denoising example scene's result:\n```\n./RedEye filter example-scene.png 15 10 0.1\n```\n\u003e [!TIP]\n\u003e These parameters will work pretty poorly for a very noisy image.\n\u003e To see better results you can increase the number of samples per pixel to about 3000. \n\u003e Here's what it's gonna look like: \n\n| Original image | Filtered image |\n| -------------- | -------------- | \n| ![original](output/readme/filter-original.png){width=400} | ![filtered](output/readme/filter-filtered.png){width=400} |\n| `example.yaml` 4k samples, 10 bounces (render time = 318s) | `kernel-size` = 15, `sigma` = 10, `b-sigma` = 0.05 (filter time = 1.5s) |\n\n## Scene description\n\u003e [!TIP]\n\u003e See [example.yaml](scenes/example.yaml) for full explanation of how to describe scene.\n\nTo describe scene you need to specify:\n1) parameters of output image \n   - name\n   - width\n   - height\n2) camera settings\n   - number of ray samples per pixel\n   - number of ray bounces until it is destroyed\n   - position of camera\n   - position of target (what to look at)\n   - field of view **[optional]**\n   - defocus angle (defocus blur strength) **[optional]**\n   - focus distance **[optional]**\n3) objects in scene\n4) skybox **[optional]**\n\nTo add objects you need to specify their materials and to create materials you need to specify their textures. \nYou can use one texture/material more than once. \nIf you describe texture/material and not use it, it will not be parsed. \nOrder of blocks inside `.yaml` file doesn't matter.\nThe simplest scene can be described as follows:\n\n``` yaml\noutput:\n    width: 640\n    height: 360\n    file name: simple-scene.png\n\ncamera:\n    samples: 500\n    bounces: 10\n    position: [3, 3, 3]\n    look at: [0.0, 0.0, 0.0]\n\nskybox: [1.0, 1.0, 1.0]\n\nmaterials:\n    main-mat:\n        type: plastic\n        albedo: [0.0, 0.0, 0.0]\n\nobjects:\n    sphere:\n        type: sphere\n        position: [0.0, 0.0, 0.0]\n        radius: 1.0\n        material: main-mat\n```\n\n## Optimization thoughts\nRight now this path tracer is incredible inefficient. \nSo far the available primitives are spheres and quads. \nThere is no support of structures like BVH or KD-trees, which makes rendering models almost impossible. \nAlso, scene data such as materials and textures is not cache coherent, \nbut I tested method with more cache-uniform data and it gave no more than a 10% speed boost. \nThis project is rather a proof of concept to later port these methods to GPU.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakihiko47%2FRed-Eye-Path-Tracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakihiko47%2FRed-Eye-Path-Tracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakihiko47%2FRed-Eye-Path-Tracer/lists"}