RenderMask

374 votes
Version: 
5.90.0
Date Updated: 
09/03/2018
Author Name: 
Ivan Tepavicharov

Render different types of masks (Luminance, RGB, Reflection, Lights/Shadows, ObjectsID, SSS, Texture, AO, ZDepth, Specular, Refraction). The script don't affect the scene materials, lights and render settings.
(this version support only V-Ray render engine)

 Version: 5.90.0

  • add support "V-Ray Next" (this version support only V-Ray render engine)

 

Additional Info: 

Category "IllusionBoxStudio"

Version Requirement: 
3dsmax 2012 - 2019

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
birket's picture

It seems that rendering an

It seems that rendering an env mask with XREF scenes doesn't work properly:- you need to merge in the XREFs in order to get it to work.

Any ideas why? Could this be fixed?

----------------------
www.blinkimage.com

birket's picture

Fabulous. Will give it a try.

Fabulous. Will give it a try.

----------------------
www.blinkimage.com

Ivan Tepavicharov's picture

OK, the "on/off falloff

OK, the "on/off falloff reflection" is now ready.

Ivan Tepavicharov

Ivan Tepavicharov's picture

The idea to have the option

The idea to have the option to remove the "falloff" is good, and i will add it as soon as possible.
As "xRef" things sit a bit more complicated, but will try.

Ivan Tepavicharov

birket's picture

Falloff and XREFs

RenderMask is ACE!, but can we have an option to have no falloff if we choose to render an Env Reflection? Its a bit of a pain - normally we just want a plain black/white matte of where reflections are and where they aren't. At the moment, I have to ramp up the Falloff value quite high, and then run levels in Photoshop to get it to be pure black and white.

Also, we make extensive use of XREF scenes in our pipeline. It would be great if, somehow, rendermask would allow us to select objects (by name or material) that are buried within an XREF scene. At the moment, we have to merge a particular XREF(s) in to use RenderMask.

Would this be possible?

----------------------
www.blinkimage.com

birket's picture

I'm using Vray 1.50.SP4a and

I'm using Vray 1.50.SP4a and Max2009 x64. I'm using DR to render out mattes using the latest version of RenderMask. All DR buckets render black, whereas local buckets render fine.

Any ideas?

(I am trying to produce a mask on a ForestPro object. Could that be the problem?)

(my scene also includes a number of XREF scenes)

----------------------
www.blinkimage.com

brittnell's picture

I appreciate your intent on

I appreciate your intent on motivating me to learn more about maxscript, however, my reasoning in asking the original author about the possibility of a z-depth specific modification/version was mainly due to the fact that most of the complex (it's not as simple as it might seem) groundwork is already evident in his script... Without me having to learn, and then re-invent, the wheel.

The reason I say it is complex (at least to me) is that it is doing more than simply scripting a black environment fog, and then adding a global self-illuminated white material override (which can also be done in Mental Ray). This script doesn't seem to take such a simple approach, but appears to go through all scene materials, find existing opacity maps in each, leave them, while changing diffuse to white and self-illumination to 100%. It then resets all materials back to their original state after render.

This is what I am most excited about, and is what gives the (excellent) effect of rendering out the z-depth with proper rendering of opacity-mapped objects such as foliage planes or other sorts of billboard objects. The global material override leaves things like billboard trees as solid rectangles (same as Max's default z-buffer render element).

With that said, it still may be that the material digging/bitmap swapping/etc. seems easy to an experienced scripter, but to me it does not seem like an efficient use of time to "put some of my own effort into it". Especially when the script is usable for nice "proper" z-depth passes as-is with just a little bit of "user guidance".

In all honesty, I'm not a scripter, and likely never will be (too many other pots already on the fire), but I'm not sure that should preclude me from making general "Hey wouldn't it be cool?" type suggestions... even if they are pie-in-the-sky.

jonahhawk's picture

Really this would be a

Really this would be a totally different tool no? It would be a ZBuffer tool, not a mask tool.

It would not be hard for you to write this yourself. It sounds daunting but it is pretty basic stuff as far as maxscript goes.

If you use VRay, you could even just set the override material to a white and then the environment fog to black. pretty easy. You'll also want to hide any of your glass objects if you want to consider the z depth behind them.

Look up 'Working with Atmospherics' and 'renderers' in the MaxScript Reference and specifically renderers.current. You can get all the information you need out of those two topics.

After you have written something with a some success, you can find a lot of help in the forums here or the maxScript forums on CGSociety.

http://forums.cgsociety.org/forumdisplay.php?f=98

People will be more likely to help you after you have put some of your own effort into it.

brittnell's picture

Hmmm... How difficult would

Hmmm... How difficult would it be to convert this script to render all objects (full scene) out with the same transparency/illumination settings you're using now (specifically: "Mask Type: Luminance"/"Keep OpacityMap - White Matte"), but also with a black environment fog?

Such an approach should be able to output z-buffer passes that work with transparency (well, at least better than Max's native render element).

Ps. I almost forgot to mention that I love this script, and use it frequently.

Edit: Works fine just putting the environment fog in there manually. Just need to remember to turn it off for the beauty pass. Would still be great to have a dedicated "render z-buffer" button on this script that would add the atmospheric for the pass, then ditch it when done... But no pressure from me, this works pretty darn well as-is.

Thanks again!

caebrasil's picture

This script is great, I use a

This script is great, I use a lot for years now! Thank you very much!
One thing you cold add is "Copy to Clipboard" option. So with this I can just Paste on Photoshop, without save it. Original "Copy Image" on "Rendered Frame Window" doens`t work properly if I have rendered big images (it consider zoom and windows frame, for example).
Anyway, thanks!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.