Hello again internet! I am so excited, because today I get to show everyone my latest update to A-Sky-Forge Version 0.3.0. This is a really great upgrade that is packed full of enhancements and features, including,
Updated lunar textures with improved normal maps for the moon so the moon no longer looks so odd.
Separate objects and shader code for the sun, moon and sky/stars so I could gain better control over the visual experience of each of these stellar objects and to implement linear mip-mapping for clearer textures.
Completely redid the lighting pipeline so that direct lighting from the sun/moon and stars are accurately combined with in-scattering from the sky and direct lighting is likewise, appropriately absorbed.
Hooked the sun and moon into a THREE.js lighting system that provides appropriately colored direct lighting and drives an ambient lighting system based on light conservation.
Eliminated ugly 'banding' artifacts that were especially visible in the darker areas of the sky using a Bayer Matrix.
Improved stellar scintillation twinkle to eliminate sharp spikes and sparks that occurred when stars were too small to see. Stars now fade out with intensity as their intensity decreases.
Implemented a solar texture by Mystic Mike (https://opengameart.org/content/sun-0) for a better sun then just a big yellow disk.
Implemented lunar eclipses that cause the moon to turn a creepy rust color and has a visible Earth's shadow.
Implemented solar eclipses that cause the sky to grow darker as the sun is covered up by the moon.
The above are even hooked into the new lighting system :D.
Improved earth shine according to Muller, Engel and Dollner's Single-Pass Rendering of Day and Night Sky Phenomena.
And the biggest change of all? I was able to add all these features and dramatically improve performance by implementing a new stellar LUT method. Instead of a giant for loop that searches for the color red to find nearby stars, the new system automatically determines which stars are closest to the given nearest pixel on the texture map and then converts the RG and BA values directly into coordinates in a second LUT table that has the actual right ascension and declination, color and stellar intensity. While I don't know direct numbers, I believe the new system is as much as a 50% faster then version 0.2.1. Overall, it is a major improvement over the laster version and you should totally check out it out here. Or, for an example of a solar eclipse, click here. Or for an example of a lunar eclipse, click here.
If you like the new version, installation is relatively easy and described on the Github README. If you're upgrading, just make sure to replace all the image files in your Sky Forge image directory with those from the new distribution as all of the textures have been updated. Then remove the material="shader: sky; side:back;" component from your <a-sky-forge> A-Frame element.
Why does the moon go out of view, and I can't see it as it does the eclipse?
Dante of code-panda.com says:
To move the camera outside of VR, you need to hold the left-mouse button and drag. Then you can focus the camera on the sun or moon, or anyplace else. You can also move around using the WASD buttons on your keyboard.