Last month I uploaded a video demo of SkyControl, a sky simulation for JME3 based on @t0neg0d 's SkyDome. Since then I’ve made some improvements and brought the code to a certain level of stability. Now I’m looking for a few brave souls to use it and provide feedback. If you’re working on a JME3 game with an outdoor setting, please consider becoming an alpha tester.
Source code, assets, and build instructions may be found at here. The source code is GPL’d. The documentation is mostly inline, in the form of JavaDoc.
Here’s an example of its use:
[java]
boolean starMotion = true; /* allow stars to move /
boolean bottomDome = true; / helpful in case the scene has a low horizon /
SkyControl control = new SkyControl(assetManager, cam, cloudFlattening, starMotion,
bottomDome);
/ add SkyControl to the root node /
rootNode.addControl(control);
/ (optional) put SkyControl in charge of the lights, the shadow renderer, and the viewport background /
control.setAmbientLight(ambientLight);
control.setMainLight(mainLight);
control.setShadowRenderer(dlsr);
control.addViewPort(viewPort);
/ set the time to 3 p.m. /
float hour = 15f;
control.getSunAndStars().setHour(hour);
/ set cloud intensity to 50% /
float cloudiness = 0.5f;
control.setCloudiness(cloudiness);
/ enable the control */
control.setEnabled(true);
[/java]
Source code for the test app is here.