Sean Meighan

Software => Enhancement Requests => Topic started by: bwinter on February 03, 2022, 08:59:51 PM

Title: RGBA
Post by: bwinter on February 03, 2022, 08:59:51 PM
I see that nodes can be set up as RGBW.  From what I've read here, it appears that the W channel is only ON when R=G=B.  Does this work across all the levels?  Does the W channel come ON in addition to the RGB channels?  Or does the W channel turn ON and the RGB channels turn OFF?  Just trying to envision exactly how the W channel is managed.

For example, if R and B are set to 50%, and G slowly ramps from 100% down to 0%.  What exactly happens when G hits 50%?  Does W turn ON and RGB turn OFF at that precise moment?

Granted, I have little/no particular use for W (white).  My question is really in context of the 4th channel and how it operates:  is there any way (or any plans) to support RGBA (amber)?  I can easily create floods that could use this Amber channel (and thus theoretically allow a broader color palette).  But I'm just not sure how that would exactly work in xLights.
Title: Re: RGBA
Post by: Gilrock on February 07, 2022, 06:02:20 AM
Unless something has changed I'm pretty sure its coded so that when R=G=B only the W channel is active.  To get around that you would need to drop effects on the actual channels.  I think the difficulty with supporting any of the pixels that have more than 3 channels is having a color mapping that everyone would agree with.  I personally have no idea when it would be suitable to light the amber channel.
Title: Re: RGBA
Post by: dkulp on February 07, 2022, 06:07:44 AM
The other "normal" way to do this (rather than at the node level) is to create two models using the same channel range.   One is set as RGBA, but with the color handling set to RGB Only.   The other is set to White only.   Thus, when you are using the RGB channels, you drop the effects on the model set for RGB.   When you want the White/Amber channel, you drop effects on the other model.   You would need blending between models turned on for this to work.
Title: Re: RGBA
Post by: bwinter on February 08, 2022, 08:09:47 PM
Granted, I have little/no particular use for W (white).

I'm actually going to re-tract that statement.  It appears that DJ/lighting systems do utilize the W (white) channel, in addition to the RGB:  using the W channel layered with an RGB color can create somewhat "pastel" colors (that can't necessarily be created with RGB alone).  Examples I found were adding R to the W can create various shades of pink.  So there might be some use for a discrete W (4th) channel after all, instead of a mere replacement for R=G=B.

As far as using the RGBA(amber) in place of RGB--there doesn't appear to be any simply conversion.  Closest I could find is this (including here for future reference):
https://www.nlfxpro.com/ben-stowes-rgbaw-color-mixing-chart/ (https://www.nlfxpro.com/ben-stowes-rgbaw-color-mixing-chart/)

Would it be possible to "simply" have a 4th channel slider in the color window in xlights?  RGB would behave as regular, but the slider could simply be the 4th channel intensity (on top of the RGB).  This slider would allow the user to add W on top of whatever RGB output is selected.  Or if that 4th channel were A (amber), this would give the user the flexibility of adding Amber at whatever level they choose (again, on top of the RGB selection).

dkulp's proposal does also seem like a reasonable method to achieve this.  However, the current design of the RGBW nodes in xlights (where W is only active when R=G=B) doesn't seem to capture the full potential of these 4-channel elements.






Title: Re: RGBA
Post by: keithsw1111 on February 13, 2022, 08:58:35 PM
There are multiple colour modes for rgbw. Not just r=g=b->w. There is also one when the common part of r g and b becomes a white leaving the colour as the non common component. This does pastels.


Sent from my iPhone using Tapatalk
Title: Re: RGBA
Post by: bwinter on March 07, 2022, 09:53:11 PM
I've had some time to explore this more, and have created a 4-channel RGBW Cree LED on a WS2814 (4-channel) LED driver (pict below).  I then modeled this as a single RGBW node in xlights.

Below is a short video of 100% R->G->B->W, followed-by a cycling color-wash of White and Blue.  As you can see, the WHITE die "blips" on at the 100% white portion of the cycle (instead of merely using the RGB die).

How exactly would I go about directly controlling the WHITE (die) discretely?  There are times when I would like to have white generated by RGB, and other times by the WHITE die.  There are other times when I would like to mix one of the primary colors with the WHITE die.  I'm not seeing any method in the COLOR panel that would grant this type of control.  Thoughts?

https://youtu.be/aUsfdTfGahc (https://youtu.be/aUsfdTfGahc)



Title: Re: RGBA
Post by: Gilrock on March 09, 2022, 06:13:38 AM
Exactly the problem.  The software can't read your mind to know what you want when.  You need to read what Dan said.  It takes 2 models and you tell it exactly what to do when.
Title: RGBA
Post by: bwinter on March 09, 2022, 07:48:47 AM
Exactly the problem.  The software can't read your mind to know what you want when.  You need to read what Dan said.  It takes 2 models and you tell it exactly what to do when.
Yeah, I understand what Dan said.  However. Keith seemed to indicate that what I?m asking about IS possible, so I?m looking for a bit more clarification on what I?m missing.

And also asking if it?s possible, as an enhancement request, to have the 4th channel controlled independently, and not merely activated whenever R=B=G.
Title: Re: RGBA
Post by: Gilrock on March 09, 2022, 09:59:47 AM
Well if there are other color modes then you should be able to select them under string type. I don't think there will be any enhancements since you can already create a model to control the W channel if that's what you want but I'll let the other guys reply on that.
Title: Re: RGBA
Post by: bwinter on March 09, 2022, 12:15:07 PM
In the Layout_String Properties, there is a dropdown for 'RGBW Color Handling' (which I just noticed, and is probably what Keith was alluding to).

The default is R=G=B->W, which describes the behavior I'm currently seeing.  I'm presuming that RGB Only ignores the W channel, and White Only ignores the RGB channels.

Is there any information/documentation on what Advanced option refers to, and how that can be used?  I'm guessing that's probably what I'm looking for...but it's not apparent how it's used.
Title: Re: RGBA
Post by: Gilrock on March 10, 2022, 01:18:16 PM
Looking at the code it appears that Advanced mode calculates a "whiteness" value from the RGB and sets the W channel based on that and subtracts a certain amount from each color channel to counter that.
Title: Re: RGBA
Post by: Gilrock on March 10, 2022, 01:19:18 PM
If you search on "RGB_HANDLING_ADVANCED" in the xLights code repo you'll find the algorithm its doing in the Node.cpp file.