Baking allows users to pre-compute or "bake" pattern networks into 2D texture images or 3D point clouds. Baking has several advantages:
- Reduce render times be eliminating run-time computation of expensive pattern networks. These savings can be realized across many frames.
- Look development asset publishing as part of a shading pipeline.
- Lock procedural pattern information from a reference position without using Pref
- Transfer assets between renderers, real-time viewports, and 3D printing.
Baking is exposed in RenderMan via pass-through pattern plug-ins that allow users to both render and bake from the same scenes. Without heavy modification of assets or scenes, users are able to:
- Use previously baked results, if they exist, or
- Read the pattern network instead of the baked results. This can happen for any reason but typically will because the baked results do not exist or a user wishes to ignore the baked result in order to tweak the pattern network.
Baking itself is enabled by using the bake hider.
2D baking allows users to bake pattern signals to texture images. Users can bake directly to txmake (.tex), TIFF (.tif), and OpenEXR (.exr) outputs. 2D baking requires users to supply a well formed texture manifold, meaning there should be user created UVs laid out appropriately for their needs. While the most common texture manifold is ST, arbitrary manifolds are supported. Atlas outputs such as UDIM are supported.
RenderMan provides a generic texture baking pattern, PxrBakeTexture
Baking behavior with an overlapping texture manifold is undefined.
Point Cloud Baking
RenderMan provides a generic point cloud baking pattern, PxrBakePointCloud. This can be used to generate Ptex images.
Baking can be set up in the render properties
, under the Baking panel.
This will start a single frame bake render. If you want to do multiple frames, or want to do a batch render, use the External Bake Render button (see Batch Rendering in Blender)
Choose between Pattern, Illumination, or All. For Pattern, this requires either a PxrBakeTexture or PxrBakePointCloud somewhere in your object's material shader network. For Illumination, each of your AOVs will be baked into a pointcloud (.ptc) file or a 2D texture file. Selecting All will bake both patterns and illumination.
Baking Illumination Mode
When baking illumination, 2D will bake to a 2D texture, 3D will bake to 3D pointcloud file (.ptc).
When doing 3D baking, this determines the density of the point cloud. Lower numbers will create denser point cloud files.
If 2D baking, determines the resolution for the 2D texture to write.
When doing illumination baking, this control filename pattern that should be used. Global will bake all objects into one file. Identifier will bake a file per object and use the object's name for the filename. Filename Attribute will use whatever is set on the object's filename attribute in the Baking panel (see the object properties
Primvar S/Primvar T
For 2D baking, you can use a different UV set by setting the name of the primitive variable RenderMan should for use for u and v.
Whether or not RenderMan should invert the value in the T direction texture coordination.