Bob, 

If the tutorial you are referring to is the one freely distributed by 
SUN, you read a little more into the material than is there, or there 
is a mistake. 

If you feel there is a mistake in the tutorial, or even if you think
it is misleading, please tell me which section/page/paragraph ... .  
I will strive to improve it.

As far as material properties go, you can only provide one Material 
Object per visual object.  You can provide diffuse and ambient colors 
for a visual object on a per-vertex basis.  But this is not face 
dependent.  There is no way to color one side of a polygon differently 
that another.

The tutorial talks about having both sides shaded (but not differently)
by turning off back face culling and flipping the normals.

By the way...  A new version of the tutorial has been released.  I saw
it on the Java 3D Collateral page this morning.  (see my sig)
The newest chapter, Lights, has a section (6.4.2) on how you can 
specify colors for visual objects.  The information in this section is 
not available in any other documentation.

Dennis


Bob wrote:
> 
> Hello :
> 
> Does anybody know how to attach a different material to the front and
> back side of a polygon?
> 
> What I am trying to achieve is that the front side of the polygon is lit
> 
> differently than the back side. I was reading a tutorial which said that
> 
> its possible to do it and you have to disable the culling and use the
> method "setBackFaceNormalFlip(true)"  so that the normals of the back
> facing polygons should be flipped prior to lighting. It never explained
> how to actually apply different material on both sides of the polygon?
> Is it possible?
> 

-- 
-----
Dennis J Bouvier
[EMAIL PROTECTED]
Find the Java 3D Tutorial "Getting Started with the Java 3D API" at
http://sun.com/desktop/java3d/collateral

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to