Advantages and disadvantages of single image textures?
-
- Posts: 7
- Joined: Tue Jan 31, 2012 5:05 pm
Advantages and disadvantages of single image textures?
Hello,
I have recently been thinking about optimizing performance on my game. I am currently creating a voxel-like 3d game.
At this moment in time all my textures are stored in one folder in individual images. For example there are 99 images all 16 x 16 and they are all around 1kb in size. I was thinking whether it would impede performance if i had them all in one big file, 256 x 256 or 512 x 512 in a texture-sheet like thing (sorry i forgot the name perhaps its atexture atlas?) almost like the one found in the 2d drawing tutorial.
Would having all the textures in one image affect performance at all? Are there any positives to changing it so all my individual textures are combined?
Thank you.
I have recently been thinking about optimizing performance on my game. I am currently creating a voxel-like 3d game.
At this moment in time all my textures are stored in one folder in individual images. For example there are 99 images all 16 x 16 and they are all around 1kb in size. I was thinking whether it would impede performance if i had them all in one big file, 256 x 256 or 512 x 512 in a texture-sheet like thing (sorry i forgot the name perhaps its atexture atlas?) almost like the one found in the 2d drawing tutorial.
Would having all the textures in one image affect performance at all? Are there any positives to changing it so all my individual textures are combined?
Thank you.
Re: Advantages and disadvantages of single image textures?
Yes, it'd improve performance. The negative is that mipmapping artifacts may appear.
Re: Advantages and disadvantages of single image textures?
You can store all images in a one big image, then create textures from sub-images. Wich at least remove some overhead. There are also things that can help you solve that problem:
2D texture arrays
Irrlicht does not have support for that unluckily.
2D texture arrays
Irrlicht does not have support for that unluckily.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: Advantages and disadvantages of single image textures?
i used that extensively in mobile game for my fulltime job. It's really fast.
My company: http://www.kloena.com
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
My blog: http://www.zhieng.com
My co-working space: http://www.deskspace.info
-
- Posts: 7
- Joined: Tue Jan 31, 2012 5:05 pm
Re: Advantages and disadvantages of single image textures?
Okay thanks!
I will begin changing everything so that it is done this ways soon. Just one question though. Do i need to set a transparency key or is having the texture sheets background to transparent good enough?
Thanks again!
I will begin changing everything so that it is done this ways soon. Just one question though. Do i need to set a transparency key or is having the texture sheets background to transparent good enough?
Thanks again!
Re: Advantages and disadvantages of single image textures?
That depends on whether you need transparency.
-
- Posts: 7
- Joined: Tue Jan 31, 2012 5:05 pm
Re: Advantages and disadvantages of single image textures?
On some occasions i will, for example leaves, i need transparency for the gaps in between each leaf.
Re: Advantages and disadvantages of single image textures?
It is almost the same, You upload just once the texture, but you can use it on multiple materials. The only diference then is that you will have a little more draw calls, but always less than if you had only one texture per object. You have to group your objects, though to achieve performance improvements. Take a look to the batching and instancing systems that there are out there.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Advantages and disadvantages of single image textures?
hi,
I have a big house model, with many objects and furniture. I created a single texturefile (with UV mapping in Maya), and its size is approx. 1 MB, with 2048 x 2048 resolution. I think, if I combine everything to one file, its size could reach the 100MB filesize also.
Is there any limitation in irrlicht about the supported filesize or imagesize?
How can I calculate the minimum required filesize or image resolution, where all my objects are covered, and the qualilty is also acceptable? Is there any way to do this?
I have a big house model, with many objects and furniture. I created a single texturefile (with UV mapping in Maya), and its size is approx. 1 MB, with 2048 x 2048 resolution. I think, if I combine everything to one file, its size could reach the 100MB filesize also.
Is there any limitation in irrlicht about the supported filesize or imagesize?
How can I calculate the minimum required filesize or image resolution, where all my objects are covered, and the qualilty is also acceptable? Is there any way to do this?
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Advantages and disadvantages of single image textures?
There's a maximal texture size supported by your gfx card, which may also differ from other cards. In general, you shouldn't use versions larger than 2kx2k, better smaller. Moreover, changing the textures while rendering will require the gfx card to arrange things for each texture, where some things might depend on the size, so rendering becomes slower with increasing texture sizes. But I'm not sure if and which parts would depend on the texture size.
You also have a general maximum of gfx card memory. Note that not the file size matters, but the RGB data size. Which here means 2048x2048x4 byte, so 16 MByte just for the main texture, plus another 6 or so for the mipmaps.
Irrlicht should be able to load all files up to 16kx16k, which is IMHO the absolute maximum of textures gfx cards support. 100MB file size is not really achievable, unless you use BMP format.
Required quality depends on the details you need on your textures and the size of the polys you cover. You could probably calculate some limits, but the visual impression is a better indicator than any theoretical value. Try to scale down the texture (or reduce the LOD bias) and check if it's still good enough. In that case scale down your texture.
You also have a general maximum of gfx card memory. Note that not the file size matters, but the RGB data size. Which here means 2048x2048x4 byte, so 16 MByte just for the main texture, plus another 6 or so for the mipmaps.
Irrlicht should be able to load all files up to 16kx16k, which is IMHO the absolute maximum of textures gfx cards support. 100MB file size is not really achievable, unless you use BMP format.
Required quality depends on the details you need on your textures and the size of the polys you cover. You could probably calculate some limits, but the visual impression is a better indicator than any theoretical value. Try to scale down the texture (or reduce the LOD bias) and check if it's still good enough. In that case scale down your texture.
Re: Advantages and disadvantages of single image textures?
though pagemapping is desirable for the performance benefits it can make tiling trickier and increases modelling time as a result. Also many UV breaks from pagemapping your objects can increase the memory footprint of a model (though there are ways around this is by folding the UVs backwards and forwards over themselves if the textures are already tiling badly this will only make it worse visually) . Pagemapping (from an art point of view) works best on discrete objects (tree sets, houses, etc) tiling on large areas such as terrain so if you already rely on tiling you may have a lot of work on your hands.