π‘ LightEffect Component
The LightEffect component adds dynamic behavior to engine lights.
It allows simulating flickers, pulses, alarms, and other animated lighting effects,
all fully configurable by the developer.
βοΈ Main Properties
- Effect Type: The type of effect that defines the animation pattern.
- Speed: Controls the overall speed of the light changes.
- Intensity Min: Minimum intensity value (how dim the light can get).
- Intensity Max: Maximum intensity value (the brightest point).
- Randomness: Degree of randomness or irregularity in the behavior.
- Active: Enables or disables the effect without removing it from the object.
π§© This component can only be added to objects of type light.
π¨ Available Effect Types
π₯ 1. Torch (Fire / Flame)
Simulates a torch or living flame, with soft but irregular variations that slightly change
intensity and rhythm, imitating natural fire behavior.
- Speed: Controls how fast the light changes (typical values between 0.5 and 2).
- Intensity Min / Max: Defines the brightness range (e.g., 0.5β1.2).
- Randomness: Adjusts irregularity. Higher values = more chaotic flicker.
Recommended example:
Speed = 1.2
Intensity Min = 0.6
Intensity Max = 1.1
Randomness = 0.3
π₯ Ideal for torches, bonfires, candles, or magical portals.
β‘ 2. Fluorescent (Broken tube light / Neon)
Emulates a damaged fluorescent or neon lamp, flickering irregularly with occasional blackout moments.
- Speed: Not used (the flicker is random).
- Intensity Min / Max: Adjusts brightness between βblackoutsβ and full light moments.
- Randomness: Controls the frequency and intensity of failures. Higher values = more flickering.
Recommended example:
Intensity Min = 0.2
Intensity Max = 1.0
Randomness = 0.7
β‘ Perfect for industrial environments, dark hallways, or abandoned laboratories.
π 3. Pulse (Soft pulse / Light breathing)
Creates rhythmic variation in intensity, smoothly increasing and decreasing continuously,
similar to a breathing effect or a beating heart.
- Speed: Pulse speed (1 = normal, 3 = fast, 0.5 = slow).
- Intensity Min / Max: Lower and upper limits of the brightness cycle.
- Randomness: Not used.
Recommended example:
Speed = 1
Intensity Min = 0.7
Intensity Max = 1.0
π Ideal for energy lights, indicators, neons, or charging zones.
π¨ 4. Alarm (Emergency / Warning light)
Quickly alternates between different brightness levels, simulating an emergency or siren light.
In some cases, it may include color changes between warm and cold tones.
- Speed: Determines flash frequency (higher values = faster flashing).
- Intensity Min / Max: Controls how much brightness varies in each flash.
- Randomness: Not used.
Recommended example:
Speed = 3
Intensity Min = 0.5
Intensity Max = 1.3
π¨ Ideal for sirens, emergency alarms, spaceships, or police lights.
π§ Usage Tips
- π Speed controls the rhythm of the effect. Use small values for smooth transitions.
- π Intensity Min / Max define the visible brightness range. Greater difference = stronger effect.
- π Randomness adds life to fire-like or neon effects.
π§ Tip: combine static lights with animated lights for more realistic environments.
π Summary
- The LightEffect component adds automatic animation to lights.
- Available effects: Torch, Fluorescent, Pulse, and Alarm.
- All parameters can be modified directly from the editor panel.
- Intensity Min can go down to 0 to simulate complete blackouts.
- Randomness controls visual chaos, ideal for natural or deteriorated effects.