ScriptSpot

Script

Quick Mask

By Anubis · 2009-10-02

Version
1.4
Version requirement
3ds max 6 and higher
Other software required
[AVG] Avguard Extensions for Max 6 - 9
Date updated
2011-02-16
Votes
72
Description

Quick black and white mask from the selected objects

Quick Mask

Now support XRef Scenes

Additional Info

Version Log: [v.1.0] initial version [v.1.1] Added copies a bitmap to the clipboard (AVG needed for Max version < 2008) [v.1.2] Added XRef Scene support, Shapes support + code optimization [v.1.3] Added two-sided material to render the backfaces [v.1.4] Added support for mr_Proxy & VRayProxy
Attachments

Tags: render, selection, Matte, copy, mask, clipboard, quick, xref, shape, anubis, XRef Scene

Comments (20)

Animation support?!

vraypixel · 2011-07-13

Hi Anubis,
Great script. Perfect for smaller scenes. Had to wait a bit when using it in a complex one with lots of xrefs but at the and it made the mask. Than waited some more to turn everything back to what it was ;)
Anyway any plans to build animation support in it?

Greats!

Hi vraypixel,

Anubis · 2011-07-13

why not ;) will put this in the todo-list.

[edit] before spend any time on this, need to say that you can render animation with the current script; just setup your renderer (F10) as usual and finally call the script.

How to..make it work?

pSicadeLio · 2011-03-26

Hi,
sorry for my newbieness,
but I can't make it work,
I've run the script, but nothing happened.. =|
Is there a specific folder where put it on?

Thank in advance,
have a nice day.

Anubis · 2011-03-27

Hey Elia,

its a macro script, so after run it once,
just find it in your Customize dialog
and assign it to hotkey/menu/button.

Great!

pSicadeLio · 2011-03-27

Thank you Anubis,
now I've learned something new,
Great script! ;)

thanks

Anubis · 2011-02-17

still dont know whats wrong with vr in the main script but glad to see it works fine for you, cheers.

problem solved

mustafa mamdouh · 2011-02-17

you made it ... it works now fine
best wishes with your scripts

quick mask v1.4 tested on 3ds max 2009 64-bit (vray v2.0)

mustafa mamdouh · 2011-02-17

ok i just tested it as normal (without vrayproxies) and it works but when i tested it with vrayproxies it didn't work .. and that what happened

First i get DOS window opened with vray icon on taskbar then max hanged for while finaly i got just a black window render

Second time i tried to restart max and tried again but this time max hanged and stop working

best regards,
mustafa

Hmm...

Anubis · 2011-02-17

its hardly to help more without vray here, but... just make this test:
- made some test scene (and save it)
- assign your vray renderer
- the script mask selected, so select objects you like
- and run this script:

with undo on
(
	matB = standardMaterial diffusecolor:black \
		selfIllumAmount:100 twoSided:on
	matW = standardMaterial diffusecolor:white \
		selfIllumAmount:100 twoSided:on
	
	geometry.material = shapes.material = matB
	selection.material = matW
	
	useEnvironmentmap = off ; backgroundColor = black
	
	render()
)
max undo
Attachments

support for VRAYPROXY will be great !!

mustafa mamdouh · 2011-02-15

very useful script but sadly it gives wrong result when i rendered vrayproxies

Hey Mustafa

Anubis · 2011-02-15

I expect this question to come out some day :)

The script using Default Scanline Renderer and that means it not support mr_proxy as well. I not use this renderers (MR or VR) but the good news is that I update the script. Now it will check the scene for proxies and switch to MR/VR if necessary.

So pleace test the last script version and drop some feedback.

Cheers

a121920312 · 2010-07-29

thanks!

veneta · 2009-12-05

excellent, thanks!

peprgb · 2009-11-27

Really useful, thank you very much!!

Best regards.

amuha005 · 2009-11-27

great very usefull ! thanks

Anubis · 2009-11-12

Renderhjs, finality I just extend the script as you suggest (without dotNet).

Anubis · 2009-10-03

dotNet is a framework for 64 bit systems and I'm not sure if Max supported it in versions prior to 9.

renderhjs · 2009-10-03

only Max 9 with service pack or greater versions have such a button. Plus most users will save it, open it in PS, select it copy it paste it to the other document anyway. SO in many cases steps could be reduced.

Anubis · 2009-10-02

I would say that this is unnecessary complication. Max VFB has a Copy button that copies without having to store the bitmap file. But thanks anyway for the advice.

renderhjs · 2009-10-02

you could extend the script to store the rendering to the clipboard. So one can easier paste it in Photoshop.

it works something like this:
--copy to clipoard and delete temp image
clipboardClass = dotNetClass "System.Windows.Forms.Clipboard" --create a Clipboard dotNetClass
imageClass = dotNetClass "System.Drawing.Image" --create an Image dotNetClass
theBitmap = imageClass.FromFile url_save_path --get the saved image from file as bitmap
clipboardClass.setImage theBitmap --copy the image to clipboard
theBitmap.Dispose() --release the bitmap

where url_save_path is a url of the temporary image saved on the disc.