Sign in to follow this  
Soapsurgeon

Large Images in an application

Recommended Posts

Hi! Im developing an application in the .NET Framework (C#) and I havent had any problems... up until now. I have in my application a map of an area of England and in its true form its 8000x8000 pixels and as you can imagine the .NET framework and GDI+ have real trouble displaying it in any control. I therefore resized it to 2000x2000 pixels but it still has trouble redrawing it at an acceptable framerate. Im now considering using OpenGL to render the map and think itd be great if i could display the full 8000x8000 image and have the ability to zoom and move around etc. I have had some experience with openGL before but that was 3d animation etc, im sure some of the same principals apply but i have looked at the NeHe tutorials and cant find anything that would suit my needs. Do you think that rendering it in OpenGL is the way to go? If so how should I go about it? And if not what other way could i do it? Sorry for the long winded question! Regards, Matt

Share this post


Link to post
Share on other sites
Well if it was me I would split the image into much smaller and manageable chunks and then load all of these images into an array and render them side by side so as to re-create the effect of having one large image. This technique would apply to GDI+, OpenGL, DirectX or whatever graphical API you choose to use.

If there's some reason why you can't split the image up then 2K x 2K is possible with newer versions of cards, for example the 6600 GeForce will do 4096 x 4096. I can't imagine that the rendering speed will be fantastic though, although this is just an educated guess. If you look at this list of graphics cards for "Max. texture size" you should be able to get an idea of what sizes are available for particular generations of cards.

Is this an OS map by any chance? I remember playing with the full size map of the UK, at over 30K in each dimension it was fun getting that to load on a PIII with 256Mb RAM I tell you [lol].

Anyway, best of luck and post back if you have any questions [smile].

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hey,

Thanks for your prompt reply. I have split the map up, into 800x800 tiles, and I draw them to an image, side by side as to create a bigger image of the desired size but GDI+ doesnt like that. Should I split them into 256x256 parts and get opengl to render them to some polygons then? I wish there was an easy way of doing this.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
ahhh, but my image is 8000x8000 so 1024 wont go, how do i get around that? Sorry for the stupid questions, just been a while since i did graphics.

Share this post


Link to post
Share on other sites
:-$ yeah, i knew that (honest!). Ok then, ill resize the images and apply them to polygons (ive done this part before) but i just wanted to clarify something about the performance of this...

The total size of all the images will be roughly 200mb so will that cause performance issues? or is it clever enough to only load the textures it needs? Ive got a funny feeling that im going to have to write some code here that loads the textures as you move along?

Thanks,

Matt

[Edited by - Soapsurgeon on March 17, 2006 9:45:19 AM]

Share this post


Link to post
Share on other sites
Trust your felings, they do you good.
If it can be done then it's a must since it doen't take just 200Mb, it takes exactly 255,36Mb (with mipmaps that is), if not then you have to reduce the textures enough for it to fit.
an alternative would be to use compressed textures, but that is complicated to such a degree that i have never tried it myself

Share this post


Link to post
Share on other sites
hmmm im contemplating whether its actually worth doing, its for my final year project at university and the rendering of the map is only a small portion of my overall application, albeit an important one, and you know the old saying if it aint broke dont fix it! It isnt broken because it works but ive been so caught up on trying to make it perfect...

Im thinking if its going to be too hard to make a quick implementation then perhaps theres no point in doing it. Thanks for all your advice.

Regards,

Matt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this