CAVE/DMX Lighting

From Unity3D

Jump to: navigation, search

CAVE is an immersive virtual reality environment where projectors are directed to three of the walls of a room-sized cube. In the CAVE environment, we also introduce the Motion Floor to simulate movements on bouncing terrain.

Contents

What is DMX Lighting?

The DMX Lights are a feature of the CAVE that lets you utilize the lights within the CAVE for your game or experience. There are all different kinds of lights to play with.
This package sends OSC messages to the Lighting Manager/controller in order to control the lights.

Integration Package

DMX Lighting wrapper for Unity

Use of DMX Lighting Wrapper

  • Import the DMXLighting package and open the CaveLighting scene to see an example scene.
  • Go to Assets -> Import Package -> Custom Package to import the package.
  • Drag from the prefabs folder the DMXController and OSCMain prefabs into your scene.
  • Open the run_lighting.bat file on the CAVE PC to start the Lighting Manager. Make sure it is open before you start your game. The Lighting Manager MUST be open for it to work during game.
  • Don’t move the location of the scripts! The JS scripts referenced by C# scripts must be in a separate folder like Standard Assets or Plugins

Using the Scripts

General Usage

  • Use the static controller “DMXController.Lighting” in any script to control the DMX Lights.
  • You shouldn’t have to change any settings for the DMX lighting to work.
  • Be sure to limit the rate at which the lights are set so it is not every frame otherwise it will crash the lighting manager
  • Look at LightingSampleScript to see examples of how to set the lighting

Controlling Lights

  • Call the DMXController.Lighting methods from any script or a new script.
  • For methods that require a lightName, just use the name of the light you want to control.
  • For example, the below code turns all the lights to red.
DMXController.Lighting.TurnOn("Master", Color.red, 0, 255);

Light Naming

These names are related to the physical light/lights in the CAVE. It is the general naming convention for the CAVE Lighting.

  • “Master” = All lights in the cave
  • “allRGB” = All lights that have RGBA color channels
  • “CaveRGB” = All lights within the cave area that have RGBA color channels
  • “ThemeRGB” = All lights in the theme area that have RGBA color channels
  • “Walls” = The bar lights that surround the cave walls
  • “Left” = The bar lights that are on the left cave wall
  • “Center” = The bar lights that are on the center cave wall
  • “Right” = The bar lights that are on the right cave wall
  • “Guest” = The two guest lights on the ceiling that light the platform
  • “GuestLeft” = The left guest light on the ceiling that lights left side of the platform
  • “GuestRight” = The right guest light on the ceiling that lights right side of the platform
  • “pygmy” = The motorized mirrors light
  • “vulture” = The moving head light
  • “h2o” = The water effect light
  • “uv” = The uv light

DMXController.Lighting Methods

  • void Blackout()
    • Turns off all the lights. This is automatically called in Start and OnApplicationQuit.
  • void AllOn()
    • Turns on all the lights to rgb(255,255,255)
  • void TurnOn (string lightName, int red, int green, int blue, int amber, int dimmer)
    • Turns on lightName by directly providing the rgb values, amber and dimmer.
    • All int values range from 0-255.
  • void TurnOn (string lightName, Color thisColor, int amber, int dimmer)
    • Turns on lightName by directly providing a Color value (see Unity documentation), amber and dimmer.
    • All int values range from 0-255.
  • void TurnOn (string lightName, Color32 thisColor, int amber, int dimmer)
    • Turns on lightName by directly providing a Color32 value (see Unity documentation), amber and dimmer.
    • All int values range from 0-255.
  • void TurnOff (string lightName)
    • Turns off lightName

//Untested functions

  • void MoveVulture (int pan, int tilt, int finePan, int fineTilt)
    • Moves and angles the vulture accordingly. Pan and tilt are for broad changes.
    • finePan and fineTilt are for minor adjustments.
    • All int values range from 0-255.
  • void TurnOnWaterLight (int thisColor, int rotation, int dimmer)
    • Turns on the h2o light.
    • All int values range from 0-255.
  • void TurnOnUVLight (int dimmer)
    • Turns on the uv light.
    • All int values range from 0-255.
  • void SetMode (string lightName, string mode, int range)
    • Every light has different modes. Please reference the physical documentation of each light to see what's available. Below are some sample modes.
    • “ccspeed” is the speed that the colors will change.
    • “strobe” sets the lights to flashing.
    • “macro” is a preset arrangement of colors that the light will go through. Each light has different macros available.
    • All int values range from 0-255.
  • void TurnOnCeilingLights (string code)
    • Turns on the fiber-optic cable lights on the ceiling.
    • The possible codes are “on”, “red”, “green”, “blue”, “white”, “purple”, “orange”, “yellow” and “off”.
    • You must send code “on” first and then send a color code after. For example, TurnOnCeilingLights (“on”); TurnOnCeilingLights (“white”); TurnOnCeilingLights (“off”);
  • UseCue(cueName, func)
    • Executes the named cue that is stored in cue_config.py
Personal tools