Texture Baking
Texture baking is a process where scene lighting is baked into a texture map based on an object's UV texture coordinates. The resulting texture can map back onto the surface to create realistic lighting in a real-time rendering environment (figure 1). This technique is often used in game engines and virtual reality for creating realistic environments.
OctaneRender®implements texture baking as a special type of camera known as a Baking Camera. Compared to the Thin Lens and Panoramic cameras, the Baking camera has one position and direction per sample. OctaneRender calculates these based on the input UV geometry and the actual geometry being baked. For each sample, the camera calculates the geometry position and normal, then it generates a ray that points towards it using the same direction as the normal from a distance of the configured kernel’s ray epsilon. Once calculated, OctaneRender traces the ray the same way it would do with other types of camera.
|
|
Texture Baking
|
Figure 1: Lighting is baked onto the Octane logo using a Baking camera
Mesh Requirements For Baking
To use a mesh for texture baking, it needs the following:
- The mesh should contain at least one UV set. Alembic files can contain up to three sets.
- Eliminate any overlapping UVs. Overlapping UVs occur when more than one mesh or mesh component share the same UV texture coordinates. Otherwise, you may find artifacts due to overlapping geometry (figure 2).
|
|
Overlapping UVs
|
Figure 2: Overlapping UVs as shown in Maya's UV editor
The simplest way to start the texture baking process is to create a copy of the scene's Render Target node and switch its camera to a Baking camera.
|
|
Baking Camera Parameters
|
Figure 3: Baking camera parameters
Baking Camera Parameters
Baking Group ID - Specifies the group ID to bake. By default, all objects belong to the default baking group number 1.
UV Set - This determines the UV coordinates to use for baking.
Revert Baking - Flips the camera directions.
Padding
Padding Size - The number of pixels added to the UV map edges. The padding size is specified in pixels. The default padding size is set to 4 pixels, with 0 being the minimum and 16 being the maximum size.
Edge Noise Tolerance - Helps remove hot pixels appearing near the UV edges. Values close to 1 do not remove any hot pixels, while values near 0 attempts to remove them all.
UV Region
Minimum - The coordinates in UV space for the origin of the bounding region for baking.
Size - This is the size in UV space of the bounding region for baking.
Baking Position
Use Baking Position - Uses the position for baking position-dependent artifacts.
Position - This is the camera position for position-dependent artifacts such as reflections.
Backface Culling - This determines whether to bake back-facing geometry.
Baking Tips
- Set the kernel’s Filter size to 1.0 since baking does not need much anti-aliasing.
- Set the Imager response to Linear/Off to disable specific camera response curves.





