Shadow Spaces
From C4 Engine Wiki
A shadow space is a box that gives the engine information about the maximum possible extents of shadows cast by particular light sources. This can be used for a performance optimization when the volume of space in which shadows can be cast is significantly smaller than the full range of a light source.
Creating a Shadow Space
A shadow space is placed in a world using the Shadow Space tool in the Spaces page (shown to the right) in the World Editor. This tool draws a box that represents the boundary of the shadow space.Shadow spaces are meant to be used when the region of space illuminated by a light source is significantly smaller than the full range of a light source. For instance, an ideal candidate for shadow space application is a narrow hallway with bright lights in it. A shadow space should be drawn so that it covers the maximum volume inside which shadows might be seen when cast from the lights that will use it. A shadow space does not need to be fully contained in its owning zone—it may extend as far as necessary into other zones.
Connecting Lights
A shadow space doesn't do anything until one or more light sources are connected to it. Each light node has a built-in connector labeled %Shadow that can be connected to a shadow space. Once a light has been connected to a shadow space, the engine uses the boundary of the shadow space to optimize the area on the screen in which shadow volumes are rendered. If the GL_EXT_depth_bounds_test extension is available, then the engine can further optimize shadow rendering by using hardware features to eliminate pixels in the interior of a shadow volume.
In the case that a light is part of an instanced world, you can't connect the light node directly to a shadow space in the world that references it. In the Node Info dialog for light nodes, there is a check box called “Connect to shadow space in referencing world”. If this flag is set, the engine will look for a a connection to a shadow space on the instance node instead of the light node. If a %Shadow connector is found, then any lights in the instanced world with the “Connect to shadow space in referencing world” flag set is automatically connected to the shadow space connected to the instance node. (The %Shadow connector is available as a built-in connector under the Connectors pane in the Node Info dialog for the instance node.)
Performance
Shadow spaces are best used for static lights because there is some CPU overhead involved in calculating shadow volume extents. The results of these calculations are cached for static lights, so a speed improvement should almost always be observed when applying shadow spaces to reduce their shadow-casting range.
Shadow spaces are also capable of producing a speed-up for dynamic lights, but there are much greater CPU expenses due to the need to perform certain calculations every frame. When using shadow spaces with dynamic lights, you should always measure “before” and “after” frame rates to make sure the use of shadow spaces hasn't reduced performance.

