Jump to content
Sign in to follow this  
  • entries
  • comments
  • views

Starfield Skybox Generator

Sign in to follow this  


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):

Free Image Hosting at www.ImageShack.us


Sign in to follow this  

1 Comment

Recommended Comments

Hey, not bad at all Matt. I'll be sure to check out the code tommorow.
Keep it coming =]

Merry XMas...

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!