wahn/rs_pbrt

Rust crate to implement a counterpart to the PBRT book's (3rd edition) C++ code:

Some images of the test scenes are shown below, but you can find more

rs_pbrt

You can find more information about rs_pbrt at https://www.rs-pbrt.org/about ...

Rust crate to implement a counterpart to the PBRT book's (3rd edition) C++ code:

http://www.pbrt.org

Current Rust (development) documentation:

https://www.janwalter.org/doc/rust/rs_pbrt/index.html or https://www.rs-pbrt.org/doc/crates/rs_pbrt/index.html

Usage

Test Scenes

Some images of the test scenes are shown below, but you can find more test scenes on GitLab.

Ganesha Statue

Very detailed scan of a small statue with over 4.3 million triangles, illuminated by a few area light sources.

The scene can be found within the GitLab repository (pbrt_ganesha.tar.gz).

Subsurface Scattering (SSS)

The scene can be found within the GitLab repository (sss_dragon.tar.gz).

Stochastic Progressive Photon Mapping (SPPM)

The scene can be found within the GitLab repository (caustic_glass.tar.gz).

Ecosystem (Cover image for the first edition of the PBRT book)

The scene can be found within the GitLab repository (pbrt_ecosys.tar.gz).

Landscape (Cover image for the third edition of the PBRT book)

Hair

The hair scattering model in action:

The scene can be found within the GitLab repository (pbrt_hair.tar.gz).

Japanes Classroom by NovaZeeke

The scene can be found within the GitLab repository (bitterli_classroom.tar.gz).

The White Room by Jay-Artist

The scene can be found within the GitLab repository (bitterli_living-room-2.tar.gz).

Country Kitchen by Jay-Artist

The scene can be found within the GitLab repository (bitterli_kitchen.tar.gz).

The Wooden Staircase by Wig42

The scene can be found within the GitLab repository (bitterli_staircase.tar.gz).

Conference Room by Anat Grynberg and Greg Ward

The scene can be found within the GitLab repository (radiance_conference_room folder).

Theater by Charles Ehrlich and Greg Ward

The scene can be found within the GitLab repository (radiance_theater folder).

For more information check out the rs-pbrt web page.

License

Licensed under either of

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Issues

Collection of the latest Issues

wahn

wahn

Comment Icon2

It would be useful to be able to specify depth of field (DOF) settings within the Blender scene and use those on the rs-pbrt side. For .pbrt files those should work correctly already, but forparse_blend_file we still need a way how to translate the settings from the Blender UI to camera settings, which can be used for e.g. the struct PerspectiveCamera. Here an example from the Italian Flat scene:

pbrt_dof

In Blender version 2.79 the two settings in questions are shown here:

dof_blend_settings

The depth of field distance can be used as parameter focaldistance directly, but Blender's f-stop value has to be translated somehow to PBRT's lensradius (in this example I used lensradius = 0.0125):

The best solution would be to look into Blender's source code to find a proper translation hint.

wahn

wahn

enhancement
Comment Icon5

On the Blender Cloud there is a project called Attic Close-up (by Gleb Alexandrov). You can download a Blender scene from there. The goal of this issue is to create a similar Blender (version 2.79) scene, which can be used to render directly with parse_blend_file (see examples folder).

Versions

Find the latest versions by id

v0.9.6 - Mar 16, 2022

I released two new versions of my crates last week. The renderer is currently not changing that much anymore. The Windows .msi installer was changed to report the dual licensing correctly (MIT & Apache 2.0), and to contain two executables, one to render .pbrt (v3) files, and one to parse and render Blender's binary .blend files (in theory independent of the Blender version using it's DNA info). Using the crate blend_info not as an executable to inspect a .blend file, but as a crate (like the example mentioned above) is now documented a little more, but I hope to improve the documentation soon, so other people get interested in using blend_info as a crate to cherry pick information they want to re-use in their own code. Examples would be OpenGL or Vulkan viewers of geometry which was modelled within any Blender version ...

v0.9.2 - Jun 04, 2021

Bug fix for the Ganesha Statue scene (see issue #135).

Add some command line options to replace the '--cropwindow' option (of the C++ counterpart):

Information - Updated Jun 26, 2022

Stars: 738
Forks: 53
Issues: 2

Repositories & Extras

A mid-level 2D graphics library for rust

rgx is a 2D graphics library built on top of Vulkan/

A mid-level 2D graphics library for rust

Safe Rust bindings to the Skia Graphics Library

Safe Rust bindings to the

Safe Rust bindings to the Skia Graphics Library

Vulkano Vulkan Graphics API for Rust

Vulkano is a Rust wrapper around Wgpu-rs or the Vulkan graphics GPU API

Vulkano Vulkan Graphics API for Rust

This is a NES (Nintendo Entertainment System) emulator written in Rust using SDL2 for graphics...

This is a NES (Nintendo Entertainment System) emulator written in Rust using SDL2 for graphics and input

This is a NES (Nintendo Entertainment System) emulator written in Rust using SDL2 for graphics...

Nanachi - pure Rust 2D graphics library

NOTE: Nanachi is still buggy and the API will changed!

Nanachi - pure Rust 2D graphics library

chip8 emulator written in rust, using rust-sdl2 for graphics

Fully implemented all 35 original chip8 opcodes

chip8 emulator written in rust, using rust-sdl2 for graphics

Rust 3D graphics library for the browser

A work-in-progress Rust -> WASM 3D graphics library for the browser built on top of WebGL, aimed at making it dead simple to do graphics

Rust 3D graphics library for the browser

Rust Graphics Crates

This is an opinionated list of modern graphics crates in Rust

Rust Graphics Crates

🕊 ɱυɠҽ · むげ

Minimal, Modular, Multiplatform Graphics Enginefor Rust and WebAssembly

🕊 ɱυɠҽ · むげ

A Rust library for rendering SVG Graphics with WASM

This crate provides a fast and effective way to interact with SVG's using WebAssembly

A Rust library for rendering SVG Graphics with WASM

▴ rust-wgpu-triangle

The "Hello world" of graphics programming in Rust + wgpu

▴ rust-wgpu-triangle
Facebook Instagram Twitter GitHub Dribbble
Privacy