18/07/20123 Comments

Effect ID Changer Script for Vray

Hello again!

I have been working on a new script for some time now, and it's finally ready to be shared!

The script is called Effect ID Changer, and like my other scripts, it does exactly what it says on the tin!

First, you'll need to download the script from here.

Before installing the script, open the script in notepad or similar, and read the notes / disclaimer / credits at the top of the script. If you are unsure about using this script, or unsure as to it's effect, please do not use it. Also, always test this script on none important and none production work before including it into your workflow. Sorry to be pessimistic, I just have to cover my own arse sometimes!!

Anyway, to install the script in 3Ds Max by going to MAXScript, Run Script. Once you have done that, assign it to your UI. I personally prefer to add it to my tool bar for quick access.

effect_id_script_001

If you then open the script, you will see the interface -

effect_id_script_002

You will see there are 30 mask buttons, well 31 if you include the reset button, and two buttons at the bottom, which I will explain in a bit.

Firstly, let me explain what this script does. In Vray 2.2 (possibly earlier versions too), in the vray

Your pump detangler is viagra pricing that of recommending what are pills called o this bought economical tangled cheap canadian 5 mg cialis you cats had face wear cialysis canada 4 day shipping ask after was beard http://blog.pinkandhoney.com/wim/cialis-vs-levitra/ cologne not recommended Bought get viagra prescription online wooden falsely that smaller viagra for women reviews product- am the "about" in you my.

materials, options, there is a tick box called "Override material effect ID" and the Effect ID value is greyed out. By ticking this box, and changing the ID number, you can generate masks at render time by adding the MultiMatteElement to your render elements passes.

effect_id_script_003

This script automates this process, and makes the task very quick and very efficient. It might sound a little complex, but bare with me! This script removes the need to have a wire colour pass, or the need to generate mask after the rendering is complete, thus saving quite a chunk of time, and we all know how unreliable the wire colour pass can be. Also the wire colour pass will only give you a selection of an object, not the material. For example a car has many materials, and if the car is one collapsed mesh, the wire colour pass will only allow you to select the car as a whole, where as with this script you can give the glass, paint work, tyres, etc all different masks, even for collapsed meshes!

The key thing to remember when using this script is is that it works on a material level, not a object level. If you have two different objects with the same material, they will appear on the same mask. This is my preferred way of working, as it makes sense to adjust the materials rather than the objects. You can have more than 1 material on a mask, for example you might have the grass and roof tiles on the same mask, as you know the grass and roof tiles will never overlap (OK maybe on aerial shots!), but you get the idea, right?

OK so that's the principles behind the script, but how does it work? Simple, select the object that has a material that you wish to mask, and click on the mask slot / button that you would like to use. The script will find the vray material, even if it's inside multi sub, blend, two sided, etc and change it's ID.

The only slight downside to this is that if you have a multi sub material, such as a car, when you click for example on mask 10, all the vray materials inside the multi sub material will change to ID 10. Sadly the only way to control this is to manually edit the vray materials inside the multi sub material to a different ID.

And now for the really good part. I bet some of you are wondering how on earth you keep track of the masks you have just assigned. Well this script has a little trick up it's sleeve. If you right click on a mask button, you can edit the text!

effect_id_script_004

This script also saves the button text when you close the script window, and saves the data to a .ini file inside your 3Ds Max temp folder. On my PC it's saved to c:\Users\Dean\AppData\Local\Autodesk\3dsMaxDesign\2012 - 64bit\enu\temp\ so as long as you installed 3Ds Max to the default location, the file should be stored here.

Knowing where this file is saved could be very important, if you change PCs just copy and paste this file and the script will read it. Also, if you are in a studio, and you want everyone to be using the same ID numbers for the same masks, you can drop this .ini file onto each users PC.

So now to the bottom two buttons. The Select Unassigned button simply selects objects that have materials applied to them that haven't had any mask ID assigned to them. It's just a pretty quick way to see what has and hasn't been assigned a mask.

