Jump to content

  • You cannot edit this iotd

SilverLining Sky & 3D Clouds on Android  by fkane    -----


Time Spent: 2 months (for the Android porting)
Date Added: Aug 13 2012 07:37 AM

I've got SilverLining running on Android / OpenGL ES 2.0 now - it's available over at the Sundog Software website, where I've got a demo of SilverLining for Android and evaluation SDK's for SilverLining.

SilverLining offers physically-realistic 3D volumetric clouds and dynamic time of day effects with procedural sky boxes and tone-mapped natural lighting to games. You tell it a time, location, and weather conditions that you want to simulate, hook it into your render loop, and it does the rest. It's been available on PC platforms for years and more recently as a Unity asset, but this marks our first foray into native code on mobile platforms. The SilverLining SDK for Android includes sample code for Java-based Android apps, C++-based native activities, and OpenSceneGraph apps.

It's surprisingly fast on my Kindle Fire and Samsung Galaxy SII; I hope making this available will lead to more vast, realistic outdoor virtual environments on Android devices. Most of our OpenGL code for PC ported over pretty easily to OpenGL ES 2.0, although we weren't able to bring over our GPU ray-casting code for stratocumulus clouds due to lack of 3D texture support. That's changing, however, in OpenGL ES 3.0. SilverLining for Android does include volumetric clouds rendered using splatting (cumulus congestus, cumulonimbus, and cumulus mediocris) as well as planar clouds (stratus, cirrus, and cirrocumulus.) You can fly around and through these clouds, making them especially useful for flight-based games - both NASA and the FAA use it, for example.

I admit this isn't the most exciting screenshot in the world; it's more of a "look, it actually works" sort of moment. Grab the demo if you can, it makes a lot more sense when you can change the time of day and cloud parameters in real time and see the sky change and see the clouds in motion.  
Android SDK & NDK
Eclipse Indigo & Juno
Visual Studio 2010
Kindle Fire & Samsung Galaxy SII

  • You cannot edit this iotd


Aug 14 2012 02:30 AM
awesome, I didn't expect it to work on my ZTE blade, but it did, and run quite fast...
Aug 14 2012 07:54 AM
"Unfortunately SilverLining has stopped" on the Nexus 7

Aug 14 2012 02:12 PM
Ah, the joys of QA on Android devices - thanks for the report, jeph.
Aug 18 2012 06:48 AM
To follow up - this demo requests a 24-bit depth buffer from the device, and it seems that some devices list that as a valid option, yet throw a fatal exception when you actually try to create the context with 24-bit depth. I'll change the demo to just use a 16-bit depth buffer which should clear it up.

The good news is that these fatals have nothing to do with SilverLining itself - it was fataling before it even got there.
Sep 18 2012 03:33 PM
I'm not the only person in the world who develops for Android using a Kindle Fire! Awesome demo by the way.