Env sun
Entity description
It places a Sun or Moon effect (glow sprite) in the skybox where it does not parallax, giving the impression that it is nearly infinitely far away. The env_sun Entity does not contribute any actual lighting. Use with light_environment and shadow_control
To place an env_sun, set the Pitch Yaw Roll. Pitch will be how far up and down it is in the sky. Yaw is how far left and right it will be. An info_player_start can be used to visualize this; you can set its angles and imagine a line coming out its back pointing to the sky and that is where the Sun will be in game (remember to delete the info_player_start after using it like this). Set Angles to Yes (This means it will use the Pitch Yaw Roll settings). Set Pitch as a negative number of the actual pitch. Sun Color is the base color of the sun. Overlay Color is the color of the transition material. The overlay prevents the sun from popping in and out of view and provides a nice transition to the full glare of the sun. Size is the size of the sun. Set this smaller than the overlay; 16 is a tiny sun and 256 is a huge sun. Set Overlay size larger than sun.
- You can also send inputs to the env_sun entity by directing them to "env_sun" instead of using a target name.
- The effect is additive with the sky: a pure yellow sun with a bright blue sky will appear white in-game; change the color to account for this.
Keyvalues
- Viewer entity ([todo internal name (i)]) <targetname>
- Name of an entity used to determine where the sun is in the skybox. The sun should be lined up on a line from this entity to the env_sun entity.
- UseAngles ([todo internal name (i)]) <boolean>
- The old way to orient env_sun is to point it at a target. The new way is to specify the angles. If you use the new way, set this property to YES.
- Pitch ([todo internal name (i)]) <integer>
- This value sets the pitch position of the sun. It overrides the pitch value in the angles keyvalue, even if left at 0, so it needs to be specified. Contrary to the angles keyvalue, the rotation of this pitch is measured counter-clockwise from the horizontal, so that 90 is straight up, while -90 is straight down. (It's simply the negative of a normal pitch value.)
- Overlay Color (R G B) ([todo internal name (i)]) <color255>
- A value of 0 0 0 will act the old way. Todo: Explain what the old way is.
- Overlay Size ([todo internal name (i)]) <integer>
- A value of -1 means the overlay will act the old way.
- HDR color scale. ([todo internal name (i)]) <float>
- float value to multiply sprite color by when running in HDR mode.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Inputs
- TurnOn
- Enable sun rendering.
- TurnOff
- Disable sun rendering.
- SetColor <color255 >
- Change the sun's color. Format: <Red 0-255> <Green 0-255> <Blue 0-255>