Re: Changing Material

New Message Reply Date view Thread view Subject view Author view

Fischler (src++at++rose)
Mon, 13 Mar 1995 13:16:43 -0800


+>---- On Mar 13, 7:04pm, Marco Crocetta wrote:
> Subject: Changing Material
->Hi,
->
->I'm still working at my trasparency problem.
->What Angus suggested works very well (thanks!) but the problem
->is that my goal is to change ONLY the alpha value of the
->material(s) belonging to a certain model.
->

If you only need to do this occasionally and need to do it to
random geometry and don't want to screw up youor pfGeoState and
pfMaterial sharing, then you can do this directly will pre- and post-
draw callbacks, though it may have a performance impact on your draw process.

The easy way on an RE you can use the msmask screen-door transparency - what
we do for fade LOD. You can use msmask() to set a level of
opacity for the resulting geometry. Set it back to full opacity
in the post- draw callback.

->Then I have two shared instances of the same model under two different
->groups belonging to the same scene, and I apply my traverse function
->to one of them...The result is that both models are transparent because
->they share the same pfGSet...

Sharing the same GSet is not a problem.
You needed separate pfGeoStates - one with the transparent material,
one with the opaque. You could store a list of pfGeoStates in the
user data of the node. Then, you could switch in a pre-draw callback
on the node which pfGeoStates the pfGeoSets were referencing.

src.

-- 
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Graphics Dev.
src++at++sgi.com  (415) 390 - 1002  FAX: (415) 965 - 2658  MS 8U-590
-----{-----{---++at++   -----{----{---++at++   -----{----{---++at++   -----{----{---++at++

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:04 PDT

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