Home Technical Talk

Noob question about large textures on small objetcs.

polycounter lvl 10
Offline / Send Message
crazyfingers polycounter lvl 10
Lets say i make this really large texture for a tree and think it would look great on an arrow...

Will putting this large texture that's already being used in the engine and taking up ram onto the small arrow cost a lot of resources? The arrow is using the entire texture.

Another example:

I'm going to place 5000 single leaves in a scene that are cut out with opacity maps. Would it be lower cost to use a single tri and take up a larger UV space that encompasses the leaf or would i be better off using more tris to fit tighter around the leaf.

these are just examples, i wouldn't actually use an entire tree texture but hopefully that made my question clear, thanks in advance guys.

Replies

  • Tumerboy
    Offline / Send Message
    Tumerboy polycounter lvl 17
    depends on the engine. In your first example though, usually, it's not an issue. As long as the texture is already going to be loaded in any scene that your arrow shows up in. If it's not, i.e. if your arrow is in the middle of the desert, with no trees being drawn, then it's kind of a waste to load that much texture. If your arrow shows up in a forest, then sure, you can probably use it, and save a little memory. But it also depends on the size of the texture you WOULD be making for the arrow. If the tree texture is 2048x2048, and the arrow would only need a 64x64, it's probably better to just make a new texture.

    In your second example, some engines handle alpha overdraw better than others. Usually you want to walk a fine line. Start with the leaf texture on a quad, and then instead of cutting around it very carefully to get all the alpha off, just snip off the big corners, to get rid of most of the alpha. A little alpha on a 8-10 tri leaf card, is probably cheaper than no alpha on a 64 tri leaf card.
  • crazyfingers
    Offline / Send Message
    crazyfingers polycounter lvl 10
    Good to hear, thanks tumerboy :D
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    1- make a seperate texture, or if you really need to use the same make sure the texel density is the same as everything else, as it can be expensive to draw if its overly high res

    2- its a balancing act, if you want lots of leaves then duplicate the ground mesh and add a tiling texture, but if its just a couple then cut round them so that you can maximise texture space.

    in general these are not hard rules it depends on game type engine etc, i would do some tests in engine, simple quick tests where you can see which is cheaper to draw/memory
  • Mark Dygert
    Lets say i make this really large texture for a tree and think it would look great on an arrow...

    Will putting this large texture that's already being used in the engine and taking up ram onto the small arrow cost a lot of resources? The arrow is using the entire texture.
    Are they only ever going to be viewed in same area? Is there a chance the arrow might be viewed in some place the tree(s) are not? Like inside an armory, or if it's shot by a player there are a lot of places it can end up. It could be a huge waste to load the entire tree texture just for the arrow. If the arrow is only ever stuck in the tree, why not share the same texture.
  • crazyfingers
    Offline / Send Message
    crazyfingers polycounter lvl 10
    Yeah there's never a simple answer in this field. Well i guess I'm back where i started, but in a good way. Good to know that it can be expensive to scale down large textuers even if they're rendered on small objects. I know that just seems like common sense, but you just never know these days. I'll use discrecion when putting a large texture on a smaller object.

    Oh and vig, good point about the arrow texture. I'll be sure not to use asssets so unrelated in the future.
Sign In or Register to comment.