Creating large images

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating large images

Tomd
Up until recently, I was exporting images using Screenshot.readToBufferedImage() from within my display() callback.

This creates an image which is effectively a screenshot of whatever is displayed by the program. You can create an image of around 1500 by 1000 pixels which is adequate for most purposes. It is essentially limited by your monitor resolution.

Now I really need to be able to create images of around 6000 by 4000 pixels, for printed posters.

I am trying to use GLPbuffer to do this, is there a better way? I am on V1.1.1a, is there anything better in later versions?
Reply | Threaded
Open this post in threaded view
|

Re: Creating large images

gouessej
Administrator
JOGL 1.1.1a is obsolete and no more maintained, please switch to JOGL 2.0. Best regards
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Creating large images

Tomd
Last time a checked, which I admit was a while ago, V2.0 was in beta and people were advising that V1 should be used for production apps.

V1.1.1a has worked well for me for a long time with no problems. There still doesn't appear to be a release of 2.0, just a release candidate.

How stable is it, and what is the work involved in switching? What are the benefits?
Reply | Threaded
Open this post in threaded view
|

Re: Creating large images

Demoscene Passivist
Administrator
Yep, I had a similar problem recently and also didn't found a solution to it. It seems that you can create a OpenGL window that is larger that the current screen resolution, but when grabbing the output back to write it into an image the "out-of-screen-area" is black/white.

This is no isolated 1.1.1a its also the case when using the newest JOGL2 builds (b#500+) either with AWT or NEWT. My best guess is that it has stg to do with the OpenGL driver and is not really an issue of JOGL in particular.

Anyway, a possible solution is ofcourse to render the image to a FBO (8192x8192 is possible on most GPUs) and then copy it back in multiple tiles.

Maybe someone has a better idea ?
Reply | Threaded
Open this post in threaded view
|

Re: Creating large images

Demoscene Passivist
Administrator
Ah, nearly forgot that there was a good article on "poster size rasterization" in Nvidia GPU-Gems. U can find it online here: http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter21.html

They suggest a viewport based approach that generally makes it possible to render at infinite resolution. Ofcourse u have to do the copyback stuff on ur own.

If u have the patience to implement their approach or find another one on ur own it would be great if u could share it here
Reply | Threaded
Open this post in threaded view
|

Re: Creating large images

Tomd
Thanks, the viewport stuff looks like a really good idea.

I am already getting good results grabbing images from the screen and saving them to file. This looks like a good way to go.

I will try to share as much as I can if I get it going, although it is part of a more complex system it might not be easy to extract anything reasonably self contained.