Sunlight shadow control: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
m (categorizing)  | 
				 (-added class hierarchy, assuming logical entity)  | 
				||
| (5 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
{{  | {{CD|CSunlightShadowControl|file1=1}}  | ||
{{this is a|logical entity|name=sunlight_shadow_control|since=Alien Swarm|sprite=shadow_control.png}}  | |||
An entity to control the sunlight that casts shadows in the map. Nearly identical to [[env_global_light]] in both function and appearance.   | |||
{{clr}}  | {{clr}}  | ||
== Keyvalues ==  | == Keyvalues ==  | ||
{{KV Targetname}}  | |||
{{KV|Pitch Yaw Roll (Y Z X)|string|This is the light cast direction. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, and roll is the rotation around the X axis.}}  | {{KV|Pitch Yaw Roll (Y Z X)|string|This is the light cast direction. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, and roll is the rotation around the X axis.}}  | ||
{{KV|Light Color|color255|This is the color of the sunlight.}}  | {{KV|Light Color|color255|This is the color of the sunlight.}}  | ||
| Line 16: | Line 16: | ||
{{KV|Texture Name|material}}  | {{KV|Texture Name|material}}  | ||
{{KV|Enable Shadows|boolean|Enables/disables shadows from this projected texture.}}  | {{KV|Enable Shadows|boolean|Enables/disables shadows from this projected texture.}}  | ||
{{KV EnableDisable}}  | {{KV EnableDisable}}  | ||
== Inputs ==  | == Inputs ==  | ||
{{  | {{I|LightColor|Set the light color.|param=color255}}  | ||
{{  | {{I|SetAngles|Set the sun direction.|param=string}}  | ||
{{  | {{I|SetDistance|Set the distance of the sun.|param=float}}  | ||
{{  | {{I|SetFOV|Set the field of view the sun casts.|param=float}}  | ||
{{  | {{I|SetNearZDistance|Set the near z distance.|param=float}}  | ||
{{  | {{I|SetNorthOffset|Sets the north offset.|param=float}}  | ||
{{  | {{I|SetTexture|Set the texture cookie of the sunlight.|param=string}}  | ||
{{  | {{I|EnableShadows|Set the if shadows are enabled|param=boolean}}  | ||
{{I EnableDisable}}  | {{I EnableDisable}}  | ||
[[Category:Lighting]]  | [[Category:Lighting]]  | ||
Latest revision as of 04:04, 19 May 2025
| CSunlightShadowControl | 

sunlight_shadow_control  is a   logical entity  available in all 
 Source games since 
 Alien Swarm.
An entity to control the sunlight that casts shadows in the map. Nearly identical to env_global_light in both function and appearance.
Keyvalues
- Name (targetname) <string>[ Edit ]
 - The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. 
parentnameortarget).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities 
- Pitch Yaw Roll (Y Z X) ([todo internal name (i)]) <string>
 - This is the light cast direction. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, and roll is the rotation around the X axis.
 
- Color Transition Time ([todo internal name (i)]) <float>
 - This is the number of seconds it takes to get from 0 to 255.
 
- Distance ([todo internal name (i)]) <float>
 - This is the distance of the sun, greater distances produce more orthogonal shadows.
 
- FOV ([todo internal name (i)]) <float>
 - This is the field of view that the sunlight casts in. Use lower values for more distant sun and sharper shadows.
 
- NearZ Distance ([todo internal name (i)]) <float>
 - This controls the near clipping plane's distance from the player.
 
- North Offset ([todo internal name (i)]) <float>
 - This offsets the from the player position where the sun is attached.
 
- Enable Shadows ([todo internal name (i)]) <boolean>
 - Enables/disables shadows from this projected texture.
 
- Start Disabled (StartDisabled) <boolean>
 - Stay dormant until activated (with the
Enableinput). 
Inputs
- LightColor <color255>
 - Set the light color.
 
- SetAngles <string>
 - Set the sun direction.
 
- SetDistance <float>
 - Set the distance of the sun.
 
- SetFOV <float>
 - Set the field of view the sun casts.
 
- SetNearZDistance <float>
 - Set the near z distance.
 
- SetNorthOffset <float>
 - Sets the north offset.
 
- SetTexture <string>
 - Set the texture cookie of the sunlight.
 
- EnableShadows <boolean>
 - Set the if shadows are enabled
 
EnableDisable:
- Enable / Disable
 - Enable/disable this entity from performing its task. It might also disappear from view.