Re: Projected texture in performer

New Message Reply Date view Thread view Subject view Author view

From: Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Date: 02/05/2001 11:56:36


Performer objects have everything that you need to render multipass
algorithms like this. What you need to do is install a Draw callback on
the pfChannel and do your rendering operations in there. Take a look at
the man pages for pfChannel, pfTexture, pfGeoState, pfTexGen and
pfOverride, all of which you will need to do this. Your algorithm will
look something like this from within the draw callback

1) Render the scene as normal with pfDraw
2) pfPushState, pfPushMatrix
3) apply your projective texture
4) apply a pfTexGen
5) use pfOverride to lock in your texture and texgen
6) Change the blend function to an additive one
7) Render the scene again with pfDraw
8) pfPopState, pfPopMatrix

www.opengl.org has some info on projective texturing here, it will tell
you how to set up the texgen:
http://www.opengl.org/developers/code/rendering.html

-- Marcin

On Mon, 5 Feb 2001, Siedle, Pete wrote:

> Hi Performers
>
> I'm looking at trying to do some lighting effects using lightmap texture
> projection.
> I've seen some of the openGL examples (and some examples using Performer)
> and think I've managed to get the general idea of what's required.
>
> All the examples I've seen generate the geom in the app and apply textures
> at this point, which seems fairly straight forward (in the 'simple' examples
> anyway :o) .
> However, does anyone know if it's possible to project a texture onto a
> database / objects that have used a loader to 'create' the geom in the app;
> ie, flt file loaded into app.
> So I need to multipass render:
>
> 1. render the scene with textures as setup in the flt file,
> 2. render the flt geom with projected texture,
> 3. blending the 2 together and display.
> 4. goto 1.
>
> If it's possible to achieve 2. above, could anyone point me towards any
> url's / provide any hints!
>
> Thanks in advance
>
> Pete
>
> -------------------------------------------
> Peter Siedle
>
> +44(0)1642 tel: 384304 - fax: 384310
>
> p.siedle++at++tees.ac.uk - http://vr.tees.ac.uk
> --------------------------------------------
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Feb 05 2001 - 11:56:50 PST

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