Announcement

Collapse
No announcement yet.

Some Houdini Alembic color related questions

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

  • Some Houdini Alembic color related questions

    Hi all,

    I have done some searching on the forum regarding Houdini Alembic files and Cd and/or MatID properties for shading, but haven't found an answer yet.
    I also read the tutorial on Houdini2Maya on the docs page, but still not sure..

    Also, I'm a returning VRay user after quite a long hiatus, so please bear with me.....

    I have a Houdini meshed particle sim with several colors swirling, as a Alembic file. All colors are set as Cd and have a material ID (set as 0,1,2,3, etc.) in the Houdini sim.
    This all comes over into Maya and the V-Ray proxy setup just fine according to the Mesh info: " Color sets: 4 ('Cd', 'my_MatID', 'velocity', 'r_MatID; ')"
    .
    With the Cd property I can quickly can set up a shader to get these colors to render accordingly, as explained in the doc tutorial.
    But what I would like is to separate the colors in the sim into their separate shaders in my render. So I can mix different shaders and looks.

    My question now is: Is there a way to use the Cd or MatID as a mask, so I can use the BlendMat to set up multiple shaders and mix them this way?
    I'm not entirely sure how to use the User Color/Integer or Scalar in this case to extract the various ID numbers.

    Or is there another way of doing this? I'm not entirely sure if 'shader sets' would be a solution for this.

    cheers for any answers, as I'm kinda stuck atm.

    rob

  • #2
    So off the top of my head, the only way I can think of achieving what you want is:

    Depending on how many shaders you want, create a vector attribute in Houdini that sets each shader as a r,g,b component. Eg Shader1/Colour1 would have my_attrib{1,0,0}, Shader2/Colour2 would have my_attrib{0,1,0}, Shader3/Colour3 would have my_attrib{0,0,1}.

    Then in Maya, access that attribute using a VrayUserColor. Then just simply drag the rgb components into the blend amounts. The blend amounts are vectors so you'll either need to convert the float into a vector or just drag it into the components manually.

    Comment


    • #3
      I see....

      Will have to get back to the Houdini artist to see if this works.

      thanks for the quick reply!

      Comment


      • #4
        It would be cool if there was a way to create a mask by value, Ie you could have a range of integers and it would create a mask from that. The only issue in certain cases is that integer values wouldn't allow you to softly blend the masking. There is also another way you can do my example but with using remaps, the problem I have with that method though is it's very hard for people who don't know the file to understand quickly what's going on.

        Comment


        • #5
          Hi,

          We did some testing on the Houdini side of things, and we decide to do a attribute per shader. It will make more sense for the artist who is going to continue with this after setup.
          So one shader and the accompanying attribute. It makes a bit more nodes on the BlendMat side of things, but it's easily understandable.

          And yes, masking by value, or remapping is something that might work, but with many people handling scenes, I always like to keep things KISS.

          Thanks again, this makes my weekend a bit more relaxed!

          rob
          Last edited by Rork; 14-02-2020, 07:24 AM.

          Comment


          • #6
            Noice, yeah I completely agree with you. If it was just you working in the houdini and maya file then yeah you could do the latter method but like you say, as soon as you get more people involved it'll just be a nightmare.

            Comment

            Working...
            X