Release Notes for v0.6.1

Intro

Simple Room scene from Radiance book

While rs-pbrt is based on the excellent PBRT book there is a much older book, which in my opinion is still relevant to global illumination and rendering: Rendering with Radiance, by Greg Ward Larson and Rob A. Shakespeare. Have a look at the video on Vimeo to find a more recent introduction to the topic and some history behind it.

One of the motivations behind my rendering research was to take several scenes from that book, and apply them to more modern renderers, just to see how accurate they really are and where potential problems lie. The image above was taken from my slides of a representation I gave at FMX 2014.

The scene is extremly simple, it shows a close-up of a crystal sphere based on a blueish box, which shows in reflections and refractions part of the room where our camera is located. The only sources of light are a light emitting sphere inside the room and a sun & sky (& ground for Radiance) simulation outside the room. The sun light enters the room through a (glass) window behind the camera, falls on the floor and a part of the walls, bounces around and therefore partially illuminates the room. You would be suprised how many problems you would have to simply create a movie with a camera flying in from outside (showing the reflective building outside, creating caustics on the ground), moving closer to the window where the sun light enters the room, and finally closing in to the final image of the crystal sphere. It took ages for other renderers to deal with exposure, tonemapping, high-dynamic range etc. (just to name a few). Sure they produce shiny pictures and they look far more realistic for far more complex scenes using thousands of textures etc. but they still would have real problems with such a simple scene.

So this release focuses mainly on my approach to store such simple scenes in Blender's file format and render them directly with rs-pbrt. In the last release notes and in this blog post I already talked about the history of my rendering research and why I would like to keep those scenes in a freely available format, but also to find methods to render the same scene with as many renderers I can. You still find many scenes in various file formats (or scene description formats) in the download section of my personal web site (and I still update them from time to time).

But lets get back to rs-pbrt and Blender scenes now ...

Blender

Beside the rs_pbrt and parse_ass_file executables there is also one to render Blender scenes. Its called parse_blend_file:

> ./target/release/examples/parse_blend_file --help
pbrt 0.6.1
Jan Walter <jan@janwalter.com>
Parse a Blender scene file and render it.

USAGE:
    parse_blend_file [OPTIONS] <path>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -c, --camera_name <camera_name>    camera name
    -i, --integrator <integrator>      ao, directlighting, path, bdpt, mlt
    -l, --light_scale <light_scale>    global light scaling [default: 1.0]
    -s, --samples <samples>            pixel samples [default: 1]

ARGS:
    <path>    The path to the file to read

Since the last release I added two additional command line options:

  1. You can specify the camera name now, in case the Blender scene contains several cameras. If you do not specify the camera name it defaults to "Camera".

  2. To compensate for a missing exposure control you can apply a global light scale value to the light emitting geometry or other light sources, e.g. image base lighting (IBL) by HDR images.

Here the settings being used for the ouside camera (cam4) which shows the outside reflective building and the effect of an HDR image being used to replace a sun & sky simulation by image based lighting (IBL). The shadow doesn't match other renderers sun & sky simulations exactly, but it more or less goes into the right direction.

> parse_blend_file -c cam4 -s 16 -i directlighting simple_room_v2_79.blend 
parse_blend_file version 0.6.1 [Detected 8 cores]
BLENDER-v279
1180208 bytes read
number of lights = 1281
number of primitives = 10230
integrator = "directlighting" [Direct Lighting]
Rendering with 8 thread(s) ...
1024 / 1024 [=====================================] 100.00 % 1.40/s 
Writing image "pbrt.png" with bounds Bounds2 { p_min: Point2 { x: 0, y: 0 }, p_max: Point2 { x: 500, y: 500 } }

I used Direct Lighting (which does not create caustics) because it creates less noise and renders faster than global illumination algorithms.

cam4 using directlighting

In Radiance the part of the ground disk close to the horizon would not be created by geometry but be rendered by a sun & sky & ground simulation. Most of the other renderers do not provide the ground part and to compensate for that in this scene I scaled the ground disk so it visually goes to the horizon line.

Lets use cam3 for a different perspective:

> parse_blend_file -c cam3 -s 16 -i directlighting simple_room_v2_79.blend
parse_blend_file version 0.6.1 [Detected 8 cores]
BLENDER-v279
1180208 bytes read
number of lights = 1281
number of primitives = 10230
integrator = "directlighting" [Direct Lighting]
Rendering with 8 thread(s) ...
1024 / 1024 [=====================================] 100.00 % 0.95/s
Writing image "pbrt.png" with bounds Bounds2 { p_min: Point2 { x: 0, y: 0 }, p_max: Point2 { x: 500, y: 500 } }

Still using Direct Lighting because the resulting image doesn't really need global illumination (yet).

cam3 using directlighting

Just to show you where the trouble begins and how difficult (noisy) things can get, lets use Bidirectional Path Tracing (BDPT) for cam2:

> parse_blend_file -c cam2 -l 5.0 -s 128 -i path simple_room_v2_79.blend
parse_blend_file version 0.6.1 [Detected 8 cores]
BLENDER-v279
1180208 bytes read
number of lights = 1281
number of primitives = 10230
integrator = "path" [(Unidirectional) Path Tracing]
Rendering with 8 thread(s) ...
1024 / 1024 [=====================================] 100.00 % 8.19/s 
Writing image "pbrt.png" with bounds Bounds2 { p_min: Point2 { x: 0, y: 0 }, p_max: Point2 { x: 500, y: 500 } }

Here the results for rs-pbrt (left) and Radiance (right) side by side:

cam2 using uni-directional path tracing

If we would have used Direct Lighting with rs-pbrt the result wouldn't be that noisy and more similar to the Radiance image, but most other renderers do not allow to switch easily between different rendering algorithms and most global illumination renderers would have serious problems with a bright sun light, reflections on a glass window, and an interior view with bouncing light from outside and some interior lighting. Also exposure settings for the camera and tonemapping come normally into play here.

> parse_blend_file -c cam1 -l 20.0 -s 128 -i bdpt simple_room_v2_79.blend
parse_blend_file version 0.6.1 [Detected 8 cores]
BLENDER-v279
1180208 bytes read
number of lights = 1281
number of primitives = 10230
integrator = "bdpt" [Bidirectional Path Tracing (BDPT)]
Rendering with 8 thread(s) ...
1024 / 1024 [=====================================] 100.00 % 2.27/s 
Writing image "pbrt.png" with bounds Bounds2 { p_min: Point2 { x: 0, y: 0 }, p_max: Point2 { x: 500, y: 500 } }

cam1 using bi-directional path tracing

Other Scenes

Currently there are a lot of assumptions being used about the Blender scene and not every Blender scene you download from the Internet renders with rs-pbrt or parse_blend_file, but I started adding features I need and tested with at least those three scenes you can download from here:

Current list of tested Blender scenes

The Cornell Box you know already from Getting Started. Here is the Cafe Scene:

Cafe Scene

And the Simple Room I talked about already above.

The End

I hope I didn't forget anything important. Have fun and enjoy the v0.6.1 release.