Varying Material parameter per instance

   3754   2   0
User Avatar
Member
949 posts
Joined: 4月 2008
Offline
Is it possible to vary a material attribute per instance?

I am using point instance, I've created a grid to generate some points and the same points have random attribute values that vary from 0 to 1, my instance objects are boxes with a constant shader, I want each box material color get the values from those points.

How can I do that?
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
53 posts
Joined: 8月 2009
Offline
A material will use any attributes that you attach to your objects that match the name and type of its own parameters. Most of the gallery materials have the option to use ‘Point Colors’ this expects to find a three valued float attribute Cd on your geometry. You can set this up using a Point SOP. Several ways to do but easiest is set the color on the points then make sure the objects you instance using the copy SOP (I guess you are using a copy SOP) inherit the Cd attribute.
Peter Quint
User Avatar
Member
949 posts
Joined: 4月 2008
Offline
Thanks for the tip, it was really helpful.

Now I could finally see how to use your tip, to override point instances properties or materials all attributes to be overridden must to be on the object level to work.

Thanks again.
https://vimeo.com/user2163076 [vimeo.com]
  • Quick Links