Re: Shadows in Performer 2.0

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Fri, 1 Mar 96 9:20:46 PST


>
> Hello!
>
> I have managed to set up a scene lit by a pfLightSource that cast shadows and I
> have a few questions.
>
> 1) My shadows are all black. Is it possible to generate shadows with
> transparency so that the object's color on which the shadow is cast will
> be seen through the shadow?

        Set the PFMPASS_GLOBAL_AMBIENT bit in the PFTRAV_MULTIPASS mode
        set with pfChanTravMode. Then make sure you clear the background
        with an alpha equal to the transparency you want.

> 2) You could set the PFLS_SHADOW_DISPLACE_OFFSET and PFLS_SHADOW_DISPLACE_SCALE
> for the pfLightSource but I have not found any explanation on these.
> I guess the OFFSET is to be used to avoid self-shadowing. What is the SCALE-
> parameter to be used for and what exactly to these parameters do?

        See glPolygonOffsetEXT.

> 3) I also have a problem with transparency. My shadowed model includes a few
> surfaces that are transparent, but when I turn on the shadows the
> transparency disappears. Anyone had similar problems?

        This is a bug. The workaround is to call:

        pfGLOverride(PFGL_DECAL, PFGL_OFF);
        pfGLOverride(PFGL_TRANSPARENCY, PFGL_OFF);

        before you call pfDraw().

> 4) The man page says that "shadows and projected textures are not clipped or
> properly computed behind a pfLightSource. Instead, geometry behind the
> pfLightSource will be textured randomly."
> Will surfaces that are outside the frustum of the pfLighSource but in front
> of the pfLightSource also be "randomly textured"? At least mine are.
> Is it possible to set for example PFTEX_CLAMP or anything to avoid this
> effect?
>

        Use CLAMP.


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:52:31 PDT

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