Tutorial : Pixel Mapping
This chapter explain how to use Usine for pixel mapping ie. display videos on a led-pixel screen.
The procedure is based on the video-pixel-mapper module.
Usine uses ArtNet DMX protocol.
ArtNet Settings
Activate ArtNet in the setup.
Verify that your ArtNet device is connected and visible on the network.
Each universe is limited to 512 channels so you with RGB pixels you can only have 170 pixels per universe.
Note:
For example for a 100 x 100 RGB led matrix (10000 led RGB), you'll need 10000 div 170 + 1 = 59 universes. So be sure that your devices can handle 59 universes.
In this example, the YM-LM501 is connected at the address 192.168.1.90.
You can choose the right DMX frame rate for your project, not too slow, but not necessary very fast, depending on your devices.
Open the plot 1 panel.
On the settings of the plot 1 click on the ArtNet device into the list to set its address.
ArtNet is now ready to play.
Pixel Mapper Module
We'll use the video-pixel-mapper module that you can put in patch like:
pixel mapper in a patch
This module take a video flow as input and send automatically ArtNet information.
The video input should match the led-pixel-matrix size. If you have a 100 x 100 matrix, you need a 100 x 100 video as input. See video-geometric-resize to resize a video.
Double Click on the module to open the mapping window.
.
Then select all pixels you want to activate with [shift+mouse]. Use [right click] to unselect.
.
Enable the selected pixels by clicking on enable selected on the settings-panel.
.
Set DMX channels
Now we have to fill each pixel with the right DMX channel and universe.
- Choose the start universe
- Choose the start index
- Choose the pixel type
- Choose the fill direction
pixel type
Determines how each color value is converted to ArtNet DMX.
- RGB 3 bytes : each color is converted into 3 DMX values R,G,B. Only 170 pixels can be sent per universe.
- BRG 3 bytes : each color is converted into 3 DMX values B,R,G. Only 170 pixels can be sent per universe.
- RGB- 4 bytes : each color is converted into 4 DMX values R,G,B,0. Only 128 colors can be sent per universe.
- -RGB 4 bytes : each color is converted into 4 DMX values 0,R,G,B. Only 128 pixels can be sent per universe.
- -BRG 4 bytes : each color is converted into 4 DMX values 0,B,R,G. Only 128 pixels can be sent per universe.
- BRG- 4 bytes : each color is converted into 4 DMX values B,R,G,0. Only 128 colors can be sent per universe.
- RBG 3 bytes : each color is converted into 3 DMX values R,B,G. Only 170 pixels can be sent per universe.
- BGR 3 bytes : each color is converted into 3 DMX values B,G,R. Only 170 pixels can be sent per universe.
- GBR 3 bytes : each color is converted into 3 DMX values G,B,R. Only 170 pixels can be sent per universe.
- GRB 3 bytes : each color is converted into 3 DMX values G,R,B. Only 170 pixels can be sent per universe.
- RGBW 4 bytes : each color is converted into 4 DMX values R,G,B,W. Only 128 pixels can be sent per universe. Algorithm WhitePart.
- WRGB 4 bytes : each color is converted into 4 DMX values W,R,G,B. Only 128 pixels can be sent per universe. Algorithm WhitePart.
- --W 3 bytes : each color is converted into 4 DMX values, 0,0,W. Only 170 pixels can be sent per universe. Algorithm GrayScale.
- ---W 4 bytes : each color is converted into 4 DMX values, 0,0,0,W. Only 128 pixels can be sent per universe. Algorithm GrayScale.
- W--- 4 bytes : each color is converted into 4 DMX values, W,0,0,0 followed by 3 values filled with 0. Only 128 pixels can be sent per universe. Algorithm GrayScale.
- W 1 bytes : each color is converted into 1 DMX value W. Only 512 pixels can be sent per universe. Algorithm GrayScale.
- WWWW 4 bytes : each color is converted into 4 DMX values W,W,W,W. Only 128 pixels can be sent per universe. Algorithm GrayScale.
- WWW 3 bytes : each color is converted into 3 DMX values W,W,W. Only 170 pixels can be sent per universe. Algorithm GrayScale.
- WW 2 bytes : each color is converted into 2 DMX values W,W,0,0. Only 256 pixels can be sent per universe. Algorithm GrayScale.
- GRBW 4 bytes : each color is converted into 4 DMX values G,R,B,W. Only 128 pixels can be sent per universe. Algorithm WhitePart.
- WGRB 4 bytes : each color is converted into 4 DMX values W,G,R,B. Only 128 pixels can be sent per universe. Algorithm WhitePart.
- RGBWW 5 bytes : each color is converted into 5 DMX values R,G,B,W,W. Only 102 pixels can be sent per universe. Algorithm WhitePart.
- WWRGB 5 bytes : each color is converted into 5 DMX values W,W,R,G,B. Only 102 pixels can be sent per universe. Algorithm WhitePart.
- RGBW x2 8 bytes : each color is converted into 8 DMX values R,G,B,W,R,G,B,W. Only 64 pixels can be sent per universe. Algorithm WhitePart.
- RGBW x4 16 bytes : each color is converted into 16 DMX values R,G,B,W,R,G,B,W,R,G,B,W,R,G,B,W. Only 16 pixels can be sent per universe. Algorithm WhitePart.
- RGB- x4 16 bytes : each color is converted into 16 DMX values R,G,B,0,R,G,B,0,R,G,B,0,R,G,B,0. Only 16 pixels can be sent per universe.
- RGBW MaxLuminance x4 16 bytes : each color is converted into 16 DMX values R,G,B,W,R,G,B,W,R,G,B,W,R,G,B,W. Only 16 pixels can be sent per universe. Algorithm MaxLuminance.
- RGBW MaxLuminance 4 bytes : each color is converted into 4 DMX values R,G,B,W. Only 128 pixels can be sent per universe. Algorithm MaxLuminance.
- WRGB MaxLuminance 4 bytes : each color is converted into 4 DMX values W,R,G,B. Only 128 pixels can be sent per universe. Algorithm MaxLuminance.
- algorithm GrayScale: the W channel is calculated with W = (R x 0.3 + G x 0.59 + B x 0.11).
- algorithm WhitePart: the W channel is calculated with W = min ( R , G , B ). G' = G-W, R' = R-W, B' = B-W.
- algorithm MaxLuminance: the W channel is calculated with W = min ( R , G , B ). G' = G, R' = R, B' = B.
If start universe is 1 and start index is 12, the fill process will start from universe 1 and channel start index x number of channels per pixel with number of channels per pixel = 3 for RGB, =4 for ARGB, etc.
The Fill direction determines how pixels channels are filled.
Finally, click on fill DMX channels button to fill.
Each universe appears with a distinct color.
Create a special layout
This section is optional, and only if you have a non rectangular screen.
You can import images to create special layouts with non rectangular led-matrix, for example
Click on image name and select the image to import.
Image should be in black&white, white pixels will enabled, and black disabled.
imported image
DMX channels filled
video displayed
See also
Usine Tutorial