RGB to Hue in material
How could I convert a RGB input to a Hue value inside the material editor?
I found this formula but I have no clue how and if it is even possible in the material editor of UE4: http://stackoverflow.com/questions/23090019/fastest-formula-to-get-hue-from-rgb The required max and min are especially hard to wrap my head around.
It would be great if a full conversion from RGB to HSB would work but Hue alone would be already great.
asked Apr 08 '15 at 02:49 PM in Using UE4
Probably not what you're looking for but I had a similar question a moment ago and this process might help with what you are trying to achieve.
The formula doesn't seem possible in the material editor - the max/min stuff is easy (there's a function for that in the editor) but the issue arises from the logical statements allowed in the material editor (the if statement specifically). You could build it with the logic in the editor but you'd end up with dozens of statements and the way it's set up gives me the distinct impresion it's meant to be compiled to a graphics processor so you would be killing performance doing HSL calculations per-pixel.
answered Apr 08 '15 at 06:16 PM
For others looking for a solution aswell I ended up having to dothe same thing and here is the network:
answered Aug 09 '16 at 02:21 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here