Guide to Shadow Caster
ShadowCaster works with .bmp and .jpg files. Their size should be 256x256.
Interface scheme
HeightMap
This box contains a picture called HeightMap.A heightmap is a grayscale image where each pixel represents the height of the point at his coordinates, where the lightest point is the highets point.
- To load a heightmap, right click the box and choose "Load Picture"
- To load a heightmap from the clipboard, right click the box and choose "From Clipboard"
GrassMap
This box contains a picture called GrassMap. The GrassMap is used with the StoneMap to generate a TextureMap.
- To load a GrassMap, right click the box and choose "Load Picture"
- To load a GrassMap from the clipboard, right click the box and choose "From Clipboard"
StoneMap
This box contains a picture called StoneMap. The StoneMap is used with the GrassMap to generate a TextureMap.
- To load a StoneMap, right click the box and choose "Load Picture"
- To load a StoneMap from the clipboard, right click the box and choose "From Clipboard"
TextureMap
This box contains a picture called TextureMap. The TextureMap can be generated by the program using the GrassMap and the StoneMap.
- To load a TextureMap, right click the box and choose "Load Picture"
- To load a TextureMap from the clipboard, right click the box and choose "From Clipboard"
- To save a TextureMap, right click the box and choose "Save Picture"
- To save a TextureMap to the clipboard, right click the box and choose "To Clipboard"
ShadowMap
This box contains a picture called ShadowMap. The ShadowMap is generated by the program using various algorithms.
- To save a ShadowMap, right click the box and choose "Save Picture"
- To save a ShadowMap to the clipboard, right click the box and choose "To Clipboard"
ColorMap
This box contains a picture called ColorMap. The ShadowMap is generated by combining the ShadowMap and the TextureMap, using different algorithms.
- To save a ShadowMap, right click the box and choose "Save Picture"
- To save a ShadowMap to the clipboard, right click the box and choose "To Clipboard"
Control Panel
This box contains all the commands you need to generate the shadows for your terrains.
Controls scheme:
- Linear: Shadows are casted at each high point and their darkness decrease linearly.
- Linear Sim: Same as linear, but shadows are casted with a fixed 45 degree angle.
- Embossed: similar to linear, but with highlights.
- Sin Func: Shadows are casted at each high point and their darkness decrease using a sinusoidal function. The highest point casts the darkest shadow.
- Cos Func: Shadows are casted at each high point and their darkness decrease using a sinusoidal function. Each shadow starts with the same darkness.
- Clear: This command clears the shadow map.
- Make Texture: This command creates the texture map by mixing the GrassMap with the StoneMap according to the height of the specified point in the HeightMap.
- Make Texture2: This command creates the texture map by mixing the GrassMap with the StoneMap according to the slope of the specified point in the HeightMap.
- X0,Y0: These are the coordinates of the position of the light.You can set these values by left clicking anywhere in the ShadowMap box.
- Decay: This value represents the lenght of the shadow. The highest the value, the shortest the shadow will be.
- 50/50: The colormap is created using a simple average function.
- Multiply: The colormap is created using a multiply function (photoshop/gimp-like).
- Multiply/2: The same as multiply, but with less strenght given to the shadowmap.
- Multiply/3: A combination of the standard multiply and divide filters. the final value is not modified if the value is a 50% gray, is multiplied if less then 50% gray and is divided if the value is greater then 50% gray.
Shadow commands
Here are the commands used to generate the shadow maps. Each command uses a differend method of shadowing:
Texture commands
Here are the commands used to generate the texture map. There are two commands:
Shadow parameters
In this section are situated the parameters used to create the shadowmap:
Blend parameters
Here are the blending parameters used to combine the shadowmap with the texturemap:
Sliders
These two sliders control the texture generation and the shadow generation. The first one controls the contrast used to mix the grassmap and the stonemap with the MakeTexture function. The second one controls the darkness given to the shadows.
3D button
This command will take you to the 3D view of the terrain.
DetailMap
The detail map is simply the texture associated to the terrain cells.
- To load a DetailMap, right click the box and choose "Load Picture".
- To load a DetailMap from the clipboard, right click the box and choose "From Clipboard".