What are Generators?
Generators are plugins that create or modify DMX channel data during the rendering pipeline. They run after Art-Net data is received but before serialization to video, allowing real-time manipulation of lighting data.Create Data
Generate DMX from scratch (strobes, effects)
Modify Data
Transform existing channels (remapping, fades)
Text Encoding
Encode text strings as DMX bytes
Time Sync
Timecode and time-based data injection
The IDMXGenerator Interface
All generators implement the simple but powerfulIDMXGenerator interface:
IDMXGenerator.cs:6-9
GenerateDMX method is called once per frame with the complete channel array passed by reference, allowing both read and write operations.
Generator Execution Order
Generators execute in the order they appear in the show configuration:TextureWriter.cs:99-105
Available Generators
HNode includes a comprehensive set of built-in generators:StaticValue
Purpose: Set a range of channels to a constant valueGeneratorStaticValue.cs:18-27
channelStart: First channel to setchannelEnd: Last channel to set (inclusive)value: Byte value (0-255)
- Force dimmer channels to full
- Keep certain fixtures in a specific state
- Override Art-Net data for testing
- Set default values for unused channels
Strobe
Purpose: Generate a periodic on/off strobe effectGeneratorStrobe.cs:16-34
channel: Target DMX channelvalueOn: Value when strobe is on (default: 255)valueOff: Value when strobe is off (default: 0)frequency: Strobe rate in Hz (cycles per second)
- Create strobe lighting effects
- Pulse indicators or warning lights
- Rhythmic visual effects
- Testing channel response
Strobe frequency is based on system time, ensuring consistent timing across frames even with variable framerates.
Text
Purpose: Encode text strings as DMX channel dataGeneratorText.cs:86-126
text: String to encodechannelStart: First channel to write tounicode: Use UTF-16 (true) or UTF-8 (false)limitLength: Enforce maximum character countmaxCharacters: Maximum string length if limited
- Character Fallback: Automatically converts unsupported Unicode characters to ASCII equivalents
- Encoding Options: UTF-8 (compact) or UTF-16 (full Unicode support)
- Length Control: Optional truncation for fixed-size displays
- Display song titles on DMX LED displays
- Show artist names or venue info
- Encode subtitles or lyrics
- Transmit metadata through DMX
Remap
Purpose: Copy a range of channels to a different locationGeneratorRemap.cs:14-24
SourceChannelStart: First channel to copy fromSourceChannelLength: Number of channels to copyTargetChannel: Destination channel
- Mirror fixture control across universes
- Reuse existing DMX data in different locations
- Create backup/redundant control
- Route channels to different outputs
Remap performs a simple copy operation. If source and target ranges overlap, the behavior depends on generator order.
RemapOnDemand
Purpose: Remap channels with manual triggering Similar to Remap but includes UI controls to enable/disable the remapping dynamically without editing the configuration.Fade
Purpose: Create smooth transitions between channel values Fades channels from their current value to a target value over a specified duration, useful for smooth lighting state changes.Time
Purpose: Encode current time as DMX values Writes the current system time (hours, minutes, seconds, milliseconds) to channels, useful for time-synchronized shows or displays.DMXPacket
Purpose: Inject raw DMX packet data Allows manual specification of exact DMX values for each channel, useful for testing or creating static lighting states.SRT (SubRip Subtitles)
Purpose: Display subtitle text from .srt files Loads subtitle files and displays the appropriate text for the current time, automatically encoding it as DMX. Use Cases:- Synchronized lyrics display
- Timed text messages
- Event schedules
- Scripted announcements
LRC (Lyrics)
Purpose: Display synchronized lyrics from .lrc files Similar to SRT but uses the LRC format common in music players for karaoke-style lyrics.ASS (Advanced SubStation)
Purpose: Display advanced subtitles from .ass files Supports the ASS/SSA subtitle format with advanced styling (though styling is limited when converting to plain DMX text).TwitchChat
Purpose: Stream Twitch chat messages to DMX Connects to Twitch IRC and converts live chat messages into DMX text data, enabling real-time chat display on DMX LED signs. Use Cases:- Live stream chat displays
- Audience interaction
- Chat moderation displays
- Viewer engagement
OnTime
Purpose: Integration with OnTime event management Connects to the OnTime show control software to receive timecode, event names, and scheduling data for synchronized performances.MAVLinkDrone (Drone Network)
Purpose: Control drone light shows via MAVLink protocolMAVLink Protocol
Communicates with drones using MAVLink
Light Events
Sends color/brightness commands
Trajectories
Controls flight paths
Show Files
Loads choreographed shows
- Drone position layouts (grid, circular)
- Synchronized light color changes
- Pyrotechnic event triggering
- Show file management via FTP
- Outdoor drone light shows
- Synchronized aerial performances
- Large-scale event productions
- Fireworks coordination
The MAVLink generator is advanced and requires compatible drone hardware with MAVLink support. See the specialized documentation for setup details.
Generator Patterns
Reading Existing Data
Generators can read existing channel values:Array Safety
Always ensure capacity before writing:Multi-Channel Operations
Generators can operate on ranges efficiently:Creating Custom Generators
Creating a generator is straightforward:Generator UI Utilities
HNode provides helper methods inUtil class for creating UI:
Performance Considerations
Generators run every frame, so performance matters:- Minimize Allocations: Reuse objects, avoid creating new lists/arrays
- Cache Calculations: Store computed values in class fields
- Bounds Check Once: Use local variables to avoid repeated checks
- Profile: Use Unity Profiler to identify bottlenecks
Generator Combinations
Generators become powerful when combined: Example: Dynamic Text with Strobe Effect- Text Generator: Encodes “ALERT” to channels 0-4
- Strobe Generator: Flashes channels 0-4 at 2 Hz
- Remap Generator: Copies strobing text to channels 100-104
Generator order determines the final output. Experiment with different orderings to achieve desired effects.