Starfield Skybox Generator
Published December 16, 2007
Having never really found a decent starfield skybox texture or a program capable of generating one, I decided to make my own. It seemed like a fun project and a good opportunity to finally make use of DXUT (which I've found to be very useful), and it was definitely both of those things. The end result is very very simple, all it does is randomly generate coordinates of stars on the surface of a sphere and then draws the stars as textured quads (using code borrowed from the particle engine of my renderer). The stars are all drawn to the six faces of a cubemap, which is then viewed in rotated in the window. Generation is very fast, so you can change the parameters and view the results in real-time. Later I added in the ability to throw in "Space Objects", which are larger planets and galaxies. These are also drawn as textured quads.
Main drawbacks are:
-Since its using a cubemap and a skybox, things get pretty ugly at the edges of cube faces. I may consider looking into some method of sphere-mapping, although from what I understand there can be some resolution issues with those.
-The app is capable of creating an HDR cubemap, but I have no HDR source textures for stars or planets.
Anyway its not too bad for a day's work, and it will be useful if I ever actually make a simple game with my renderer. Here's a screenshot and the source code (uses DXUT and boost libraries):
http://members.gamedev.net/MJP/Starbox_DX9.zip
Keep it coming =]
Merry XMas...