Hello , i have asset which has a Mtlx Shader that takes 2 attributes(Mtlx Geometry Property Value) from the points - color and switch, and with these attributes I want to randomly change the color of each instance. When i am using it directly in point instancer everything works fine. But in this case I want to arrange objects via "Layout LOP"(method Point Instancer), so i have to add these attributes to already existing "point instacer" primitive type. I tried "Modify Points Instances LOP" but it seems it doesn't work.
Workaround I found is to grab the points straight from the "Layout LOP" to another "Points Instancer LOP" and add those attributes there but it's not the most elegant solution.
If you have a better solution to this problem I would be grateful ^^
In the Modify Point Instancers LOP, if you want to add/modify a primvar, you need to specify it with the name, so "primvars:color" should work. Otherwise "color" is created as a property.
You can just as easily use a wrangle however which would be faster since it won't have the overhead of the Modify Point Instancer's which needs to cater to selection subsets, multiple instancers, etc etc...
Thank you a lot! I thought that was the problem but I couldn't import the attribute from Internal SOP as primvar. Out of curiosity if I would like more control, do you know how to import primvar using Interal SOP? Houdini automatically imports attributes from Internal SOP in "Modify Point Instances LOP" as property. Adding "primvars:"attribute name from SOP" in this field does not work.
It should still work by specifying "primvars:color" - keep in mind that the attrib name in SOPs will be encoded (":" in attrib names are illegal) and the SOP wrangles don't handle namespaced attribs like the LOP wrangle does, so there's a little more jumping through hoops you need to do.
Here's an update to the example file that deals with the primvars:color attrib using the internal SOP method with the Modify Point Instances LOP.