Assigning Random Materials To Named Primitives

   768   1   0
User Avatar
Member
128 posts
Joined: 9月 2018
Offline
I have a City and each building has it's own name attribute. For each named primitive I want to assign a different material, so all the buildings have variation between them. Does anyone have any ideas?

Vincent Griffith
User Avatar
Member
8591 posts
Joined: 7月 2007
Online
Easiest is to use Enumerate SOP to get integer value per name and use that to construct your material name

Or you can also use random_shash() vex function to generate random number per name, modulo it by number of materials and generate name that way
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links