If you are using DirectionalLight, you can add two lights pointing
at different directions. This way, both the FRONT and BACK
faces can all be seen instead of adding two faces with opposite
normal directions.
----- Original Message -----
From: "Kyle McDonald" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 26, 2003 4:45 PM
Subject: Re: [JAVA3D] AW: [JAVA3D] AW: [JAVA3D] Problem with Specular Color
> Florin Herinean wrote:
> > I can confirm that DirectX version is behaving correctly regarding the
> > specular lighting effect, as in the attached image. However, you can
clearly
> > see from the image that DirectX version has it's own bigger problems
which
> > makes it unusable for me: it is not honouring the Back-face normal flip
> > option in the PolygonAttributes constructor (see the very dark front
facing
> > faces). Is this a bug in j3d or simply directx layer doesn't know about
> > back-face normal flip ?
> >
>
> Hi Florin,
>
> We've email'd in the past about LEGO and J3D. It looks like your
> code is coming along nicely.
>
> For the longest time I was also stuck on a problem that is similiar
> to what you are seeing I think. Does this work corectly for you in
> OGL?
>
> The Flip Normals flag didn't seem to ever (OGL or D3D) do what I
> wanted it to do.
>
> My code currently rewind all non CCW polygons to be CCW, and
> uses those points to calculate Normals. I then used CULL_BACK
> to elininate the back faces. Also if a sub file was referenced
> with 0 BFC INVERTNEXT, I switched to CULL_FRONT, so that it was
> rendered facing the other way.
>
> Similiar to what you are seeing, these polygons that are done
> with CULL front, still have the normals facing into the object,
> so that even though the culling worked correctly the lighting
> was shaded wrong. I originally thought that the backface normal
> flipping would flip these normals for me automatically, but
> someone in the J3D group here at sun explained to me why it
> wouldn't work (not even in OGL) - I don't remember the
> explaination right now.
>
> I ended up solving this by computing 2 sets of normals for each
> polygon, and then in addition to switching from CULL_BACK to
> CULL_FRONT when I see a 0 BFC INVERTNEXT, I also switch which
> normals I attach to the geometry array.
>
> It's not as elegant a solution as I might have liked, but it
> does work for me.
>
> -Kyle
>
>
> --
> _
> -------------------------------ooO( )Ooo-------------------------------
> Kyle J. McDonald (o o) Systems Support Engineer
> Sun Microsystems Inc. |||||
> Enterprise Server Products [EMAIL PROTECTED]
> 1 Network Drive BUR03-4630 \\\// voice: (781) 442-2184
> Burlington, MA 01803 (o o) fax: (781) 442-1542
> -------------------------------ooO(_)Ooo-------------------------------
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".