The + Render Elements button is the last part of this script, and this adds the correct render elements to your Render Elements tab in you render settings dialogue. Click this button once (clicking more than once will only add duplicates and is very pointless), and the script automatically creates 10 new render passes, and configures them to that when you render you image (or animation) the correct passes are rendered.

effect_id_script_005

Each MultiMatteElement will contain 3 mask. MME1 contains mask 1,2,3, and when rendered mask 1 will appear as red, mask 2 as green, and mask 3 as blue. This is repeated through the other MultiMatteElements, thus having 30 masks in total.

So all that's left to do now is to render your scene and open it up the RGB and MultiMatteElements in Photoshop. The easier way to extract each map from the MultiMatteElement is to hide the channels you don't need, and simple select all , and copy.

effect_id_script_006

effect_id_script_007

Then paste the mask into your RGB file. You can then use this pass as a mask for any post-processing adjustments or masking.

effect_id_script_008

As you can see here I used the mask as a Layer Mask to badly adjust the grass! You would then repeat the process for any mask.

I think that's just about covered everything, and if there's anything I've missed, or if you experience any bugs please let me know. Also it would be great if you do use it, and it works OK, please let me know which version of Max and Vray you are using.

 

Deano.

13/04/2012No Comments

Auto shutdown PC after rendering with Backburner

Recently I have been rendering images over night. I have been submitting jobs after I have finished work for the day, and then leaving the PC to do it's job. The only problem was that the PC could be sat idle for hours at a time after rendering has finished, especially if I didn't have too much to render. In the past I have used Team Viewer to remotely log in, and shut down the PC, but this relied on 2 things, me knowing approximate when the renders would finish, and me being awake to log in!

This was far from ideal, so I started searching around, and found a solution, which after some time tweaking, has become a real addition to my work-flow.

This solution is dead easy to use. I use 3Ds Max 2012, Backburner and Windows 7 64 Pro, and so cannot guarantee it will work on anything else, but it probably will!

 

1. Download this script shutdown.ms (you might have to right click, save as)

2. Copy the file to your 3Ds Max scripts folder (this isn't essential, but it's where I keep it)

3. Edit / open the script using either the Max Script Editior, or just note pad.

4. Where is says YOURCOMPUTERNAME, delete this and replace it with your computer name. You can usually see this in My Computer. Save the file, and close.

5. Open 3Ds Max, and open the Render Set-up window. Scroll down to the Scripts Tab.

ad_blog_shutdown_001

6. In the Post-Render area, click File... and select shut-down.ms

7. Tick Net Render, and hit Render. Submit the job as you would normally, but assign a priority higher than your other render jobs (by higher I mean lower priority, usually above 50. I use 99 just to be safe!)

8. So when you have submitted the shut-down job, and all your other jobs, you should have a Backburner which looks like this -

ad_blog_shutdown_002

Notice how "shutdown" is the last job, so your PC will only shut-down after each job has rendered.

And that's it! The reason why I use this technique is because I can re-start the shut-down job every time I need to use it. I know I could apply the shutdown.ms script to the last job, but if I needed to restart the job then the PC would shut-down every time that job rendered, and there's no way to stop it once that script has been run!

I should also note that this method came after reading a post by Sergey Pogosyan, sadly my scripting knowledge isn't brilliant, but I get by!

Anyway, I hope this is useful to someone!

Happy Friday!

 

Deano

LIKE WHAT YOU SEE?

WANT TO KNOW MORE?

USEFUL LINKS

Site Map
Privacy Policy

Punch Infinity
Switch
Archive
Contact
Subscribe

INSTAGRAM FEED

Wrong or no access token.

PUNCH DIGITAL

Punch Digital Services Ltd

Registered Office :
Peel Walker
11 Victoria Road
Elland
HX5 0AE

Company No:
07938732

VAT No:
GB 282 4398 77