Home Technical Talk

Texture Atlases and MipMaps

alfredasplen
vertex
Offline / Send Message
Pinned
alfredasplen vertex
Hi everyone, I've got some thoughts about texture atlases and game art, which I think can be best explained through a hypothetical example:

I've got myself a texture atlas. On it I've got a bunch of assets that I want to reuse, including a few variations on let's say... a trash can. I've a got a fairly large scene set up in-engine: it's a long street, with a bunch of trash cans along it. I've got one trash can standing on one end of the street, and one on the other end of the street, both sharing this texture atlas.

Standing next to one trash can, won't the nearer one also snap into a lower texture resolution when the farther one switches to a lower LOD? Are their textures processed individually by the engine, side-stepping this issue? What would be a solution to this issue (if it actually is one), when you basically want to create a bunch of different assets that are reusable over a large area, and still keep draw calls to a minimum? Do you still have unique textures for each asset and just use material instances from a few master materials?

I first really started mulling this over when I started reading up on stuff like trim sheets, texture packing methods, Tor Frick's famous one-texture environment, etc. I suppose it's also a relevant technical questions for games like Skyrim, where you're constantly mixing and matching a huge amount of different assets at most points in the game.

Can you see what I'm wondering about? Am I missing some super obvious solution?

Replies

  • throttlekitty
    LODs are handled separately on each object, so there's no worry about all your trash cans behaving strangely. The same goes for mipmaps, which is (always?) per triangle, even within an object. You could view these both easily by having a row of trash cans and walking to and from them and seeing the result. For mipmaps, you could make one that uses a different solid color for each mip and watch the rainbow of colors; probably better to use a model with a bit more to it than a trash can though.

    So for a more direct answer, use the texture atlas where it makes sense to do so, and reuse materials where you can. So long as you don't go crazy with thousands of materials, you're probably fine. If performance gets bad, you can always start reducing.
  • alfredasplen
    Ok, thank you for the reply! It's been driving me nuts for the past few weeks thinking about this. I kind of obsess with knowing every step of the pipeline before starting a project so I can plan for every eventuality (maybe that's why I have problem getting shit done...)
Sign In or Register to comment.