Switchers For Randomizing
Patterns In 3dsmax By Neil Blevins Created On: Dec 10th 2013 Updated On: July 13th 2026
Software: 3dsmax Lets say you have a bunch of rocks in a scene, and you want
to give each rock a slightly different color to add variety. What you
need is a switcher. What is a switcher? Basically, you define
a set of patterns, and they get assigned to specific groups of objects,
faces, etc, usually using some sort of ID value that connects the
pattern to the thing its being applied to. So for example, you create a
rock material that has 5 different rock colors, and then spread
randomly the ID 1 to 5 on a bunch of rocks, and each rock receives one
of the 5 rock colors based on the ID.
Which Switcher To Use
There are many different types of switchers in 3dsmax, and none of them
work in all situations sadly. Here's a quick breakdown of the different
switchers and where they should be used.
Sub-object Material: Switcher for switching between materials,
not patterns, so we won't be using it for this tutorial. Works in
3dsmax scanline and vray. Has an unlimited number of slots, and works
off Material ID only.
MultiIDMap: By Grant Adam, can be found at http://maxplugins.de/ Switcher for
patterns, both maps and bitmaps. Works in 3dsmax scanline and vray. Has
15 slots, and works off Material ID only.
VrayMultiSubTex: Switcher for patterns, both maps and
bitmaps. Works in vray only. Has an unlimited number of slots, and
works off Material ID or Object ID.
VrayHDRI: Switcher for patterns, bitmaps only. Works in vray
only. Has an unlimited number of slots, and works off User Definable
Properties. Usage: In the file name in VRayHDRI, you can put tags like
"c:\temp\diffuse_<mytag>.jpg" then in the User Defined Properties
of your object add the string mytag=someString. When V-Ray evaluates
VRayHDRI on that object, it will look up the mytag user property for
that node and use the texture "c:\temp\diffuse_someString.jpg" for that
node. Advantage: Since it can use User Definable Properties, an object
can
have multiple named ID values per object.
CG Source's MultiTextureMap: Switcher for patterns, bitmaps only.
Works in 3dsmax scanline and vray. Has an unlimited number of slots,
and works off Material ID or Object ID.
For this tutorial, I'll use the VrayMultiSubTex, but the same basic
technique works in all of the pattern based switchers, use whichever
one works with
your renderer of choice. You also should download my Soulburn
Script pack, as I'll be using the iDSetter Script.
Using VrayMultiSubTex
So here's the basic process...
Method 1: If you have a bunch of seperate objects, say a bunch of
seperate rock objects, first, select your
rocks.
Run my iDSetter Script.
Set Low to 1 and High to 5. Hit Apply. Now inspect the rocks. Each rock
has a Material modifier on it with a random Material ID from 1 to 5.
Method 2: If you have a single object that contains a bunch of
subobject elements, and you want each element to be different, select
your object, and assign a
MaterialByElement modifier.This will assign a random Material
ID per element (each rock).
Now that we've got the Material IDs assigned, lets assign a single rock
map to the diffuse of the rock material...
Now put that rock bitmap map as a submap of VrayMultiSubTex. Set Num
IDs to 5.
Now you can fill in the 5 slots with 5 completely different rock
textures, or if you just want some color variation, put 5
ColorCorrection maps in the 5 slots, hook all 5 ColorCorrection maps to
your original bitmap, and then tweak the color on each map slightly,
making some darker, some lighter, some browner, etc.
And here's the result...
Now remember, since the rocks are all keyed off the Material IDs, if
the directors says "I love it, but can you make that rock closest to
camera one of the browner ones?" You can, just select that rock, and
change the Material ID in the Material modifier to be one of the
browner variations.
Using MultiTextureMap
Amir Naziri reminded me about CG Source's MultiTextureMap. This is
another type of switcher that's available here: http://www.cg-source.com/multitexture.php
It lets you take a bunch of maps, and randomly assign them to a set of
objects using Material or Object ID. Or, you can load a single map, and
play with the Random Color Adjustment to have each be a slightly
different color / brightness / saturation. This plugin does have a few
limitations though...
Only works with bitmap textures, not procedurals, and no map
chains
Limited number of bitmap options, so no stuff like cropping or
Rotation built into the map.
But it's certainly a useful plugin that may do exactly what you need in
some instances, and is worth checking out.
Other Techniques
Urs Dubacher
pointed out a few other scripts and plugins that can help with creating
random variation:
Check 'em out if you want even more ways of achieving variation.
Conclusion
Remember, when you have a bunch of similar things, they're never all
exactly the same, there's always subtle color variation and texture
variation, even if they're all the same sort of rock, grass, wood
planks on the kitchen floor, etc. The colors in the example above may
be a little exaggerated to show the point, but even subtler variation
can give a lot of life to your scene. So always use a switcher to give
it a
little variation.