|
Hi Sun:
I'm going to need your assistance, as I
suspect I am having trouble with a lighting bug. I've tried
to work around the problem, but I'm unable to. Attached
is simplified source code using only Sun classes that shows the
problem.
Thanks,
Geoff.
PS. this email follows on from one I send to
the interest group a couple of days ago (sorry that I couldn't easily
continue the thread ... I deleted the message).
Original message (23/04/00):
I'm having a lighting problem when shapes
butt up against each other. Attached
is an extreme example of the problem where there are 100 cylinder disks
joined.
The black dots don't necessarily appear on a
vertex, but can appear randomly at the intersection of two shapes.
It doesn't help to overlap the shapes.
I suspect that as the vertex normals at the joins
are pointing in three different directions, this is my problem.
I've tried using Sun's NormalGenerator
utility (instead of our own) but it's no help.
We're using a
directional light, and in this case these material properties are
set:
material.setEmissiveColor(0.0f,
0.0f, 0.0f);
material.setSpecularColor(1.0f,
1.0f, 1.0f);
material.setAmbientColor(1.0f,
0.0f, 0.0f);
material.setDiffuseColor(1.0f,
0.0f, 0.0f);
material.setShininess(64.0f); Has anyone seen a similar problem, and were able to
solve it, or perhaps can offer an explanation to help me work around
it.
Thanks for any assistance. |
Java3DTest.java