Re: Non-square clipmaps
Angus Dorbie (dorbie++at++multipass)
Tue, 10 Mar 1998 10:56:27 -0800
On Mar 10, 10:45am, Michael A. Coleman wrote:
> Subject: Re: Non-square clipmaps
> perfly++at++segolene.roazhon.inra.fr wrote:
> >
> > Salut,
> >
> > is it possible to use non-square clipmaps ? (ex: 32768x8192)
> >
> > Kenavo
> > =======================================================================
> > List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
>
>
> One can stuff a non-square texture into a square clipmap; we had to do
> this. Decide which square power of two you want to go to and then stuff
> your image into half or fourth or eighth (or whatever your nearest
> power-of-two aspect ratio is) of the cliptexture. Your image cache
> files still have to refer to a square cliptexture. The trick is
> positioning your eyepoint so that you never look at the areas of the
> entire cliptexture that don't correspond to your actual image. We set
> up blank tiles of various sizes to cover the "undefined" area of the
> cliptexture.
>
> There may be a better way to do this, but this is what we came up with.
> We did this quite a bit of time ago, so my explanation is a little hazy.
>
This is the right approach you just pad the database.
It doesn't cost you anything because you don't need the undefined tiles on the
file system.
You can use the texture matrix to scale the image up from the inset dimension
to the 0,0 to 1,1 texture coordinate range, or more accurately scale the
coordinates down to the inset size.
Cheers,Angus.
--
"Only the mediocre are always at their best." -- Jean Giraudoux
For advanced 3D graphics Performer + OpenGL based examples and tutors:
http://www.dorbie.com/
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2
on Mon Aug 10 1998 - 17:57:00 PDT