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. 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 a model using a Baking camera


Mesh Requirements For Baking

To use a Mesh for texture baking, it needs the following:

    1. The Mesh should contain at least one UV set. Alembic files can contain up to three sets.
    2. Eliminate any overlapping UVs. Overlapping UVs occur when more than one pmesh or mesh component share the same UV texture coordinates. Otherwise, you may find artifacts due to overlapping geometry.


Texture Baking



Figure 2: Overlapping UVs as shown in Maya's UV editor


For more information refer to the Baking Camera, fouind under the Octane Camera section. 


You can use render layers, AOVs, imager settings, etc. in the same fashion as other types of cameras, allowing extracting lighting and material information.



Texture Baking AOVs



Figure 3: Any of the Octane AOVs can be baked into textures


Baking Tips

Set your 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. This works correctly if View Transform in Color Management of Blender is set to Raw.