Light Control Commands
This section documents runtime light manipulation commands (UE5.2+).
Overview
UnrealCV provides TCP commands for controlling scene lighting:
Directional Light: Sunlight intensity and shadow settings
Sky Light: Ambient/IBL intensity control
Shadow Quality: Deep shadow casting for better occlusion
Note
These commands operate on the scene’s default DirectionalLight and SkyLight actors. Custom lights require Blueprint API usage.
TCP Commands
Directional Light
- vget /light/directional/intensity
Get directional light intensity (lux).
Returns: Intensity value (e.g.,
3.00)- vset /light/directional/intensity [Intensity]
Set directional light intensity.
Arguments: -
Intensity: Lux value (typical range: 0.0-10.0)Example:
vset /light/directional/intensity 3.0Returns:
Set DirectionalLight intensity to 3.00
Deep Shadow
- vget /light/directional/castdeepshadow
Get directional light deep shadow casting status.
Returns:
trueorfalse- vset /light/directional/castdeepshadow [true|false]
Enable/disable directional light deep shadow casting.
Arguments: -
trueor1- Enable deep shadows -falseor0- Disable deep shadowsExample:
vset /light/directional/castdeepshadow true
Sky Light
- vget /light/skylight/intensity
Get skylight intensity.
Returns: Intensity value (e.g.,
1.00)- vset /light/skylight/intensity [Intensity]
Set skylight intensity.
Arguments: -
Intensity: Multiplier value (typical range: 0.0-3.0)Example:
vset /light/skylight/intensity 1.0Returns:
Set SkyLight intensity to 1.00
Blueprint API
LightBPLib provides Blueprint-accessible functions.
- SetDirectionalLightIntensity(WorldContext, Intensity) bool
Set directional light intensity from Blueprint.
- Parameters:
WorldContext – World context object
Intensity – Lux value
- Returns:
true if successful
- GetDirectionalLightIntensity(WorldContext) float
Get directional light intensity.
- Parameters:
WorldContext – World context object
- Returns:
Current intensity in lux
- SetSkyLightIntensity(WorldContext, Intensity) bool
Set skylight intensity from Blueprint.
- Parameters:
WorldContext – World context object
Intensity – Intensity multiplier
- Returns:
true if successful
- GetSkyLightIntensity(WorldContext) float
Get skylight intensity.
- Parameters:
WorldContext – World context object
- Returns:
Current intensity multiplier
- SetDirectionalLightCastDeepShadow(WorldContext, bCast) bool
Enable/disable deep shadow casting.
- Parameters:
WorldContext – World context object
bCast – true to enable deep shadows
- Returns:
true if successful
- GetDirectionalLightCastDeepShadow(WorldContext) bool
Get deep shadow casting status.
- Parameters:
WorldContext – World context object
- Returns:
true if deep shadows enabled
Lighting Setup Notes
Directional Light Intensity Reference:
0.5- Dim indoor lighting1.0- Overcast day3.0- Typical daylight10.0- Bright direct sunlight
Sky Light Intensity Reference:
0.0- No ambient light0.5- Dark interior1.0- Normal IBL2.0- Bright interior with windows
Deep Shadows:
Enable for: - Accurate occlusion in depth/segmentation data - Realistic shadow relationships - Training data for depth estimation models
Disable for: - Faster rendering (during preview) - Situations where shadows cause ambiguity
Common Issues
Light commands have no effect
Ensure scene contains DirectionalLight and SkyLight actors
Check that lights are set as movable (not static)
Verify light intensity values are within valid range
Intensity values seem wrong
Directional light uses physical units (lux)
Sky light uses relative multiplier
Check UE5 lighting units settings in Project Settings
See Also
UnrealCV Dev for UnrealZoo - UnrealCV Dev For UnrealZoo rendering feature summary
Command System - Base UnrealCV command reference