Skip to main content
The 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

VolumetricQualityModes
default:"High"
Quality mode for volumetric cone effects:
  • High: Transparent blending, highest quality
  • Medium: Transparent with optimized sampling
  • Low: Alpha cutout, best performance
bool
default:"false"
Prevents users from changing volumetric quality. Useful for world optimization.
DefaultQualityModes
default:"High"
Quality mode for blinder projection effects:
  • High: Transparent blending
  • Low: Alpha cutout
bool
default:"false"
Prevents users from changing blinder projection quality.
DefaultQualityModes
default:"High"
Quality mode for PAR light projection effects:
  • High: Transparent blending
  • Low: Alpha cutout
bool
default:"false"
Prevents users from changing PAR projection quality.
DefaultQualityModes
default:"High"
Quality mode for other projection effects (moving heads, spots):
  • High: Transparent blending
  • Low: Alpha cutout
bool
default:"false"
Prevents users from changing other projection quality.
DefaultQualityModes
default:"High"
Quality mode for disco ball reflection effects:
  • High: Transparent blending
  • Low: Alpha cutout
bool
default:"false"
Prevents users from changing disco ball quality.
DefaultQualityModes
default:"High"
Quality mode for lens flare effects:
  • High: Transparent blending
  • Low: Alpha cutout
bool
default:"false"
Prevents users from changing lens flare quality.

Video Sampling

Texture
Optional texture for video sampling. When assigned, fixtures can sample colors from this texture for video-reactive effects.

Materials

Material[]
Array of all fixture materials in the scene. Used for intensity and property updates.
Material[]
Array of all volumetric cone materials. Used for quality mode and intensity updates.
Material[]
Array of all projection materials. Used for quality mode and intensity updates.
Material[]
Array of all disco ball materials. Used for quality mode and intensity updates.
Material[]
Array of all laser materials. Used for intensity updates.

Post Processing

Animator
Optional reference to bloom post-processing animator for bloom intensity control.

UI Sliders

UnityEngine.UI.Slider
Master intensity slider. Controls maximum intensity for all fixture types.
UnityEngine.UI.Slider
Fixture intensity slider. Controls brightness of fixture body meshes.
UnityEngine.UI.Slider
Volumetric intensity slider. Controls brightness of volumetric cone effects.
UnityEngine.UI.Slider
Projection intensity slider. Controls brightness of light projections.
UnityEngine.UI.Slider
Disco ball intensity slider. Controls brightness of disco ball reflections.
UnityEngine.UI.Slider
Laser intensity slider. Controls brightness of laser effects.
UnityEngine.UI.Slider
Bloom intensity slider. Controls post-processing bloom effect strength.
UnityEngine.UI.Text
Text components for displaying slider percentages. One for each slider type.
float
default:"1.0"
Maximum intensity value for fixture meshes. Set by master slider.
float
default:"1.0"
Maximum intensity value for volumetric effects. Set by master slider.
float
default:"1.0"
Maximum intensity value for projections. Set by master slider.
float
default:"1.0"
Maximum intensity value for disco balls. Set by master slider.
float
default:"1.0"
Maximum intensity value for lasers. Set by master slider.

UI Toggles and Buttons

UnityEngine.UI.Toggle
Toggle for volumetric noise effect. Disable for better performance on low-end systems.
UnityEngine.UI.Button
Button to set volumetric quality to High mode.
UnityEngine.UI.Button
Button to set volumetric quality to Medium mode.
UnityEngine.UI.Button
Button to set volumetric quality to Low mode.
UnityEngine.UI.Button
Button to globally enable/disable strobe effects. Useful for photosensitivity.

DMX Configuration

bool
default:"true"
Enable DMX fixture control. Set to false if only using AudioLink.
Enable AudioLink fixture control. Set to false if only using DMX.
int
default:"0"
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)
bool
default:"false"
Enable 9-universe RGB mode for expanded color control.
bool
default:"true"
Delays strobe output for global illumination baking. Recommended to keep enabled.
CustomRenderTexture[]
Array of Custom Render Textures for horizontal DMX mode. Auto-populated by VRSL setup.
CustomRenderTexture[]
Array of Custom Render Textures for vertical DMX mode. Auto-populated by VRSL setup.
CustomRenderTexture[]
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

