I’m attempting to reduce the number of material slots present on my final SKM output. My setup is such that each individual mesh part uses a very simple UV strategy, so a single texture can be used for everything. A few of the things I’ve tried so far:
- If each of my input parts creates its own Mesh Section, then I end up with a large number material slots, which is a lot of draw calls. Not great, and completely unnecessary in my case.
- If I use the Extend Mesh Section modifier node, that does appear to reduce the number of material slots, but then for some reason, the output texture appears to be extended (it is made larger and larger as I add more mesh section modifiers). I can’t seem to modulate that behavior.
- Moreover, modifiers do not compose well. So there is really no way for me to change my current pipeline in the CO to move away from skeletal mesh switches. There is simply no alternative. I need to be able to preserve my switches, while still being able to merge the mesh sections so that my final output has only a single material slot.
- I’ve also attempted to use an Edit Mesh Node (with the same tagging and such), passing in the same reference material, setting my texture override, etc, etc. To no avail.
Is there a different way I should be approaching this? A different way to keep the number of mesh sections low, or another way to force a single output mesh section so that there will only be 1 material slot?
An important note is that my graph has a single SkeletalMeshComponent, because I need a single output SKM (done, that is working just fine).
I’ve also tried setting the layout to Overlay mode for the skeletal meshes I’m adding to the graph, which causes the following error to appear in the console:
```
A layout block goes across different texture tiles. This is not supported yet.
```
Perhaps this pattern I am attempting to use is just not yet supported?
Hey @Doddzilla0
From what you described with the texture expanding when using “Extend Mesh Section” and the layout block error (“A layout block goes across different texture tiles”) it sounds like the UV layouts across your mesh parts might be overlapping outside the standard 0-1 UV space or the texture layout strategy inside the Customizable Object Graph is trying to pack them side by side into a larger atlas instead of merging them onto the exact same UV coordinates
I think a few things could help us narrow this down:
How are your UVs set up on the source meshes?
Are all mesh parts pre-unwrapped to share the exact same 0-1 UV tile space without overlapping areas that require separate atlas blocks?
Which Layout Strategy is configured on your base mesh node?
If it’s set to automatic packing (like Grid or Pack) Mutable will automatically resize/extend the generated texture atlas to make room for each new section, which explains why the texture gets larger and larger.
If all your parts are indeed using the same material + uv layout, I would recommend looking at these things
Shared Material ID/Single Material Slot
Make sure all your incoming source Skeletal Meshes in your project share the exact same Material Instance/Slot Assignment before being imported in to Mutable
Layout Node setup
In your Customizable Object Editor, check your Mesh nodes Layout settings.
If you want everything to share 1 material + 1 texture space without creating an atlas grid then make sure the layout is not set to create multiple blocks per mesh section.
Removal of Mesh Section Modifiers
Instead of using Extend Mesh Section (which makes Mutable manage dynamic texture merge blocks) try instead to connect the meshes with a Group Node or Base Mesh + Edit Mesh where all the sections explicitly point to Section Index 0 and use the same Material asset
Epic Games Official Documentation: Customizable Characters with Mutable · Mutable Tutorials
Could you tell me what your UV layout and Texture Layout Strategy looks like in the node settings? That should help me track down exactly why Mutable is expanding the texture rather than reusing the single slot.