Nothing too fancy, but in the day and age of modern HDR rendering and graphics, why shouldn't we have fancy star fields for space and nighttime levels? Think about how neat it would be when you have an environment where you're standing in an area with a lot of light polution, you only really see the brightest stars in the sky. Then, once you're in the clear and your eyes adjust how many more stars you see. Maybe even through night vision.
Recently I've started playing through Kotor 2 for the first time (after many years or owning the game), and one thing I saw in the early spacewalk scene was just how uniform and regular all the stars appeared. This in itself is somewhat jarring since even if you were in the centre of the galaxy, you would never get a star pattern quite like this. What a great place to use this kind of process I thought!
The method of generating these stars is pretty simple, really.
- We assume that the viewers perspective is more or less aligned to the galactic plane.
- There are stars above and below the viewer, but the majority exist along the "horizon"
- Some stars are brighter than others.
- Most stars are actually very dim.
What we end up with is a uniform distribution of dim / medium dim stars everywhere, and then progressively brighter stars near the galactic plane. It's definitely a starting point! Once I find the source code I wrote (and should have backed up onto a NON-portable medium (DOH!!!!)) I'll post freshly generated examples :D
On the technical side, I use doubles and floats to calculate everything, and then render the results to a 128bit, 6K x 8K DDS file. I could go more, but since I was using a 32-bit compiler I think I was running out of memory allocation O_o
I chose to do 32bit RGBA and sample real world (real space?) star data to get a more realistic distribution of star colours (temps) and luminosities. And while I COULD just as easily do a single 32bit gray scale channel, I think RGBA is much more fun ;)
From then on it's possible to tune and add general brightness variations in Photoshop (as long as it doesn't crash trying to open the 130MB+ DDS files), and add things such as nebulae, dark dust, etc.
About the biggest limitation of this custom build starfield generator is my own programming ability and lack of necessary math skills to be able to create this star field in a more useful longitude-latitude orientation. Or even a cross style cubemap where stars respect boundaries. It's something I intend to learn because it will greatly increase the fidelity of the starfield once it is transformed into those types of maps.
More on that in part 2!

This is the first 1024 frames of an Unreal speedrun. You can clearly see where the action is, where the player gets hurt, etc.