We’re in the late stages of a project and doing some optimisation by reducing the number of materials being used. I figured out there must some sort of tool for this so I’d thought I’d ask here, but essentially for each mesh we want to collate it’s textures into one big atlas that’s shared between the other meshes, and then update it’s UV’s to take into account the atlas coordinates. The aim being that we can reduce the number GL state changes when rendering each mesh by them all sharing the same materials and set of textures. Then potentially look at batching these in the editor into one draw call.
So my question is, before we go down the route of scripting this workflow, are there any available tools that can do this kind of operation? It’s seems like quite a common problem so i figured there must be something available.
Sounds like you are trying something similar to mega textures (minus the mega part).
I’m not sure, MegaTextures are a runtime thing right? I could be totally wrong though.
I’m just really looking for a tool that can take discrete mesh/material combos and make one uber material that combines all the textures.
So array of N meshes with unique materials and textures and spit out 1 material with atlases for each texture slot, and the same N meshes with updated Uv’s mapped into the textute atlas
On the projects I worked on before, we’d usually start with creating texture that were atlas of other textures, and built meshes around it. We’ve also sometimes went back and artists did this in 3dsmax / Maya. In photoshop they’d atlas some textures to say 4x4 grid and then changed models by simply offsetting their uv coordinates onto the right square.
But it’s possible there are some tools, I would not be surprised. At some point we could perhaps even write some scripts in Playcanvas to do it.