bool
default:"true"
Reduces interpolation speed in-game for more responsive DMX control.
float
default:"1.55"
Multiplier for in-game interpolation reduction when sperateInGameInterpolationSpeed is enabled.
bool
default:"false"
Enables debug logging to console. Useful for troubleshooting.
bool
default:"true"
Property for controlling volumetric noise effect. Automatically disabled on mobile platforms.
bool
default:"true"
Requires depth-based lighting for volumetric effects. Automatically disabled on mobile platforms.
bool
default:"false"
Property for globally disabling strobe effects. Useful for photosensitive users.

Configuration Steps

Initial Setup

  1. Add VRSL_LocalUIControlPanel component to a persistent GameObject
  2. 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
  3. Assign DMX Custom Render Texture arrays (auto-populated by VRSL prefab)
  4. Assign AudioLink Custom Render Texture array (auto-populated by VRSL prefab)

UI Connection

  1. Create Canvas with UI sliders and buttons
  2. Assign slider components to corresponding fields
  3. Assign text components for percentage display
  4. 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()
  5. Configure button OnClick events:
    • Volumetric High → _SetVolumetricHigh()
    • Volumetric Med → _SetVolumetricMed()
    • Volumetric Low → _SetVolumetricLow()
    • Global Strobe Toggle → _ToggleGlobalStrobe()

Quality Mode Lock Setup

To prevent users from changing quality settings:
  1. Set desired quality modes
  2. Enable corresponding lock booleans:
    • lockVolumetricQualityMode
    • lockBlinderProjectionQualityMode
    • lockParProjectionQualityMode
    • lockOtherProjectionQualityMode
    • lockDiscoballQualityMode
    • lockLensFlareQualityMode
  3. Buttons will be visually disabled and non-interactive

Public Methods

Quality Mode Methods

void
Sets volumetric quality to High mode (if not locked).
void
Sets volumetric quality to Medium mode (if not locked).
void
Sets volumetric quality to Low mode (if not locked).
void
Sets blinder projection quality to High.
void
Sets blinder projection quality to Low.
void
Sets PAR projection quality to High.
void
Sets PAR projection quality to Low.
void
Sets other projection quality to High.
void
Sets other projection quality to Low.
void
Sets disco ball quality to High.
void
Sets disco ball quality to Low.
void
Sets lens flare quality to High.
void
Sets lens flare quality to Low.
void
Forces update of all quality modes. Useful after loading settings.

Intensity Methods

void
Sets master intensity for all fixture types. Called by master slider.
void
Sets intensity for fixture body meshes. Updates _UniversalIntensity shader property.
void
Sets intensity for volumetric cone effects.
void
Sets intensity for light projections.
void
Sets intensity for disco ball reflections.
void
Sets intensity for laser effects.
void
Sets bloom post-processing intensity via animator (if assigned).

DMX Control Methods

void
Updates DMX Custom Render Texture state based on current mode. Enables active mode CRTs and disables others.
void
Switches to Horizontal DMX mode (if DMX is enabled).
void
Switches to Vertical DMX mode (if DMX is enabled).
void
Switches to Legacy DMX mode (if DMX is enabled).
Enables or disables AudioLink Custom Render Textures based on isUsingAudioLink.
void
Updates 9-universe mode setting on all DMX CRT materials.

Other Methods

void
Toggles global strobe disable on/off. Updates all DMX strobe textures.
void
Updates _SamplingTexture property on all materials with videoSampleTargetTexture.
void
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 all VRStageLighting_DMX_Static components:
  • Enables/disables DMX Custom Render Textures
  • Switches between Horizontal/Vertical/Legacy grid modes
  • Controls global strobe disable
  • Sets material intensity properties
Manages AudioLink for all VRStageLighting_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: Uses DMX_CRTS_Horizontal textures
  • DMXMode = 1: Uses DMX_CRTS_Vertical textures
  • DMXMode = 2: Uses DMX_CRTS_Legacy textures
Grid Reader populates these textures with OSC data.

Performance Optimization

Quality Mode Impact

High Quality (Transparent):
  • Best visual quality
  • Requires alpha blending
  • Higher fill rate cost
  • Recommended for PC
Low Quality (Alpha Cutout):
  • 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):
  • VolumetricNoise automatically disabled
  • RequireDepthLight automatically disabled
  • Quality modes should be set to Low
  • Use lock booleans to prevent user changes

See Also