Driving RGBW (with Cold or Warm White) or RGBAmber LEDs with an RGB input - RGB to RGBW/RGBA ?
  • mad-matt
    garageCube team
    Posts: 539
    Joined: Mon Sep 09, 2013 5:50 pm

    Driving RGBW (with Cold or Warm White) or RGBAmber LEDs with an RGB input - RGB to RGBW/RGBA ?

    by mad-matt » Mon Jan 08, 2018 4:24 pm

    Hi everyone,

    I had the same request multiple times on the support so I wanted to share my answer. The problem is how would we control a RGBW or RGBAmber led strip, since in our video world we're working with RGB. If MadMapper plays a movie, it gets RGB values, when using a syphon input or materials (GLSL shaders) we get RGB values. How then would we control a RGBW led strip ? MadMapper offers multiple solutions to this problem.

    By default MadMapper support RGBW pixels. This thread is for people who want to have a custom control on what values MadMapper sends to the 4 pixel channels (or for RGBAmber). It is for advanced users that already have experience with LED control.

    If using the RGBW pixel type of MadMapper, we'll send on the 4 channels: channel 0=red component value, channel 1=green component value, channel 2=blue component value, channel 3=min(red,green,blue)

    To have control what's sent on each channels, read this:

    The most flexible solution is to control RGB with a video stream and W with another one (not using GLSL expressions). You can map the media on two fixtures, patched on the same DMX address (ie ArtNet universe 0 channel 1) with different fixture definitions: one fixture definition will control the RGB, the other will control the warm white channel.
    For doing that, you create two fixture definitions of the same size, ie 171x1 pixels for a 171x1 RGBW strip. The first fixture definition will have pixel type of 4 channels - R, G, B, unused - and the other pixel type of 4 channels - unused, unused, unused, L (a fixture won't erase the value stored in the channel for "unused" channels), so each fixture patched on the same start address will feed part of the channels (RGB & W).
    Then you can use two different movies, one for RGB, the other for W (you can then use color filters in Final Cut, Premiere or other app and do two exports).

    That's an option if your setup is just to playback a movie. If you setup is more interactive or using a live video input from Syphon for instance, you might use GLSL expressions. In this case you would do something with 4 expressions. If you compute Warm White value with W = min(red*F1,min(green*F2,blue*F3)). You have to find the correct F1,F2,F3 - each between 0.0 and 1.0 - depending on white pixel color temperature. For cold white: 0.299, 0.587, 0.114. For warm white... googling fastly I found http://www.tannerhelland.com/4435/conve ... ithm-code/)
    Then the 4 expressions would be
    channel 1: R - min(R*F1,min(G*F2,B*F3))/F1
    channel 2: G - min(R*F1,min(G*F2,B*F3))/F2
    channel 3: B - min(R*F1,min(G*F2,B*F3))/F3
    channel 4: min(R*F1,min(G*F2,B*F3))

    Any comments or suggestions welcome !
    Matthieu - MM team
  • kozman007
    junior Member
    Posts: 2
    Joined: Thu Nov 09, 2017 3:01 am

    Re: Driving RGBW (with Cold or Warm White) LEDs with an RGB input - RGB to RGBW ?

    by kozman007 » Wed Jan 10, 2018 10:41 pm

    I read all this and I am a beginner. This RGBW thread mentioned when you want to play a movie. However my purposes are for programming RGBW programmable LED strips. Did you mean playing a movie on a LED strip curtain? I'm I have 34 metres of strips (2040 pixels) and have a structure setup. Does MadMapper support RGBW in this matter? Sorry if this is a rather elementary question but this is a new program for me. I appreciate the response.
  • mad-matt
    garageCube team
    Posts: 539
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Driving RGBW (with Cold or Warm White) LEDs with an RGB input - RGB to RGBW ?

    by mad-matt » Tue Jan 16, 2018 12:05 pm

    MadMapper has native handling of RGBW. But some people want to handle the W another way, especially when the white pixel is warm white. Don't take care about that at the moment. If you want more precise control over what's sent to the RGBW channels then read this post back when you already have your setup working
  • roverone
    junior Member
    Posts: 2
    Joined: Mon Jul 30, 2018 9:09 pm

    Re: Driving RGBW (with Cold or Warm White) or RGBAmber LEDs with an RGB input - RGB to RGBW/RGBA ?

    by roverone » Thu Aug 02, 2018 5:21 am

    I'm sorry to revive and old thread like this, but I was one of the users who was interested in this solution. I have finally received my test batch of RGBWW LED strips to work with. In this case the warm white is around 3k.

    To restate the original situation, images and video are encoded in RGB and so the decision must be made to either ignore the white LED, and just drive the strip with only RGB or to figure out how to "extract" the white out of what the RGB is trying to show and take advantage of the presence of the white LED. As a simple example, if the RGB that is trying to be shown just happens to make the same white as the white LED, the white LED could be illuminated, and the RGB LEDs could be dark. It is possible that the actual spectral curve of the white LED might make a more pleasing fuller-spectrum white.

    In my case, they are warm white LEDs. With some testing I quickly learned that the brightness of white that the white LED could make is quite a bit more than the white that could be made from just the RGB LEDs. That means the coefficients would not necessarily all be between 0.0 and 1.0

    A preliminary estimate was that an RGB of 255, 154, 30 was about the same as the warm white being driven at 70 (these all out of 255). Much more tilted to red than I would have expected.

    That made a formula that looked like this (I changed the division into a reciprocal multiplications)

    channel 1: R - min(R*0.274509804,min(G*0.454545455,B*2.333333333))*3.642857143
    channel 2: G - min(R*0.274509804,min(G*0.454545455,B*2.333333333))*2.2
    channel 3: B - min(R*0.274509804,min(G*0.454545455,B*2.333333333))*0.428571429
    channel 4: min(R*0.274509804,min(G*0.454545455,B*2.333333333))

    That is just a preliminary test, although it seems to work OK.

    I'm going to start another thread in a few days to deal with understanding all of the places that the input to output level transfer function (simple example; gamma curve) comes into play. Understanding this affects everything: The LED pixel chips themselves are converting a command to be at a particular brightness into a fast on-off pattern in the some proportions to give the appearance of a brightness. The MadMapper software converts the video to DMX through some transformation (and presumably the Response control affects this) and then the video and images themselves are encoded with an intended response.

    Like I said, all of this will be in a different thread, but I bring it up just to point out that the simple linear math for extracting white might not be doing what is expected on values that represent non-linear brightnesses. And then add to that the quantization to 8 bits, and there is a lot to be worked through.

Who is online

Users browsing this forum: No registered users and 0 guests