I’m in the process of changing the scene a bit to be able to use my own exporter and render with various renderers (from the same Blender scene). The current state of the classroom scene can be seen here (rendered by Indigo):
If you turn the light layer for the sky off, so only the sun is illuminating the scene, the result will look like this:
I modified the latest Blender release a bit so that my local executable dumps a binary file to disk with triangle information while you start rendering with Cycles, Blender’s global illumination renderer. As an exercise to learn the new programming language Rust I parse the binary file and convert the triangle information to the Radiance file format. Right now I don’t deal with materials, but I easily can make some triangles emit light or setup a sun and sky simulation for Radiance:
All I want to talk about in this blog is how that scene can be used to create a falsecolor image via Radiance:
First of all you need kind of a makefile for Radiance, called classroom.rif, which I created by hand:
The first line describes a bounding box for the scene and tells the renderer that it’s an interior scene (via the capitalized I before the x-, y-, and z-dimensions). The classroom.rad file was created via my Rust program. The classroom_gensky.rad file I created via a command line tool called gensky:
The camera view point (-vp), direction (-vd), and horizontal field of view (-vh) can be calculated from the Blender camera.
The first Radiance image (without the falsecolor contour lines) can be rendered with the first two lines of the following command lines:
The rpict line is a modified version of the one found in classroom.sh and basically renames the output file to classroom_irr.unf. But it also specifies one extra parameter -i, which makes Radiance compute irradiance rather than radiance values, as can be found in the documentation. The falsecolor command finally combines the two images (with irradiance and radiance values) into a single HDR (high dynamic range) file, providing a legend via the -l option in a range from 0 to 10000 Lux. The −cl option asks for contour lines, and the −n option can be used to change the number of contour lines.