Tutorial / Random object visibility in 3dsmax with MaterialByElement & Opacity

Zip file with illustrations & max 7.0 files can be downloaded here.

This simple 3dsmax technique is quite useful when you have to trigger the visibility of numerous objects. Instead of deleting “randomly” some elements, you apply randomly materials that are visible… or not. This is a very simple flexible method, and it works normally with any rendering engine inside 3dsmax. It doesn’t involve any script (although I think it can be improved with scripts)

We’ll take this 3D array of cubes for example, collapsed in the same object.



First we appy on it a Multi/Sub-Object material composed of 1) whatever base material you like and 2) a material with a plain black color in the opacity slot (We do it in the example with VrayMaterial + VrayColor but it normally works with any material with an opactiy slot)

Then you apply a MaterialByElement on the array and you choose the
This is very flexible because you can choose directly in your viewport the distribution and the frequency of the voids. Eventually you also can distribute up to 8 materials.

And what our array becomes with only 10% of the cubes :

A drawback is that the objects have to be separated into elements within the same mesh or poly. If you wan to apply this technique on poly instead of elements, you’ll have to break all the vertices.

It also may slow down your rendering, depending on the render engine you use.

For example, this method was used in these projects :

Please feel free to comment or to share your technique, scripted or not.


  1. I created maps with vraylight texture
    but this way is amazing. I check your blog everyday. how did you learn this technique? GREAT WORK also!!

  2. well i really apreciate this tutorial mate .. saves lot of time and effort .. one of the downs i encountered though is that Zdepth doesnt seem to care about the material and renders all of em which would make it harder for compositing in PS later on .. anyone got a solution for this .. i am working my A** off trying to find a way .. will post if i find something out

  3. I think the solution is quite simple. Once you got the random effect you desire, you can add a edit mesh modifier, select elements by mat ID number corresponding to the void material then simply delete the elements. Finally, it will be like selecting randomly the elements, function that doesn’t exist natively in MAX…

  4. For VRay, a speedup would be to put an empty VRayMtlWrapper or VRayBlend material in the NULL slot, rather than a VRayMtl with 0 opacity and 1.0 IOR. Other render engines have similar ways to make a null material (empty mental ray material, e.g.).

    • Thank you Jon, I’ll take a look at this !

      I’ve notice that my technique slows down the rendering when those “transperent” object are in front of each other, your hint might correct this.

      Since my workflow doesn’t need randomizing big arrays of objects but only light emitters at the moment, the slowdown wasn’t a real problem but any improvement to this method is well apreciated !

Leave a Reply to Nixx Cancel reply

Your email address will not be published.