
Description
While originally striving to archive another effect (the famous "moving light source behind black letters" thing, making them visible by blending over the edges), I came up with this sphere which simulates light emitting from its center through holes on its surface. I was somewhat inspired by The Dome logo (a German Pop Music event) and Phear, a Teris clone.
The effect itself is not that complex, but as it turned out I had to face some unexpected issues. First of all, I had to learn it is not trivial to place equally spaced points (the centers of those discs) on the surface of a sphere. I read quite some web sites and Usenet posts, beginning from "Tesselating Geospheres" to "An Introduction to Generalized Spiral Points" until I came up with a solution that calculates Coulomb energies for a potential field.
Secondly, as you can see, the sphere is basically black and opaque (yeah, with those white discs). As I wanted the user to also see the light contributed by rays that face away from the user, I had to split the sphere into hemispheres, use the stencil buffer to render only the corona of the back-facing hemisphere, and then the whole front-facing hemisphere in a second pass, all with additive blending enabled.
You may download the Windows / OpenGL executable from my website. The C++ source code is included and requires my recently published GALE OpenGL framework to compile (I was using MS VC++ .NET 2003).
Have fun!











