UV Layouts Properties - anticto/Mutable-Documentation GitHub Wiki

Several nodes in the Mutable graph handle the management of texture UV layouts. See the Texture Layout examples for more information. Additionally, some nodes can also use UV layout blocks to control their operation like the Remove Mesh Blocks modifier node.

Each Mesh Section may have several UV channels used in the materials, usually for texturing. In Mutable you can specify how each of this should be managed.

  • Try to optimize the layout automatically. This is the default.
  • Manually optimize the texture layout blocks. The user will define the texture blocks in the properties of each relevant node.
  • Don't manage the layout and leave the mesh data unmodified. This is necessary if the channel is used for special purposes in the material, or if none the textures sampled with this UVs is managed by Mutable (Pass-through textures).

Layout Properties

These properties appear in the Skeletal Mesh Node and the Table Node for each available layout in each mesh section represented by the nodes.

  • Mesh Section is used to select which of the mesh sections in the node mesh you want to set the properties for. The Mesh section includes the LOD, and the Mesh Section's material name. Additionally, in the Table node it is necessary to select between there may be several meshes in different columns of the table. Meshes in different rows will all have the same texture layout properties.

  • UV Channel each mesh section may have several UV channels, and with this property you can select which one you are editing.

  • Layout Strategy is the main layout setting:

    • Overlay will leave the UV coordinates untouched. When merging mesh sections they will overlap. This is useful if you have planned your assets so that they don't have texture layout conflicts, for instance reserving space for each mesh part that can be swapped. Mutable will not do any texture layout optimization and will not modify the textures that use this channel.
    • Resizable will pack the layout blocks and extend the textures as much as necessary when blocks don't fit in the texture space. This is useful when the contents of the textures using this layout can change a lot. The final textures may be larger or smaller than the source assets.
    • Fixed will also pack the layout blocks and extend the textures but only up to a grid size specified in Max Grid Size (see below). From there on, the texture blocks will be shrunk so that all of them can be packaged. This is useful to ensure a texture budget is not exceeded when assets have not been planned for it.

When using Resizable or Fixed as a strategy, the layout (and so its textures) will be split in blocks. This can be done manually, by creating the blocks in the Layout block editor, automatically following various strategies, or a mix of the two (define some manual blocks and the rest will be split automatically). There are two restrictions:

  • All vertices must be assigned to a block. Otherwise, Mutable wouldn't know what to do with them and would end in random blocks.
  • In UV texture space, faces cannot cross the limits of a block. Otherwise some vertices of a face would move to different places stretching the face across the texture.

Automatic blocks

When using Resizable or Fixed as a strategy, if not all the geometry is assigned to a block manually, the automatic block splitting will be used. This feature will create new blocks in addition to the ones created manually (if any).

  • Automatic Blocks Strategy This is the strategy used to create new blocks.

    • Rectangles : Create blocks using rectangles following the grid resolution. It will split the blocks as much as possible while triangles don't cross the grid boundaries. The result can be adjusting by adjusting the Grid Size property.
    • UV Islands : Create blocks by analyzing the mesh topology and bounding triangle islands in UV space with rectangles following the grid. In addition it will generate texture masks for each island, since they may overlap in the grid. This strategy is more expensive on the CPU side.
  • Automatic Merge Blocks Strategy This is relevant only if UV Islands is selected in the previous property. It controls how the initially generated blocks are merged into bigger blocks:

    • Merge child blocks This option will make sure that if a UV island falls entirely inside the bounding rectangle of another one, it will be merged and will not have its own block.
    • Don't merge No merging will happen once blocks are generated.
  • Consolidate Blocks This button in the layout editor can be used to turn the automatically generated blocks from the preview into manual blocks so further editing of their properties is possible.

Layout Blocks Editor

The Layout Blocks editor widget shows a mesh section UV channel and has the tools necessary to create blocks manually and see previews of the automatically created blocks.

  • Manually created blocks will appear in yellow, and will contain a know to resize them.
  • The currently selected manually created blocks are shown in blue. They also have a context menu with additional properties when right-clicked. See the Advanced Properties section below for more information.
  • Automatically created blocks will appear in grey, and cannot be edited. If they contain a texture mask, it will be shown in red over the masked UV faces.

Blocks can be added and removed with the buttons in the toolbar. They can be selected by right clicking or dragging with the right button to do a rectangle selection.

The view can be zoomed with the mouse wheel, and panned by pressing the middle mouse button. A context menu that appears with right click contains an option to reset the view to the standard unit space 0,0 to 1,1 of the UV layout.

The context button on the selected blocks has options to delete or duplicate them.

Advanced properties

LOD Warning control

When using automatically generated LODs, some algorithms may move the UVs and may place some vertices outside a block from LOD 0 that was correct. For those cases Mutable can automatically move that vertex back into the block, but by default it will generate a warning. This warnings can be supressed with the following options:

  • Ignore Unassigned Vertices Warning : Ignore this error when compiling the asset.
  • First LOD to ignore : Ignore compilation warnings from the specified LOD on. Only relevant if the previous check is toggled.

Block Shrink Priorities

When using the Fixed packing strategy, some texture blocks may need to be shrunk to fit into the texture space. It is possible to specify which blocks to shrink first by setting blocks priorities. This can be done only for manually created blocks in the context menu that appears when they are selected and then right-clicked. The blocks with lower priority will be shrunk first.

Block Masks

For some layout operations it is interesting to specify the faces that should belong to a block by using a texture mask. This texture mask can be specified with the Block Mask option of the context menu of the selected block.