Hey Guys,
I was wondering if anyone knew the best way in which to render a background of stars?
Basically making a 3D game, with the camera locked in a downward looking position above the flying spacecraft (so only need a 2D plane of stars, imitating the look of 3D space). I need to render stars in the background which move as per the ships movements. Some far, some closer (but not close…)
My first try was rendering them all as there own object, a simple texture, repeated… I feel this is too inefficient. A mate suggests rendering them to a texture first then displaying a single texture? Or maybe procedurally creating the starfield texture?
Does anyone have any ideas or pointers to where to look for my answers?
You are looking for the Stardust class:
Wiki Entry
Forum Thread
I used starfield textures put on large quads… and then displayed in multiple layers. It works very fine and is quite efficient. You just need to make the textures transparent, so that the lower layers can be seen through the higher ones.
Here is a demo where you can see how it turned out… with 3 layers.
Looks really polished and professional!
yep that's nice