Hi
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
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
Joe