Jump to content

material by element, but with instances


Tim Nelson
 Share

Recommended Posts

I want to do something like the material by element modifier, but without attaching all of my instances into a single editable polygon. Is there a way to do that? Basically I want 4 or 5 different intensities of diffuse map to be applied to a bunch of instanced objects.

 

I guess I could do a random select script, and manually assign them to different materials. But I don't think that would give me as good of results since I'm trying to do 4 or 5 types.

Link to comment
Share on other sites

select all of the objects you want to randomly assign materials to and use this script:

 

"for obj in selection do obj.material = meditMaterials[random 1 5]"

 

where the #'s 1 and 5 are the numbers of the slots in your material editor that contain the materials you want to use(they're numbered L to R on each row and top to bottom). So if you had the 5 materials you wanted to assign and they are in in slots 2-6 you'd change that to say [random 2 6] or whatever.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...