Announcement

Collapse
No announcement yet.

(Resolved) Hue shift by attribute

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • (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
    Last edited by bender83; 26-10-2020, 02:06 PM.

  • #2
    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.
    Attached Files
    Last edited by chakarov; 26-10-2020, 02:56 PM.
    Georgy Chakarov | QA
    www.chaosgroup.com
    georgy.chakarov@chaosgroup.com

    Comment


    • #3
      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

      Click image for larger version

Name:	Screenshot 2020-10-26 at 23.12.38.png
Views:	815
Size:	723.2 KB
ID:	1089554

      Best,
      David.

      David Anastácio // Accenture Song - VFX
      https://www.accenture.com/us-en/serv...visual-effects

      Comment


      • #4
        Ey David that's nice, saves from writing the connectivity attribute. Cheers
        Hristo Velev
        MD/FX Lead, Bottleship VFX
        Sofia, Bulgaria

        Comment


        • #5
          Originally posted by glacierise View Post
          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

          Best,
          David.
          David Anastácio // Accenture Song - VFX
          https://www.accenture.com/us-en/serv...visual-effects

          Comment


          • #6
            Nice David. Thank you!! Also "setRange" is nice. I did oversee this little one and the fit node is one of my favourite ones in H.

            Comment

            Working...
            X