Hi,

>MIME-Version: 1.0
>Date: Wed, 14 Jun 2000 15:25:42 -0400
>From: "Kasparian, Raffi J." <[EMAIL PROTECTED]>
>Subject: [JAVA3D] version 1.2 broke my lighting effects
>To: [EMAIL PROTECTED]
>
>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.
>

Is lightAlwaysOnBoundingLeaf attach to the scene graph ?
i.e.  viewPlatformTG.addChild(lightAlwaysOnBoundingLeaf)

Note that in v1.2 all BoundingLeaf have to attach to scene graph
in order for lighting/behaviors that use BoundingLeaf
work correctly. This is broken in v1.1.3.

If it is still not working, please send us a test program.

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

Thanks.

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

Reply via email to