public BranchGroup createSceneGraph() { // Create the root of the branch graph BranchGroup objRoot = new BranchGroup(); ... // Create Directional light with color and direction. Add it to scene. DirectionalLight light = new DirectionalLight(new Color3f(1.f,1.f,1.f),new Vector3f(-1,-1,0)); light.setCapability(Light.ALLOW_COLOR_WRITE); light.setInfluencingBounds(new BoundingSphere()); objRoot.addChild(light); // Create AmbientLight light with color. Add it to scene. AmbientLight ambientLight = new AmbientLight(new Color3f(.3f,.3f,.3f)); ambientLight.setInfluencingBounds(new BoundingSphere()); objRoot.addChild(ambientLight); ... return objRoot; }