Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Two views of a single point cloud with direct illumination on the box and the two teapots (baked with the PxrDirectLighting integrator).

...

Image Removed

...

Image Removed

...

Image Removed

...


Two This example shows two point clouds with global illumination (baked using the PxrPathTracer integrator): one for the box and one for a teapot.

Image Added

Image Added

Image Added

Box GI point cloudTeapot GI point cloudRender using GI point clouds

Finally, we can render an image using these global illumination point clouds as textures. The
The 3D point clouds can be read in an OSL shader using the texture3d() function.The box faces and the diffuse teapot are rendered using the baked illumination data in the point cloud files. function (For a more cache-friendly 3D texture format, the point clouds can be converted into brick maps using the `brickmake' utility program.)

Multiple outputs, arbitrary output variables, LPEs

Similar to raytrace rendering, \textit{light path expressions} (LPEs) may be used to isolate different components of global illumination while baking. The data that can be baked is very general: if an integrator can splat it, then the illumination baker can write it to a display driver.

For example, the view-independent components of global illumination can be precomputed. As a simple example, here we declare direct diffuse and indirect diffuse outputs:

Code Block
DisplayChannel "color directDiffuse" "string source" ["color lpe:C<RD>[LO]"]
DisplayChannel "color indirectDiffuse" "string source" ["color lpe:C<RD>.+[LO]"]
Display "<identifier:object>DirectDiffuse.tif" "tiff" "directDiffuse"
Display "+<identifier:object>IndirectDiffuse.tif" "tiff" "indirectDiffuse"

Similarly, the albedo user lobe may be rendered with an albedo LPE:


Code Block
Option "lpe" "string user2" ["Albedo,DiffuseAlbedo,SubsurfaceAlbedo,HairAlbedo"]
DisplayChannel "color albedo" "string source" ["color lpe:overwrite;C(U2L)|O"]
Display "+<identifier:object>Albedo.tif" "tiff" "albedo"

The images below shows albedo, direct diffuse, and indirect diffuse for the Cornell box with two spheres.