One tile is 3x3x[module height] meters.
vieuxchat wrote:In fact I'm not sure I really understand what is the difference between a directionnal light and a point one.
Would a directionnal light always follow the direction of the party ?
There are four types of light, determined by the LightComponent's type field.
"point" - The default. Light is cast in all directions from the LightComponent's position and falls off with distance (the distance depending on the LightComponent's range).
"spot" - Light is cast in a cone from the LightComponent's position. The spotAngle field determines the radius of the cone and the spotSharpness field determines the distance from the axis of the cone at which light falloff starts (0 is immediately, 1 is no falloff at all). The component's rotation determines the direction of the cone, and the range determines the height of the cone. This is used a lot by ceiling shaft lights in the standard assets. Also, they don't render correctly in Wine for some reason.
"ambient" - Light is applied to all triangles on the level. Position and range are not meaningful for ambient lights, and there's no shadow casting. This is what sky objects use for their ambient lights. Note that ambient lighting, while not tremendously demanding, also isn't free, so don't use multiple ambient lights on the same level; combine the colors and intensity into one ambient light instead.
"directional" - You might have heard this kind of light referred to as a "sun" in 3D graphics jargon, and indeed it's what sky objects use for the direct sunlight. Imagine a point or plane which is infinitely distant, and emits uniform light that does not fall off with distance - but does cast shadows. That's the best way I can explain directional lights. (You could also just try one and see.) Position and range are not meaningful for directional lights, but rotation is, since it determines the direction in which the light is cast.
vieuxchat wrote:I thought static shadows = true would be faster than static shadows = false, is it like that or am I wrong ?
Close! You're confusing staticShadow with staticShadowDistance. staticShadow determines whether static shadows are cast by the light at all; staticShadowDistance is the distance in meters from the camera at which point the light will stop casting dynamic shadows. The default static shadow distance is 25m, which happens to exactly match the far clip of the default camera on levels with no SkyComponent.
You can stop a light from casting dynamic shadows at all, but still get static shadows by setting staticShadows = true and staticShadowDistance = 0. This is what the forest_lantern object in the standard assets does.
Also, if the player has shadow quality set to Low in the game options, dynamic shadows aren't cast at all, only static ones, regardless of staticShadowDistance.