Home Technical Talk

Quick Texture sheet question

This is my first time unwrapping a house, and I feel like this is not the proper way to texture it. I tried to unwrap it so each piece has UV space, but that led to low resolution, and a lot of frustration. Here is a picture of my current house (the texture are just there to show the different materials used) , uv layout, picture in UDK, and my unwrapped model. The flats are separate, the one shows my material spots, and the other is my UV layed out overtop.

Hopefully it can show what I am asking, is this the proper way to do this sort of thing? Also how would someone use a AO map with this sort of thing?

Thanks!

mvq5BOB.jpg

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    You don't need to merge the uv's and the textures all together.This can cause low resolution and unequalized texel ratio. If you work with multiple textures, then display just one in the uveditor when you uving. About the ao, you need second uv map for this. This is also needed for lightmaps so you must make it.
  • TicoTaco
    Options
    Offline / Send Message
    Obscura wrote: »
    You don't need to merge the uv's and the textures all together.This can cause low resolution and unequalized texel ratio. If you work with multiple textures, then display just one in the uveditor when you uving. About the ao, you need second uv map for this. This is also needed for lightmaps so you must make it.

    Thanks for the reply. I had a hunch the AO would be a second UV channel.
    I am a little unsure of what you mean by using multiple textures though. Would you have to have the meshes seperate? Ie. Windows/window sills mesh, roof mesh, house bottom mesh each with their own uv's/texture sheets, or is there a way to have a single mesh (like mine) with multiple uv's and texture sheets?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Yes its totally possible. So I mean single mesh with multiple uv sheets(one for each part/texture).

    *If you still not sure about what I say, I can show you with my model what is using multiple textures/mats.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Okay so this is my model:
    handpaintedvillageudkv1.jpg
    And here is an example of one texture and its uv's (edges are not visible, but you can see what is happening):
    plasterjpg.jpg
    The plaster parts are uv'd like this (filling the whole uvmap). The another textures uv's are also filling the whole uvmap or almost the whole.
  • TicoTaco
    Options
    Offline / Send Message
    That was abit of a amateur question. I knew about multiple UV's , I never worked with them though. I did a bit of Googling after you posted your first response. I cannot get the multiple uv's to work though. Here is what I am doing.

    I UV's the bottom half put it into the UV channel 2, the rest of the mesh was on another UV unwrap and set to channel 1 . I made two simple textures in PS. In UDK I set up the material (as I saw in some PolyCount threads regarding multiple UVS's), but nothing is working , it just shows one texture no matter what. I even tried this with a simple box model but it was a no go still. I tried changing to all the different map channel variations (1,2,3 etc) in the Tex Coordinate nodes also.

    Here's another photo to.
    eazRICK.jpg

    I probably messed something up :P , thanks for taking your time to help.
  • Chase
    Options
    Offline / Send Message
    Chase polycounter lvl 9
    What I think Kristof is saying is you should use a multi sub object. This map channel thing will get expensive quick. Not to mention you'll have to remember which map channel holds which UVs for the house. I'm currently doing that and it's a pain. One map channel for the main texture, one for the Light Map, and maybe a third for something else.

    Anyways, use a multi sub object. That way, you have the roof as one whole texture, the frame of the house as another, and maybe have the windows and doors as another texture sheet so as to not have this resolution loss. Like this:
    36874441.jpg
    51814024.jpg

    A multi sub object is like have a bunch of separate materials, just all loaded under one material. You'd apply them to the house by selecting each part first; ie, roof, then house, then door/windows. It might be easier to detach everything, but after you select one section you'd apply the specific texture to that part. Apply a UVW modifier and unwrap like normal.

    Quick side note: Since a multi sub object houses so many other materials you can simply swap them out in UDK to create variation to your models. Or do the opposite and use different models using the same materials.
    94586969.jpg
  • Pola
    Options
    Offline / Send Message
    Pola polycounter lvl 6
    I don't use max, I'm a maya user. In my experience you could apply multiple materials and those could be assigned different textures, the UV set was default to the first. Usually you don't need to make a new UV set unless it's requiring a different unwrap for something like lightmaps. You can overlay your uv's for different parts of a mesh in the original uv set and it won't be an issue if they different parts are assigned different materials.

    Additional UV sets from memory will contribute to performance cost from memory, as does assigning multiple shaders/materials to your meshes. I don't know how much and in your case it may not be noticeable.

    The way you had it originally set up was fine, I'm not sure what benefits you are gaining from using multiple materials to break your texture up. If you are using bigger textures then why not use a bigger single texture in the first place? Keep in mind the textures should be 256 512 1024 etc, if you don't use those dimensions it still counts once it's on the gpu, 800x320 becomes 1024x512. By using less textures you also cause less state changes on the gpu by preventing it from switching between textures to render. Some extra triangles probably won't harm performance as much so if you have a repeating texture you could add splits such as the roof for example and overlap the split uv's ontop of one another(or offset by 1/-1 in UV space if you're baking textures).

    For AO, you could also bake to vertex colour, depending on quality you are after. This would not require an extra uv set and not be affected by tiling, but won't be as detailed/crisp.

    Hope that helps, I could be wrong about some of these things. I mainly wanted to counter Obscura's first post, this is coming from what I know with mobile game development in 2D using the GPU on quads/planes. You also don't have to have the uv's for your mesh all spread out in the 0-1 UV space, as I mentioned above you can overlap uv shells to share the texture content, it'll make your texture on the mesh look sharper/higher quality than how you have it right now. The tradeoff is by sharing the texture content between the uv shells you cannot have unique details without using other options like shaders/uv sets/vertex paint.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Sorry i forgot to tell you, you dont need multiple uv Channels, you can do it with one, by massive overlapping. And you need to assign multiple material ID's, and using multi/subobject material (if you are using max).And don't try to assign all the textures inside one material in UDK:)Doubleclick to your model in the contentbrowser, and if you assigned the multimat in max and exported with this, there will be separated material channels.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Hey, because you wasted your time first, I want to compensate it with this tutorial about the material ID's check it out :)
    http://www.polycount.com/forum/showthread.php?p=1815164#post1815164
  • Pola
    Options
    Offline / Send Message
    Pola polycounter lvl 6
    I'd still advise against multiple materials/textures when it's not needed. I did that when I was taught general 3D, but with games if you do that with all your assets it's possibly going to be a problem which will cause much grief having to fix x amount of assets. If just for personal project and not a job/product than it might not matter to you.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Pola wrote: »
    I'd still advise against multiple materials/textures when it's not needed. I did that when I was taught general 3D, but with games if you do that with all your assets it's possibly going to be a problem which will cause much grief having to fix x amount of assets. If just for personal project and not a job/product than it might not matter to you.

    I really don't understand what is your problem with using multiple textures on one mesh. Its really useful if you want to reuse it on anything.Like on multiple different houses for example. And with this, you can tile the texture without adding extra edges.
  • Pola
    Options
    Offline / Send Message
    Pola polycounter lvl 6
    You could still use one material/texture and reuse it on different house meshes. You can tile in one dimension by having the subtexture as a vertical/horizontal strip in the texture.

    The reason I advised against it was performance impact, multiple textures for one is going to cause additional draw calls from the state changes, as for each rendering pass it has to switch between the textures for each material you add on top, this might be different from the engine I use but it prevents batching. And when you upload the textures to the gpu, if any textures are not power of 2 it is still treated as if it is, which wastes memory.

    It might make sense if you have a smaller tiling texture of say 128x128 while the rest is 512x512. Correct me if I'm wrong but if the 128 doesn't fit into the 512 properly than you'd get a 512x1024/1024x512 texture, plus it wouldn't tile in both directions without uv splits(which is increases vertex count). And then if you had 4 of these 128x128 you could have a 256x256 with them all, or use seperate textures/materials for each. Alternatively you could use a single 128x128 in grayscale channels RGBA and with a shader and a gradient map have 4 tiling textures in one texture with the cost of the shader instructions. When you have a situation like this, I'm not sure what is the right choice, if there is anyone more knowledgable on the subject that can chime in that'd be great.

    This is all stuff most artist may not think about, it's more of an issue if you are making art for mobile devices. If you are just doing single assets for portfolio you won't have any problems, if you make a game and have many assets done this way, you might see problems depending on the hardware.

    Using multiple textures and materials can be faster to iterate with which can be good, only on a big project are you going to regret it if you have to go back and optimize.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Sorry I still dont agree with you because its an absolutely rife stuff...And Performance?Yes you need to be careful if you working on some mobile title, but nowadays pc's are really strong...I'm pretty sure they can handle this easily :)
  • Pola
    Options
    Offline / Send Message
    Pola polycounter lvl 6
    Absolutely rife stuff? Not sure what you mean there. I edited my post and added a paragraph about a situation with multiple tiling textures where I don't know how you would approach that. If mostly unique or not needing tiling though, no need for multiple textures/material?

    I have no idea about PC on a large project, depends on the players you try to reach. MMO games for example usually try to reach the broader player base where their computers aren't as powerful. I have worked on some pretty basic 3D games where the performance was pretty bad probably because of reasons I have talked about here and possibly because of the programmers we had(we were all students still learning). I'm not sure what an asset heavy game would perform like in unity/udk if you approach majority of assets in the way you do.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I mean current. I dont see your picture btw. For what you said about mmo's: Yes, they are trying to optimize the game for weak pc's too, but im sure the most of mmo's still using multiple materials on the building. Like how on the picture what Chase posted. Probably they optimize the engine itself, and using lower resolution textures and lower tri/vertex count on the models.If they would use unique textures for the building, then THAT wouldn't be optimized choice.
  • TicoTaco
    Options
    Offline / Send Message
    Dammit. I knew I did this somewhere! In the foliage modelling tutorials the tree/bark using this. Turns out I was going about assigning the channels wrong (adding a new unwrap and changing it to channel 2) Instead of just selecting the elements and using the edit poly material ID select. Thanks for the replies!

    @Obscura, Thanks for the tut.I really appreciate it, and I'm sure others will benefit from it.

    @Chase Great explanation to, really helpful stuff.

    @Pola, ya this is just a personal project. I am working off a concept. I'm going for a more .. unoptimized prettier scene, than a optimized correct scene :poly136:

    A2ulAO7.jpg
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Multi-Material are the way to go if you want to effectively tile your textures on a an environment piece, unless you are able to make a shader that splits one texture into 4 parts without seams, that's how most buildings are done.

    Or you could use Mask-Maps in your RGB channels.

    Also, while they're not cost efficient on 1 house alone, they are efficient on many buildings, since many of them will use the same textures in difference places, outside of an extra Material-Link which might change the colors or number of tiling slightly, they're the best option, especially for a full city.

    The best option performance wise would be to manually setup everything. Put in mutiple generic tiles in one texture sheet that reach's the end of the UV space either Horizontally or Vertically, and tile your UV's from there manually from one side.

    Crysis 2 did this alot for their environments iirc.
  • Pola
    Options
    Offline / Send Message
    Pola polycounter lvl 6
    Most of what I know with textures/gpu is from 2D frameworks that are accelerated via the gpu. I'm not sure where to read up on the technical side for 3D content.

    In the 2D framework it was best practice to keep as many assets using the same texture/atlas and avoiding a state change. With a mesh/material you're going to be going through several textures such as diffuse/normal/spec, so not sure if rendering is done stepping through a material and iterating through it's textures or not. I'm guessing it doesn't matter what the mesh is, all meshes with that material are rendered for each pass, but what happens when you have multiple materials to a single mesh?
Sign In or Register to comment.