In this weeks update, I added a couple of new planet structure definitions for Saturn and Uranus into Solar Explorer.
I’d been putting these two off for a while since they have rings and the code I wrote to swap the planet between the cutaway view and normal view couldn’t handle them, so they were just vanishing. I decided to just go for it and modified the code to smoothly fade the rings back in.
I also upgraded to the latest beta compiler for Shiva which brought some performance enhancement to more recent CPUs. This also resolved the bug that had stopped me releasing a version of the code that had the planet orbits drawn in as lines when the solar system was fully visible.
With this and a couple of minor bugs fixed, I released the app to the market.
As is usually the way, I discovered a nasty visual bug about two minutes after I hit the save button.
The method that I used to generate the planet cutaway models was causing a horrible flicker on some devices, when viewing the planet structure, but only for the gas giant models, and only on my HTC Desire.
I hadn’t seen it when I’d done my testing as I usually do the bulk of that on my Galaxy Tab, and the problem didn’t show up there.
As it was only a visual glitch, I decided to leave the latest app in place and find a solution, which unfortunately turned out to take a great deal of time. The problem was that the coloured rings that represent the layers inside the planet are actually a stack of coloured discs. For some reason, the renderer in my Desire couldn’t figure out which one was in front of the other, so they were constantly swapping place.
Many hours later, I realised that I’d either found a limitation in Android’s OpenGL implmentation, or a bug in Shiva. Since I was unable to create a test app to give to the Shiva team that exhibited the same problem, I decided just to do a workaround, which was to rewrite the module and generate the coloured layers as a stack of rings, rather than discs, so they wouldn’t overlap.
Sounds easy, but it’s wasn’t because I had to learn how to modify a mesh with Shiva, which isn’t particularly well documented.
The end result though looks better than the stacked disc version did, so I’m pleased, but I’d like my eight hours back.
One small step for Juno
There’s so many things that can go wrong with rockets, most of them resulting a big bang and a large insurance payout, so it was good to see that Juno got safely off the ground and into space.
Hopefully in 5 years we’ll hear that Juno arrived at it’s destination safely.