Home Technical Talk

texturing houses and buildings?

polycounter lvl 19
Offline / Send Message
Rekmar polycounter lvl 19
hello everyone
I've been thinking about environment art, not as many enthusiasts as in character art eh?

anyway, I was thinking about the best approach in texturing a house or building. my question is about texture usage.
say, my house intends to have at least 5 materials (outside brick, outside brick columns, roof, inside walls, inside wooden supports, inside floor 1, inside floor 2), uhm ok those were 7 materials, which emphasizes my question even more.
should I get all of my materials on a single texture (like uwvmapping+texturing a character), or should I make all materials a separate texture?
this is intended for an RPG with a free camera (think Oblivion), the camera will often go near walls and surfaces and so quality needs to be kept good.
so I am concerned about both problems of quality (texture space and resolution) and performance (amount of textures), and while poop's thirding technique might help with both methods, it isn't decisive as to which method to use.
another factor that could be important is that these houses and buildings will be modular.

I believe Oblivion uses a different texture for every single different environment feature it has (method 2), is this the best approach? what about other games?

thanks

Replies

  • cholden
    Options
    Offline / Send Message
    cholden polycounter lvl 18
    Use multiple tiling textures for the materials.

    It's also ok to use one texture for multiple materials (the thirding technique)

    As far as everything on one texture, this technique is better for lower resolution art such as RTS, but it can work if you want to be really clever with your UVs.
  • IronHawk
    Options
    Offline / Send Message
    IronHawk polycounter lvl 10
    Cholden: Do you usually just use a multi-sub for buildings then?
  • cholden
    Options
    Offline / Send Message
    cholden polycounter lvl 18
    yea, multi-sub's are great.
  • Ryno
    Options
    Offline / Send Message
    Ryno polycounter lvl 18
    Either approach will work. Even if you want to just do one sheet, you can still manually tile your textures by dicing up the geometry and being precise with your UV placement. If for instance, you wanted to keep some brick on the building higher rez via tiling, you could use one quarter of your texture sheet for the brick. Ensure that the texture goes exactly from zero to .5, and then just do type-ins for UV placement, to ensure that it is precisely placed.

    The only drawback to this is mip bleed. You can avoid it by using a bit of extra cushion in the texture though.

    Having used both techniques, especially with current gen multi-map shaders, I'm starting to lean more toward the single sheet solution. Well built buildings tend to have a nice uniform look to them. Diffuse tones, specular levels, amount of bump all tie together well to make the building look right.

    If you are using multiple unique tiling textures, there often ends up being a lot of hue shift, shine variation, and difference in amount of bump. The building can look slightly Frankenstein-ish if you don't watch it. With one sheet, you can avoid these anomolies and make corrections a bit quicker. With multiple tile sheets, it takes quite a bit more wrangling, and back and forth to make sure they all fit together. Just something to watch out for, if you decide to go with this route.
  • Rick Stirling
    Options
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    You do both, as and when you need to. A texture sheet is good for keeping content together, single textures are great for teams sharing the same textures (saving disk space, memory and streaming).

    You can also avoid mip bleeding by claming your UVs.
  • Black_Dog
    Options
    Offline / Send Message
    Black_Dog polycounter lvl 17
    But you can't clamp coordinates and still use tiling? Maybe a better approach for architecture is to pick textures that only have to tile on one axis, usually x, and stack them on the other axis. That'd give you, say, 3 512s and a bunch of trims in one 512*2048.
  • EarthQuake
    Options
    Offline / Send Message
    If you're going to do sheets just keep this one thing in mind: Be absolutely positive you're getting your texal ratio right when you're doing it because going back and cutting up all your geometry and redoing your uvs is a pain in the ass. I try to stay away from doing this as much as posible and just using tiling textures because its much easier to uv and you can easily tweak the tiling amount by simply scaling your uvs. Then again i dont do a whole lot of building type stuff so i'm no expert.

    Also the comment about having everything in one file makes a lot of sense too, that is way easier than tweaking 12 different texture or however many. So its a balance and pros and cons either way....
  • Steve Schulze
    Options
    Offline / Send Message
    Steve Schulze polycounter lvl 18
    [ QUOTE ]
    you can still manually tile your textures by dicing up the geometry and being precise with your UV placement

    [/ QUOTE ]Eesh, thats such a horribly wasteful way to work for as far as I can see a very minimal amount of gain. What advantage is there in having all the textures on one sheet besides a little colour and light direction variation which should be avoidable if you have the necessary textures open up side by side in Photoshop. Thats my logic anyway (that of a hand-held game developer). What am I missing?

  • Rick Stirling
    Options
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    Jackablade - you only have to load one texture off the disk rather than 8, so it's a perfect system for detail textures.

    Example: Build you shop with common/shared textures, then use a detail textures sheet that has all the signage.
  • Husch
    Options
    Offline / Send Message
    Husch polycounter lvl 18
    It is always wise to keep the number of materials low as possible, so you will have less "Draw Calls" in your engine.
    For Gothic 3 we made houses with 10 or more materials but after testing some levels in the engine we decided to cut down the number of materials to 3 or 5, because the engine was getting slow because of the high number of draw calls.

    So we combine the textures, made them tileable in one direction and added some more edges in the buildings where we have to. Some more polys won´t hurt the framerate so much compared to a higher number of materials.

    Although todays graphicboards have 256 or 512 MB you still have to keep the texture memory small, because in the most cases you have more textures for one material(diffuse map, specular map, normal map and maybe some RGB multiply shaders. So try to live with 1024 or 512 Textures, especially when you have a wide, open terrain level with woods, mountains, houses, props, characters and so on.
  • Steve Schulze
    Options
    Offline / Send Message
    Steve Schulze polycounter lvl 18
    Interesting. I think I'll need to discuss this one with our coders. While we couldn't afford to be cutting in extra polygons on the DS (what with the hard poly budget of around 2000 polys per screen), we may well be wasting memory on having loads of tiny alpha plane objects on individual textures.

    Thanks for the explanation.
  • warby
    Options
    Offline / Send Message
    warby polycounter lvl 18
    [ QUOTE ]
    But you can't clamp coordinates and still use tiling? Maybe a better approach for architecture is to pick textures that only have to tile on one axis, usually x, and stack them on the other axis. That'd give you, say, 3 512s and a bunch of trims in one 512*2048.

    [/ QUOTE ]


    i love that idea =)
  • Ryno
    Options
    Offline / Send Message
    Ryno polycounter lvl 18
    Yup, texel ratio is a big issue with sheets. It can also be an issue with tiling textures, particularly with ones with well described details such as bricks. Just cranking up the tiling won't always work as the bricks shrink down to a couple of centimeters across. Even so, texel issues are definitely less of a concern with tiling textures as opposed to sheets. It's not a bad idea to try authoring at double-rez, just in case you are off with the texel density with a sheet and need to bump it up a little.

    Yes, doing tile strips across the top or up the side of the sheet is a nice technique that I use quite a bit. Unfortunately, doing this doesn't always leave me with sufficient space on the sheet for all of the other details that I need. So I might do a skinny tile strip across the top, then split my geometry horizontally, then map both the upper and lower sections to my tiling strip. This may save me a quarter or more of the sheet, which is sometimes necessary.

    Although, I've used both the shared-tiling and the individual sheet options, I've found that tiling sheets just takes a lot more wrangling. On top of that, as Rick pointed out, you might have some small and minor prop calling a whole gaggle of 1024 sheets at the same time, which really drags things down.

    Jackablade, consider consolidating several of those little alpha textures into a few slightly larger ones. It'll make less calls, and could help a little. I'd try to group them so that the objects that are seen at the same time go on the same sheet, if that were at all possible. By having fewer textures, it'll also make any editing of them less of a wrangling task as well.
  • IronHawk
    Options
    Offline / Send Message
    IronHawk polycounter lvl 10
    Is it possible to define cells on a sheet of tiles and then call the cell? This way I could put dirty brick, clean brick, brick with broken middle on a single sheet all uniform size and call the cells I needed.

    I do this in 2d games where I have an entire sheet devoted to a particular tileset. I use it also for ISO games where I put an entire sprite animation on a sheet and then code the animation calls to use cell coordinates.

    - Jesse
  • EarthQuake
    Options
    Offline / Send Message
    That probablly wouldnt be that hard to do, your engine would just have to support it and you would need some material system that would let you specify 0.25,0.25 to 0.5,0.5 is blah blah materal......
  • Ryno
    Options
    Offline / Send Message
    Ryno polycounter lvl 18
    I'm not familiar with any engines that can handle things that way. I don't quite understand how the graphics card wouldn't be forced to load that full texture, regardless of which cells you loaded from it.
  • Joao Sapiro
    Options
    Offline / Send Message
    Joao Sapiro sublime tool
    command and conquer generals uses that for the UI , dunno if it would work for texture.
  • Ryno
    Options
    Offline / Send Message
    Ryno polycounter lvl 18
    Wouldn't that just be a "display cell" of the texture command? If so, isn't that texture still actually being fully loaded on the graphics card?
  • Black_Dog
    Options
    Offline / Send Message
    Black_Dog polycounter lvl 17
    Yes. That's why you try to put assets that get drawn together on the same sheet, so that texture memory isn't spent on stuff that happens to be absent from the scene.

    The point of texture atlasing is to reduce batches and get slightly more efficient loading, not to avoid loading things into texture memory.
  • adam
    Options
    Offline / Send Message
    adam polycounter lvl 19
    You can also build your scene using modular pieces, unwrapping each to its own sheet and tiling the 3D piece, rather than the texture. A lot of todays games use that process and if the console/system can handle it I prefer to work that way.

    I did this image for someone @ another forum but it applies to what I'm saying here as well:
    hidemodular.jpg

    The image on the left shows how the shell of a scene I'm doing is using 12 pieces to do the walls. Even some of the detail pieces I used populate the scene are modular (re: the ceiling details).

    This scene isn't being created for an engine so I've been loose with limiting myself to memory footprints or any such bologna so 12 is a little high. The image helps illustrate the technique I mentioned.

    You've a lot of ways to work at your disposal; it all depends on the game and what the engine is capable of. Research mod-friendly engines out there, find out what they're capable of and what techniques people use to create some work for it and try your hand at that. Exposure to multiple ways of working is really beneficial to developing your skill set.
  • Ryno
    Options
    Offline / Send Message
    Ryno polycounter lvl 18
    Excellent point, Adam. Just to re-inforce that approach to those who haven't used it, make sure to UV map each module before duplicating and welding it. This can be a bit easier than attempting to copy and paste UVs after the fact.
    Using modular sections is a good way to ensure consistency in design, which is one of the hallmarks of well-planned architecture.

    Once again, check texel density of each module to ensure consistency between each of the different sections.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Gasp, you build in lego blocks? I will never understand you pc developers.
  • adam
    Options
    Offline / Send Message
    adam polycounter lvl 19
    Suck it down, PGA Street!
Sign In or Register to comment.