Skip to main content

Shape3D object not receiving lighting

Please note these forums are being decommissioned and use the new and improved forums at
3 replies [Last post]
Joined: 2012-07-03

I created a Shape3D object (a rectangle) out of a QuadArray, and it is behaving as though it has no Material, even though I gave it one set many of its properties.

I followed these steps:
-created a QuadArray with 4 points so as to form a rectangle.
-created an Appearance object
-created a Material object, and set its ambient color to bright red, its diffusive color to dark red, and its specular color to black.
-Set the appearances material to the one above, and then created a new Shape3d with its geometry being the QuadArray and its appearance being the one above.
-Added this Shape3D to a TransformGroup containing two spheres(Primitives) and a directional white light. All three objects are easily within range of the light's bounding sphere.

The lighting works perfectly on the spheres, which have their Material set to default values. However, the rectangle appears as one solid color, with no lighting effects. If I change its material's ColorAttributes, that works fine. Its as if its lighting is disabled, but I even setEnableLighting(true) for the material.

Is there some crucial step im missing here in order to make lighting work for this Shape3D?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2012-07-03

sup dawg!! sorry to hear about your troubles, bro----maybe one of these will help?

best of luck on your game,


Joined: 2012-07-03

Thanks I got it now.

Joined: 2012-08-12

Sorry for not replying with anything useful but may I ask how you fixed your issue?