Re: [info-performer] Light from nowhere.

New Message Reply Date view Thread view Subject view Author view

From: mnippere++at++csc.com.au
Date: 02/16/2003 17:13:58


Christopher,

This sounds like a problem that we had. I can't remember the exact
reasoning behind it, but it turns out that performer likes to have a
default light model. I am pretty sure that it did not show up in pfStats
either, but I could be mistaken. If you do not override this light model by
setting your own, then you get some ambient light. In the order of
r=g=b=0.2 or 0.3. Something like that anyway.

All we did to overcome this was to set up a pfLightModel in initDraw, set
the ambient to zero and apply. That seems to have done the trick. Hope this
works for you...

  // Set up a default light model
  pfLightModel *lm;
  lm = new pfLightModel();
  // Ensure that default lighting is set to zero.
  lm->setAmbient(0.0f, 0.0f, 0.0f);
  //do not want local reflections
  lm->setLocal(PF_OFF);
  // Apply the lighting model
  lm->apply();

Matt

"Dorosky, Christopher G" <christopher.g.dorosky++at++lmco.com>
++at++holodeck.engr.sgi.com on 17/02/2003 09:21:49

Sent by: owner-info-performer++at++holodeck.engr.sgi.com

To: "'info-performer++at++sgi.com'" <info-performer++at++sgi.com>
cc:
Subject: [info-performer] Light from nowhere.

I have a problem when viewing my models.

They look fine in perfly, so I know I am doing something wrong.

I have one lightsource, the sun, and I can completely turn it off, but the
models are still slightly lit.

I removed the lightsource from the code, so that the pfStats show no
pfLights, no pfLightSources, and no lightModels.
I also checked to make sure that the materials on the models are not
emissive. They are not.

Still, I can't get the models to go black.

I am running Redhat 7.3, with Performer 2.5.2.

Does anybody have any ideas?

Christopher Dorosky
Lead Electronic Systems Engineer - Real Time Simulation, TOPSCENE
Lockheed Martin Missiles and Fire Control - Dallas
christopher.g.dorosky++at++lmco.com
972-603-2349

-----------------------------------------------------------------------
   List Archives, Info, FAQ: http://www.sgi.com/software/performer/
   Open Development Project: http://oss.sgi.com/projects/performer/
                Submissions: info-performer++at++sgi.com
            Admin. requests: info-performer-request++at++sgi.com
-----------------------------------------------------------------------


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Sun Feb 16 2003 - 17:22:56 PST

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