Re: "Hidden" ambient light??

New Message Reply Date view Thread view Subject view Author view

Elizabeth Smith (eliza++at++daisy.paradigmsim.com)
Tue, 19 Nov 1996 11:11:39 -0600


On Nov 19, 10:27am, Scott McMillan wrote:
> Subject: "Hidden" ambient light??
> I have been struggling with what I thought was a fog and then light
> attenuation problem for a while now. I could never seem to get the
> shading in the distance to go completely to black (until recently):
>
> I am loading Alias/OBJ models with materials whose ambient, diffuse,
> and specular components are non-zero. I have a single local
> pfLightSource, and I am setting the quadratic attenuation term rather
> high to get a significant effect. This light's ambient light has been
> set to zero, and the diffuse is essentially white. But the geometry in the
> distance was still slightly lit. Even when I turned the attenuation WAY up,
> the geometry would dim to a certain point but never go black.
>
> I finally fixed the problem, by setting the ambient components of the
> materials to zero. Now if I understand what I read in the OpenGL manual last
> night, this would seem to imply there is an ambient light source somewhere.
> I haven't added one though, and pfPrint only shows the one light source I
> added.
>
> Is there a ambient light source that Performer/OpenGL sets up by default? If
> so, how do I turn it off? If not, can anybody clue me in to what is
> happening?
>
> My system: High Impact, Irix 6.2, Performer 2.0.2
>
> Thanks in advance,
> scott
>
>

Could the problem be with the ambient color of the lighting model?
Are you setting it explicitly or taking the default?
The lighting model and its ambient component are independent of
any individual light source.

>From the man pages:

     pfLModelAmbient receives three floating point values in the range from
     0.0 through 1.0 to set the red, green, and blue, values for the amount of
     the ambient light associated with the scene for the given light model.

     pfGetLModelAmbient copies the red, green, and blue components of the
     ambient in the given light model into the parameters r, g, and b,
     respectively. The default value for the ambient red, green, and blue
     light components is 0.2.
                       ^^^^^^^

The component is equivalent to the GL_LIGHT_MODEL_AMBIENT
values. (See man glLightModel) For IrisGL, see man lmdef DEFLMODEL.

Also remember that with OpenGL, lights have a specular component
as well as ambient and diffuse.

--Elizabeth Smith

-- 
|----   Elizabeth Smith                                     ----|
|	972-960-2301 (voice)	Paradigm Simulation, Inc.	|
|	972-960-9049  (FAX)	14900 Landmark, Suite 400	|
|	eliza++at++paradigmsim.com	Dallas, Texas   75240	USA	|
|       www.paradigmsim.com                                     |
	 
	
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/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 2.0b2 on Mon Aug 10 1998 - 17:53:58 PDT

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