{"id":18045178,"url":"https://github.com/abusch/rustracer","last_synced_at":"2025-07-12T15:40:20.719Z","repository":{"id":41508619,"uuid":"92555266","full_name":"abusch/rustracer","owner":"abusch","description":"A toy raytracer written in Rust based on PBRT","archived":false,"fork":false,"pushed_at":"2022-07-03T08:49:56.000Z","size":59804,"stargazers_count":30,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-24T03:11:25.576Z","etag":null,"topics":["path-tracing","pbrt","physically-based-rendering","raytracer","raytracing","rendering","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abusch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-26T23:21:30.000Z","updated_at":"2024-12-05T23:52:30.000Z","dependencies_parsed_at":"2022-09-21T11:13:41.111Z","dependency_job_id":null,"html_url":"https://github.com/abusch/rustracer","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/abusch%2Frustracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abusch%2Frustracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abusch%2Frustracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abusch%2Frustracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abusch","download_url":"https://codeload.github.com/abusch/rustracer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248140256,"owners_count":21054268,"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":["path-tracing","pbrt","physically-based-rendering","raytracer","raytracing","rendering","rust"],"created_at":"2024-10-30T18:12:18.410Z","updated_at":"2025-04-10T01:33:10.061Z","avatar_url":"https://github.com/abusch.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rustracer\n\nRustracer is a toy\n[raytracer](https://en.wikipedia.org/wiki/Ray_tracing_(graphics)) written in\n[Rust](http://rust-lang.org).\n\n[![Rust](https://github.com/abusch/rustracer/actions/workflows/rust.yml/badge.svg)](https://github.com/abusch/rustracer/actions/workflows/rust.yml)\n[![dependency status](https://deps.rs/repo/github/abusch/rustracer/status.svg)](https://deps.rs/repo/github/abusch/rustracer)\n\n\u003e *Update (27/05/2020):* This project is not really developped anymore as I ran\n\u003e out of steam and spare time. I'm doing a little bit of maintainance\n\u003e occasionally, such as updating dependencies, to keep it from bitrotting but I\n\u003e suggest you look at [rs_pbrt](https://github.com/wahn/rs_pbrt) for a more\n\u003e full-featured port of `pbrt`.\n\n## History\n\nIt started as a little playground to play with raytracing concepts that I found\non [Scratchapixel](http://www.scratchapixel.com). I then found out about\n[tray_rust](http://github.com/TwinkleBear/tray_rust) and began refactoring my\ncode to follow its design, but then eventually bought a copy of\n[Physically-Based Ray Tracing](http://www.pbrt.org) and decided to follow the\n[C++ implementation](https://github.com/mmp/pbrt-v3) as closely as possible to\nmake it easier to follow along with the book. Consider this a port of PBRTv3 to\nRust.\n\n**Note**: I am very much a beginner in Rust as well as in raytracing and this\nproject is a way for me to learn about both. If the code is ugly or broken, it\nis very much my fault :) This is not helped by the fact that the C++\nimplementation is _very_ object-oriented, and doesn't always translate cleanly\nor idiomatically to Rust... I haven't really paid attention to performance yet,\nor number of allocations, so both are probably pretty bad :) That being said,\nfeedback is more than welcome! \n\n## Related projects\n * [tray_rust](http://github.com/TwinkleBear/tray_rust): if you want to see a\n   good physically-based raytracer in Rust written by someone who knows what\n   they're talking about, you should check this project instead of mine :) It's\n   got some nice features, like distributed rendering, and the code is\n   beautifully written and documented.\n\n * [rs_pbrt](https://github.com/wahn/rs_pbrt): another port of PBRT to Rust.\n\n## Examples\n\nMore examples can be found in the [renders/](renders/) directory.\n\n![balls](balls.png)\n\n## How to build\n\nTo run the CLI, run `cargo run --release -p rustracer -- scene_file.pbrt`.\n\n## Currently supported\n * Integrators:\n     * Whitted\n     * Direct Lighting (with \"all\" or \"one\" sampling strategies)\n     * Path Tracing (with \"uniform\" or \"spatial\" sampling strategies)\n     * Normal (for debuging)\n     * Ambient Occlusion\n * Shapes:\n     * Basic shapes: disc, sphere, cylinder\n     * triangle meshes\n * Perspective camera with thin-lens depth-of-field\n * Lights:\n     * Point lights\n     * distant lights\n     * diffuse area lights\n     * infinite area light\n * BxDFs:\n     * Lambertian\n     * perfect specular reflection / transmission\n     * microfacet (Oren-Nayar and Torrance-Sparrow models, Beckmann and\n       Trowbridge-Heitz distributions, Smith masking-shadowing function)\n * Materials:\n     * Matte\n     * Plastic\n     * Metal / RoughMetal\n     * Glass / RoughGlass\n     * Substrate (thin-coated)\n     * Translucent\n     * Uber\n     * Disney (without SSS)\n * Textures (imagemaps, UV, CheckerBoard)\n     * imagemap with mipmapping (with trilinear and EWA filtering)\n     * UV\n     * CheckerBoard\n     * Fbm\n * BVH acceleration structure (MIDDLE and SAH splitting strategy)\n * multi-threaded rendering\n * Support for PBRT scene file format (still incomplete)\n * Read textures in PNG, TGA, PFM, HDR or EXR (thanks to [openexr-rs](https://github.com/cessen/openexr-rs))\n * Write images in PNG or EXR\n * Support for PLY meshes (thanks to [ply-rs](https://github.com/Fluci/ply-rs))\n * Bump mapping\n * Memory arena (thanks to [light_arena](https://github.com/Twinklebear/light_arena))\n\n## TODO\n * More CLI parameters (e.g. output file name, thread numbers)\n * More camera types (orthographic, realistic, environment)\n * More shapes (cone, paraboloid, hyperboloid, NURBs...)\n * More samplers (Halton, Sobol...)\n * More BxDFs and materials\n * Implement subsurface scattering\n * Volumetric rendering\n * More integrators: bidirectional path tracing, MTL, SPPM\n * Animations\n * more light types\n * k-d trees?\n * Spectral rendering?\n * some SIMD optimisation?\n * ...\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or\n   http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabusch%2Frustracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabusch%2Frustracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabusch%2Frustracer/lists"}