Star Rendering
I have spent more than a month (nearly two) perfecting the rendering of stars, and I can now say that I am happy with the result.
Here are two terrible video captures of star rendering (The mp4s might not play in a browser, but they are better quality, so you could try downloading them):
- stars1.mp4 or try stars1.webm
- stars2.mp4 or try stars2.webm
- Stars PNG
- Stars2 PNG - this image was taken with a config setting turned on which positions stars exactly on pixels, which looks better for still images, but causes temporal aliasing as the world slowly turns (the stars jump to the next pixel).
Things to notice
- Just FYI: First video was just before dawn. Second video had exposure forced to 'night'. The giant percent symbol was because I was testing signed distance field font rendering.
- At different exposures, the stars become fewer and smaller in a very natural way (I did not demonstrate this well, sorry)
- The stars are slowly moving as the world turns, without annoying temporal aliasing. You'll notice this at the end of the second video.
- The stars are slightly twinkling. This is actually an artifact/bug that I left in because I like it, but I could 'fix' the bug too.
- The stars are realistically grouped (in fact this is a rendering of the actual stars around Earth, but I could render them from 50 lightyears away and they become unrecognizable)
- The stars have actual blackbody radiation colors (no weird purples and greens) and they wash out to white as they get brighter than the exposure white level, rather than to a solid color (this is a good thing), yet the bloom still reflects the original color
- Large stars dont accidentally look like spheres (search for other examples of star rendering and you'll get what I mean)
- The stars are not animated. Animated textures might look okay, I have not tried that yet. These are pixel shader creations with no texture lookups, which means it is fast.
- The graphics performance cost is so negligable as to be nearly unmeasurable.
- Bright stars bloom, but in a nice stylized way (faint gaussian blur and a cross)
- The sky is DENSE with stars (I think I'm rendering 40,000 currently, which is really overboard) when it is very dark, which looks pretty spectacular I think.
- HDR stars look better but these look good even while HDR is not yet ready for PCs.
- There is a faint galaxy textured skybox, but this is our Milkyway, and maybe not right for a fantasy universe.