Env lensflare: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Include back button to main page)
Line 1: Line 1:
{{BMS point|env_lensflare}} It creates a {{WP|lens flare}} that can be used to represent bright light sources. [[File:Lensflare.png|frame|right|Entity icon in Hammer.]]
{{BMS point|env_lensflare}} It creates a {{WP|lens flare}} that can be used to represent bright light sources. [[File:Lensflare.png|frame|right|Entity icon in Hammer.]]
{{back | Black Mesa Level Creation}}


==Keyvalues==
==Keyvalues==

Revision as of 20:02, 13 August 2023

Template:BMS point It creates a Wikipedia icon lens flare that can be used to represent bright light sources.

Entity icon in Hammer.
Black Mesa Level Creation

Keyvalues

File (FlareFile) <string>
Optional - file defining the lens flare. Note: Hammer's parameters overwrite the file's parameters.
Distance attenuation (FlareAttenuation) <float>
Distance where lensflare will be invisible. 0.0 if not attenuation with distance
Flare Type (FlareType) <choices>
Normal: normal lens flare (Pitch,Yaw,Roll not used) ------ Sun Flare: set the same Pitch,Yaw,Roll that the one from the sun light_env. That will define the position of the sun. the actual position of this entity is not used.
  • 0: Normal
  • 1: Sun Flare
Appearance (FlareStyle) <choices>
Template:Light appearances
Size of Glow Proxy Geometry. (GlowProxySize) <float>
Size of the glow to be rendered for visibility testing. Must be larger than the distance from the sprite center to empty space. So if this glow is inside geometry (like a light bulb), set this value to be bigger than the bulb's radius. Any time a sphere of this radius would be visible (poking through any nearby geometry), the glow will be rendered. - Richard's note : I noticed that value more than ~100 wont work correctly
Flare 01 texture (Flare01_texture) to Flare 20 texture (Flare20_texture) <string>
image of the lens - if empty the flare doesn't exist
Flare 01 parameters (Flare01_params) to Flare 20 parameters (Flare20_params) <string>
parameters - example : DISK 1.0 10 10
Flare 01 intensity (Flare01_intensity) to Flare 20 intensity (Flare20_intensity) <vector>
intensity of the flare - example : 1.0 1.0 1.0
Flare 01 sizes (Flare01_sizes) to Flare 20 sizes (Flare20_sizes) <vector>
intensity of the flare - example : 1.0 1.0 1.0
Flare 01 color (Flare01_color) to Flare 20 color (Flare20_color) <color255>
color factor of the texture - example : 255 255 255


Inputs

ColorRedValue
Sets the red color channel's value (0 - 255).
ColorGreenValue
Sets the green color channel's value (0 - 255).
ColorBlueValue
Sets the blue color channel's value (0 - 255).
SetScale
Set the lensflare's scale (0 - 8.0).
HideLensFlare
Hide the lensflare. Won't be drawn until the 'ShowLensFlare' input is received.
ShowLensFlare
Show the lensflare.
ToggleLensFlare
Toggle the lensflare between hidden and shown.


Outputs

Flags

Start on : [1]
Play once : [2]

Lens Flare Properties

An individual env_lensflare can support up to 20 flares. Each flare have different properties that can be customized.

Texture

The texture property sets the material used by the flare. It is a path to a VMT file relative to the materials folder and without the file extension. Common flare materials are located in the effects/lensflare/ folder. Any material can be used as a lens flare, but flare materials should use UnlitGeneric and be additive.

Parameters

The parameters property controls the appearance of the flare. Parameters take the following form: TYPE parameters

The following lens flare types can be used:

DISK

A screen space flare that gets stronger when the player looks directly at the env_lensflare, and weaker as the player looks away. It takes three parameters.

The first number - how strong a image will move away from screen center. With 0 it will attached to screen center. Negative number will mirror effect that do positive number.

The second number - distort a image along the axis Y.

The third number - distort a image along the axis X.

Function example. Function second example.

BOW

An effect that uses an image and distorts it between center of screen and env_lensflare center. It takes one parameter.

The first number - change a picture scale. Don't work with negative numbers.

Function example. Function second example.

CLA

This effect looks like copy of DISK. It use same parameters.

Function example.

DISKH

An effect that uses an image and moves it along the X/Z axis. It takes four parameter.

The first number - how strong the image will move away from screen center along the axis X/Z. If positive number - it will use the axis X. If negative number - it will use the axis Z. If number is 0 - it will stand at env_lensflare center.

The second number - distort the image along the axis X and Z.

The third number - distort the image along the axis Y.

The fourth number - change position of a image along the axis Y. If positive number - be higher, if negative number - be lower.

Function example. Function Second example.

RAY

An effect that uses an image and scale it. It takes two parameter.

The first number - distort the image along the axis Y. The second number - distort the image along the axis X and Z.

Function example.

Todo: May better describe functions. Replace the links to videos in this page.