3

I need to access a color´s HSV values separately in geometry nodes, I´m using Blender 3.2.1 and there only seems to be a separate RGB node and no separate HSV.

Is there any way to convert RGB values to HSV?
Or am i missing something here?

HTMLwyn
  • 35
  • 5
  • I don't know what you mean by saying "as of Blender v3.2.1", there was no Separate HSV in Blender 3.1.2 or 3.0.0 either in Geometry Nodes, I just checked that. It's always been in the Shader Editor only (and it still is in 3.2.1). – Gordon Brinkmann Jul 10 '22 at 16:01
  • @GordonBrinkmann my bad, non-native speaker here. I just wanted to state the version I´m using as I hoped there might be an experimental branch with the HSV node – HTMLwyn Jul 10 '22 at 17:32
  • 1
    https://blender.stackexchange.com/questions/212430/how-to-convert-hsv-to-rgb-using-shader-nodes has some info on recreating Blender's separate HSV for shader nodes using only math and mix, which should work for GN as well. There are plenty of separate HSV algorithms available, but they don't all give identical output. Easiest, if it's possible, would be to simply make an HSV version of any textures, using compositing or by making a render with a plane + modified material.... – Nathan Jul 10 '22 at 17:38

1 Answers1

5

Using the same math as Blender's source code, it's possible to make these node groups:

RGB to HSV:

enter image description here

HSV to RGB:

enter image description here

The nodes and the node groups outputs the same color:

enter image description here

enter image description here

Hulifier
  • 6,048
  • 1
  • 8
  • 24