- Notifications
You must be signed in to change notification settings - Fork24
Twinklebear/tray_rust
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
tray_rust is a toy physically based ray tracer built off of the techniquesdiscussed inPhysically Based Rendering. It began life as a port oftray toRust to check out the languagebut has surpassed it in a few ways.The renderer is currently capable of path tracing, supports triangle meshes (MTL support coming soon),and various physically based material models (including measured data from theMERL BRDF Database). tray_rust also supports rigid body animation alongB-spline paths and distributed rendering.
Running and passing--help
or-h
will print out options you can pass to the renderer which are documented in the help.For the more complicated use cases I hope to do some write ups and guides on how to use them (e.g. distributed rendering,animation) but this may take a while. I strongly recommend running the release build as the debug version will be very slow.
To position and animate objects, the camera and so on theBlender plugin is the easiest to use. However the pluginis still in development and missing some features like setting materials, changing light properties and such soyou'll still currently need to do those by hand in the exported JSON file. For materials take a look atthematerials documentation for lightsyou'll likely just want to change the emission color which is an RGB color plus a strength term.
Start at the documentation for thescene module,there are also a few examplescenes included but not all the models are provided. From a cleangit clone
youshould be able to runcornell_box.json andsmallpt.json. I plan to add somemore simple scenes that show usage of other features like animation to provide examples. The rigid body animationfeature is relatively new though so I haven't had time to document it properly yet.
Documentation can be found on theproject site.
- More material models (eg. more microfacet models, rough glass, etc.)
- Textures
- Support for using an OBJ's associated MTL files
- Bump mapping
- Subsurface scattering?
- Vertex Connection and Merging?
In the samples the Buddha, Dragon, Bunny and Lucy statue are fromThe Stanford Scanning Repository.The Rust logo model was made byNylithius on BlenderArtists.The Utah teapot used is fromMorgan McGuire's page andthe monkey head is Blender's Suzanne. I've made minor tweaks to some of the models so for convenienceyou can find versions that can be easily loaded into the sample sceneshere, though thecube model for the Cornell box scene is included.The materials on the Rust logo, Buddha, Dragon and Lucy are from theMERL BRDF Database. Models for running the scenes and links to model sourcescan be foundhere.
Render times are formatted as hh:mm:ss and were measured using 144 threads on a machine with fourXeon E7-8890 v3CPUs. The machine is an early/engineering sample from Intel so your results may differ, but massive thanks toIntel for the hardware! Some older renders are shown as well without timing since they wererun on a different machine.
Some more sample renders can be foundhere. I've also used tray_rustfor the past two years atUtah's Teapot Rendering Competition,view my animations for2015and2016. The latter wasmade using the Blender plugin for modeling and contains more complex motion and sequences.
1920x1080, 4096 samples/pixel. Rendering: 00:43:36.45.
1920x1080, 4096 samples/pixel. Rendering: 00:49:33.514.
About
A toy ray tracer in Rust
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.