Per primitive material?

Hi,

It doesn’t look possible to have per primitive material at the moment, even with the material sop, does it? I don’t see any "material"primitive attribute.

Yes, still rambling on things I’m used to in Houdini :wink:

Best
Vincent

Correct, materials are per SOP or per COMP. Not per primitive.

If it’s just a separate texture map you want per-primitive, you can make a 3D texture and use a different W value for UVW per-primitive.

Thanks for the tip but I was thinking different materials, like bump reflective, simple diffuse…

You’ll want to use a Delete SOP to pull out the primitives into separate SOPs then apply the materials to those. That allows the primitives to be grouped per-material for the render which is a large speed improvement.

this is exactly what i’m trying to do, please can you point me out how to do it?

You can do it by using a texture 3D that you fill with the number of textures you want. You can acces them with a w value in the instancing page of your geo. You have to use your tex3d as your base color for your phong or pbr.

Your w value can be a simple pattern samples with the numbers of samples equal your numbers of primitives.

There is an example where I stared from a particles system that I did.

exemple_tex3d.toe (6.71 KB)

Hope it helps you.