The only way I can see having a really efficient texture atlas for modular environments, is to overlap your UVs. However, I want to create an environment in unreal engine which, unfortunately, doesn't allow overlapping UVs due to artefacts when it comes to building the lighting... So how do you get around this?
Lets say I have a brick texture within my atlas and I want it tiled many times on one of my assets to make the bricks really small... Without overlapping the UVs, its impossible right? so how do people do it?
Replies
This is uncharted waters for me - Any tutorials you know of that you can firmly shove me in the direction of?
Hi Eric, I'll be using Maya for this.
https://www.youtube.com/watch?v=joKnmShAdJE
So its my understandiung that, if ever you have a uv shell that is flipped/inverted/outside of the initial UV space, you need a secondary UV layout for your lightmap? If not, it will just use the existing UVs by default?
The Polycount wiki has a good amount of tutorials/threads about modular environment workflows that should get you going (given some can be a bit outdated).
http://wiki.polycount.com/wiki/Modular_environments
Then the up/down+left/right tiling textures can be their own separate maps. Brick, stone blocks, etc.
The modular wiki page has lots of info about this. For example, see Visually Appealing Building Guide and UE4 Modular Building Set Breakdown.
Making it all into a single atlas is possible, but it places several limits on your workflow. For one thing, you have to add extra edges wherever you want a portion of the atlas texture to tile repeatedly. Or else you have to use extra shader instructions to extract a tile from an atlas.
http://wiki.polycount.com/wiki/Texture_atlas
http://wiki.polycount.com/wiki/ChannelPacking
http://wiki.polycount.com/wiki/MultiTexture
I've decided then to make a normal map of just horizontal "trims" and a few sculpts for the decor along the top and have this on a separate UV set. Everything else on the standard UVs for the atlas and also make a third UV set for each module for the lightmap.
Hopefully thats correct :P
(I kid!)
I was wondering if it is possible to have three UV channels in unreal on an asset? I was hoping to have three - one for diffuse that is unique to this asset, one for a shared normal map across all of my assets, and one for the lightmap.
If no, How do I make sure that unreal engine is using the proper UV set for the lightmap, and not the one for the normals?
I cant find this anywhere online so im thinking maybe you dont have more than two sets?
Yes you can have more than 2 UV sets. For example:
https://forums.unrealengine.com/showthread.php?49503-Materials-UV-Channels-and-maps
However I believe the vertex count of each model will increase, which is generally frowned upon when making a real game, since there are memory budgets, and depending on the game the overall download size can also be a factor.
And yeah I did think that. I cant see any way around it though? Having two maps for the whole level at the cost of vertex count is surely better than lowering that count but having a unique normal map for everything?
Thanks if anyone can help me out with this!¬