Game Development Community

How Does Torque 3D Handle Non-Square Textures in Memory

by Greg G · in Torque 3D Professional · 02/25/2010 (9:32 am) · 5 replies

I'm wondering how Torque 3D handles textures there aren't square. Is there an actual memory savings or does it allocate a slot in memory for a square image as large as the biggest dimension of the texture?

I ask because I know in some engines there is no memory savings from using rectangular textures, I'm just wondering if that's the case with T3D.

Thanks

#1
02/25/2010 (9:44 am)
To ensure that your GPU is processing your textures efficiently, you should ensure that they are power-of-two. They do not have to be square, but they should definitely be POT.
#2
02/25/2010 (9:46 am)
I'm aware they have to be powers of two. My questions was purely about memory savings. I have been using textures like 256x512 for awhile now, but I'm wondering if there is any point? Does this translate to a savings in memory, or is a full 512x512 slot being allocated?
#3
02/25/2010 (10:09 am)
I believe any video card built since 1999 can handle a 256x512 texture without it having to be square. This was probably a limitation in the Voodoo1 or Voodoo2.

So no, T3D won't make textures square, because they are fed as they are to the graphics API.
#4
02/25/2010 (10:50 am)
Thanks, that makes sense. I have only heard about the issue in relation to older engines I thought it might no longer be relevant.
#5
02/25/2010 (10:55 am)
if you use non power of 2 textures on terrain they will appear grainy and non mipmapped. always use a combination of 32 64 128 256 512 1024 2048 4096, etc and you will be ok. texture could even be 64x4096 and it will work well.