This article's documentation is for Source 2. Click here for more information.

light_omni2

From Valve Developer Community
Jump to: navigation, search

light_omni2 is a point entity available in Counter-Strike 2 Counter-Strike 2.

English (en)Translate (Translate)

It creates an invisible light source that can cast both real-time and baked light in all directions and has the ability to be a choice of four types of shapes.

Keyvalues

Source 2 Transform:

Origin (origin) <coordinates>
The world space origin of the entity.
Angles (angles) <angles>
The pitch, yaw, roll orientation of the entity.
Scale (scales) <vector>
The x, y, z scales of the entity. Not all entities can use this.
Transform Locked (transform locked) <boolean>
Lock the transform at its current value, preveting the transform of the node from being modified.
Force Hidden (force hidden) <boolean>
Visually hides the entity from the viewports. The Outliner pane will still list hidden entities.
Editor Only (editor only) <boolean>
Entity is only displayed in Hammer and will not appear in game.



Source 2 Targetname:
Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist>
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Create Client-Only Entity (clientSideEntity) <choices>
  • 0: No
  • 1: Yes



Source 2 Hierarchy:
Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent.
Parent Model Bone/Attachment Name (parentAttachmentName) <string>
The name of the bone or attachment to attach to on the entity's parent in the movement hierarchy. Use !bonemerge to use bone-merge style attachment.
Model Attachment position offset (local.origin) <coordinates>
Offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
Model Attachment angular offset (local.angles) <angles>
Angular offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
Model Attachment scale (local.scales) <vector>
Scale in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.
Use Model Attachment Offset (useLocalOffset) <boolean>
Whether to respect the specified local offset when doing the initial hierarchical attachment to its parent.



Source 2 Light2:
Enabled (enabled) ([todo internal name (i)]) <boolean>
Enable or disable the light. Has no effect on Direct Lighting when set to Static.
Color Mode (colormode) ([todo internal name (i)]) <choices>
How to calculate the light's color
  • 0: Color
  • 1: Color Temperature
Color (color) ([todo internal name (i)]) <color255>
Color Temperature (colortemperature) ([todo internal name (i)]) <float>
Lumens (brightness_lumens) ([todo internal name (i)]) <float>
Total amount of visible light energy emitted, in lumens. The default omni-directional light is calibrated at 1000 lumens, typical for a 60 Watt incandescent bulb.
Direct Lighting (directlight) ([todo internal name (i)]) <choices>
Controls direct lighting rendering.
  • 0: None
  • 1: Static
  • 2: Stationary
  • 3: Dynamic


Shape (shape) ([todo internal name (i)]) <choices>
Shape of the light.
  • 0: Point
  • 1: Sphere
  • 2: Tube
  • 3: Tube with end caps
Cookie (lightcookie) ([todo internal name (i)]) <choices>

Source 2 Light Units:
Units (brightness_units) ([todo internal name (i)]) <choices>
Units for specifying the brightness of the light source.
  • 0: Lumens
  • 1: Candelas
  • 2: Nits
  • 3: EV
  • 4: Legacy
Candela (brightness_candelas) ([todo internal name (i)]) <string>
Amount of light energy emitted per steradian of solid angle, in candela.
Nits (brightness_nits) ([todo internal name (i)]) <string>
Amount of light energy emitted per square meter per projected steradian, in nits. Controls the brightness of specular highlights and directly-viewed light geometry.
Brightness EV (brightness) ([todo internal name (i)]) <float>
Legacy (brighness_legacy) ([todo internal name (i)]) <string>
Exposure Value but specified as a scale value instead of powers of 2.



Source 2 Light Style:
Style (light_style) ([todo internal name (i)]) <vdata_choice>
Light Style.
  • 0: candle_1
  • 1: candle_2
  • 2: candle_3
  • 3: event_test
  • 4: fast_strobe
  • 5: flicker_1
  • 6: flicker_2
  • 7: fluorescent_flicker
  • 8: gentle_pulse
  • 9: slow_pulse_nofade
  • 10: slow_strobe
  • 11: slow_strong_pulse
Radiance RGB Material Variable (light_style_radiance_var) ([todo internal name (i)]) <string>
Emissive RGB color for a light's material on appropriately sized geometry.
Style RGB Material Variable (light_style_var) ([todo internal name (i)]) <string>
Light style multiplier ignoring the light's actual color.
Style Output Event 0 (light_style_output_event0) ([todo internal name (i)]) <vdata_choice>
Name of the event that triggers the OnStyleEvent0 output.
  • 0: buzz
  • 1: flash
  • 2: off
  • 3: on
  • 4: pop
  • 5: spark
Style Output Event 1 (light_style_output_event1) ([todo internal name (i)]) <vdata_choice>
Name of the event that triggers the OnStyleEvent1 output.
Style Output Event 2 (light_style_output_event2) ([todo internal name (i)]) <vdata_choice>
Name of the event that triggers the OnStyleEvent2 output.
Style Output Event 3 (light_style_output_event3) ([todo internal name (i)]) <vdata_choice>
Name of the event that triggers the OnStyleEvent3 output.
Style Target 0 (light_style_target0) ([todo internal name (i)]) <targetname>
Apply light style to a particular entity's materials.
Style Target 1 (light_style_target1) ([todo internal name (i)]) <targetname>
Apply light style to a particular entity's materials.
Style Target 2 (light_style_target2) ([todo internal name (i)]) <targetname>
Apply light style to a particular entity's materials.
Style Target 3 (light_style_target3) ([todo internal name (i)]) <targetname>
Apply light style to a particular entity's materials.


