Announcement

Collapse
No announcement yet.

(Resolved) Random Colors on packed instances

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

  • (Resolved) Random Colors on packed instances

    Hi all,

    I have a 10 mil poly object packed and instanced via a copy to points sop 100000 copies. It is essentially made of 3 groups, which need 10 color variants on each so around 1000 color permutations etc.
    Obviously I need to use packed objects, but nothing seems to recognise my groups.

    ​​​​​​Is it possible to do it via attributes and in the shader?
    Last edited by Gosho.Genchev; 20-11-2020, 07:34 AM.

  • #2
    Yes, I have done in the shader with an integer attrib, so each grp will get let's say an attribute SWT in this case `i@swt = 1;` group1 `i@swt = 2;` group2 and so on, obviously if you make the name of the groups in a smart way you can run a for each and add the i@swt attrib in a wrangle.

    Then in the shading part, you get a userInteger and add the swt attrib and connect a multiid node, then you can plug in each material and the attrb will know where to put the right material.

    Attached Files

    Comment


    • #3
      Hey hsz that is very useful.
      My mind was in such a muddle after trying lots of project specific requirements and digging myself a bit of a hole.

      I ended up simplifying and doing this...
      Attached Files

      Comment


      • #4
        Hi Jim Meston , did you try TexPatternID texture in combination with TexMulti or MtlMulti
        Georgy Chakarov | QA
        www.chaosgroup.com
        georgy.chakarov@chaosgroup.com

        Comment


        • #5
          Will do. What I have currently is useful as the client will say less blue ones etc so I can just remap the ratios.

          Comment


          • #6
            Hi Jim Meston I have been trying to get this to work as you have it. Any tips on getting the geo to render correctly in Vray ??

            Comment


            • #7
              Originally posted by mike_jag View Post
              Hi Jim Meston I have been trying to get this to work as you have it. Any tips on getting the geo to render correctly in Vray ??
              What is your issue exactly?
              Can you take a screen shot of your network and say what you are expecting to happen?

              Comment


              • #8
                Here you go, it's pretty straightforward.

                Click image for larger version

Name:	houdini_0BgzTnItqG.png
Views:	191
Size:	345.6 KB
ID:	1193445
                Attached Files

                Comment


                • #9
                  Thanks guys, Yes totally agree its pretty straight forward.
                  By me using a copy to points vrs copy. Its still not working as expected. I have the prim data coming out but Vray for some reason either doesn't see it or just not using it.

                  Comment


                  • #10
                    mike_jag, well, could you attach your scene file?
                    V-Ray For Houdini | V-Ray Hydra Delegate | VRayScene
                    andrei.izrantcev@chaos.com
                    Support Request

                    Comment


                    • #11
                      Originally posted by mike_jag View Post
                      Thanks guys, Yes totally agree its pretty straight forward.
                      By me using a copy to points vrs copy. Its still not working as expected. I have the prim data coming out but Vray for some reason either doesn't see it or just not using it.
                      Here are some examples both with "copy and transform" and "copy to points".
                      It is likely that if you are assigning a prim attributes to points before the "copy to points" won't pass that prim attrib through.
                      Better to use point attribs before a copy to points as in my example attached.
                      Attached Files
                      Last edited by Jim Meston; 19-10-2023, 08:28 AM.

                      Comment


                      • #12
                        Thanks a bunch for the example files guys. Totally figured out my mistake. I didn't add the info to the input max within the TexRemap node.
                        Also sry I wasn't able to add a file normally I have one ready when first posting.

                        Comment

                        Working...
                        X