Shadow control
From Valve Developer Community
This point-based entity is available in all Source games.
| Table of contents |
[edit]
Entity Description
Defines the direction, color and attenuation distance of Dynamic Shadows for the entire map.- The properties of this entity apply to the whole map. Multiple instances of this entity within a map may cause errors.
- Its basic properties are controlled by three Entities used in combination: light_environment defines (a) the color and intensity of the Diffuse Skylight and (b) the direction, color and intensity of the Direct Sunlight. It also creates (buggy, unconfigurable) Dynamic Shadows which can only be overridden/controlled by the shadow_control Entity. env_sun places a glow sprite in the skybox to represent the Sun's apparent position in the sky. To make sense of it all, just make sure you have only one of each of these entities in your map, and that the Pitch and Yaw <angles> are set the same for all three of them. (Pitch is equivalent to the Sun's Angle of Elevation from the ground, and Yaw is its Compass Bearing.)
- The Sky List article suggests some settings for some of Valve's skyboxes. The worldspawn Entity defines which skybox to use. Note also that env_fog_controller settings will look wrong if they don't correspond to the particular skybox in use.
[edit]
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- Pitch Yaw Roll (Y Z X)
- This entity's angular orientation in the world (also used for angular effect entities).
Tip: Pitch is the Sun's Angle of Elevation from the ground, and Yaw is its Compass Bearing.- color
- <color255> The color of the shadows.
- distance
- <float> The maximum distance the shadow is allowed to cast, in inches.
Tip: Shortening this distance can be used to approximate the effects of Diffuse Lighting.- disableallshadows [Episode One Update]
- <boolean> All Shadows Disabled
[edit]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- color <color255>
- Set the shadow color.
- direction <vector>
- Set the shadow direction.
- SetDistance <float>
- Set the maximum shadow cast distance.
- SetAngles <angles>
- Set the shadow direction.
- SetShadowsDisabled <integer> [Episode One Update]
- Set shadows disabled state.
[edit]
Outputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.


