Jump to content

Material ID Script?


Recommended Posts

Maybe this should be in the Max section, rather than the script section..

 

But does anyone know a way to automatically create a material ID pass without manually setting the MatID for each material? ...or maybe a similar type of pass that would allow me to isolate material selection in post.

 

My scene has a lot of materials, and a lot of multi-mats. I would rather not go through, and set each one by hand.

Link to comment
Share on other sites

soulburn scripts has a random ID function which will randomize the color ID of objects then use the VrayWirecolor render element to get a pass. Is that what you are after?

 

Doesn't work with multimaterial ID's though - just on an object level

 

Edit

Edited by John Dollus
Link to comment
Share on other sites

seeing that you can only get 15 MATID's I found Object ID's easier to use when I have more that 15 materials in the scene, or am I missing something?

 

I select by material and assign those objects the same Object ID. Its not an automated process so maybe it could be scripted.

 

jhv

Link to comment
Share on other sites

Thanks, ...I actually wound up using a combination of both. I used Soulburn to randomly generate wire colors. However, I am using MR and not Vray so VrayWireColor is not an option. But in the MR Render Elements there is an Object ID pass, so I loaded that. Then in the roll out for the Object ID you can tell it to use the object color, rather than the object ID.

 

The whole process took about 5 seconds, and is very useful, though different from a Material ID pass. Because it randomly generates wire colors, objects of the same material can have different colors, because they are different objects. Though this did solve my need for this image, it still doesn't make selecting one material in an entire image possible.

 

As a side note, there is also a random material ID in the Soulburn scripts. Though it applies a material ID to individual objects by using the material under the modifier list, which I never actually knew existed before. It also does not seem to effect the render elements. What is interesting about it is that it is not limited to 15 colors, but like I said, it seems to be closer to an Object ID itself, rather than a Material ID.

Edited by Crazy Homeless Guy
Link to comment
Share on other sites

  • 3 months later...

Maybe this script will help you?

 

effectschannel.gif

Put needed materials in Material Editor and press button "A" with shift key for randomising material id.

(Create Render Elements support only with Vray)

http://3d-kstudio.com/?page_id=27#EffectsChannelSet[/url]

 

 

Also look here this script

RenderRenderElements

http://3d-kstudio.com/?page_id=27#Render%20RenderElements

Edited by Track
Update Links
Link to comment
Share on other sites

  • 9 months later...

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...