PDA

View Full Version : Rendering BIG pictures



Marc
03-13-2002, 12:54 AM
Hi all!

I don't know, if this is really an advanced coding question (at least for me): I would like to render a picture with a higher resolution than the screen (lets say hmmm... to make it more unrealistic, that your screen supports it 1000000x1000000 pixels). For this I would like to render a number of tiles which can be stitched together afterwards seamless. But I don't know, how to set up the viewport for the single tiles. The middle tile is easy (just a smaller angle) but the others have some skewed viewing pyramides. I don't know how to set up these pyramides. Can anybody help me? Thanks alot in advance.

Marc

JML
03-13-2002, 05:32 AM
Check up on the use of glFrustum (explained in the redbook). The frustum does not have to be symmetric, you can specify the 'skewed' viewing pyramids with that call.
The math is fairly straightforward I guess: the left, right, top and bottom values for the tiles are gridded on the near plane, znear and zfar are constant.

HTH

Jean-Marc.

ehart
03-13-2002, 07:39 AM
A technique for this is described in Game Programming Gems 2, and source is included.

Anyway, it is pretty much just writing your own version of gluPerspective using glFrustum. Compute the left, right, top, and bottom planes for the entire scene view, then just compute than parametricly for the given tile.

-Evan

Marc
03-13-2002, 10:19 PM
I tried glFrustum and it works great! It's quite easy if you know what to look for.
Thank you very much.

Marc