Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sphere lighting problems

843799Sep 24 2004 — edited Oct 13 2004
Hello, I am relatively new to Java3D and was unable to find an answer to my problem via a forum search, so I'll post it here:

I'm working on a program that is basically a Solor System simulator in which I have textured, spherical planets orbiting about a sun as well as rotating about their own axes. The scene is lit by a point source from the sun and a small amount of ambient light.

My problem is seen in the day/night breaks on the planets: they are very sharp, jagged and uneven, apparently just following the polygon edges, rather than being a nice, straight line. These breaks jump back and forth as the planets rotates and new polygons are lit, giving rise a a rather unrealistic sunrise.

Increasing the number of divisions in the sphere (I'm currently experimenting with 64 or 128) helps a bit, but it requires an unreasonably large number of divisions to get an acceptable appearance. Is there some way for me to fix this problem, perhaps there's a better method of generating normals of which I am not aware? Thank you very much.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2004
Added on Sep 24 2004
5 comments
204 views