Performances and optimizations




Baking textures can be a very computationally intensive task and can take a long time depending on several factors. You will find on this page some information that may help to speed up this process.

Triangulation

The bakers work internally with triangulated meshes; if the 3D models (low and high poly) are not triangulated, the bakers will triangulate the meshes themselves. This process can take a long time and will increase linearly in relation to the amount of polygons contained in the model. It is generally advised to triangulate the meshes (especially the high poly mesh) in order to avoid this process occurring during baking.

If your workflow is based on FBX, you can triangulate the mesh at export time using an option in the DCC application.

Difference Between 'regular' and 'from mesh' Bakers

Depending on the map the bakers use various implementations.

Generally speaking, the 'from mesh' bakers rely on ray tracing techniques to extract and project data from one model to another, and will mainly use the CPU. In this case a higher amount of CPU cores will decrease the baking time.


MapOpenGLCPU RaytracingDXR or Optix (GPU) Raytracing
Ambient occlusionx

Ambient occlusion from mesh
xx
Bent normals map from mesh
xx
Color map from mesh
x
Convert UV to SVGx

Curvaturex

Curvature map from mesh
x
Height map from mesh
x
Normal map from mesh
x
Opacity map from mesh
x
Positionx

Position map from mesh
x
Thickness map from mesh
xx
Transferred texture from mesh
x
World space directionsx

World space normalsx


DXR

In Designer 2018.3 we have introduced the DXR library, allowing the use of specific hardware to accelerate ray tracing. Currently, three bakers take advantage of this technology - the bakers in which many rays are cast per pixel. We have noticed that this increases speed by a factor of 25, or more.

As of today, the DXR technology is only supported by Nvidia on the RTX and Titan V GPUs.

The DXR-accelerated ray tracing will automatically be enabled if the system follows these requirements:

  • A compatible GPU is installed (Geforce RTX or Titan V)
  • GPU drivers are up to date
  • Windows 10 'Fall Creator' / October update (ver 1809) is installed

    Check your Windows 10 version

    To check if this update is installed on your system, click on the start menu, type 'winver' and hit the return key.


Disable DXR

In case you are running into issues with DXR, you can disable this feature (and fall back to CPU ray tracing) using the "--nodxr" command in the Substance Designer shortcut.

Geometry Cache

The bakers in Substance Designer use a geometry cache (for the high poly model) after a first bake has been executed. The cache will be kept in memory as long as the baker window is open, and the high poly model has not been changed.

Closing the baker window will clear the cache, and opening the baker window again will require the model to be reloaded in memory.

Anti-Aliasing

The bakers can use super sampling to perform anti-aliasing. Supersampling means the bakers will cast more rays per pixel in order to smooth the result. The baking time can be dramatically affected by this setting; this is particularly true for bakers where lots of rays are required, such as the ambient occlusion from mesh baker.

As an example:

  • an AA setting of 2x2 means the baker will cast 4 times the initial amount of rays. For a 2048*2048 px texture, the resulting computation is equivalent to baking a 4096*4096px texture and should take around 4 times more time to compute.
  • an AA setting of 8x8 means the baker will cast 64 times the initial amount of rays. For a 2048*2048 px texture, the resulting computation time is equivalent to baking a 16384*16384px texture and should take around 64 times more time to compute.

Taking these numbers into consideration, the 8x8 setting should be used with care.

In order to reduce the noise presence, it is generally advised to increase the number of secondary rays (for the ambient occlusion, thickness and bent normals bakers) and keep a 2x2 or 4x4 AA setting rather than using a low amount of secondary rays and a high AA setting.

Advice

A good performance/quality setting for ambient occlusion from mesh is to use AA 2x2 and at least 128 secondary rays.

File Format

Exporting files on disk can take a significant amount of time depending on the file format, resolution, bitdepth and compression settings. Compression settings can be modified in the Preferences / Projects / General / File Format options. Disabling compression can decrease the export time at the expanse of larger files.

Crashes and TDR

Crashes can be caused by multiple factors, one of them being the TDR (Timeout Detection Recovery). The TDR is a Windows mechanism built to detect and recover from situations where the GPU seems to be not responding. Because of a low default value for the TDR delay detection, crashes can be experienced when using specific bakers in some situations:

  • when baking dense meshes with the Ambient Occlusion baker
  • when using the DXR accelerated bakers with very dense high poly meshes (more than 60 Million triangles)

You can find additional information about the TDR and a step by step guide to how you can modify its associated settings here: GPU drivers crash with long computations