two-sided lighting

New Message Reply Date view Thread view Subject view Author view

Mark Johnson (johnson++at++vrlab.uccb.ns.ca)
Mon, 29 Aug 1994 10:42:19 -0700


Hi all,

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


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:50:31 PDT

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