VRSL_LocalUIControlPanel component is the central management system for VR Stage Lighting. It provides user-accessible controls for quality modes, intensity levels, DMX/AudioLink configuration, and rendering settings for all fixtures in the scene.
Overview
This component acts as the hub for VRSL configuration, managing:- Quality modes for volumetric, projection, disco ball, and lens flare effects
- Intensity sliders for different fixture types
- DMX grid mode selection (Horizontal/Vertical/Legacy)
- AudioLink enable/disable
- Global strobe control
- Video sampling texture assignment
- Material property synchronization
Inspector Properties
Quality Modes
Quality mode for volumetric cone effects:
- High: Transparent blending, highest quality
- Medium: Transparent with optimized sampling
- Low: Alpha cutout, best performance
Prevents users from changing volumetric quality. Useful for world optimization.
Quality mode for blinder projection effects:
- High: Transparent blending
- Low: Alpha cutout
Prevents users from changing blinder projection quality.
Quality mode for PAR light projection effects:
- High: Transparent blending
- Low: Alpha cutout
Prevents users from changing PAR projection quality.
Quality mode for other projection effects (moving heads, spots):
- High: Transparent blending
- Low: Alpha cutout
Prevents users from changing other projection quality.
Quality mode for disco ball reflection effects:
- High: Transparent blending
- Low: Alpha cutout
Prevents users from changing disco ball quality.
Quality mode for lens flare effects:
- High: Transparent blending
- Low: Alpha cutout
Prevents users from changing lens flare quality.
Video Sampling
Optional texture for video sampling. When assigned, fixtures can sample colors from this texture for video-reactive effects.
Materials
Array of all fixture materials in the scene. Used for intensity and property updates.
Array of all volumetric cone materials. Used for quality mode and intensity updates.
Array of all projection materials. Used for quality mode and intensity updates.
Array of all disco ball materials. Used for quality mode and intensity updates.
Array of all laser materials. Used for intensity updates.
Post Processing
Optional reference to bloom post-processing animator for bloom intensity control.
UI Sliders
Master intensity slider. Controls maximum intensity for all fixture types.
Fixture intensity slider. Controls brightness of fixture body meshes.
Volumetric intensity slider. Controls brightness of volumetric cone effects.
Projection intensity slider. Controls brightness of light projections.
Disco ball intensity slider. Controls brightness of disco ball reflections.
Laser intensity slider. Controls brightness of laser effects.
Bloom intensity slider. Controls post-processing bloom effect strength.
Text components for displaying slider percentages. One for each slider type.
Maximum intensity value for fixture meshes. Set by master slider.
Maximum intensity value for volumetric effects. Set by master slider.
Maximum intensity value for projections. Set by master slider.
Maximum intensity value for disco balls. Set by master slider.
Maximum intensity value for lasers. Set by master slider.
UI Toggles and Buttons
Toggle for volumetric noise effect. Disable for better performance on low-end systems.
Button to set volumetric quality to High mode.
Button to set volumetric quality to Medium mode.
Button to set volumetric quality to Low mode.
Button to globally enable/disable strobe effects. Useful for photosensitivity.
DMX Configuration
Enable DMX fixture control. Set to false if only using AudioLink.
Enable AudioLink fixture control. Set to false if only using DMX.
DMX grid mode selection:
- 0: Horizontal Mode (~1560 channels, 3 universes)
- 1: Vertical Mode (~871 channels, 1.7 universes)
- 2: Legacy Mode (original sector-based)
Enable 9-universe RGB mode for expanded color control.
Delays strobe output for global illumination baking. Recommended to keep enabled.
Array of Custom Render Textures for horizontal DMX mode. Auto-populated by VRSL setup.
Array of Custom Render Textures for vertical DMX mode. Auto-populated by VRSL setup.
Array of Custom Render Textures for legacy DMX mode. Auto-populated by VRSL setup.
Array of Custom Render Textures for AudioLink mode. Auto-populated by VRSL setup.
Advanced Settings
Reduces interpolation speed in-game for more responsive DMX control.
Multiplier for in-game interpolation reduction when
sperateInGameInterpolationSpeed is enabled.Enables debug logging to console. Useful for troubleshooting.
Property for controlling volumetric noise effect. Automatically disabled on mobile platforms.
Requires depth-based lighting for volumetric effects. Automatically disabled on mobile platforms.
Property for globally disabling strobe effects. Useful for photosensitive users.
Configuration Steps
Initial Setup
- Add
VRSL_LocalUIControlPanelcomponent to a persistent GameObject - Populate material arrays:
- Drag all fixture materials to
fixtureMaterials - Drag all volumetric materials to
volumetricMaterials - Drag all projection materials to
projectionMaterials - Drag all disco ball materials to
discoBallMaterials - Drag all laser materials to
laserMaterials
- Drag all fixture materials to
- Assign DMX Custom Render Texture arrays (auto-populated by VRSL prefab)
- Assign AudioLink Custom Render Texture array (auto-populated by VRSL prefab)
UI Connection
- Create Canvas with UI sliders and buttons
- Assign slider components to corresponding fields
- Assign text components for percentage display
- Configure slider OnValueChanged events:
- Master Slider →
_SetFinalIntensity() - Fixture Slider →
_SetFixtureIntensity() - Volumetric Slider →
_SetVolumetricIntensity() - Projection Slider →
_SetProjectionIntensity() - Disco Ball Slider →
_SetDiscoBallIntensity() - Laser Slider →
_SetLaserIntensity() - Bloom Slider →
_SetBloomIntensity()
- Master Slider →
- Configure button OnClick events:
- Volumetric High →
_SetVolumetricHigh() - Volumetric Med →
_SetVolumetricMed() - Volumetric Low →
_SetVolumetricLow() - Global Strobe Toggle →
_ToggleGlobalStrobe()
- Volumetric High →
Quality Mode Lock Setup
To prevent users from changing quality settings:- Set desired quality modes
- Enable corresponding lock booleans:
lockVolumetricQualityModelockBlinderProjectionQualityModelockParProjectionQualityModelockOtherProjectionQualityModelockDiscoballQualityModelockLensFlareQualityMode
- Buttons will be visually disabled and non-interactive
Public Methods
Quality Mode Methods
Sets volumetric quality to High mode (if not locked).
Sets volumetric quality to Medium mode (if not locked).
Sets volumetric quality to Low mode (if not locked).
Sets blinder projection quality to High.
Sets blinder projection quality to Low.
Sets PAR projection quality to High.
Sets PAR projection quality to Low.
Sets other projection quality to High.
Sets other projection quality to Low.
Sets disco ball quality to High.
Sets disco ball quality to Low.
Sets lens flare quality to High.
Sets lens flare quality to Low.
Forces update of all quality modes. Useful after loading settings.
Intensity Methods
Sets master intensity for all fixture types. Called by master slider.
Sets intensity for fixture body meshes. Updates
_UniversalIntensity shader property.Sets intensity for volumetric cone effects.
Sets intensity for light projections.
Sets intensity for disco ball reflections.
Sets intensity for laser effects.
Sets bloom post-processing intensity via animator (if assigned).
DMX Control Methods
Updates DMX Custom Render Texture state based on current mode. Enables active mode CRTs and disables others.
Switches to Horizontal DMX mode (if DMX is enabled).
Switches to Vertical DMX mode (if DMX is enabled).
Switches to Legacy DMX mode (if DMX is enabled).
Enables or disables AudioLink Custom Render Textures based on
isUsingAudioLink.Updates 9-universe mode setting on all DMX CRT materials.
Other Methods
Toggles global strobe disable on/off. Updates all DMX strobe textures.
Updates
_SamplingTexture property on all materials with videoSampleTargetTexture.Updates depth light and volumetric noise settings on all materials.
Example Setup
Basic Control Panel
Performance-Optimized Setup
Quest-Optimized Setup
Integration with Other Components
DMX Fixtures
The Control Panel manages DMX rendering for allVRStageLighting_DMX_Static components:
- Enables/disables DMX Custom Render Textures
- Switches between Horizontal/Vertical/Legacy grid modes
- Controls global strobe disable
- Sets material intensity properties
AudioLink Fixtures
Manages AudioLink for allVRStageLighting_AudioLink_Static components:
- Enables/disables AudioLink Custom Render Textures
- Sets material intensity properties
- Manages quality modes for AudioLink effects
Grid Reader
The active DMX mode determines which grid textures are used:DMXMode = 0: UsesDMX_CRTS_HorizontaltexturesDMXMode = 1: UsesDMX_CRTS_VerticaltexturesDMXMode = 2: UsesDMX_CRTS_Legacytextures
Performance Optimization
Quality Mode Impact
High Quality (Transparent):- Best visual quality
- Requires alpha blending
- Higher fill rate cost
- Recommended for PC
- Good visual quality
- Uses alpha testing
- Better performance
- Recommended for Quest
Material Arrays
The component updates materials in batches:- Iterates through material arrays
- Sets shader properties via
Material.SetFloat/SetInt/SetTexture - Occurs only when settings change
- No per-frame overhead
Custom Render Textures
Disabled CRTs stop updating:- Inactive DMX modes: UpdateMode = OnDemand
- Active DMX mode: UpdateMode = Realtime
- Saves significant GPU time
- Only one grid mode active at once
Mobile Platform Handling
On Android and iOS (Quest):VolumetricNoiseautomatically disabledRequireDepthLightautomatically disabled- Quality modes should be set to Low
- Use lock booleans to prevent user changes
See Also
- DMX Static Component - DMX fixture control
- AudioLink Static Component - AudioLink fixture control
- Grid Reader - OSC data reception