two-sided lighting

New Message Reply Date view Thread view Subject view Author view

Liu Xiaoyan (liuxy++at++nsrc.nus.sg)
Tue, 27 Jan 1998 13:50:57 +0800


Found the following item in 1994's list with no reply.
I am having similar problem now. Thanks in advance.

Liu Xiaoyan
National Supercomputing Research Center
Singapore

attached mail follows:


From: "Mark Johnson"
Date: Mon, 29 Aug 1994 10:42:19 -0700
To: info-performer++at++sgi.sgi.com
Subject: two-sided lighting
I am having some difficulty with two-sided lighting. Color only appears on
one side of a scene triangle. The other side is grey. As often as not,
the grey side faces the light source. If I reverse the normals, the grey
side will be on the other side of the triangle. This is not a practical
solution since the file cannot indicate which normals should be reversed.
Why don't the backsides of the triangles have color?

Also, I have broken rectangles up into triangles, and the two triangles
do not have the same color, despite being in the same geoset with
color applied overall.

According to the man page on MtlSide, I must:
1. have a 2 sided light model
2. have face culling turned off.
Both of these conditions have been met.

According to pfApplyMat (later on same man page), the following
conditions must be met for lighting:
1. Lighting must be enabled via pfEnable
2. a pfLightModel must be applied using pfApplyModel
3. A pfMaterial must be applied using pfApplyMtl.
4. One or more pfLights must be on.
5. the geometry must have normals.
Again all of these conditions have been met.

So questions:
1. Is there some dependency on the order in which the above-mentioned
   function calls must be made?
2. Why do the backs of triangles not have color?
3. Why do the fronts of co-planar triangles have different colors?

Mark Johnson
johnson++at++vrlab.uccb.ns.ca

=======================================================================
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:56:37 PDT

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