Time for action – lights on!
You can use any combination of light sources from the com.jme3.light
package: ambient lights, directional lights, point lights, and spot lights. Remove the lights from HoverTank.java
file's simpleInit()
method, and add them back one by one to see the difference.
- Add an ambient light. Try multiplying the color by different scalars, larger or smaller than 1.0f, to increase or decrease its brightness. Note how it illuminates the whole scene evenly. Try setting the color to something other than
White
.AmbientLight ambient = new AmbientLight(); ambient.setColor(ColorRGBA.White.mult(5f)); rootNode.addLight(ambient);
- Remove the ambient light and add a point light. Move it to different locations to see the difference. Try different ...
Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.