(Resolved) Hue shift by attribute

I have a bunch of packed objects that I wish to (in the shader) vary the hue of per (packed) point. What’s the suggested workflow?

The way I’d approach it in Mantra (very crudely) is
- make random ‘shift’ attr with shift value -1 to 1.
- take Cd (or color map) input in shader, RGBtoHSV, then add the ‘shift’ value, convert back to RGB and plug into the shader.

To do the same in VRay I’m struggling because I can’t seem to find a way to do something as simple as splitting a vector into 3 floats a-la
https://www.sidefx.com/docs/houdini/…ectofloat.html

Open to other ways of doing this, just wanted to know if there’s an equivalent to vector to float, AS WELL as the suggested method for hue shifting.

Cheers
Ben

Hello @bender83 , you could use V-Ray Color Correct (Maya) to do Hue shift from attribute /example uploaded/.
To extract an element from color you could use V-Ray Color Channel - here you can choose R,G or B , or V-Ray Color Operations with Output Mode “Result A” and use corresponding outputs of the VOP.
hueShift.zip (37.1 KB)

Hi @bender83 ,

Just want to add, that you can also use the sampler node to get a random value for each of your packed primitives, this way you don’t even need to write any extra attributes into into you geometry.

Sampler node > random by polyShell > remap values to Hue shift wanted > hsl_hue_offset

Best,
David.

Ey David that’s nice, saves from writing the connectivity attribute. Cheers

Hey, yes but it also depends how the mesh is packed.
The connectivity still can be better when you need more separation in the mesh. They both have its uses :slight_smile:

Best,
David.

Nice David. Thank you!! Also “setRange” is nice. I did oversee this little one :slight_smile: and the fit node is one of my favourite ones in H.