Home Technical Talk

Texturing a house and UVs - What approach to take

KurtR
polycounter lvl 7
Offline / Send Message
KurtR polycounter lvl 7
I'm slightly confused what the best practice for texturing and UV'ing a house these days are. I did a lot of reading and there's so much conflicting ideas that my brain couldn't make a choice on how to move forward with confidence. Is atlases mostly out? Do I attach everything together,  create different ID's and use tiling textures? Even for window trim? Do I create a lot of parts and keep the UVs on separate sheets and import all these parts into ex ue4? How are drawcalls calculated based on having all the house as different parts rather than one whole mesh? Is the lightmap quality poor if I choose to attach everything together? Should I choose my approach dependent on game engine in use?

In ue4, which will be my target engine in the end (though I want to create some assets in the process for sale to try to get some cashflow for my project) I know I can just create different IDs so to get different materials in the engine to use, and then use tiling textures as instances to create change, but again, do I attach every part of the house or keep them separate? I'm not really aiming for a modular workflow when it comes to these houses; I feel limited in design if I do so and need a lot of unique buildings. I might re-evaluate this.

Any input, links or anything else much appreciated. Image below is of a house I'm currently modeling.



Replies

  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Unique uvs/textures on an asset of this scale is not going to be pretty. Atlasing, tiling textures, and multiple shaders are probably the best options. 

    Personally, I'd break the asset into sections and uniquely UV each one, whilst trying to re-use textures where I could. So you could break the roof into upper and lower, the walls, the floor, windows and doors, etc. Or combine the techniques and have tiling textures on the walls, floors, roof tiles, or what ever combo. Once you set up multiple part's pivots in Max it's easy to reassmble in UE and create a blueprint for the whole house. 
  • KurtR
    Offline / Send Message
    KurtR polycounter lvl 7
    Thanks Musashidan. I've been back and forth on breaking it down some as you suggest. I think that in the end makes perfect sense and Ill just shoot for that. Brain unjammed, thanks man.
  • Steppenwolf
    Offline / Send Message
    Steppenwolf polycounter lvl 15
    How you split it up boils down to two different compromises. Number 1: between easy usage and creative flexibility (dropping in whole building vs. being able to combine small parts into different buildings) Number 2: compromise between number of draw calls and triangles that need to be rendered. Ther's a limit to both that will become a bottleneck eventualy and kill your framerate. Short layman explanation: each mesh and each material per mesh creates a draw call. Each additional draw call on a mesh means it needs to rendered one more time internaly before appearing on the screen, effectively adding to the triangle count. For example a whole house of 100k tris with 9 materials attached has 10 draw calls. Effectively 1 million tris need to be rendered for it. Or the house is split up into say 20 meshes with 2 materials each (3 draw calls per mesh). Then you have 60 draw calls but effectively only 300k triangles need to be rendered.

    Ther's other factors, like how expensive your materials and shaders are but lets keep it simple. So in your case a good compromise would be to break the building up into big chunks that use as few materials as possible each. For instance, one mesh for the roof, one for outer walls, one for the interiour. But as i said it's always a compromise. Ther's valid reasons why you would rather keep it in one piece or in smaller pieces that allow more variation and creativity. It's up to you and in the end it ties in with everything else that's in your scene or game. You might be able to afford more draw calls or traingles on that house and save them somewhere else instead.
  • KurtR
    Offline / Send Message
    KurtR polycounter lvl 7
    Ah, thanks a lot for that explanation, Steppenwolf. I'm trying to understand drawcalls and the sort of compromises you bring up better. This was very helpful. Might just be me, but I'm finding it hard to find that sort of reading material to dig into, so this was much welcomed.
  • Steppenwolf
    Offline / Send Message
    Steppenwolf polycounter lvl 15
    Thing to keep in mind with this is, there is no simple answer beforehand what the best approach is because games are so different (indoors, outdoors, open world, mostly terrain, mostly city etc.). Often times you just have to build your scene or game and iterate your approach depending on which stats turn out to be problematic for you.
    Then ther's optimization tricks, like reducing number of materials on your lods, using a proxy lod (combining meshes and baking everything down onto one material) for your last lod step etc.
    What i wrote is also just scratching the surface. It's a very complex topic and i only understand part of it myself even tho i've worked on a whole bunch of games already.
  • Eric Chadwick
    We have some resources on the wiki about the tech end of rendering, how it works and why, worth a read.
    http://wiki.polycount.com/wiki/Rendering

    Also some info here
    http://wiki.polycount.com/wiki/GameRenderingTerminology
    http://wiki.polycount.com/wiki/Shaders_for_Artists

    And we have some good resources here about different ways to make buildings for games. Like it's been said, it depends on a lot of things which way you choose. Good to know how different people approach it...
    http://wiki.polycount.com/wiki/Modular_environments
  • KurtR
    Offline / Send Message
    KurtR polycounter lvl 7
    Thanks for the extra input Steppenwolf, and thanks for the links Eric! Def. gonna head over there and dig further into it.






  • KurtR
    Offline / Send Message
    KurtR polycounter lvl 7
    Hey guys. I'm back at this. I want to make sure I cover all angels of the process before I get into some real texturing. I did some more reading and tried a few different approaches. However, as in the image below, I took the approach of breaking it apart. This seemed like the most valid approach. In the half-assembled house below I got exterior walls with a tiling map, roof with a tiling map. The concret and stairs uses part of an atlas, and the windows and the window glass uses ID1 and 2 where ID 1 is for the atlas, and ID2 is for glass material in UE4. I thought it was a good idea to make both separate window and door sizes - some forward thinking -  I can reuse on all my houses that has their own sheet.

    Interior walls will also have their own tiling sheet in the end.

    It's coming in all fine, I can set my material for the second ID on the window as I had hoped, but I didn't need to assemble anything. It all came in together and worked nicely. Quite strange asking if you did something wrong when everything worked out fine, but did I do something wrong?



Sign In or Register to comment.