VRay Render Elements & render layers improvement

david | dj mod,mel script,rendering,vray | Sunday, September 5th, 2010

The image above shows the Render Elements tab in the vray render settings window. If you've used it before you may notice some cosmetic differences, and that's because I've modified one of the vray mel scripts to add some functionality that makes render elements easier to use with render layers.



david | dj mod,mel script,rendering,tutorials,vray | Wednesday, September 1st, 2010

This mel script creates a renderLayer that can be used to quickly render mattes for selected objects or groups of objects with the VRay for Maya renderer.

As you can see from the screen shot, djVRayCreateMatteLayer.mel looks very similar to the mentalray mattePassMaker.mel script which I wrote about in my previous post. In fact djVRayCreateMatteLayer.mel is an attempt to emulate the mentalray matte pass functionality using "VRay Render Elements".

At this point in time I am fairly new to vray and vray is relatively new to maya so djVRayCreateMatteLayer.mel should be viewed as a work-in-progress, but one you may find useful if you ever need to create mattes using vray. (more...)


david | dj mod,mel script,mentalray,rendering,tutorials | Monday, August 30th, 2010

You can use this script to create black and white matte renders using mentalray's pass system which means that it takes no longer to render 100 mattes than it does to render one. And since the script makes it so easy to set up these passes you can render a separate matte for every object in your scene, if thats what you want, or for combinations of objects that you select or based on the materials that are assigned. (more...)

spReticle modified and compiled for maya 2011-x64

david | dj mod,mel script | Thursday, August 26th, 2010

In preparation for upgrading to maya 2011, I'm recompiling plugins that I rely on. This one, called spReticle, required a small code fix to work with 2011.

spReticle is an open source offering from Sony Pictures Imageworks that gives you the ability to add customizable viewport overlays like gate masks and safe guides and much more.

You can get it from my downloads page.

Put the plugin (mll file) in your plugins folder and the mel files in your scripts folder. Use the plugin manager to load the plugin, then to create a reticle node use the following command:


This will set up a reticle with a 16:9 transparent gate mask with 4:3 center-cut action/title safe lines, frame numbers in the top left corner, scene name top center. You can modify all these to you liking and add many variations using the attribute editor.

update: 9 April 2011: maya 2012-x64 version also available

update: added 2013-x64 version

update: added 2014-x64 version

Mimic RightMouseClick with CTRL+LeftMouseClick

david | dj mod,mel script | Sunday, March 14th, 2010

I noticed that some people using wacom tablets find the stylus version of the  right-mouse button to be a little clumsy. Since maya makes extensive use of right-mouse-button menus I wanted to see if I could find an alternative. As luck would have it, Roger Klado had already figured it all out and written it up in great detail, so all I had to do was extract the bits I needed and put them into a mel script.

The result is djObjMenu.mel. Make a shelf button or marking menu with this command


Run it and you'll find that CTRL+LeftMouseClick invokes the same behaviour in the viewport as the RightMouseClick. So for a stylus that would be CTRL+penDown instead of hover+sideButton. Some people may find this easier or more direct. Let me know if you do. I don't use a stylus, so I'm interested to hear your thoughts.

Look for djObjMenu.mel on my downloads page.

Update: I've realized that CTRL+LeftMouseClick is normally used in component mode to deselect things. If you run djObjMenu from userSetup.mel then you'll lose the ability to deselect components (unless you want to use Shift-LeftMouseClick to toggle them). Therefore I think it would be better to run djObjMenu from a shelf button, to be used when you are animating rather than modeling. Then restart maya to revert to normal. I'm going to look into making the script detect whether the context is component mode to avoid the conflict, but that may take me a while to figure out. I'll have to read Roger's instructions again!

So, I've edited my original post to remove the suggestion about userSetup.mel, which I've replaced with a shelf button suggestion. Apologies if I confused anybody.

connectNodeToAttrOverride for mia_material_x

david | dj mod,mel script,mentalray | Thursday, November 12th, 2009

When building shader networks in the hypershade window it is common to drag-and-drop one node onto some attribute of another. When you do this maya attempts to guess the type of connection you are making. If you drag a texture or a material onto a color attribute then maya will automatically connect either the .outColor or the .outValue, depending on the node type. There are other default connections for other types of attributes but if maya can't figure out what to do it opens the connection editor and leaves it for you to make the connection manually.

There is one notable case that seems to confuse people - mia_material_x and mia_material_x_passes. For example say you want to layer mia_material_x over another shader using mib_color_mix or mix8layers. If you drag-and-drop the mia_material_x onto one of the color inputs instead of connecting as you might expect, up pops the connection editor. If you've done this before then you probably know that you simply need to connect mia_material_x.result, but wouldn't it be great if maya was able to do that automatically, and skip the connection editor?

If you said "yes, that would be great" then you'll like the next bit. Back around the turn of the century, the thoughtful folks at alias provided a mel script called connectNodeToAttrOverride.mel which states

//        This procedure is provided as a hook for customers to allow
//        you to redefine the behaviour of drag and drop.

Well that's what I've done. Three lines of code was all it took! Now dragging mia_material_x and mia_material_x_passes works just like the other materials.

You can download my modified connectNodeToAttrOverride.mel from my downloads page.

djRivet.mel – added support for multi uv sets

david | animation,mel script | Tuesday, November 3rd, 2009

Several years ago I wrote a mel script called djRivet.mel that makes it easy to constrain things to deforming surfaces using follicles. Matt Oldfield, one of the TD’s at Disney Interactive, suggested that I update it to include support for multiple uv sets. It was pretty cool to hear that someone other than me finds this script useful, and being able to specify different uv sets for the textures and the follicles makes perfect sense.

You can download the update here.

maya 2010 mia_material_x bump bug fix

david | dj mod,mel script,mentalray,rendering | Thursday, October 15th, 2009

In maya 2010, if you connect a bump map to a mia_material_x shader and later change your mind and delete the bump map or break the connection, the shader will no longer render as you expect and the hypershade swatch will turn black. (more...)

poseDeformer walk-through

david | animation,mel script,tutorials | Friday, October 2nd, 2009

I was asked to write a simple getting started guide for using Michael Comet's poseDeformer, so here it is. (more...)

poseDeformer plugin compiled for maya2010-x64 win

david | animation,dj mod,mel script | Saturday, August 15th, 2009

We upgraded to maya 2010 this week so I have recompiled my 2nd favourite plugin - Michael Comet's poseDeformer. This is the windows x64 version. (x86 coming soon)

I added it to poseDeformer.rar on the Downloads Page.

Update 2 Oct 2009: Added maya2010 win32 (x86) compile to the download.

« Previous Page | Next Page »

Powered by WordPress | Based on a theme by Roy Tanck