Texture Problem?

BlitzMax Forums/BlitzMax Programming/Texture Problem?

Steve Elliott(Posted 2005) [#1]
I load a large 2d chess board into BlitzMax (1024 X 724) using the standard loadimage command.

Now because BlitzMax is using 2d in 3d I guess internally it's a texture mapped plane. So if somebody runs it and their graphics card can't handle textures that big I'm going to have compatibility problems aren't I?

If I break up the board I can't see them fitting back together correctly because it's a perspective view.

Any help would be appreciated.


Shagwana(Posted 2005) [#2]
I see no reason why you cant chop it up into tiles and paste it bit by bit back again. It should be possible and I recommend you look into that way of handling it.


N(Posted 2005) [#3]
Now because BlitzMax is using 2d in 3d I guess internally it's a texture mapped plane. So if somebody runs it and their graphics card can't handle textures that big I'm going to have compatibility problems aren't I?


My old GeForce 3 ti200 had a max texture size of 2048x2048 pixels, the GeForce 2 (GTS 64mb) has a 2048x2048 limit as well, so I really don't think you should be that concerned with this. Unless for some insane reason you want people using the first Voodoo cards to be able to run your game, in which case using a hardware accelerated 2D engine is illogical.

So, I'd say don't worry about it.


Steve Elliott(Posted 2005) [#4]
Thanks Noel I didn't realise the Geforce 2 supported such large textures.

Shagwana, I have my doubts about chopping the board up because the diagonals (from the back to nearest the camera) wouldn't have to be far out at all for the join to be spotted - and I'm sure the quality of texture mapping varies slightly in quality on different cards - also, drawing more (but smaller) pieces seems slower to me.


Robert(Posted 2005) [#5]
also, drawing more (but smaller) pieces seems slower to me.


That seems surprising. My experience is that graphics cards of the GeForce 2 era work well with 256x256 size textures or thereabouts, but performance drops dramatically with anything much larger.

If I break up the board I can't see them fitting back together correctly because it's a perspective view.


Do you mean that you use SetRotation before drawing the board? If the board graphic itself is drawn with a perspective view that isn't a problem. Is the perspective changeable?


ziggy(Posted 2005) [#6]
any size potence of 2 is faster than others, it doesn't matter if it's biger or smaller. it's best to have a 1024x1024 texture, that a 1024x724 one.


Steve Elliott(Posted 2005) [#7]

Do you mean that you use SetRotation before drawing the board? If the board graphic itself is drawn with a perspective view that isn't a problem. Is the perspective changeable?



No the board is fixed, but I'm just concerned that because a chessboard has very obvious lines (screen shot in the gallery) any alignment problems will be very obvious. But for lower resolutions I'll probably scale the board down - which again might cause problems if the individual pieces are scaled independently as tiles.


it's best to have a 1024x1024 texture



I've considered using a texture of that size, but didn't want to slow it down further - everybody agree that size would be better?


Steve Elliott(Posted 2005) [#8]
Ok, I'll try to break-up the board and background textures into 256 X 256 blocks - starting with the 1280 X 1024 background!

It's probably a good idea to do this before releasing any demo to minimize negative feedback I guess.

Ouch! A drop of 22 FPS (on my system) for just breaking up the background texture - from 457 FPS to 435 FPS - memory consumption is down though (and compatibility up?)