Sunset/Sunrise + Night Lighting for Terrains and Models

Hey Christopher and Thomas,

If you haven’t already checked out scene.globe.enableLighting, that will show a sunset effect in the atmosphere and will shade the terrain based on the time of day, but only if the terrain has normals like in CeisumTerrainProvider. You can also play around with imagery layer colors like in this demo Imagery Adjustment if you want to change the hue of the terrain.

For models most of the lighting work will have to be done in a custom shader. We don’t have a global ambient color so you will have to determine that in the shader based on the sun direction and the current view position. SkyAtmosphereFS.glsl may give you some ideas for that. Basically there’s no simple answer for models.