rtxon

所属分类:图形图像处理
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2023-07-09 18:36:37
上 传 者sh-1993
说明:  我为娱乐和学习而制作的光线跟踪器。,
(A Raytracer I made for fun and learning.,)

文件列表:
LICENSE (35149, 2022-10-28)
Makefile (341, 2022-10-28)
camera.h (1271, 2022-10-28)
images/ (0, 2022-10-28)
images/render1.png (508102, 2022-10-28)
images/render2.png (610601, 2022-10-28)
main.cpp (4566, 2022-10-28)
ray.h (441, 2022-10-28)
sphere.h (538, 2022-10-28)
vec3.h (3403, 2022-10-28)

# rtxon Yet another Rust raytracer implementation. The goal of this project is to familiarize myself with more intermidiate concepts in Rust such as traits, lifetimes, shared pointers and design patterns as well as learn a bit of Raytracing basics on the side. The source code is my implementation of [Ray Tracing in One Weekend](https://raytracing.github.io/books/RayTracingInOneWeekend.html) by Peter Shirley. ## Features - Basic Materials (Lambertian, Metal, Dielectric, Emmisive) - Shapes (Sphere, Rectangle, Triangle) - Positionable Camera - Anti Aliasing - Depth of Field - Motion Blur - OBJ Import - Cute progress bar when rendering ## Future Features - Proper BHV implementation - ~~Parallelism~~ - GUI progress indicator - ~~OBJ Import~~ - HDR background for global illumination ## Rendering default scene ```bash cargo run --release ``` ## Renders ### 640x360, samples = 128 * 500, depth = 100, f = 0.05, ~22h (Ryzen 5950x) Cornell Box ### 1280x720, samples = 1024, depth = 100, f = 0.05, ~10min (M2 Macbook Pro) Scene 1 ### 640x360, samples = 512, depth = 100, f = 0.05, ~44s (M2 Macbook Pro) ![Scene 1](images/render1.png) ### 640x360, samples = 512, depth = 100, f = 0.2, ~45s (M2 Macbook Pro) ![Scene 2](images/render2.png) ### 640x360, samples = 512, depth = 100, f = 1.0, ~65s (M2 Macbook Pro) ![Scene 3](images/render3.png) ### 640x360, samples = 128, depth = 100, f = 0.05, ~12s (M2 Macbook Pro) ![Scene 4](images/render4.png) ### 640x360, samples = 512, depth = 100, f = 0.1, ~7min (M2 Macbook Pro) ![Scene 5](images/render5.png) ## Command-line Arguments ```bash $ rtxon --help A Raytracer In One Weekend implementation Usage: rtxon [OPTIONS] Options: -s, --scene Scene to render (default Cornell Box) [default: 9] -w, --width Size of the tuple in decimal digits [default: 600] -s, --samples Samples per pixel [default: 128] -m, --max-depth Primorial offset [default: 100] -o, --output-path Desired output location [default: output.png] -t, --threads Threads [default: 1] -c, --chunks Threadpool Chunks [default: 1] -h, --help Print help -V, --version Print version ``` ### Render default scene with 10 threads ```bash $ rtxon --output-path render.png --max-depth 100 --samples 128 --width 600 --threads 10 --chunks 10 ``` ### Render checker scene with 10 threads ```bash $ rtxon --output-path render.png --scene 2 --max-depth 100 --samples 128 --width 600 --threads 10 --chunks 10 ```

近期下载者

相关文件


收藏者