Upgrading the engine
I spent the last few days rebuilding Solar Explorer’s engine from scratch, to make it more flexible and use less resources.
Originally, all the planet models were individual objects that I’d exported from Blender. Now, I’ve built a single planet model that looks better and uses fewer polygons. Using the XML functionality I recently implemented, all the settings for the planets are now loaded at startup and the planets are created dynamically.
I also completely reworked all 30 planet texture maps using Image Magick to rescale and pack the textures much more efficiently, and at the time generate all the textures for the lo def version of Solar Explorer.
The Earth also got a new atmosphere model which looks a lot nicer than the one I had before, though I did have to lose the clouds. The big problem with clouds was that the texture had to be quite detailed, or I just ended up with a grey looking mist that obscured the continents. I hope to put the clouds back in a later release if I can find a good way of including them that doesn’t make the Earth look worse.
Finally I implemented lens flares using a demo that Shiva prepared. Shiva’s lens flares uses a lot of texture memory (10 or more 512×512 pixel textures), so I wrote another Image Magick script to pack all the textures into a single 512×512 pixel one with minimal apparent loss in quality. Gotta love Image Magick, modifying a script and running it certainly beats manually cutting out the 15 or so textures, scaling them, packing them, then finding out that one of them needs to be a bit bigger and having to manually do it all over again.
The end result is a lot nicer to look at, starts quicker, uses less memory and runs a lot faster, which was really the main objective. I need the extra speed so that I can start to implement some special effects, like the lens flares and better Earth model mentioned above.