Hi,
The Material Attribute of an Appearance object determines whether lighting is enabled for the Shape3D.
By default a Shape3D with no Material set, or a Material created via
new Material(); will both have lightingEnabled == true. To set it false do something like this:
Appearance a1 = new Appearance();
Color3f eColor = new Color3f(0.0f, 0.0f, 0.0f);
Color3f sColor = new Color3f(0.5f, 0.5f, 1.0f);
Color3f oColor = new Color3f(0.5f, 0.5f, 0.3f);
Material m = new Material(oColor, eColor, oColor, sColor, 100.0f);
m.setLightingEnable(false);
a1.setMaterial(m);Once it's set to false the color the object will be rendered in will be either the VertexColor for each vertex of the Geometry of the Shape3D (if set), otherwise the Color of the object set by the
appearance.setColoringAttributes( new ColoringAttributes() ); I'd like to be able to point to an example of this in the Java3D examples, but I see that it only has lit examples throughout :(
https://github.com/philjord/java3d-examplesSo the only place where this fact could be discovered is in the Java3D tutorials here (and elsewhere)
https://github.com/philjord/java3d-core/tree/master/docs/tutorialunder
2.6.3 Attribute Classesbut I realize that's pretty obscure! I would encourage you to install and get the examples running as it helps a lot with early questions here are 2 pictures of appearance options shown in the examples
examples/appearanceexamples/picking/PickTest.java