Angus Dorbie (dorbie++at++sgi.com)
Tue, 20 Jul 1999 14:11:20 -0700
If you disable the zbuffer then you shouldn't need to writemask either.
Performer state shouldn't be clobbering this either (but maybe my IrisGL
is rusty). coplanar surface offset code may be clobbering your
writemask. Do you have pfLayers in the scene graph?
Depth mapped shadows DELIBERATELY clear a red background to show up
errors in the rendering.
If you have channels split up and maybe your light on a foreground
channel then the depth map will be drawn before that channel and the red
will overwrite the background channel.
Also, the channel clear method on Reality Engine is CRITICAL. all
fragments must be written if you are tag clearing instead of using the
much more expensive dlear operation. So, you need to clear the screen to
black not just tag clear in something like aspace simulation.
Cheers,Angus.
Jorge Valencia Loera wrote:
>
> Hi pf's,
>
> my configuration:
>
> Onyx
> 12 x R4440 CPUs
> 2 x RE2 w/ MCO on each pipe
> IRIX 6.5.3
> PF 2.2.4
> I use multiple processes, multiple channels, multiple pipes & I link my app
> using Iris GL.
>
> Does anybody know about performer functions (Libpr routines I guess) that
> can do the same work as the GL functions zbuffer() & zwritemask() ???
>
> I am working on a space simulation and I am trying to draw a background
> first (the sun, moon & earth) without writing into the depth buffer (to
> avoid problems w/ the shadow map when casting shadows) & on top of that draw
> a foreground (the space station)
>
> my scene graph is something like this:
> (use a regular font to see the scene graph)
>
> SCENE
> / \
> / \
> BG FG
> /\ \
> / |\ \
> / | \ \
> / | \ \
> STARS SUN MOON SPACE
> STATION
>
> The "background - foreground" effect is working fine but when I try to cast
> shadows I have some color corruption (there is some transparency appearing
> on the space station so that I can see my background through some objects)
> and the shadows are completely wrong!!! (I only see some sort of big
> randomized shadow on the screen)
>
> I guess it's because my background is still blowing up my depth buffer. If I
> remove the BG sub-tree from my scene graph then everything works fine.
>
> I use the following node callbacks for my BG node:
>
> // This function is called during traversal just before drawing a
> // celestial body node. Its purpose is to disable the writing to
> // the Z buffer.
> int
> BGPreDrawCB(pfTraverser *_trav, void *_data)
> {
> zbuffer( FALSE );
> zwritemask( 0 );
>
> return PFTRAV_CONT;
> }
>
> // This function is called during traversal just after drawing a
> // celestial body node. Its purpose is to enable the writing to
> // the Z buffer.
> int
> BGPostDrawCB(pfTraverser *_trav, void *_data)
> {
> zbuffer( TRUE );
> zwritemask( 0xFFFFFFFF );
>
> return PFTRAV_CONT;
> }
>
> I think that the internal libpr record concerning the graphics state is not
> updated due to the fact that I set the graphics state directly through the
> GL so may be libpr is making incorrect assumptions about the current
> graphics state.
>
> or am I doing something wrong?
> Is there a better way to do what I want to do?
> Does anybody know about something related to my problem
>
> Any help, comment,... will be really appreciated.
> Thank you.
>
> Jorge.
>
> ______________________________________________________
> Get Your Private, Free Email 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
--
Never express yourself more clearly than you think.
Neils Bohr
For advanced 3D graphics Performer + OpenGL based examples and tutors:
http://www.dorbie.com/
This archive was generated by hypermail 2.0b2 on Tue Jul 20 1999 - 14:11:26 PDT