Overview
TheVRStageLighting_DMX_Static class is the primary component for DMX-controlled lighting fixtures in VRSL. It handles DMX channel assignment, fixture properties, movement controls, and rendering for stage lights that can be controlled via industry-standard DMX protocols.
This script supports both modern industry-standard DMX channel assignment and legacy sector-based addressing. It can control movers, spot lights, and other fixture types with full support for pan/tilt, color, intensity, gobos, and strobes.
Namespace: VRSLInherits from:
UdonSharpBehaviour (in VRChat) or MonoBehaviour (in Unity)
DMX Settings
Enables DMX mode for this fixture. When enabled, the fixture responds to DMX input from the grid node.
Optional ID number for organizational purposes. Useful for matching IDs in DMX software and for Udon scripting references.
The industry standard DMX Channel this fixture begins on. Most standard VRSL fixtures use 13 channels.
The industry standard Artnet Universe. Use this to choose which universe to read the DMX Channel from.
Enables 9-Universe mode for this fixture. The grid will be split up by RGB channels with each section and color representing a universe. Only available on the Vertical and Horizontal Grid nodes.
Enables the legacy ‘Sector’ based method of assigning DMX Channels. Keep this unchecked to use industry standard DMX Channels.
Enables single channel DMX mode for this fixture. This is for single channeled fixtures instead of the standard 13-channeled ones. Currently, the ‘Flasher’ fixture is the only single-channeled fixture.
Chooses the DMX Address to start this fixture at when using legacy sector mode. A Sector in this context is every 13 Channels. I.E Sector 0 is channels 1-13, Sector 1 is channels 14-26, etc.
Chooses which of the 13 Channels of the current sector to sample from when single channel mode is enabled.
Enables legacy gobo range compatibility.
General Settings
Sets the overall intensity of the shader. Good for animating or scripting effects related to intensity. Its max value is controlled by Final Intensity.
Sets the maximum brightness value of Global Intensity. Good for personalized settings of the max brightness of the shader by other users via UI.
Choose between setting the Final Intensity for all meshes, or individual meshes.
Sets the maximum brightness value of Global Intensity for volumetric meshes only. Good for personalized settings of the max brightness of the shader by other users via UI.
Sets the maximum brightness value of Global Intensity for projection meshes only.
Sets the maximum brightness value of Global Intensity for fixture meshes only.
The main color of the light. Leave it at default white for DMX mode. Supports HDR colors.
Movement Settings
Invert the pan values (Left/Right Movement) for movers.
Invert the tilt values (Up/Down Movement) for movers.
Enable this if the mover is hanging upside down.
Fixture Settings
Enable projection spinning (Udon Override Only).
Enable strobe effects (via DMX Only).
Tilt (Up/Down) offset/movement. Directly controls tilt when in Udon Mode; is an offset when in DMX mode.
Pan (Left/Right) offset/movement. Directly controls pan when in Udon Mode; is an offset when in DMX mode.
Use this to change what projection is selected. This is overridden in DMX mode.
Mesh Settings
The meshes used to make up the light. You need at least 1 mesh in this group for the script to work properly. Supports up to 5 mesh renderers.
Controls the radius of a mover/spot light.
Controls the length of the cone of a mover/spot light.
Controls the mesh length of the cone of a mover/spot light.
Maximum pan angle range in degrees.
Maximum tilt angle range in degrees.
Public Methods
_UpdateInstancedProperties()
Updates all material property blocks with current fixture settings. Call this method after changing any public properties to apply changes to the fixture._UpdateInstancedPropertiesSansDMX()
Updates material property blocks without DMX functionality enabled. Used for non-DMX controlled fixtures._DMXChannelToString()
Returns a string representation of the current DMX channel and universe._GetUniverse()
Gets the calculated DMX universe for this fixture._GetDMXChannel()
Gets the calculated DMX channel for this fixture.Properties (for Udon Scripting)
All public fields have corresponding properties for safe access from Udon scripts:LightColorTint- Get/Set the light colorConeWidth- Get/Set the cone widthConeLength- Get/Set the cone lengthMaxConeLength- Get/Set the maximum cone lengthGlobalIntensity- Get/Set the global intensityFinalIntensity- Get/Set the final intensityFinalIntensityComponentMode- Get/Set component modeFinalIntensityVolumetric- Get/Set volumetric intensityFinalIntensityProjection- Get/Set projection intensityFinalIntensityFixture- Get/Set fixture intensitySelectGOBO- Get/Set the selected goboNineUniverseMode- Get/Set nine universe modeInvertPan- Get/Set pan inversionInvertTilt- Get/Set tilt inversionIsDMX- Get/Set DMX enabled stateProjectionSpin- Get/Set projection spinPan- Get/Set pan offsetTilt- Get/Set tilt offset
Usage Example
Related Components
- VRStageLighting_AudioLink_Static - AudioLink-controlled fixtures
- VRSL_LocalUIControlPanel - Local UI control panel for VRSL
- GridReader - OSC/DMX grid reader component