Lighting problem

New Message Reply Date view Thread view Subject view Author view

Allen Bierbaum (allenb++at++vrac.iastate.edu)
Tue, 05 Oct 1999 09:37:36 -0500


I am having a problem with lighting in a Performer application. I have
been wrestling with it for quite a while. I think I may just be making
some bonehead mistake that I am missing.

My scene graph looks like this

LS = pfLightSource
MD = Model

           Scene
        / | \
      LS1 | Group
          Scene | \
        / | DCS DCS
      LS2 DCS | |
| MD MD
           Node
|
       klingon.flt

The code for the both lightsources is the same except that I set the
ambient color differently for each light to detect the influence of the
light:

 pfLightSource* sun1 = new pfLightSource;
 sun1->setPos(0.0f, -1.0f, 0.0f, 0.0f);
 sun1->setColor(PFLT_DIFFUSE,1.0f,0.0f,0.0f);
 sun1->setColor(PFLT_AMBIENT,1.0f,0.2f,0.0f);
 sun1->setColor(PFLT_SPECULAR, 1.0f, 1.0f, 1.0f);
 mRoot->addChild(sun1);

The problem is that only LS1 is influencing the scene. LS2 seems to be
making no contribution whatsoever. When I turn of LS1 there is no
lighting in the scene. When I turn it on, there is lighting, but only
from that light.

When I save out the scene graph without LS1 as a .pfb and load it in
perfly, the scene graph view shows LS2, but it has no influence over the
lighting at all.

What (stupid thing) am I missing or what should I check?

-Allen


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Tue Oct 05 1999 - 10:12:43 PDT

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