UV Layouts vs. Texture Maps

Hello there

I have a little question regarding a technical aspect of blender:
What is better, having bigger maps or several UV Layouts?
I ask this question because I saw a lot of my friends using huge maps for a wall (like 2048 or even 4096) but the whole wall is actually just a tiling texture with one little detail at the bottom.
Now I thought: wouldn’t it be better to use a 512 tiling texture to fill the wall and add the little detail with another UV layout and another 256-512 map?

But then I thought: Wouldn’t it be always better to use tiling textures for the basic pattern and add the details with another map? If we look at the mapsizes it’s obviously better, but how much resources does it cost the blender game engine to mix different UV Layouts with textures?
I see a lot of big maps with lots of unused space. Sometimes its necessary because you have so many details, a tiling texture wouldn’t be good, but what about architecture and environements? (or even simple objects without lots of details)

Well I work somehow different than my friends and they dont understand why I’m doing this:
One map per object-group for large tiling base texture, one map that adds details here and there and a final lightmap with AO, shadows, etc. (The lightmap is generated for more objects at once because I found out that its okay if lightmaps are slightly distorted or not that detailed)
So I have 3 UV layouts for my objects. But … is this good or bad for the game engine?
My mapsizes are much better because I can use very small maps and still have awesome crisp detail, instead of baking everything into 2048 maps for just one single object.

So again: Is it better to bake big maps for my objects (like 2048 maps for every object to have enough detail) or make 3 UV Layouts (with 512, 512 and 256 and better details than baking) ?
Basically: How much does an additional UV Layout cost in the game engine?

I started blender some weeks ago, so I didn’t have the time make a big scene and test it out myself.

Sorry if this is a bit confusing, I can add some screenshots later to explain if its too abstract.

Thanks for your time!
Zykras

You only can use 2 UV-maps in the BGE (for some reason - I think this is going to be fixed soon in the Google Summer of Code, hopefully). It’s probably best to use the same UV-map, but just apply two different textures to the part that you need. E.G. Tiles the walls normally, but simple edge cut the bottom portion, for example, to make a trim. Or, use the second available UV-map to handle trim, while the first handles tiling. It’s up to you, but just know that only two are available right now.

First I was like “what?” but then I did some tests and yep, I can’t use more than 2 layouts :eek:
It will always pick a random layout if I try to use more than two … thank you very much for this info!
But it’s not all bad, I can still use more layouts to detail and then bake the diffuse texture (Maybe I just dont like adding details in photoshop when I can’t see exactly what i will look like)

But it’s really sad that you can’t use more than 2, is there a reason for this?
I’ll still use 2 different maps for color and ao/shadows so I dont have to bake everything.

How do you apply your UV’s? I’m still a beginner and my teacher showed us how to bake these big unefficient maps, so I don’t know if I’m just missing something or it’s really better to work with different maps (at least one for color and one lightmap)

Edit: But my main question still remains:
Is it better to use two 512 maps instead of one 1024 ?
For example: Instead of using a 1024 baked map for one object (color+ao+shadows, etc) I would use a 512 or even 256 map for my tiling texture (better quality and I dont have details on this object, so the tiling is okay) and one 512 map for the AO+shadows.
The final output looks much better with my method but I don’t know if this method would cost more resources in a big project. Small mapsize is better, but does it slow down a bit when each object uses 2 UV Layouts?

I don’t think there’s a reason behind only having 2 UV-maps - I believe it’s going to be fixed soon, though.

About the UV-layouts, I would probably apply mine like you - one for diffuse, and one for ambient occlusion / shadows / details. Basically, if you wanted to get more detail, you would bake in textures into each other. For example, the diffuse map probably can stand by itself since certain objects might need to tile textures (walls, blocks, etc). However, the other UV-map could be used for ambient occlusion, shadow, etc. all on one map.

You could combine the maps together, but that won’t work for tiling surfaces like floors. However, if you have something that doesn’t tile, like a texture for a character, details, ambient occlusion, normal, color and specular textures can all share a single UV-map.

To have a more efficient UV-map, you could use the Smart UV Projection option when you press U to unwrap your mesh. This will basically try to put each and every face on the map somewhere. Of course, the best method would probably be to mark seams and then unwrap the mesh, so that it appears exactly the way you need. Here’s a tutorial on it.

Okay that’s pretty much my workflow. But I use 3dsmax with plugins to unwrap my objects (I just have the impression blenders UV tools are somewhat slower, at least unwrapping by hand)
Actually I need blender just for the game engine part (and only because we have to, can’t use UDK or something else), but working with blender was a lot of fun so now I switch between both programs ^^

It’s good to know I’m not the only one who uses different layouts for diffuse and lightmaps (I hope it’s the right term, lightmap is for me baked ao+shadows+etc)
But I understand that some objects need more detail thus a bigger map with a proper UV Layout.
Oh and for my lightmap UVs: Can I just take everything in one map? Like joining the objects to make one big lightmap for everything? Or would it be better to break my scene into groups of similar objects (for example the kitchen) and use a 2024 texture instead of 4096?
And last question: I have the impression that lightmaps do not require proper layouts, automatic smart unwrapping works fine right? Even some stretching and distortion seems to work out (just to optimize the UV space)

Thanks for your help so far Solar, your site will come in very handy in one week when I start scripting/game logic and stuff :stuck_out_tongue:

No problem - I’m glad that you want to come learn.

For lightmaps, I would recommend putting all the objects together, if they’re in the same area. Here’s an example.

Say you have a kitchen, with a cabinet, counter, and table. While you could have separate objects for that, if they don’t move or animate, then it might be best to join them all together so that you can bake a lightmap in a single go-through.

In that example, you could bake each object separately - the cabinet’s AO map would be separate from the table and counter’s, and if you have a room for that, then that’s another lightmap. However, if you join all these objects together and then unwrap them, then that would be only 1 lightmap that you’d need - one for the kitchen room (though making duplicates would now be harder, as each object’s section of the lightmap is particular to the kitchen room).

It’s basically up to you - I know that if you have multiple objects and use Smart Projection on the UV unwrapping in Blender, all the faces will be shown on the UV-image, so that makes it easier to bake textures for all objects in your scene.