Florin Herinean wrote:

Ooops!

Kelvin tell that bug 4722648 - Non-uniform scale causes lighting errors - is
fixed in J3D v1.3.1 beta1

Actually is not fixed. See the attached picture obtained with j3d v1.3.1
beta ogl. The blue areas should all have the same color, since the surfaces
are all parallel and the light is directional, but actually you can see 3
different colors. A very small amount of non-uniform scale was applied to
every brick to create a small distance between them (a seam).




This is fixed based on the test case we have. Note that there is no such problem in Direct3D version of Java3D which always normalized normal.

To confirm your finding, please try your applications on Direct3D version
of Java3D, if you got the same rendering image and highlight. This is
not the same problem and may cause by specular lighting effect
for local viewer. Make sure positive non-uniform scale is used.

- Kelvin
--------------
Java 3D Team
Sun Microsystems Inc.



-----Urspr�ngliche Nachricht-----
Von: Florin Herinean
Gesendet: Mittwoch, 19. M�rz 2003 09:07
An: 'Discussion list for Java 3D API'
Betreff: AW: [JAVA3D] Problem with Specular Color


Yes, that's the bug. So version 1.3.1 have it fixed. Lot's of nice fixes in 1.3.1 ! When will be a fcs release ?

I was scaling up, the actual geometries were bigger than the original size
which was always normalized, size 1 in all directions.

I've fixed my problem by using the workaround specified in the first
paragraph: "Scaling the geometry data explicitly and recomputing the normals
without using a non-uniform Transform3D will always work, but is expensive."

Actually, in my case the "is expensive" proved not to be true, there was
absolutely no difference in loading time, memory usage or rendering time.

Also, in the bug report there is a small error: "The bug only presents
itself when the scale is changed dynamically. If the Transform3D is
initially created with a non-uniform scale, then the lighting is correct
until Java 3D notices that the scale has become uniform again." That's not
true. In my app I was creating the transform3d directly with a non-uniform
scale and never touching it anymore, but the lighting was incorrect.

Cheers,

Florin

-----Urspr�ngliche Nachricht-----
Von: Kelvin Chung [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 18. M�rz 2003 22:14
An: [EMAIL PROTECTED]
Betreff: Re: [JAVA3D] AW: [JAVA3D] Problem with Specular Color


Monica Sleumer wrote:




I agree that the non-uniform scaling probably has a lot to do with it,
because I noticed that the effect got worse the more I scaled the
geometry. For instance, the cylinders that still looked like cylinders
had no problem, but those that were scaled down into disks a few pixels
thick had serious problems.
Unfortunately, I have to scale everything to the proper size in the
application I'm writing. At least setting the specular color to black
and the shininess to 1 removes the specular color artifact for now.

Florin, did you scale your shapes up or down? That is, did you make them
appear bigger or smaller than the original geometry size? In this
application the shapes are always being scaled down. The original
cylinder shape is much larger and longer in proportion than any of the
cylinders in this application. I wonder whether scaling a shape down
makes the specular color much brighter while scaling a shape up makes
the colors much darker...

Anyways, maybe I'll have fewer problems if I start with a VRML shape
file that is closer to the eventual size of the shape that will be
displayed, so that the scaling is less extreme. I'll try that next.

Monica



In case you're using J3D v1.3 release, there is a bug 4722648 - Non-uniform scale causes lighting errors

which is fixed in J3D v1.3.1 beta1.

- Kelvin
------------
Java 3D Team
Sun Microsystems Inc.

===========================================================================
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".

Reply via email to