Procedural Shading for WorldWind Java
Following up on the experimental procedural layer scheme, here is a shading layer that will compute lighting from a fixed south-east light source (morning light in northern hemisphere).
Download ProceduralTiledImageLayer.java (updated Sept 2009) and ProceduralShadingLayer.java. Remove the .txt extension and add to your SDK layers package.
Be sure to read my previous post regarding usage and limitations of this process (availability of elevation data and caching).
Note that light on shaded printed maps usually comes from north because when seen from above, it does give the proper feeling for relief, although it is unnatural in the northern hemisphere where the sun never shines from the north.
This is because our brain is used to understand shadows produced by a light source coming from above - in real life, light almost never comes from below. This is why craters on the Moon or other planets often look like bumps instead of holes - you need to turn the image upside down for your brain to properly understand the lighting.
Download ProceduralTiledImageLayer.java (updated Sept 2009) and ProceduralShadingLayer.java. Remove the .txt extension and add to your SDK layers package.
Be sure to read my previous post regarding usage and limitations of this process (availability of elevation data and caching).
Note that light on shaded printed maps usually comes from north because when seen from above, it does give the proper feeling for relief, although it is unnatural in the northern hemisphere where the sun never shines from the north.
This is because our brain is used to understand shadows produced by a light source coming from above - in real life, light almost never comes from below. This is why craters on the Moon or other planets often look like bumps instead of holes - you need to turn the image upside down for your brain to properly understand the lighting.