Skirt (skirt) ([todo internal name (i)]) <float>
Size (size_params) ([todo internal name (i)]) <float>
Range (range) ([todo internal name (i)]) <vector>
Outer Angle (outer_angle) ([todo internal name (i)]) <float>
Inner Angle (inner_angle) ([todo internal name (i)]) <float>

Source 2 Light Render:
Render Light Geometry (showlight) ([todo internal name (i)]) <boolean>
Render the light geometry .
Render To Cubemaps (rendertocubemaps) ([todo internal name (i)]) <boolean>
If true, illumination from this light renders into baked cube maps. .
Bake Specular To Cubemaps (bakespeculartocubemaps) ([todo internal name (i)]) <boolean>
Bake specular into cubemaps. .
Brightness Scale (brightnessscale) ([todo internal name (i)]) <float>
Scale brightness by this amount .
Fade Out Start Size (fade_size_start) ([todo internal name (i)]) <float>
Screen size where the light will begin fading out .
Fade Out End Size (fade_size_end) ([todo internal name (i)]) <float>
Screen size where the light will be fully faded out .



Source 2 Light Shadows:
Cast Shadows (castshadows) ([todo internal name (i)]) <choices>
Whether this light casts shadow .
  • 0: No
  • 1: Yes
  • 0: Baked Only
Shadow Map Resolution (shadowmapsize) ([todo internal name (i)]) <choices>
  • 0: 4096
  • 1: 3584
  • 2: 3072
  • 3: 2560
  • 4: 2048
  • 5: 1536
  • 6: 1024
  • 7: 512
  • 8: Default
Shadow Priority (shadowpriority) ([todo internal name (i)]) <choices>
Priority for the light's shadowmap. Shadowmaps are allocated from highest-to-lowest priority, favoring lights with stationary shadows within each priority. "Low" is below the default priority.
  • 0: Highest
  • 1: High
  • 2: Medium
  • 3: Low
  • 4: Default
Transmit Shadow Casters to Client (pvs_modify_entity) ([todo internal name (i)]) <boolean>
When this light is visible to a player, add its shadow casters to the player's PVS. .
Shadow Fade Out Start Size (shadowfade_size_start) ([todo internal name (i)]) <float>
Screen size where the shadows will begin fading out .
Shadow Fade Out End Size (shadowfade_size_end) ([todo internal name (i)]) <float>
Screen size where the shadows will be fully faded out .



Source 2 Light Bounce:
Bounce Light (bouncelight) ([todo internal name (i)]) <choices>
How bounced lighting should be represented .
  • 0: None
  • 1: Static
Bounce Scale (bouncescale) ([todo internal name (i)]) <float>
Scale value for indirect illumination. Values other than 1.0 disrupt the balance between direct and indirect illumination. Consider using post-processing instead.


Min Roughness (minroughness) ([todo internal name (i)]) <float>
Hack for fill lights or cheap fake soft area lights.

Source 2 Light Volumetric:
Volumetric Lighting (fog) ([todo internal name (i)]) <choices>
How volumetric light should be represented .
  • 0: None
  • 1: Baked
  • 2: Dynamic
Volumetric Strength (fogstrength) ([todo internal name (i)]) <float>
Logarithmic Fog Brightness Multiplier.
Volumetric Shadows (fogshadows) ([todo internal name (i)]) <choices>
  • 0: Default
  • 1: None
  • 2: Cast Shadows


Inputs


Source 2 Light2:


Enable <void>
Turn on the light.
Disable <void>
Turn off the light.
Toggle <void>
Toggle the light.
SetColor <color255>
Set the light's color.
SetColorTemperature <float>
Set the light's color temperature in Kelvin.
SetBrightness <float>
Set the light's brightness in EV.
SetBrightnessScale <float>
Set the light's brightness multiplier, which defaults to 1.
SetStyle <string>
separated list of styles from light_styles.vdata to play in sequence. The last entry will loop. The last style can be 'on'/'off' to enable/disable the light with no light style.
SetFogStrength <float>
Set the fog strength.
SetFogScale <float>
Set the fog multiplier, which defaults to 1.



Source 2 Targetname:
Kill
Removes this entity from the world.
KillHierarchy
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 means infinite>
FireUser1 to FireUser4
Fire the OnUser outputs; see User Inputs and Outputs.


RunScriptFile <string>
Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
RunScriptCode <string>
Execute a string of VScript source code in the scope of the entity receiving the input.
CallScriptFunction <string>
Call a script function.
CallPrivateScriptFunction <string>
Calls a script function from this entity's private script scope.
CallGlobalScriptFunction <string>
Calls a script function in the global script scope.



Source 2 Hierarchy:
SetParent <string>
Changes the entity's parent in the movement hierarchy.
SetParentAttachment <string>
Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
SetParentAttachmentMaintainOffset <string>
Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.
ClearParent
Removes this entity from the the movement hierarchy, leaving it free to move independently.


Outputs


Source 2 Light2:


OnStyleEvent0 <void>
Fired when the current light style plays an event of the type specified by Style Output Event 0.
OnStyleEvent1 <void>
Fired when the current light style plays an event of the type specified by Style Output Event 1.
OnStyleEvent2 <void>
Fired when the current light style plays an event of the type specified by Style Output Event 2.
OnStyleEvent3 <void>
Fired when the current light style plays an event of the type specified by Style Output Event 3.



Source 2 Targetname:
OnUser1 to OnUser4
These Outputs each fire in response to the firing of the like-numbered FireUser1 to FireUser4 Input; see User Inputs and Outputs.
OnKilled
This Output fires when the entity is killed and removed from the game.