Ray-Tracing-The-Next-Week-With-Rust

所属分类:图形图像处理
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2024-04-11 12:01:47
上 传 者sh-1993
说明:  本项目为一个简单的光线追踪渲染器,参考Ray Tracing: The Next Week,用Rust实现。实现了动态模糊、图片用作纹理、体积渲染、Perlin Noise、四边形、光源、实例。 This project is a simple ray tracing renderer, reference Ray Tracing: The Next Week. Implemented motion blur, images for texture, volume rendering, Perlin Noise, quadrilaterals, lighting, and instances.

文件列表:
src/
Cargo.lock
Cargo.toml
LICENSE
cornel10000.jpg
earthmap.jpg
final_scene.jpg

# Ray Tracing: The Next Week With Rust 本项目为一个简单的光线追踪渲染器,参考[_Ray Tracing: The Next Week_](https://raytracing.github.io/books/RayTracingTheNextWeek.html),用Rust实现。该书为[_Ray Tracing in One Weekend_](https://raytracing.github.io/books/RayTracingInOneWeekend.html) 的下一章。实现了动态模糊、图片用作纹理、体积渲染、Perlin Noise、四边形、光源、实例。你也可以访问上一章节:[Mario-Hero/Ray-Tracing-in-One-Weekend-with-Rust](https://github.com/Mario-Hero/Ray-Tracing-in-One-Weekend-with-Rust)。 This project is a simple ray tracing renderer, reference [_Ray Tracing: The Next Week_](https://raytracing.github.io/books/RayTracingTheNextWeek.html), implement using Rust. The book is the next chapter of [_Ray Tracing in One Weekend_](https://raytracing.github.io/books/RayTracingInOneWeekend.html). Implemented motion blur, images for texture, volume rendering, Perlin Noise, quadrilaterals, lighting, and instances. Also, you are welcomed to visit the previous chapter: [Mario-Hero/Ray-Tracing-in-One-Weekend-with-Rust](https://github.com/Mario-Hero/Ray-Tracing-in-One-Weekend-with-Rust) | | | | :-----------------------------------------: | :------------------------------------------: | | final_scene | cornell_box_scene | ## 依赖 Dependency 1. Rayon: 用于多线程加速渲染 Used for multi-threaded accelerated rendering. 2. nalgebra: 提供Vec3支持 Provide Vec3 support. 3. tokio、indicatif: 实现进度条 Used to implement a progress bar. 4. image:用于导入图像用作纹理 Used for importing images as textures. ## 用法 Usage ` cargo run --release` 运行并等待完成。 Run and wait for completion. 然后打开目录下的`pic.ppm`图片文件即可。Then open the `pic. ppm` image file in the directory. 该图片即为上文的左图,如果需渲染其他项目,可以把`main.rs`第51行 The output picture is the image on the left from the previous context. If you want to render other projects, you can change the line 51 of `main. rs`, ```rust let (world, cam) = final_scene(IMAGE_WIDTH, IMAGE_HEIGHT, CAMERA_SAMPLE, RAY_DEPTH); ``` 中的`final_scene`替换为`scene.rs`文件里的其他scene函数,比如`perlin_scene`、`cornell_box_scene` and make `final_scene` another function in `scene.rs`. Such as `perlin_scene`、`cornell_box_scene` ## License The project is released under MIT License.

近期下载者

相关文件


收藏者