Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A toy ray tracer in Rust

License

NotificationsYou must be signed in to change notification settings

Twinklebear/tray_rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Build Status

Running

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.

Building Your Own Scenes

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

Documentation can be found on theproject site.

TODO

Sample Renders

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.

Model gallery

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

Rust Logo with friends, disk

1920x1080, 4096 samples/pixel. Rendering: 00:49:33.514.

About

A toy ray tracer in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp