tray_rust

tray_rust is a toy physically based ray tracer built using the techniques discussed in Physically Based Rendering. Initially created as a port of tray to Rust, it has since evolved and surpassed its predecessor in several aspects. This renderer is capable of path tracing, supports triangle meshes, and various physically based material models, including measured data from the MERL BRDF Database.

Features

  • Path Tracing: A rendering technique that simulates the way light bounces to produce realistic images.
  • Triangle Meshes: Support for complex models constructed from triangles.
  • Material Models: Includes various physically based material models, with upcoming support for MTL files.
  • Animation: Supports rigid body animation along B-spline paths.
  • Distributed Rendering: Enables rendering across multiple machines to speed up the process.

Running tray_rust

Running tray_rust with --help or -h will display available options. The renderer is optimized for release builds, as debug builds will run significantly slower. For more advanced usage, such as distributed rendering and animation, refer to the upcoming guides and documentation.

Building Your Own Scenes

To create and animate scenes, the Blender plugin is the easiest tool to use. Although the plugin is still in development and lacks some features like setting materials and changing light properties, these can be manually adjusted in the exported JSON file.

  • Materials: Refer to the materials documentation.
  • Lights: Modify the emission color in the JSON file, which includes an RGB color and a strength term.

Start with the scene module documentation. Example scenes such as cornell_box.json and smallpt.json are included, though not all models are provided. More simple scenes demonstrating additional features like animation will be added in the future.

Sample Renders

Below are some sample renders created using tray_rust. Models like the Buddha, Dragon, Bunny, and Lucy statue are sourced from the Stanford Scanning Repository. The Rust logo model was created by Nylithius on BlenderArtists. The monkey head is Blender's Suzanne. Minor tweaks have been made to some models for convenience, and they are available here.

Render Examples

Model gallery Model gallery 1920x1080, 4096 samples/pixel. Rendering: 00:43:36.45.

Rust Logo with friends, disk Rust Logo with friends, disk 1920x1080, 4096 samples/pixel. Rendering: 00:49:33.514.

Documentation

Comprehensive documentation is available on the project site.

Similar Projects

Rustfinity.com

Links

  1. Home
  2. Learn Rust
  3. Get Started
  4. Practice Rust
  5. Challenges
  6. Tutorials
  7. Blog
  8. Open source
  9. Learn Gleam

Socials

  1. GitHub
  2. X

Legal

  1. Privacy Policy
  2. Terms of Service