This page is currently available only in English


Baking

Table Of Contents


Introduction

Baking allows the rendering of AOVs onto texture maps using a specific UV channel. This can be useful in a variety of scenarios. One of these is "light mapping" where the user renders the diffuse lighting received by a particular object onto a texture and then re-uses the texture during animation rendering instead of having to compute the (potentially slow) diffuse lighting on each frame.


Baking Pros

Baking Cons

The image below shows a simple light-mapped scene containing a couple of objects. Both the teapot and the floor are using a 512x512 baked TotalDiffuseLightingRaw AOV image.


Original scene used to generate the baked lightmap textures. Rendered in 11 seconds.

Modified shader graphs to use the lightmap textures. Rendered in 2 seconds.


The floor's baked 512x512 image. Please note that the image appears darker because it's shown in linear space.


Using Baking

Generating baked images involves a few main steps:

Redshift requires an appropriate UV channel to perform baking. In most 3d apps, there will be an "Automatic UV" or "Unwrap UV" option which will generate an appropriate UV layout for baking. Two important requirements for a baking UV channel is that the UVs should fit in the 0->1 UV range and the different parts of the object should not be overlapping in UV space. The unwrapped UVs generated by most 3d apps already satisfy these criteria.



Creating Bake Sets

Once we have our UV channel, one or more bake sets should be created and configured. Bake sets contain baking settings that can be applied to single object or a group of objects. Each object in the group will get its own baked image.

Finally, Redshift's AOV settings have to be configured to specify which AOVs should be baked as well. For example, if we wanted to bake diffuse lightmaps, we should use the "TotalDiffuseLightingRaw" AOV.


AOV Setup for Baking


Redshift's baking capabilities rely on the AOV system for rendering out the baked images. Setting up the AOVs for baking is identical to setting them up for a render (camera-based) render.
You can find general information on AOVs here and a short AOV tutorial here.

We advise that users set up a separate render pass/layer (depending on their 3d app's capabilities) to configure the AOVs used for baking, as these might differ to the AOVs required by your main render.

When configuring AOVs for baking, the user has to make a choice regarding the baked image filenames. Since all bake sets rely on the global AOV options (which include filenames), how can this work when the scene contains multiple objects? I.e. how do we prevent the baking of all object in the scene from writing to the same image file?

This depends on the 3d app.


Executing Baking


Limitations

The baking system currently doesn't work with the following rendering features:


Using Baking for Lightmapping

Here are a few quick steps to generate baked lightmaps similar to the one shown above: