Re: Mirror Effect

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 06/23/2000 12:38:08


The author of smoke & mirrors is John Kichury.

Subload is really too slow for fast mirrors, it's essential if you have
a curved surface but that's pretty complex stuff. Planar reflections can
be done much faster with other approaches.

My mirrors effect in the bumplogo section of www.dorbie.com is just a
database & rendering order hack, and the other post with sample code is
really for a mirror channel rather than a mirror in a scene as far as I
can see but pretty close to what you need.

You need to compute the reflection matrix for the surface in question
and mask the mirror database to the reflecting surface maybe using
stencil operations, this matrix is the tricky part and is an exercise
left for the reader. Reversing the face winding as the other post
suggested is the right thing to do. The only other issue is how you
choose to draw the scene multiple times, you can have a duplicate
channel which is over your main channel or you can add the scene twice,
once below the reflection matrix with a winding & stencil mask callback.
Light sources need to be reflected too so you should probably do the two
channel thing to allow this without too much pain.

You can then get clever with glScissor or portal culling to improve
performance.

Cheers,Angus.

Svend Tang-Petersen wrote:
>
> Or check www.dorbie.com for a similar example.
>
> Jason Rappleye wrote:
> >
> > Hi,
> >
> > One of our local SEs was talking to me about the smoke & mirrors demo that
> > we have on our O2s. It does what appear to be real-time reflections. He
> > said the SGI employee wrote a paper on how this was done, but he never
> > managed to get me a copy of it.
> >
> > SGI folks: is this available somewhere? Or can we get the author to
> > explain it?
> >
> > Thanks,
> >
> > Jason
> >
> > On Fri, 23 Jun 2000, dimi christop wrote:
> >
> > >
> > > Hi,
> > > I would like to develop a mirroring effect.
> > > I was thinking of capturing the image buffer of the pfChanel, and apply
> > > this image as
> > > a texture at real time. This would happen every frame.
> > > I started out by applying a pfTexture object on a quad, and then use
> > > pfTexture::subload to capture the screen buffer and
> > > change the texture on the object at once but it did not work.
> > > Does anyone know a different way of doing this.
> > >
> > > Thanks in advance
> > > Dimi
> > > ________________________________________________________________________
> > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> > >
> > > -----------------------------------------------------------------------
> > > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > > Submissions: info-performer++at++sgi.com
> > > Admin. requests: info-performer-request++at++sgi.com
> > >
> >
> > --
> > Jason Rappleye
> > Canisius College, Computer Science & Math major
> > email: rappleyj++at++canisius.edu rappleye++at++acm.org
> > "The woods are lovely, dark and deep, But I have promises to keep,
> > And lines to code before I sleep, And lines to code before I sleep"
> >
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
>
> --
>
> Regards Svend
>
> *******************************************************************
> Svend Tang-Petersen, MSc Email: svend++at++sgi.com
> AGD, Europe
> Silicon Graphics Fax: (+45) 46579440
> Hovedgaden 451 Phone: (+45) 46555660
> 2640 Hedehusene VNET: 540-0422
> Denmark http://reality.sgi.com/svend_copen
> *******************************************************************
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 12:38:35 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.