(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?

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.

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…

Hi @Jim_Meston , did you try TexPatternID texture in combination with TexMulti or MtlMulti

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

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?

Here you go, it’s pretty straightforward.

​
randcolors.zip (44.6 KB)

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.

@mike_jag , well, could you attach your scene file?

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.
color_from_attrib_examples.zip (44.5 KB)

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.