Bake Your Decals into Your Texture Maps
Decals are a way of placing images on your models in a way that is similar to placing stickers on a surface in the real world. You can render or bake your decals into your asset's material or texture maps. One decals are placed on the surface of your asset, the textures contained by your decal can be transferred and baked onto your asset's textures and exported from Modo and applied to your asset in other digital content creation (DCC) packages or game engines.
Note: Before baking your decals, you must have a material containing your decals and a floating decal in your scene. For more information on creating, setting up, and projecting a decal, see Projecting Decals with Planar Decals.
Setting up the Surface Probe
Before baking your decal into your asset’s textures, you must create a surface probe. The surface probe lets you project a texture from a decal onto the surface of an asset so that it can be rendered or baked on the final asset. The surface probe is a Texture item In the Shader tree that allows you to determine the distance between the decal you want to bake and the surface it is baked onto. Once the distance is determined, the surface probe uses probe rays to transfer the texture present on your projected decal onto the surface of your mesh.
Before using the surface probe, you must be working with a scene that contains a target mesh for the decal to be projected onto and a projected decal that has been placed on your mesh.
To use the surface probe:
-
Right-click the material group you want to bake your material onto in the Shader Tree and select Create Surface Probes.
The Create Surface Probes dialog is displayed, and the selected material is assigned as the Target Material Group.
-
Select the Decal Material Group you want to bake down into the target material.
Several setting within the Create Surface Probes dialog can be enabled or disabled when setting up a surface probe.
• Place in Library - Stores all individual effects contributing to your decal in the Library folder. The Library folder is then referenced as a single item in your decal material.
Because decals are often made up of multiple texture layers and effects, this is an easy way to keep your decal material groups organized and easy to manage. If your decal only has one texture layer or effect, or is a relatively simple decal, you may find it useful to uncheck Place in Library and have your texture layers in the same place as your surface probes.
• Update Existing Probes updates any probes already in your scene while creating a new one. If you are creating additional probes and want older probes to be left as they are, uncheck this option.
• Probe Materials applies any changes in the material item within your decal material group, such as changes to your diffuse or specular colors. If you want to ignore the material item within your decal and only transfer textures to the surface of your receiving mesh, disable this option.
• Enable Only Unique Texture Effects if you want to bake effects unique to the decal’s texture effects and not in the receiving material group, such as Stencil or Normal.
-
Click OK to apply the Target Material Group, Decal Material Group, and additional settings.
If Place in Library is enabled, a new surface probe material item is added to the material selected in the Target Material Group parameter. A new folder called Decal Probes also becomes available within the Library folder in the shader tree. The decal Probes folder contains texture layers corresponding to any layer effects within the material set in the Decal Material Group parameter.
Adjust the Surface Probe to Ensure a Clean Bake
For the surface probe to work well and prevent distortion on your decals as they bake, your decal must be close to the surface of your mesh. The Offset of your decal determines how far from the surface of your mesh your decal is sitting. The Probe Ray Max Depth determines how far the Surface Probe has to probe before hitting the surface of your mesh. To do this, you need to adjust the Offset of your decal in the Decal Planar MeshOp, and the Probe Ray Max Depth in the texture layers you want to bake. It is best for the Probe Ray Max Depth to be slightly higher than the offset in the decal planar MeshOp.
Tip: For more information on setting up and projecting decals and the settings in the Decal Planar MeshOp, see Procedurally Project Planar Decals with The Decal Planar MeshOp.
When adjusting your Offset, view your decal in the Preview renderer. Preview render lets you view your decal clearly on the surface of your mesh when it is offset by a low amount.
To start a Preview render, select Render > Open Preview. Alternatively, press F8 on your keyboard.
|
|
Decal with its Offset set to 1 um, viewed in the 3D viewport. |
The same decal, with the same Offset amount, but viewed in the Preview render. |
To adjust the offsets of your decals:
-
In the Items List, select the mesh item containing your Decal Planar MeshOp.
-
With the Mesh Item selected, select the decal planar MeshOp in the Mesh Operations Viewport.
-
In the Properties menu, adjust the MeshOp's Offset parameter in the Decal Planar tab.
If you manually set up your decal, the Decal Planar MeshOp is in the new mesh item created to hold the MeshOp.
For more information on manual decal setup, see Procedurally Project Planar Decals with The Decal Planar MeshOp.
For decals made using the Decals… button, this MeshOp is in the Mesh Item called Decal Mesh in the Decal Folder. For more information on the Decals… button, see Create and Hand Paint Decals With Mesh Paint Replica.
Tip: Mesh items containing a MeshOp are identified via the cog icon in the Item List
As the decal’s Offset is adjusted, the decal moves closer or further away from the surface of your mesh. If the decal is too far away, the decal may become distorted. If the decal is too close to the surface of your mesh, parts of the decal may become occluded.
The Offset amount value should be as low as possible, to allow the decal to sit close to the surface of the mesh and prevent distortion. For example, decals on flat surfaces should have their offset set to a value around 1 mm.
|
|
Decal projected with a high Offset amount. |
Decal projected with a low Offset amount. |
The Offset of your decal is heavily dependent on the geometry it is projected onto. For example, decals that cross a corner or a curved surface may need a lower offset than a decal projected onto a flat plane.
|
|
Decal projected on a corner with an Offset of 5um. |
Decal on a curved surface with an Offset of 2mm. |
Once the decal’s Offset is adjusted, the Probe Ray Max Depth must be adjusted. Probe Ray Max Depth controls how far into the receiving surface the decal needs to be projected.
To adjust the Probe Ray Max Depth of the surface probe:
-
Select the texture effect layers you want to adjust from the decal Probes folder in your Library.
-
Shift click to select multiple texture effect layers.
-
Open the Texture Layers tab in the Properties menu with the texture effect layers selected.
-
Adjust the Probe Ray Max Depth within the Texture Layers tab.
Changes made to the Probe Ray Max Depth with multiple texture effect layers selected are applied to all selected layers.
The value of the Probe Ray Max Depth should be roughly the same as your decal’s Offset value for the best results.
The Probe Ray Max Depth and Offset channels can be connected within Modo’s Schematic viewport, allowing the Decal Planar MeshOp to drive the Probe Ray Max Depth directly.
MeshOps are added to the schematic viewport by dragging the MeshOp from the Mesh Operations Viewport into the Schematic viewport. Specific channels, such as a texture's Probe Ray Max Depth are added to the schematic viewport by middle mouse-dragging a selected channel into the schematic viewport.
Tip: For more information on how to access, use and add nodes to the Schematic Viewport, see Schematic Viewport.
Bake Decals into Texture Maps to Export from Modo
After the surface probe is set up, decals are flattened or baked into the receiving surface’s material. You can then save your textures out of Modo. Baking and exporting textures with decals from Modo allows you to quickly and easily reuse and repurpose your decals in third-party digital content creation packages like Katana without needing to re-project them onto the surface of your mesh.
Decals cannot be baked onto your texture maps without a Surface Probe texture item being present in the receiving material. For more information on how to set up a Surface Probe, see Setting up the Surface Probe.
Note: When baking, make sure your UV Bake Border distance is set properly. For more information on setting your bake order distance, and baking in general, see Baking.
To manually bake your decals:
-
In the Shader Tree, select the material containing the Surface Probe material item, and click the Add Layer button at the top of the shader tree.
The selected material should be the same material assigned to the Target Material parameter when setting up the probe. For more information on how to set up a Surface Probe and marking materials as a target material, see Setting up the Surface Probe.
-
In the Add Layer menu, search for the (new image) Texture Item and select it.
The (new image) Texture Item is also found under Image>New>(new image) in the Add Layer menu.
The image item contains your assigned texture maps and is how the bake is triggered.
-
In the file browser, set a file name, extension, and path to save your image.
Note: Modo sets .tga as your image's file extension by default. Change file extensions by selecting you chosen extension in the Save as type dropdown.
The new image item created has the same name as the file name added to the file browser.
Click Save to save the file and close the file browser.
-
Set a Resolution and Format in the New Still dialog.
Note: Resolution, Format and Colorspace can all be set based on personal preference. There is no set recommendation for Resolution or Format, however it is recommended that Colorspace is left as Default unless custom colorspace configs are being used.
Click OK to close the dialog and create the new image item in the shader tree.
-
Change the Layer Effect of the new image item you created by clicking in the effect column and choosing the layer effect from the menu that opens.
Tip: For more information on different types of Layer Effects and how they look, see Layer Effects.
The texture map baked depends on the layer effect assigned to the image item. For example, set the layer effect to Normal if you want to bake a normal map.
-
Repeat the above steps until all the textures you want to bake are present in your target material.
-
Right-click on the image item you want to bake and click Bake to File.
-
The offline render window opens, and your chosen map is baked.
Modo automatically exports baked maps to the save location specified when the bake was triggered.
Decals can also be baked using the Texture Cache and well as the Bake Item in the shader tree. For more information, see Optimize Your Textures Using the Texture Cache and Working with Bake Items and Baking Tools.