Fixtures - towneh/vrsl-urp GitHub Wiki

Fixtures

The fixture types, how to patch a DMX fixture so it reads the desk, and how to set up an AudioLink fixture so it reads the music. Field-by-field detail for every inspector control is in the Fixture Configuration Reference. This page is the order to do things in.

The two components

Component Driven by Manager
VRSLDMXRealtimeLight Channel values from a desk VRSL_DMXURPLightManager
VRSLAudioLinkRealtimeLight AudioLink's audio analysis VRSL_AudioLinkURPLightManager

A scene can carry both paths, each with its own manager and its own fixtures. The prefabs under Runtime/Prefabs/ are fixture bodies with the right component already on them. They are the quickest way to a working rig. A DMX fixture prefab works on any grid layout, since the layout is set once on the manager (see DMX Sources), so the one set under Runtime/Prefabs/DMX/ serves whatever layout the world uses.

Fixture types

fixtureType on either component decides which fields the inspector shows and how the package shapes the cone.

Type What it is
MoverSpotlight A moving head with a tight beam. Pan and tilt.
MoverWashlight A moving head with a broad, soft beam. The cone stays bright across most of its width and feathers at the edge.
StaticBlinder, StaticParLight Fixed fixtures. No pan or tilt. The cone points where the body points.
StaticPointLight A fixed fixture that lights in every direction, for practicals and bar lights.
Discoball A mirror ball. A point light whose dots come from a cubemap on the manager, turning about the fixture's up axis at discoballSpinSpeed. On DMX it is one channel, the dimmer, with its colour from the fixture's tint; on AudioLink it follows its band like any other fixture. The dots land on surfaces; discoballBeams draws them in the haze as well, at a cost per raymarch step, so it is off unless asked for.
Custom Everything shown, nothing assumed.

Fields every fixture has

  • maxIntensity is the output at full DMX or full audio level. It is on the same scale as a URP spot light's Intensity. A fixture at full output matches a URP spot set to the same number. Calibrate against a reference light rather than by eye.
  • range in metres, past which the light stops.
  • Cone angle. spotAngle on AudioLink fixtures, and on DMX fixtures minSpotAngle and maxSpotAngle, with the zoom channel moving between the two.
  • emitterDepth pushes the apex of the cone back inside the fixture, so the beam leaves the lens with a real width rather than from a point. Around 0.3 to 0.5 m tends to read well on an LED bar.
  • lensTransform is where the light comes from. The prefabs ship with one, and on your own geometry you add an empty child at the lens and assign it, since otherwise the light comes from the object's root.
  • fixtureShellRenderers are the body renderers, and a blinder's lens flare, that show the same colour and intensity as the light: dark at black, lit as the desk says. On your own geometry, list every renderer that should glow with the fixture.

Movers add enablePanTilt and the travel, offset and invert settings for each axis. DMX movers take pan and tilt from the desk and rotate on the GPU. AudioLink movers read the transforms you animate.

Patching a DMX fixture

  1. Give the fixture the universe and start channel that the desk sends it on. Universes count the way a desk counts them, from 1.
  2. Choose the layout. The prefabs use VRSL's 13-channel layout, which runs pan, pan fine, tilt, tilt fine, zoom, dimmer, strobe, red, green, blue, gobo spin, gobo select and movement smoothing. Five-channel statics use use5ChannelMode and read dimmer, red, green, blue and strobe from five consecutive channels. Patch those five channels apart and set the body shader to its five-channel mode too, so the light and the body read the same data.
  3. Turn off what the fixture does not use. enableConeWidth off on pars and blinders stops unrelated traffic on the zoom channel flickering their cone, and enableStrobe, enableGobo and enableGoboSpin follow the same logic.
  4. Open VRSL → URP → DMX Config → DMX Monitor in play mode and hover the fixture's cells. The status bar names the fixture patched at each channel and what that channel does for it, so a patch off by one shows up before it costs a rehearsal.

Where the values come from, as a video grid or as bytes, is in DMX Sources.

Setting up an AudioLink fixture

  1. Pick a band: bass, low mids, high mids or treble.
  2. Pick a colour source: a fixed emissionColor, one of AudioLink's theme colours, ColorChord, or a colour read from a texture at textureSamplingCoordinates. The texture modes read the manager's samplingTexture, or AudioLink's own texture when that is empty.
  3. Play a loud section and set maxIntensity for how bright full output should be. Then set bandMultiplier for how readily the fixture reaches full output from quiet audio.
  4. Set delay to read the band's history rather than its present value. A row of fixtures with rising delays chases along the row.

Set enableAudioLink off to hold a fixture at full output regardless of the music. That is how a static fixture lives in an AudioLink scene.

Gobos

Both managers hold a gobo wheel, a list of textures packed into one array. A DMX fixture selects a slot from its gobo channel. An AudioLink fixture selects one with goboIndex, where 1 is an open beam. goboSpinSpeed rotates it, negative for the other direction. A new manager loads the stock wheel automatically.

The discoball's dots and ball

Every discoball in a scene throws the same pattern, discoballCubemap on the manager. The shipped prefabs carry the stock mirror-ball cubemap; any cubemap works, and a coloured one tints its dots. With no cubemap assigned a discoball lights as a plain point light. The prefabs are VRSL-DMX-Discoball-1CH and VRSL-AudioLink-Discoball.

The ball turns with its dots, about the fixture's up axis at the same speed, while the world runs. It is the fixture's lensTransform, shown as Ball in the inspector's Discoball section, and the prefabs set it to their sphere. On a discoball of your own, set it to the mesh that should turn; left empty, the ball stays still while the dots go on turning, from the fixture's own position. The prefabs' sphere is a mirror, so what it shows comes from the world's reflection probes: bake or place one around it, or it reads dark.

Switching fixtures on and off at runtime

The manager follows its realtime fixtures by itself. Switch a fixture's GameObject, or anything above it, off or on while the world runs, or spawn a fixture prefab, and its light and beam go or come back by the next frame. Switching off the fixture's component (VRSLDMXRealtimeLight or VRSLAudioLinkRealtimeLight) stops its light and beam too, but its body keeps glowing with the show; switch the GameObject off to hide the whole fixture. However many fixtures switch in one frame, the manager collects them once, so hiding a whole room at a time is fine. RefreshFixtures() is still there and does no harm, but nothing needs to call it.

After you change a DMX fixture's settings by script, call MarkConfigDirty(); after you change its address, call ApplyAddress() on the fixture. The manager reads AudioLink fixtures every frame, so they need neither.