Scene > Bake Light and Shadows
Use the Bake Light and Shadows module to set parameters for direct and indirect illumination, subdividing polygon meshes, and calculating ambient occlusion. This can improve the visual quality of OpenGL and raytracing precomputed renders.
Use baked lightmaps for storing a static rendered image of lighting that won't change. To edit the UV sets for a lightmap, use the UV Editor.
Another way to access the Bake Light and Shadows module is to right-click the empty space next to the Quick Access Bar and select it from the list.
The Bake Light and Shadows module has a menu bar, two tabs (Bake Settings and Advanced), and an icon bar at the bottom for quick access to commonly used tools.
This menu contains options for loading, saving, and updating paths locations for lightmaps. Triplanar & Layout
Loads all lightmaps without a bake calculation.
Using File > Load Lightmaps, select all files to load. The following is the behavior to expect:
If loading lightmaps via the Advanced GUI, it saves or loads the lightmaps via its controls. There is no removal of connected lightmaps or name updates.
Saves all lightmaps used either to the scene file or an external location (if Save Texture As External Reference is enabled).
Saved lightmaps will be named as follows:
_Lightmap
for the base illumination._SeparateLightmap
for the separate illumination. If there are future multiples of a separate lightmap, the name could be extended by a number like _Separate2Lightmap
.If files already exist at the export location with lightmaps of the same name:
The file name of the exported exr file depends on the name of the lightmap(s).
For an initial baking with activated Save Texture As External Reference, new lightmap names are generated, which leads to unique file names within the export location.
Torus_Lightmap3.exr
exists, so Torus_SeparateLightmap3.exr
would be generated).Saving via the File menu or creating additional bakings with existing external references provides the option to choose overwrite, make files unique, or cancel.
Saving via the File menu does not enable Use External Texture Reference.
Opens a set folder and looks for file names matching the lightmap names. If a file cannot be found, the Repath dialog appears for locating the file. The following is the behavior to expect:
If you have a missing non-inlined texture (you see a pink and black checkboard texture) and know where the missing file is located on disk, load the file, using the Bake Light and Shadows module > Advanced tab > Lightmap section > Texture controls. If many of the lightmap files are now in a different folder, try repathing these lightmaps all at once (if the new ones are all in the same folder), by selecting the geometries with the missing lightmaps, then in the Bake Light and Shadows module, select File menu > Repath Lightmaps.
Opens the Lightmap Statistics dialog, providing stats on the number of nodes and total texture memory used by all nodes, as well as for only the selected nodes. Use this to get an overview of the texture memory size, as large numbers of baked lightmaps can negatively impact the performance of your scene.
This menu contains options for selecting specific groups of nodes in the Scene Graph. Use these to help identify nodes that have or have not been baked, have an active or non-active bake type, and/or align with the selected bake type.
Selects all nodes that have either a vertex or texture bake, regardless of the active bake type.
Selects all nodes without a vertex or texture bake.
Selects all nodes of the selected bake type missing a bake, as well as unbaked nodes with Active Bake set to None. Use this to save time by only performing calculations on these nodes, instead of including nodes with a bake. Hidden nodes are not respected.
The Calculate Missing button selects the same content; however, doesn't display it in the viewport.
Selects all nodes with an existing texture bake, regardless of what is set as the active bake type.
Selects all nodes with an existing vertex bake, regardless of what is set as the active bake type.
Selects all nodes with both an existing texture and vertex bake, regardless of what is set as the active bake type.
Selects all nodes with a texture bake set as the active bake type.
Selects all nodes with a vertex bake set as the active bake type.
This menu contains options for loading and saving lightmaps, as well as saving, editing, accessing bake presets.
Loads the lights and shadows from the selected node.
Saves the current lights and shadows.
Creates a new preset, once changes are made to an existing one. The new preset appears at the bottom of the preset list with (Vertex) or (Texture) appended to its name. For example, if the current bake type is set to Texture and the preset is named, Bumper, it will appear as Bumper (Texture) in the Settings and Save Preset lists.
Opens the Edit Presets dialog for activating, renaming, or deleting a preset. Right-click for these options. Activating a preset applies the bake light and shadows settings of that preset to the selected nodes.
Provides a list of presets for setting the indirect illumination quality level.
This can also be set using the Indirect Illumination Quality option.
The new preset appears at the bottom of the preset list with (Vertex) or (Texture) appended to its name. In the case, Medium Quality (Vertex)
, the preset would have a vertex bake type.
The Bake Settings tab contains parameters for configuring direct and indirect illumination, subdivisions, lightmap behavior, lightmap UV generation, as well as setting the bake type and finally calculating the bake.
Sets the type of baking performed. Choose whether the bake results are stored as a color for each vertex of the geometry or in a texture (called a lightmap) that's mapped onto the geometry with lightmap UVs. Both of these support the baking of ambient occlusion, shadows, and direct/indirect illumination; however; there are some differences.
Vertex - Use vertex for solid objects, finely already tessellated objects, or ones with adequate subdivisions, that need shadows for the environment, a simple baked lighting setup, or a neutral look. An advantage of the vertex bake type is shadows are very fast to calculate and no manual reworking is required. See Vertex Baking for more information.
Texture - Use texture with simple geometry for good, high-quality shadows and lightmaps, especially when baked for real-time scenes, while needing to keep the poly count low, but visual quality high. Think construction/manufacturing data and architecture with many planar surfaces. Use it to bake more complex lighting effects, such as reflections or caustics from nearby glass or specular materials. Just ensure Hide Transparent Objects is disabled, so these objects will then be visible during baking.
Lightmap UVs are needed, so for complex or important objects in direct view, we recommend manually unwrapping UVs. To edit the UV sets for a lightmap, use the UV Editor.
One other advantage is that with texture bake type shadow maps, clones or reference objects can have different lightmaps. See Texture Baking for more information.
An XML file, BakePresets
, is generated and used to store vertex and texture bake shadow presets. This hleps to avoid issues when adding or deleting presets.
BakePresets
file removes all non-default presets fron the preset list on your next launch.BakePresets
files doesn't exist in C:\Users\User\AppData\Roaming\VREDPro
, VRED will generate one.BakePresets
is made and then is used to overwrite the original in the folder, the presets in the copy are used by VRED and replace the ones in the preset list. Only available for the Texture Bake Type.
Sets the type of raytracing used. Select CPU or GPU Raytracing. To better understand the differences and choose the best type of raytracing for your needs, check out GPU vs. CPU Raytracing.
Only available for the Texture Bake Type.
Hides glass and other transparent objects while baking, so they don't cast shadows or contribute to indirect illumination, when enabled. The shadow plane will not be hidden.
To bake complex lighting effects, such as reflections or caustics from nearby glass or specular materials, ensure this is disabled, making these objects visible during baking.
Enables an extra calculation of direct light bounces, which increases the quality of the final result. Think of a spot light illuminating a performer on stage. Only the light source's contribution is used to calculate the light contribution to any given illuminated point.
Set the type of direct illumination you want baked. Choose from:
This default setting creates common ambient occlusion shadows. This is independent of light direction and takes the mutual occlusion of visible geometry into account. Ambient occlusion is calculated based on distance (mix/max).
These additional options appear when Ambient Occlusion is selected: Weighting, Minimum Distance, and Maximum Distance.
Creates shadows by considering the lighting information from the environment and any light sources listed in the Light Editor.
If there is noise in your shadow baking, a higher sample count can correct this.
In addition to the baked shadows, lights are also baked. What is meant by lights is the direct illumination from any active light source, such as a spot light, point light, etc., including the environment. The baked illumination replaces the diffuse real-time precomputed environment lighting after baking. The shadows darken glossy and specular reflections from the real-time precomputed environment lighting in OpenGL and in the Precomputed and Precomputed + Reflections raytracing modes. Later changes to geometry objects, for example, through transformation, do not influence the displayed baked light and shadows.
As of version 2022.1, Enable Separate Illumination is not available when Light and Shadows is selected.
Go a step further and enable Indirect illumination (Indirect Illumination > Enable) to add any indirect illumination. Use the Visualization menu options, Ambient Occlusion Rendering for shadows and Precomputed Illumination Rendering for lights, to display the pure data stored in the textures or vertices.
VRED bakes light from the specified light source into a separate lightmap. Bake a specific lighting setup or many indirections from the environment to lighten a scene, along with additional separated lights that can be toggled on and off afterwards. This option shows the correct baking of ambient occlusion/shadows and environment lighting for base illumination and separate direct/optional indirect illumination for separate illumination, when this option and the light source's Bake as Separate Illumination option or geometry light source's option are enabled.
When this option is enabled, the following happens:
When is option is disabled, all active lights are baked, regardless of whether they have Bake as Separate Illumination enabled or disabled.
Sets the number of image samples used to define the direct shadow quality. Six presets are available, as well as a custom quality setting:
Only available with Ambient Occlusion selected.
Sets the weighting of the samples while calculating ambient occlusion for both vertex and texture baking. Use this to improve your shadows. Select one of the following:
Uniform - This is the original setting for calculating weighting in VRED 2021.3 and before. All samples while baking are equally weighted.
Cosine - Provides a more realistic real-life result than uniform weighting. Shadows might have more depth and contrast by giving samples in the direction of the surface normals a higher weight.
Only available with Ambient Occlusion selected.
Sets the minimum distance of objects to be considered for the Ambient Occlusion calculation. This value defines black areas, where full occlusion takes place.
Only available with Ambient Occlusion selected.
Sets the maximum distance of objects to be considered for the Ambient Occlusion calculation. This value defines white areas, where no occlusion takes place. This value can also be seen as the maximum expansion of the virtual hemisphere.
Only available for the Vertex Bake Type.
Deletes the Ambient Occlusion calculation of the whole scene.
Only available for the Vertex Bake Type.
Deletes the Ambient Occlusion on selected geometry.
The total calculation time depends on the complexity of the scene and chosen shadow quality preset.
Enables an extra calculation of indirect light bounces, which increases the quality of the final result.
Enables/disables the indirect illumination mode. When enabled, extra calculations of indirect light bounces are preformed, which increases the quality of the final result, but increases calculation time.
To see the differences between vertex and texture baking for indirect lights, refer to the following table.
Available only for the Texture Bake Type with Enable Separate Illumination enabled.
Provides indirect illumination only for the separate illumination and omits the base illumination from baking, increasing the brightness of the scene. If you don't need increased brightness, disable this.
Only available for the Vertex Bake Type.
Sets the quality of indirection. The higher the values, the better the results.
The number of indirections defines the number of calculated light bounces. The default value is one, so only one light bounce is calculated.
Higher values produce better quality, but increase calculation time.
Enables the transfer of color between nearby surfaces, caused by the colored reflection of the indirect illumination option. Color bleeding causes a white wall close to a red wall to appear pink because it receives red light from the red wall. When disabled, the illumination color is stored as greyscale.
Overrides all non-transparent objects with a chosen flat diffuse material color for indirect illumination calculation.
Displacement textures are not respected when this option is enabled. Baking displacements is only possible with texture baking.
Sets the color used for the indirect illumination when Override Material is enabled.
Only available for the Vertex Bake Type.
Deletes the indirect illumination calculation of the whole scene.
Only available for the Vertex Bake Type.
Deletes the indirect illumination on the selected geometry.
Only available for the Texture Bake Type.
This section contains options for sharing lightmaps for clones, saving textures externally, using a denoiser, and setting for resolution and edge dilation.
Shares lightmaps for clones in a scene, when enabled. Disable to calculate different lightmaps for clones of the same geometry in the scene, before calculating. With vertex baking, geometries that are clones have the same bake result. With texture baking, these geometry clones can have different lightmaps.
This is the expected behavior for clones with smart references:
Nodes in different file references cannot be clones - A node in file reference a.vpb
cannot be a clone of a node in reference b.vpb
. Since each file is stored separately, each belongs to the file-respective reference. A node within a file reference can also not be a clone of a node in the regular scene. In these cases, a copy of the node is required. Within the same file references, there are no limitations for clones.
All "instances" of a file reference need to be cloned - When reference a.vpb
is used multiple times, all a.vpb
are clones. This also means all children of each a.vpb
instance are clones of all other a.vpb
children.
Lighmaps can be different on clones - When having two clones of a box in the scene, you can calculate different lightmaps for these clones. Just uncheck Share Lightmaps For Clones, before calculating the lightmap.
If you have shared lightmaps between multiple clones and are unsatisfied with the result on some clones, it is possible to recalculate the lightmaps for the unsatisfactory ones and share the new ones between them. Concerning the clone nodes, the clones still remain clones, even with different lightmaps attached.
Clones across instances of the same file reference cannot have different lightmaps - A box is used in a.vpb
file reference and the file reference is used twice in the scene. You cannot calculate different lightmaps for the box, since the file only exists once and is only written once. Therefore, the box is only stored once.
You want different lightmaps on clones across instances of the same file reference - Manually change the scene to do this. In most cases, this would mean removing the file references and replacing them with normal group nodes.
Enables the storing of all lightmaps and all baked textures in an external file location (non-inlined). Use the Location option to set where they will be stored.
For saving textures non-inlined for specific lightmaps, bake the lightmaps with Save Texture as External Reference activated. Those lightmaps will be saved non-inlined in the vpb, even if the Preference option, Use Inline Textures, is enabled.
Use this option for creating variants for certain geometry. When unchecked, lightmaps and baked textures are saved into the scene file (inlined).
Displays the location where the lightmap textures are saved. Click to open a browser and save the lightmap textures in a designated location.
Deletes all lightmap textures from all selected objects.
Deletes all lightmap textures from all visible selected objects.
Reduces noise in the final lightmap texture, using either a GPU or CPU denoiser.
VRED will use GPU denoising, if there is a GPU graphics card; otherwise, calculations are done on the CPU.
Uses previously calculated lightmap resolutions, if valid lightmaps already exists; otherwise, the resolution is calculated based on the current settings.
When nodes have different lightmap resolution settings, their resolutions are preserved, instead of overwritten. Anything without existing settings will have then calculated, using the current settings.
If you want the resolution recalculated for everything, disable this. Any lightmaps that had different resolutions will be changed and might look different.
Defines the resolution used as either Static or Dynamic.
Static - Uses the specified resolution for all generated lighmap textures.
Dynamic - Uses the minimum and maximum resolution settings for each texture, which depends on the chosen pixel density, geometry size, and UV space. This is the most commonly used option; however, it requires more rendering time and resources.
Sets the number of pixels per meter for the lightmap texture. The lightmap resolution will be calculated, using this value. Therefore, smaller objects will have a lower density and smaller resolution than larger ones.
Things, such as faces, may need a higher pixel density, due to the amount of detail. Objects out of view can have a lower density. This tool is essential for game development and film production.
Prevents seams that can occur when a lightmap has low edge dilation. this means no unintended edges of color from the background around the texture. By increasing the edge dilation of the outermost pixel (ensuring sufficient rays), this eliminates the seam (border). Therefore, there are valid pixels at the borders, which fit.
The resolution of the lightmap can also play a roll in a seam appearing. To improve this further, increase the resolution of the lightmap, using Maximum Resolution, then pressing Calculate All.
Only available for the Texture Bake Type.
This section sets the method used for UV generation and provides the option for using existing UV sets.
Use this first time you bake new geometry without lightmap UVs. It automatically generate s UVs. Just select the method used for generating the lightmap UV Sets before the baking process, if Use Existing Lightmap UV Set is unchecked or the geometry has no lightmap UVs. Select one of the following:
Triplanar & Layout - Generates the lightmap UV Sets using the Triplanar function from the UV Editor. With triplanar mapping, there is a blend zone where the projections overlap on the surface. If this does not give the desired result, try the Unfold & Layout option.
The created UV texture coordinates are then laid out as per the current Layout settings, with the exception of the Island and Tile Padding, as these are controlled by Edge Dilation.
The Fewer Islands option in the UV Editor is automatically enabled when Triplanar & Layout is selected, to reduce the number of islands for a UV layout.
Unfold & Layout - Generates the lightmap UV Sets using the Unfold & Layout function from the UV Editor. This tries to flatten the surface in UV space. This can only succeed if the surface is not a closed object or has been cut beforehand; otherwise, try the Triplanar & Layout option.
The created UV texture coordinates are then laid out as per the current Layout settings, with the exception of the Island and Tile Padding, as these are controlled by Edge Dilation.
Use if your geometry already has lightmap UVs and you want the existing lightmap UV layout reused. When enabled, it will use the previously created UV set. This is the default state, since most people want to use the existing lightmap UVs.
When disabled, any existing calculations are lost and cannot be retrieved. New lightmap UV set creations replace the existing one, which could result in layout and bake results that differ from the previous ones.
Only available for the Vertex Bake Type.
Use these settings to subdivide the mesh for polygons that cannot be retessellated, but have shadow results that need improvement.
Enables/disables the subdivision mode. When enabled, the Quality, Minimum Edge Length, and Intensity Threshold options become available.
Causes geometries to be refined during the ambient occlusion calculation process, when the Enable subdivision check box is checked. Extra vertices are inserted into the meshes to try and get smoother results on the geometry. Three presets are available:
Defines the threshold of the subdivision. If the length of an edge between two vertices is below the defined value, it is not subdivided and no additional vertices are added.
Sets the threshold of intensity values of two vertices, to force a subdivision of the triangle edge.
Enabling this feature increases calculation time and the polygon count of the scene.
Use these buttons at the bottom of the Bake Settings tab to create a bake calculation. Press the button that best fits your needs.
Calculates ambient occlusion, shadows, or light and shadows for all visible and selected nodes in the Scene Graph hierarchy without baking or baking of the selected bake type. When complete, the viewport will update to display the baked lights and shadows. Use this to select nodes more automatically, instead of searching for and selecting them one at a time.
Calculates ambient occlusion, shadows, or lights and shadows for all visible and selected nodes in the Scene Graph hierarchy. Geometry with existing baking of the selected bake type are recalculated. When complete, the viewport will update to display the baked lights and shadows.
The Advanced tab contains an overview of settings used for baking and shows what can be seen in the viewport, such as the light baking textures.
To see the light baking textures directly on the model, from the Visualization menu, select Precomputed Illumination Rendering.
Displays the bake properties and states for the selected nodes.
Changing the Select option or manually selecting something else, changes the content listed in this section.
Displays the name of the selected node. If multiple are selected, the name is highlighted in yellow, indicating the name differs among the selected nodes.
Displays the current bake state of the selected node. There are three states that can be set:
None
Valid
Cleared
For Vertex Bake, vertex baking was cleared, since the Clear All button was pressed. The last used baking calculation settings can still be reloaded.
For Texture Bake, the lightmap was cleared, since the Clear All button was pressed. The last used baking calculation settings can still be reloaded.
What makes None different from Cleared, is that there was never something baked on that node and, therefore, no Bake Settings are available to display.
Sets the active type of baking (vertex or texture) which is rendered in the viewport. Select None to toggle baked light and shadows off.
Another way to set the active bake type is to right-click within the Scene Graph to access the context menu, select Edit > Baked Light and Shadows, then choose Use No Bake, Use Vertex Bake, or Use Texture Bake.
Only available for nodes where texture bake calculations were performed.
This section displays the shadow and illumination maps for the geometry selected in the viewport.
The Properties section cannot display multiple lightmaps. Therefore, you must select one thing at a time to preview the textures. To select another image file, click the Open icon , select another image, then Open. The new texture is loaded into the Lightmap section. Be aware that the UV layout must be identical to the new loaded texture and Lightmap UV set to achieve the correct results.
If you are expecting to see a lightmap and there is none, ensure the texture and/or vertex bake have a Valid state in properties and that Active Bake is not set to None.
Provides an auto-generated name for the lightmap of the selected node. Notice that the name is a combination of the node name followed by _Lightmap
and followed by _
numeration, if several lightmaps were baked on nodes with the same name. This name is used when saving the lightmap as an external reference.
If you see a yellow highlighted field, this indicates that multiple nodes are selected with different names.
Use when you've renamed a node after baking and want VRED to generate a new name with a new calculation that matches the renamed node. This will make it easier for the artist to identify which lightmap is assigned to which node.
Provides controls for loading, refreshing, and deleteing base and separate lightmap image, as well as they're location.
To load the texture image from a file, click .
To save the texture image to a file, click .
To reload the texture image, click .
If you have a missing non-inlined texture (you see a pink and black checkboard texture) and know where the missing file is located on disk, load the file, using these texture control, then try repathing the lightmaps.
To delete the texture image, click .
Stores the texture outside VRED in an external location when saving the file. The image data is then not stored within the project file.
If the referenced texture file cannot be found when saving the project, the texture will be included in the project file. You need to save a currently inlined texture, first, using File > Save Lightmaps to a folder outside VRED to set up a referenced file location.
Provides the dimensions of the lightmap.
Shadow - Shows a preview of the shadow lightmap for the baked texture.
Base Illumination - Shows a lightmap for the baked texture that captures all illumination from the real-time environment (base).
Separate Illumination - Shows a lightmap for the baked texture that captures the illumination from everything baked separately, using Enable Separate Illumination and Bake Separate Illumination.
Provides an overview of the settings used for baking the selected object (parameters from the Bake Settings tab). Find the mode set, whether indirect illumination, color bleeding, material override, and subdivisions are enabled, the number of indirections, the quality settings for direct and indirect quality, and much more.
These are a part of the same settings seen in the Bake Settings tab, if you select the Settings menu, then Load from Node.
A quick way to access this tool is to use , found in the Icon Bar.
This contains three tools that apply to both vertex and texture baking:
Loads the bake setting from the selected node. It is a shortcut for Load from Node.
Clears all the active bake type data for the currently selected node hierarchies in the Scene Graph.
Selects all geometries of the selected Scene Graph hierarchy (or whole scene if nothing selected) without any baking or baking for the selected bake type.