Simple ray tracing & rasterization engine written in rust.
Ray Tracing:
- Rendering quadrics: sphers, cones, cones (with slabs),
- Rendering meshes (passed as .obj files). Also precomputing vertex normals
- Bounding Volumes Hierarchy
- Full camera movement + zoom
- Precomputed mesh normals
- Object rotations
- Parallel execution
- Lambertian/Phong shading
- Gouraud/Phong shading
- Antialiasing via supersampling (via distributed ray tracing)
- Soft shadows (via distributed ray tracing)
- Reflections + glossy reflections (via distributed ray tracing)
- Refraction & attenutation
Rasterization:
- Mesh rasterization
- Object rotation
- Lambertian/Phong shading
- Gouraud/Phong shading
- Texture mapping with stripe effect
- Backface culling
- Full camera movement + zoom
- Simple antialising (via supersampling)
- Clipping
- Camera movement
You need to install Rust on your system and then just type the command:
cargo run --release
The binary file will be located at target/release/rtrs
.
There is also a binary attached which is located at rtrs
(Note: compiled on OS X Catalina 10.15.6).
- tobj to load .obj files
- nannou to open a window and detect key press events, which is an analog of OpenFrameworks for Rust language
- image to save an image
- rayon which provides easy-to-use parallelism for Rust
All experiments are done on MacBook Pro 16' with 2,3 GHz 8-Core Intel Core i9.