How many UV sets are standard?

I’m new to Unreal and game creation in general, coming from a strictly pre rendered background. There is one specific thing I’m curious about, workflow wise.

How many UV sets do you typically use per asset?

I recently did a project where we had three different UV sets. 1 for texture, 1 for normal mapping and 1 for the lightmap. This, however, got very complicated. Unreal wanted the normal map to be on the first UV set, unless we wanted to do some big workarounds. Substance painter on the other hand, wanted the texture on the first UV. We had to do a lot of switching around and complex workarounds to get it to work.

Because of that, we’re now thinking that for the next project we should combine the texture and normal UV and have just 2 UV sets; one for the texture/normal and one for the lightmap.

The problem with that is that the resolution requirements might differ massively between the normal and the texture. Maybe we need the normal on one part of the mesh to be really high resolution, but we can’t scale it up because that would mess up the texture.

So my question is basically, what is the standard workflow for this?

I apologize if this is the wrong place for this kind of question. I would be happy to be redirected if that’s the case!

You don’t have to worry about different resolutions of the texture.
Think of the UVs as some kind of instruction how to lay any texture onto your model, it does not care about the size of the texture.
Quite the opposite, the texture is stretched automatically to fit onto the model.

You can easily use a low res diffuse texture and a high res normal map at the same time.

I don’t mean the resolution of the whole map, rather of specific shells. Like, say there’s a model that has one area with some text, and another with a complex pattern I need to do with a normal map. In that case I would want to scale up the UV shell with the text on the texture UV, but on the normal map that part wouldn’t need to be high res at all. The complex pattern on the other hand, I would scale up in the normal map but not in the texture map.

There are some other differences as well in how you do the UV mapping. Like for the texture you would want to keep the cuts to a bare minimum, while for the normal map you need to cut every hard edge.

You can shift UVs with a TexCoord+Add Node. You can isolate your HighRes UV Shell onto a single texture and move it with this method to the desired place.

I see! So what you’re basically saying is that you typically only use 2 UV-sets, one for texture/normal and 1 for lightmap, and if there are special circumstances when you’d need higher res for some part there are workarounds for that?

What about the much larger amounts of cuts you need for normal maps compared to texture maps? Is basically just a trade-off you have to deal with?

I really don’t know what you mean with “cuts”.

What I meant is you can have 3 different Textures:


You basically have a BaseColour and a Normal Texture.
Additionally you have a Detail Normal Texture that should only cover a certain part of the Texture.
You shrink the Detail Texture to the desired Size and then shift it to the desired place.

By “cuts” I mean the cuts you do in the UV map to be able to unfold it correctly. When you’re doing normal maps you need to cut along every hard edge for the baking calculation to be correct, but when you’re UV-mapping for a BaseColor you want to keep the cuts to a minimum to avoid seams.

I understand I would need different texture maps for the BaseColor and the Normal. What I’m asking about here is UV sets.

It’s kinda weird that your doing your UVs to match your hard edges, instead of your hard edges to match your UVs.

Hard edges are entirely optional, you can control the shading in other ways, or use one smoothing group.

So if you for example had a cube you wanted to smooth the edges of using a normal map, you wouldn’t need to cut along each 90 degree angle for the normal map?

I’m very thankful for you guys’ response to this, but what I’m mainly curious about is if the typical workflow for Unreal Engine 4 is using 2 UV sets or 3? Is it standard to use the same UV set for the normal as for the baseColor?

We can always work out the kinks later, like how to actually best do the maps.

For most assets, 2 is enough. 3 is fine for custom use cases like animated UVs or other effects.

Yeah no need to cut it other than enough to make it flat, it would be beneficial not to cut more as it’s cheaper. The normal map or smoothing groups can still smooth the corners whether or not you cut up the UV.

Most common is one UV for lightmap (if you are not doing dynamic lighting) and one for your material (same for normal, base color, roughness, ambient occlusion and so on).

Thank you so much for the responses!

It’s very interesting to me that you say that. The reason I’ve been cutting all the corners is because of what he mentions in this tutorial from around 8:50. It’s quite an old tutorial though, so is this not an issue anymore? Should I just be smoothing every edge and only cutting for the purpose of making the shells flat?

The issue being described at 8:50 is related to normal maps tangent space not being synced with the viewport. UE4 uses Mikktspace and you can bake normal maps in mikktspace with xNormal, Substance, and various other applications. Although that’s not the only issue you have to worry about with normal that are aggressively compensating for the smoothing difference between the low poly and high poly models. Compression and mipping do not do well with those hard gradients in normal maps, and you’ll get artifacts. For most assets aimed for a modern game, you should be able to bevel most hard 90 degree angles anyway.

Thank you again for the help!

I feel like I’ve got some sort of grip on it now :smiley:

ZacD explained it pretty much on point.
You won’t really encounter these kind of issues described in the video unless you do something as extreme as smoothing a hard angle cube. These days polygon count is kind of a non-issue in modern game engines and while it’s true more polygons will take mroe performance, there are many other things that are much bigger performance hogs so unless you go crazy it shouldn’t be an issue. Therefore you should just bevel the cube instead of doing something as extreme as smoothing 90 degree angles like this, which circumvents any issues like that. But it all depends on case by case, no rules without exceptions and all that. That said, I have never encountered any issue he describes in the video while working in UE3/4 for years and only cutting where necessary to make a nice, flat UV shell.