I have recently upgraded from Java 3D 1.1.3 to Java3D 1.2. This has been and
still is a painful process. Several things that worked correctly in my
program under 1.1.3 are broken in 1.2. One of them on which I need help
concerns lighting.

My distilled lighting method is something like the following:

BoundingLeaf lightAlwaysOnBoundingLeaf = new BoundingLeaf( new
BoundingSphere( new Point3d(), Double.MAX_VALUE ) );

AmbientLight al = new AmbientLight();
al.setInfluencingBoundingLeaf( lightAlwaysOnBoundingLeaf );

PointLight pl = new PointLight( true, Color3f, Point3f, Point3f );
pl.setInfluencingBoundingLeaf( lightAlwaysOnBoundingLeaf );

Sphere sphere = new Sphere( radius, Primitive.ENABLE_GEOMETRY_PICKING |
Primitive.GENERATE_NORMALS |  Primitive.GENERATE_TEXTURE_COORDS, 36,
Appearance );

sceneBG.addChild( al )
sceneBG.addChild( pl )
sceneBG.addChild( sphere )
sceneBG.addChild( viewPlatformTG );
        viewPlatformTG.addChild( ViewPlatform );
        viewPlatformTG.addChild( behaviorAlwaysOnBoundingLeaf );

By adding lightAlwaysOnBoundingLeaf to viewPlatformTG, I am attempting to
guarantee that all objects will be lit.

This works fine in v 1.1.3 but in v 1.2 the sphere is completely black
(unlit) when its Appearance has a Material (necessary for shading effects).
If I remove the Material form the Appearance, the sphere shows up but it is
unshaded (of course).

This is also true for Shape3D's even though I have used the NormalGenerator
on their Geometry.

What could be going on here? It doesn't inspire confidence in java3D that
basic things like this can break from an uprgrade. Can anyone shed some
light (pun intended) on what I can do to get lighting working again in v
1.2?

For what it's worth, I'm using NT 4.0, 256 RAM, no graphics acceleration
cards.

Raffi

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