- Home /
Texturing larger models "Uv image" Blender and Gimp
Hello there! I've been searching for a solution for this, for a looong time. But haven't really found anything that answered my question specifically. I hope I might have luck here, even tho it's not an unity question only, I hope there's some artist here that can help me with this. This invols gimp, blender and unity.
I've created this house for unity, I have Uv unwrapped the whole building in blender, and imported the uv image to Gimp and placed textures on the image. But because I got the whole house in one uv image, which contains alot faces. I have to shrink down the textures in gimp, for them to match on the different faces, which gives me quality lose, because I have to resize the textures. even tho I imported the uv image at 2048x2048.
I really want to end up with something like this, on all my models, even larger models than shown
(Images taken from google)
1) http://ricgameart.files.wordpress.com/2011/10/uv-mapping1.jpg
As seen on the images, there is a whole house on that one uv, and the textures still look so high quality. How do I approach this? and have would I do it, if the mesh was even bigger? Like maybe a whole building full of small rooms where I want all kinds of textures, but with no quality lose? How would I fit all of that into an uv image, would the only option be serveral uv's for that one model? or is that not the right way to go for a game model that size? Remember the models are going to be used for unity, and I feel like having uv's for the models are the best way to go, also it gives a lot more control over the details of the model, rather than just assigning materials to the different faces in the game engine. Or is that not a proper way to do it? How do I approach this, and how do I approach even larger objects? I hope someone can help me out!
Thanks in advanced!
Answer by meat5000 · Oct 15, 2013 at 04:32 PM
Before you export your UV map from Blender you should Re-Size your islands.
You must decide which parts should have high res and which parts should have low res. Then you select the face of the model (which selection sync enabled) and make the UV island much bigger for higher res and smaller for lower res; jiggling them all around for the best fit and to use as much of the texture space as possible.
Resizing the UV islands will not affect the model itself except for changing how much of the texture is crammed into the space.
Make sure to Save your Blend file after remapping the UV otherwise the export/texture and the model won't match.
What if it's a really larger building, with serveral rooms, and I want high details in each room, how should I approach that then? In that case, i wont be able to just resize parts of the uv's that need detail, because the model is so large, and I wan't all the rooms to be detailed. Would the only option here, be serveral uv's, or should I export a larger uv image than 2048x2048?
To some extend you will need to separate the objects. $$anonymous$$aybe 1 per room if they are really that big.
Okay I see, but the house I have now, should'nt be the biggest problem to have on one uv.. But still, it's seems like i lose so much quality, when texturing in gimp. What's a proper uv siz? i'm using 2048x2048 atm, bigger would be stupid, wouldn't it? What's a normal uv map size set to, for a building that need's detail? I'm sure, what sizes a proper for games, and for unity. And thanks for the quick answers.
Whereas 2k x 2k is actually a large texture, relative to a house model where each part gets split into chunks the texture size actually becomes quite small if you look at is as being multiple textures placed into a larger container. Essentially a UV map is akin to a texture atlas, where many images are placed in to one file. 2k x 2k is a good size for a UV texture but take in to account that Android for example doesn't support higher.
Detailing multiple rooms as well as the exterior is probably not achievable in high res on a 2048x2048 texture.
$$anonymous$$y first suggestion stands.
Okay, let me sum up, and see if I get it.
So 2048x2048, is a good size, (i'll keep using that for now) I'm making this for pc" but thanks for the android info, nice to know:-)
When the model get's larger, I should split it into serveral uv's. ins$$anonymous$$d of just one.
But if the model is just a smaller house/model, I should make it fit in one uv image, and just scale the uv's bigger, for the parts of the model i want more detailed (higher res), But if the model is larger, and still need's detail, I should use two uv maps for that one model, ins$$anonymous$$d of just one.
Did I get that right?
And last question, if you were making this, for pc. Would you have a finished uv map, for all your models. Or would you just assign materials for some of the models in unity? And when would that be a good idea?
And again, thanks for all the information.
Answer by Max_Bol · Oct 15, 2014 at 04:29 AM
To answer the whole thing... First you need to consider multiple things like the maximum amount of textures you wish/can run at once within the materials. This is mainly based on the target VRAM you wish for the game to require.
As an list of examples :
VRAM usage : Should your project be playable on a PC with a 512MB VRAM graphic card or will you limit it to 1Go or even 2Go (cutting out the market which can play your game). (If you aim at smartphones, you should not aim at anything higher than 512MB since even popular models still lack in memory)
How many textures will be required to load at once? Think of it as through the PC's rendering process. Every textures, be it a normal map or a diffuse or even the alpha channel affect how much VRAM is required by the engine to render the scene. First, you got 8, 16 and 32 bits formats for the pictures. This is related to every pixels shown. For example, a 8 bits 1024x1024 RGB texture takes 8 388 608 bits (1Mo) of memory while a 32bit 1024x1024 takes 33 554 432 bits (4Mo) without alpha and 34 603 008 bits(5Mo)with alpha (used in transparency/specular.
The calculation to get how much memory a texture (or set of textures within a material) takes is as fallowed (for a 2K texture with alpha):
Know the amount of pixels : 2048*2048 = 4 194 304 pixels
Multiply the result by the color bits (1,8,16 or 32) : 4 194 304 * 32 = 134 217 728
If there is an alpha, add the same calculation, but count it as 8 bits : 134 217 728 + 33 554 432 = 167 772 160
Divide it by 8 : 167 772 160 bits / 8 = 20 971 520 Bytes(octets)
Then you can get the actual required Megaoctet required by dividing this by 1 048 576.
This might sound dull, but with this you can guess, now, that you can't have that much texture on screen at the same time. Remember that even if you don't see an object, if its render is not turned off (with Occlusion Culling for example), it still count in the VRAM usage.
Let's say that you got a material with a shader that require a diffuse map with alpha for specular, a normal map and a self illumination alpha map. You decide to put all the texture to 2K. The diffuse takes 5Mo, the normal (no alpha) takes 4Mo and the self-illum takes 5Mo (since it require an alpha, it's a 32 bits most of the time) This end up costing you 14Mo for a single material.
How big is your asset? For a building that will take close to all the screen or at least 1/3 of it, you could consider spending 1/4 or 1/5 of the available resources toward its rendering. For interior, you could consider even more depending on how much (if any at all) you see the outside. As an example of the 512MB given previously, you could allow around 100Mo or 128Mo in materials for the building IF, as I wrote, it takes a lot on screen. This mean you can use like 7 or 8 materials to fill the interior wall, sealing, floor, etc.
When to separate or use multi-materials? Using multi-materials (with material IDs) can be a life-saving when you wish for things to always be considered as a single object. On the other side, if you almost never see 2 parts of the meshes/prop/object/whatever and they don't need something like skinning, you should consider separating both of them so that the 2 materials aren't rendered by force, but because they are seen by the scene's camera (rendering source). Doing so allow you to save on the general VRAM usage. But on the other side, if you see something plenty of times in the view in row, you might also consider using multi-material or joining multiple object on the same texture for the sake of reducing the VRAM usage peeks. (see it as turning on and off a light in real life. Keeping it on only when needed is great, but if you enter and quit the room constantly, you should just keep it light or you will broke it just faster. It's relatively the same with textures and material called, but instead of breaking thing, it slow down the caching process.)
By the end, the best way of dealing with this is by testing.
As an additional note for the 2 pictures given by the original question, one of the reason why the first picture is highly detailed is due to its resolution being 3800x3800. Another thing to consider is how well you can manage the pixel illusion and amount of details. If you have small items or details on the house, you should consider actually making them in 3ds instead of trying to give the illusion of it. This way the textures doesn't loose "quality" over such things because it seems off otherwise.
Your answer
Follow this Question
Related Questions
Assigning UV Map to model at runtime 0 Answers
Wrong import of UV from blender 1 Answer
UV issue on pixel pallet from Blender 0 Answers
Blender Model Texture not seamless in Unity 0 Answers
[Blender] How to export 2 UVMap applied to the same Mesh 2 Answers