Game Development Community

Max image size

by Tim Doty · in Torque Game Builder · 03/28/2005 (4:16 pm) · 6 replies

I just discovered that images are limited to 2048 pixels in height (the image is 10350 pixels tall). 10350 pixels tall!??!?!? I can hear you asking (in a virtual sense). Well, yeah, because I was going to use T2D's ability to load as cell: the image is 4x15 images. Much more convenient than laying out/editing 60 different related images (think deck of cards). The program I used to create the images is scriptable so I may be able to do something there but:

Is there any real reason for the limitation? Or should I just be able to find the constant limiting the size, adjust it upwards and recompile?

#1
03/28/2005 (5:17 pm)
10350 pixels tall is massively excessive. Okay, let's assume your image is 10350x10350. Let's see...

10350 x 10350 x 4 = 484,490,000 bytes required to store your image on the video card, or about 418 megabytes. Most video cards have anywhere from 32 to 256 megabytes of video RAM. (The 4 comes from assuming it's a standard 24-bit image with an additional 8 bits of alpha.)

60 images might be messier, but until we have consumer grade video cards that can do massive clip-mapped textures, you're going to have to live with it.

Most absolute top of the line modern video cards can handle up to 4096x4096 textures. But for the most part you want to stick to 512x512 or 256x256 on average.
#2
03/28/2005 (6:10 pm)
The common maximum for ATi cards is 2048x2048. For nVidia cards it's 4096x4096. The Voodoo maximum was 256x256, but the sooner we stop living within those limits the better ;) And the best way to do that is to make sure all our fancy new games don't work on their hardware. But that's just my opinion ;)

I would suggest using the chunked image datablocks and sprites for loading such massive files, if that's possible for your needs. I know it can read non-power-of-two images, but I don't know if it can handle such massive images.

Alternatively, if you've got something like a 4x16384 image file, this is no different than having a 256x256, assuming that the tiles inside will still fit correctly (ie, you don't have to break tiles). And if that doesn't fit, then use a 256x512.
#3
03/28/2005 (6:15 pm)
Voodoo for the win!

Hey all these new gamers thing this new sli stuff is pretty neat. Me, I remember running a pair of Vodoo 2 cards SLId like 10 years ago :p And you know what? Those things gave me better performance than just about ANYTHING until only a few years ago!
#4
03/29/2005 (5:59 am)
As I said, the image is not loaded as "full", but as "cell" -- it is 2000x10350 pixels (4x15 cells). The individual images are "only" 500x690. Okay, not POT textures so it would really be 512x1024, right?

Or does T2D load the whole image as a single texture and then map out portions?
#5
03/29/2005 (11:42 am)
Quote:Or does T2D load the whole image as a single texture and then map out portions?

Of course. It's more efficient. The fewer texture-swaps that you can get away with, the better the performance.

Like I said, try the chunked version.
#6
03/29/2005 (12:18 pm)
Thanks for the reply. fxChunkedImageDatablock2D inherits from fxBaseDatablock2D so I didn't think it supported non-full mode loading. I just tried and it fails as well. I'll see about scripting the export of many small images then.