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.
Posted: October 16th, 2007 under 3dsmax, tutorial, vray - 3dsmax.
Comments: 12
Comments
Comment from metafus
Time: October 17, 2007, 4:00 pm
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!!
Comment from Tolas
Time: October 31, 2007, 4:52 pm
Indeed, very nice tip. Thanks.
Comment from a7mad fat7y
Time: January 13, 2008, 6:36 pm
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
Comment from Pixel
Time: January 19, 2008, 11:52 pm
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…
Comment from Vnimation
Time: February 10, 2008, 4:12 am
Great tutorial. Thank you very much!
Comment from egor
Time: March 17, 2008, 11:34 pm
could you re-up the zip file, I would like to learn this.
Comment from admin
Time: March 18, 2008, 12:23 am
It’s done.
Comment from Dunniz
Time: April 29, 2008, 10:37 am
Thanks for the tutorial, very interesting. I am new to 3DS, how do i collapse multiple objects into one?
Thanks.
Comment from Nixx
Time: January 22, 2009, 12:52 pm
Nice one, very helpfull. I’d also use the tile texture to ad variations to the windows.
Comment from Alexwebmaster
Time: March 3, 2009, 1:34 pm
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
Comment from Jon Seagull
Time: September 10, 2009, 7:45 pm
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.).
Comment from admin
Time: September 25, 2009, 4:23 pm
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 !


Write a comment