Huge images...

BlitzMax Forums/BlitzMax Programming/Huge images...

Digital Anime(Posted 2008) [#1]
I noticed wit one of my projects that one of the images that I use causes trouble on some computers. In my case it was a 3600x2400 png file.

On my Nvidia card I got no problem, but on a notebook with an Intel gfx chipset everything was black. After replacing the image by one of a lower res everything worked perfectly.

My big guess is that there is a limit on the maximum image size you can use depending on the graphics card and texture sizes, or total video memory.

Wonder if someone knows the real reason for the limit.


tonyg(Posted 2008) [#2]
Your guess is right. Some cards have a limit on the image size and proportions they can display.
this looks horrible but run it as-is and it will show some of your display capabilities.
Try Large 2D Image Object to split your image.


GfK(Posted 2008) [#3]
Why would you ever need a single image that big? You load that into Blitzmax and its effectively 4096x4096 - over 60MB of resources.


Digital Anime(Posted 2008) [#4]
When using 1 hires star background picture for example. It would be easier t draw only 1 picture on the correct x,y coordinates al the time.

But now that I am aware of this I know it's best to split the image up in tiles to be compatible with older or lesser graphics cards. So my question is answered.

Thanks for the replies.


RexRhino(Posted 2008) [#5]
Digital Anime:

Are you making a 2D or a 3D game?

If 2D, it might be better to plot individual stars, depending on how many stars you have. A large graphic is going to take up TONS of memory. Like Gfk said, a 4096x4096 image takes over 60MB of resources.

If 3D, if you are doing space backgrounds, you don't need anything larger than 1024x1024 on the side of a skybox. I am writing a game that procedurally draws stars/nebulas/etc for a skybox (I am trying to create a kkrieger style game where everything is generated), and uses a resolution determined by screen setting (I figure if they are running a higher rez, they have a better graphics card to handle bigger textures, if they run low-rez I want to keep textures small). I have found that textures larger than 1024x1024 don't really increase the quality of the skybox (assuming, of course, it is outer space stuff). Even 512x512 texture on a space skybox looks pretty decent on a 24" monitor at 1920x1200.


Digital Anime(Posted 2008) [#6]
It's only for 2D, so I know that it's best that everything I make using large backgrounds I can best split everything to smaller tiles first in some cases.

About the 3D, it's good to know that when I will start with a MiniB3D project. I think it's also a good option to think about a texture setting when I still want to use high detailed textures in my game for best quality, but also make the same textures in lower detail available for compatibility


smilertoo(Posted 2008) [#7]
Easiest way isn't equal to the best way.
You'll want to use tiling, even if it's with big tiles.