Aero Empire's world is not Earth. The planet size is different, the atmosphere is different, including the immense twilisphere which extends across the entire planet. And so, the celestial surroundings of the planet should also be different. To be honest, we were never planning on making the moon plain and gray like Earth's moon - that was just a placeholder made by me.
And so, as we get closer to releasing our demo, we want to make sure the atmosphere of the game fits well - and that includes changing the moon, stars, and we are even planning on adding rings to the planet.
We decided not to add two moons, as that has been done a lot to achieve the "otherworldly" effect, and since moons interact with the lighting and atmospheric scattering, adding too many would be computationally expensive. So we decided to add one moon - but to make it a glassy and reflective moon with a reddish color. This should instantly give the impression that Aero Empire is not Earth, and should also be interesting to look at.
The moon was created by three image maps (it is not a sphere, as we are not going to have the moon rotate). Those three maps are as follows:
The diffuse color of the moon.
The moon is a primarily red color, with large continents that are darker and smoother and with cracks exposing lighter and warmer areas of the moon underneath.
The bump map and specular map of the moon.
The bump map defines the radius of the sphere of the moon at each pixel, where lighter colors have larger radii, and darker areas have smaller radii. This also doubles as the specular map, as the highlights are stronger on the continents, so it needs a lighter color there, and the weaker on the cracks so it needs a darker color there.
Instead of using an ordinary bump map for the moon which is suited for flat surfaces, I decided to use a spherical bump map, which fits the spherical shape of the moon better. This works by computing the position on the sphere for each pixel, and then multiplying that by a radius defined by the the bumpmap (where darker colors are smaller radii, and lighter colors are larger radii). The 8 neighboring pixels are then used to compute 8 triangles connecting to the center pixel (as if this was a real spherical mesh with vertices defined per pixel). The normals of these triangles are then averaged to get the final normal for the center pixel. This makes a normal map where the bump map extrudes from a sphere as opposed to extruding from a plane (which is what normal bumpmapping essentially does).
Then, by tweaking the lighting parameters for the moon inside the engine, and applying a specular map to the moon's lighting, I achieved the final in game effect. The highlight is an especially nice touch - it is interesting to observe, and the rarity of shiny moons make it instantly give off an otherworldly appearance (as does the deep red color the moon reflects onto the scene).
Look forward to more updates as we crunch towards the demo release date, including planetary rings, a gyro test flight video, and the finished HUD!