Advice on using UV sets for saving textures


Some general questions here asking a) for your opinion and b) about performance considerations. I am asking because I plan on creating lots of assets following the approach outlined.

For a low poly art style, often 3D models are more like 2D sprites with a limited color palette. For instance a tree has a brown trunk and green leaves. No detailed bark or leaf structures or so: sth like that low poly tree - Google Search

If the mesh geometry allows it, you can uv map all trunk vertices to a brown part of the texture and all leaves to a green one. This way you end up with a single draw call (1 material + 1 texture) and a 2x1px palette texture. Lets call this technique UV vertice pushing (uvv pushing).

Now think cyberpunk: there is no cyberpunk without neon glowy stuff: You do need the emissive channel. Problem is, that if you just plug in your palette texture into the emissive channel, then everything glows. Instead, everything not glowy must be black. If you want to keep the 1 draw call/material/texture approach, then the only way out is a second UV map. You can make similar arguments for material roughness and metalness. Therefore, right now, I have four UV maps:

  • ColorMap
  • EmissiveMap
  • RoughnessMap
  • MetalMap

In principle everything works out of the box. Blender for instance exports all uv sets and they just work in Babylon. Nice :slight_smile:

For the purpose of comparison the other (more common I guess) approach: You have dedicated textures for each channel (and hence higher memory consumption / probably loading times).

What do you think? Is UVV pushing a workable approach? Any oversights which might come back to hunt me?

Will UVV pushing compared to “textures-per-channel” in any shape or form limit the capabilities/features of the Babylon PBRMaterial (or whichever is used)?

And what about the performance assumption: is the 1 draw call/material/texture paired with a laughably small texture such a huge performance boost at all? How expensive is the switching between UV maps?

Best wishes

hi there

Babylon and glb would already do one optimization here in having metalness and roughness just be a channel each in a single texture.

Nothing wrong in using multiple UV maps in the manner you mention. Having all the verts in a single space for a flat diffuse color works well , i did it on my last project in fact. but I created a pallete texture , with several colors on it.

Draw calls do add up eventually in real time rendering ( when no runtime optimizations are happening ) so its always a good to think about how to be smart with materials and textures.


Babylon and glb would already do one optimization here in having metalness and roughness just be a channel each in a single texture.

I encountered this yesterday. This is actually a slight drawback because you cannot control metalness and roughness individually but need to have them in one texture tile (in the palette texture I mean). At least by default Babylon reads metalness and roughness from a single channel. Practically no biggy because most of the time it is high roughness with little to none metalness anyway. I ended up with 8 combinations.