Re: Decals with projected textures again??

New Message Reply Date view Thread view Subject view Author view

Robert Webb (robertw++at++wormald.COM.AU)
Fri, 21 Jul 1995 14:04:42 +1000 (EST)


On Thu, 20 Jul 1995, Robert Webb (that's me!) wrote:

> Hey Nacho,
>
> > We had a similar problem with zwritemasks, and maybe it'd be best if you
> > can handle the displacepolygon in callbacks by yourself. Even if you
> > consider using callbacks in the decaled nodes to reset the zwritemask,
> > that might not work properly, since the writemask ( at least in our case )
> > were changed after the draw node callback.
> >
> > Jim Helman told me a few weeks ago that ...
> >
> > >In 1.2, PFTR_NO_OCCLUDE transparency and PFDECAL_BASE_FAST/DISPLACE,
> > >diddle the zwritemask as part of their operation.
>
> This is sad :-( It's a pity I can't say pfOverride(PFSTATE_ZWRITEMASK) or
> something like that. But you mention that it happens in 1.2, will anything
> be different in 2.0? I assume it will still diddle the zwritemask.
>
> It seems like such a simple thing to just stop the call to zwritemask(), but
> instead I will have to traverse the scene graph, replace all the pfLayer
> nodes with pfGroups, and add my own call-backs to all the children (or at
> least the first two) to handle the decal stuff. This will be an even bigger
> pain when we use the Performer 2.0 large-area data-base management stuff.

Well it turned out not to be quite that bad. All I needed to do was put a
pre-draw call-back on the second child of each pfLayer node, and all the
call-back does is "zwritemask(0xffffffff);". The first child is considered
to be the base geometry, and the following children are the decal layers.
It turns out that the pfDecal(PFDECAL_LAYER) call, which called
zwritemask(0x0), is done before the pre-draw call-back (thankfully!), so I
have this chance to set the zwritemask back how I want it. This means I
can't have more than one level of layering, but that's fine for me.

That's one of my problems solved!
Rob.

------------------------------------------------------------------------------
 _
|_) _ |_ _ ._ _|_ \ / _ |_ |_ robertw++at++wormald.com.au
| \(_)|_)(/_| |_ \/\/ (/_|_)|_)o

"Informer, you no say daddy me Snow me I'll go blame, a licky boom boom down"
                                                                - Snow.

------------------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:42 PDT

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