From: Marcin Romaszewicz (marcin++at++sgi.com)
Date: 05/08/2002 13:24:41
Unfortunately, there is not. The shadow-casting projective light uses your
channel's frustum for rendering the scene. The near and far on a
projective light do nothing, since it is no more than a texturing
operation.
Projective spotlights support range attenuation by using black fog, but
the shadow casting lights do not.
-- Marcin
On Wed, 8 May 2002, Christian Skluzacek wrote:
> Hi,
>
> I'm using the shadow and projective texturing
> capabilities of pfLightSource but am trying to limit
> how far the projective textures are projected. For
> example, I set the near/far planes on pfFrustum and
> attach that to the lightsource as follows:
>
> pfFrustum * pFrustum = new(pfGetSharedArena())
> pfFrustum;
> pFrustum->makeSimple(45.0f);
> pFrustum->setNearFar( 1.0f, 200.0f );
>
> pfLightSource *pLSource = new pfLightSource;
> pLSource->setPos( 0.0f, 0.0f, 0.0f, 1.0f );
> pLSource->setAttr( PFLS_PROJ_FRUST, pFrustum );
> pDCS->addChild(pLSource);
>
> // Set shadow properties
> pLSource->setMode( PFLS_SHADOW_ENABLE, PF_ON );
> pLSource->setVal( PFLS_INTENSITY, 0.01f );
> // PFLS_SHADOW_SIZE=256,
> PFLS_SHADOW_DISPLACE_SCALE=1,PFLS_SHADOW_DISPLACE_OFFSET=0.0019
>
> // Set Projective Texture properties
> pLSource->setMode( PFLS_PROJTEX_ENABLE, PF_ON );
> // PFLS_PROJ_TEX=pfTexture
>
>
> This pretty straight forward and the projective
> texture and shadow are drawn fine but they extend
> beyond the frustum far plane (of 200.0). Is there any
> other way of controlling this?
>
>
> Thanks,
> Chris
>
> BTW, Performer 2.2.7 on Irix 6.5.7 on OnyxIR2 (also
> linking pf libs statically to get shadows to work)
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
>
This archive was generated by hypermail 2b29 : Wed May 08 2002 - 13:24:51 PDT