3D Night Sky Example

After spending some time reading a recently posted topic on the GMC asking about how to create a night sky in 3D, I decided I’d try my hand at making a simple example using a technique mentioned in that topic – using a model created as a pointlist to render stars.  I ended up liking the result very much, so I wanted to share it with everyone here.

Basically, at the start of the game (or more specifically, when the camera object is created), I’ve set up a script which creates models for a sky dome, a background pseudo-terrain, and stars.  These are drawn as you would draw a skybox, so they all appear in the background of whatever you’re doing in your game.

I’ve set up a simple FPS-style camera system for this demo, but it’s very crude, so don’t hold me accountable for that, please.  You can use your mouse to look around, and W, A, S, and D to move around.  F4 will toggle fullscreen mode, and ESC will exit.

You can download the example here (279 kb).

I’d appreciate it if this example were used for learning purposes only, and that you do not use any of the textures from it without first asking permission.  With that said, enjoy!


  1. xygthop3 - Over a year ago

    We can’t let this go without a comment.

    So….nice example once again. :D

  2. FredFredrickson - Over a year ago

    Hehe, thanks Xygthop! :)

Leave a Reply