Overview
The Furality Somna serializer is a specialized implementation designed for Furality event fixtures. It supports RGB channel merging, allowing multiple DMX channels to be combined into a single block’s color channels for compact representation of RGB fixtures.Class: FuralitySomna
Namespace: GlobalImplements:
IDMXSerializer
Configuration Constants
Size in pixels of each channel block (16×16 pixels), matching VRSL standard
Number of channel blocks per column
Properties
Maps DMX channel numbers to their assigned color channel (Red, Green, or Blue).Usage:
- Red channel: First channel of RGB triplet
- Green channel: Second channel of RGB triplet
- Blue channel: Third channel of RGB triplet (does not increment position)
Internal offset tracking how many merged channels have been processed. Reset each frame.
How It Works
Standard vs Merged Channels
Standard Channel (no merge):Position Calculation
The cumulative offset adjusts block positions to account for merged channels:- Channel 0 (Red): offset = 0, position = 0
- Channel 1 (Green): offset = 1, position = 0 (same as channel 0)
- Channel 2 (Blue): offset = 1, position = 0 (same, offset doesn’t increment)
- Channel 3 (standard): offset = 1, position = 1
Methods
InitFrame
Resets the cumulative offset counter at the start of each frame.The list of all channel values (not used by this method)
cumulativeOffset to 0
SerializeChannel
Encodes a DMX channel as either a grayscale block or a color channel contribution.The pixel array to write to
The DMX channel value (0-255)
The DMX channel number
Width of the output texture
Height of the output texture
- Calculates block position using
(channel - cumulativeOffset) - Checks if channel is in
mergedChannelsdictionary:- If merged: Mixes the value into the appropriate color channel (R, G, or B)
- If not merged: Creates a standard grayscale block
- Updates cumulative offset:
- Increments for Red and Green merged channels
- Does NOT increment for Blue merged channels
- Does NOT increment for standard channels
DeserializeChannel
Decoding is not implemented.Usage Example
Basic Setup
Multiple RGB Fixtures
Channel Layout Example
Configuration:Color Channel Constants
FromTextureWriter.ColorChannel enum:
Advantages
RGB Fixture Support
Native support for RGB color mixing fixtures
Space Efficient
3 channels (RGB) occupy 1 block instead of 3
VRSL Compatible
Uses same 16×16 block size as VRSL
Flexible
Mix merged RGB and standard channels freely
Limitations
- Manual Configuration: Must manually specify which channels are merged
- RGB Triplets Only: Designed for 3-channel RGB fixtures, not RGBW or other formats
- Order Dependent: Channels must be serialized in order (R, then G, then B)
- No Validation: Does not verify RGB channels are consecutive or properly configured
Channel Capacity
Capacity depends on how many RGB fixtures are used:Capacity Comparison
| Mode | Blocks Used | Channels Encoded | Efficiency |
|---|---|---|---|
| All Standard | 169 | 169 | 1.0× |
| All RGB Merged | 169 | 507 (169 fixtures) | 3.0× |
| Mixed (50/50) | 169 | ~338 | 2.0× |
RGB merging effectively triples channel capacity for RGB fixtures compared to standard grayscale encoding.
Best Practices
1. Group RGB Fixtures
Organize DMX channels with RGB fixtures grouped together:2. Initialize Before Each Frame
3. Validate Configuration
Verify RGB channels are properly configured:Advanced Usage
Dynamic RGB Configuration
Configure fixtures at runtime based on fixture definitions:Comparison with Other Serializers
| Feature | Furality Somna | VRSL | Binary |
|---|---|---|---|
| Block Size | 16×16 | 16×16 | 4×4 |
| RGB Merging | Yes | Yes (RGB Grid) | No |
| Channels (256×256) | 169-507 | 169-507 | 416 |
| Decoding | No | Yes | Yes |
| Use Case | Furality events | VRChat VRSL | General |
Performance
- Encoding (standard channel): ~0.015ms
- Encoding (merged channel): ~0.018ms (color mixing overhead)
- InitFrame: ~0.001ms
- Memory: Minimal (Dictionary overhead)
Troubleshooting
Colors appear in wrong positions
Colors appear in wrong positions
This occurs when
InitFrame is not called before encoding.Solution: Always call InitFrame at the start of each frame to reset the cumulative offset.RGB colors are incorrect
RGB colors are incorrect
Check that channels are serialized in R→G→B order.Solution: Ensure Red channel is serialized first, followed by Green, then Blue.
Some fixtures are grayscale instead of RGB
Some fixtures are grayscale instead of RGB
The channels may not be configured in
mergedChannels.Solution: Verify all RGB channels are added to the dictionary with correct ColorChannel values.Blocks overlap or appear at wrong positions
Blocks overlap or appear at wrong positions
The cumulative offset may be incorrect due to wrong channel order.Solution: Serialize channels in sequential order (0, 1, 2, 3…) and ensure Blue channels don’t increment offset.
Future Enhancements
This serializer is functional but could be extended with additional features.
- Implement
DeserializeChannelfor bidirectional communication - Support RGBW (4-channel) fixtures
- Auto-detect RGB triplets from channel definitions
- Add validation to ensure proper RGB channel ordering
- Support non-consecutive RGB channels
When to Use
✅ Good for:- Furality events and compatible fixtures
- RGB LED fixtures and color-mixing lights
- Maximizing channel density for color fixtures
- VRSL-compatible environments requiring RGB support
- Bidirectional communication (no decoder)
- Non-RGB fixtures (use VRSL or Binary instead)
- Fixtures with non-standard channel layouts
- Applications requiring generic serialization