ScriptSpot

Script

Vray Script for randomizing Object IDs and Material IDs

By leon0101 · Credited author: Ciprian Socaci - modified someone elses script for Mental Ray · 2017-03-08

Version requirement
3DS Max and Vray
Votes
1
Description

This is a script we use at work. One of the guys modified a script for Mental Ray. It gives random Obj IDs and Mtl IDs to all objects and materials in your scene. Unfortunately as there are a max number of 16 material IDs, that is all you get. Remember to change 'output type' from 'Integer (no AA)' to 'Color (with AA)' to have an anti-aliased pass.

When you run this script you will have no notification or messages, but it will have worked. If you check material IDs and Object IDs you will find they have all changed.

Attachments

Tags: material ID, object id, random elements material ID, Vray Obj ID, Mtl ID

Comments (2)

256

triff · 2017-03-16

There are actually 256 MatIDs/EffectIDs, it's just only 16 are accessible in the mat editor (pretty sure they're the same thing). You can find them under Options in most VRay mats, not sure about MR.

EffectsChannel Set on here is great for working with IDs and mattes and has a randomize function: http://www.scriptspot.com/3ds-max/scripts/effectschannelset

leon0101 · 2017-03-22

Great, I'll mention it to Ciprian. Maybe he can adjust the script.