Sign in to follow this  
genesys

tiling textures vs. low texture ammount (performance)

Recommended Posts

genesys    133
Hi! I'm going to create realtime buildings... since buildings have many repetitions, one can save a lot of texturememory by using tiling textures... so i can make up my building out of 5 or 6 tiling textures which is much smaller than having one texture which covers the whole surface of the building... However - for the tiling textures, i can't combine them to a single texturefile cuase then they wouldn't tile anymore... So - what is better for performance? having as many tilable textures as possible and don't care how many texturefiles to use per object (of corse with sizes of powers of 2..) or is it better to combine some patterns into one single texture (which then contains repeting patterns) but having less texture files? Thanks!

Share this post


Link to post
Share on other sites
Prgrmr@wrk    109
I'd use a combination of the two. Have some bigger textures with a few variations (and major differences), and then a selection of smaller textures such as open windows and drain pipes (or whatever) that can be individually placed over that main textures. The advantage to this is that you can have an option to limit the number of extra textures per building (or per world), to help performance on low memory video cards.

Share this post


Link to post
Share on other sites
genesys    133
hi! thanks for your reply!

but if i do so then i will need multiple UV sets, no?

the best thing would be if i could all the repetitive textures put in one texturesheet. I know that it is possible to wrap a certain part of a texture as tile texture over a surface by code... but i have no idea how i could implement that dynamically (or how i would have to texture my objects in my 3d application to use such a feature)

How does the actual number of Textures affect performance?
i mean... How high must be the ammound of pixels that i can save to excuse a new texturefile?


Thanks!

Share this post


Link to post
Share on other sites
Prgrmr@wrk    109
I honestly don't have a clue what the real answer to the ratio of "number of textures" vs "total size of textures" is, but I've never noticed any difference between lots of little textures used efficiently, and several big textures. One thing I know is that you can't always count on the hardware to support textures over 256x256 (at least with older cards), so you might end up chopping tilesets into multiple pieces anyways, instead of binding them at variable texture positions. Chopping them up is how I do it in my 2D engine, for tiles, and for displaying large images.

The short answer, IMO, is to load the tiles however you want (from one file, or many), but bind each one to a seperate texture object. That also makes them slightly easier to draw later on, since you won't have to store the positions of each tile in the larger texture. The base texture for each building doesn't have to be that big either, it could just be a regular tile that repeats well, such as unlit windows.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this