Dave Girard's 101 Autodesk® Maya® Tips is now available in Kindle, interactive iPad edition and DRM-free EPUB/PDF editions. Work faster, cry less. Read more about the ebook.




Follow cgbeige on Twitter

Topics by tag:



Recently published articles by Dave G:



Free downloads by Dave G:



Mac OS X-only downloads:

Facer 3.0 Brings the Non-denominational Holiday Cheer

Just kidding – happy Urdu Festivus, one and all. Here is your gift from me: a beefy update to the Facer polygon toolkit. I whittled it myself out of unloved dreidels.

Here’s a rundown of what’s new in 3.0:

  • Triangulate now works with multiple mesh selections.
  • Added UV unfolder script. This correctly unfolds selected UVs using the horizontal, then vertical unfold operations. Need to use it with a UV projection.
  • Grouped MEL scripts section with embedded scripts first. Downloadable ones come last, starting with OMT Select Outline.
  • Added bounding box centre based transformation option to Replace All With Last script. This lets you replace objects that have frozen trasformations. I still need to add an option for local bounding box transforms.
  • Unfreeze rot/trans script in MEL section. This is a very handy script that recovers translation and rotation info for objects with frozen transforms, using bounding box info.
  • keepOnlyNFaces script. This deletes every selected face except an alternating count that you specify. I used it recently to remove faces from stock models:
  • Replace All With Last script now has a rotation option (target or source):
  • Pivot Toolbox. A nice set of tools designed to work with object pivots:
  • Also has a “set pivot to selected vertex” script:
  • Unique Namer. This is a script that renames non-unique nodes so you stop getting clashing name errors.

Be safe and remember that a punch is not a good way to win a family argument. A kick is best.

0 notes | Permalink

Maya File Preview Batch Processor for OS X

In an older post and in my 101 Autodesk Maya Tips, I talked about how you can send UNIX standard output to Maya via its commandPort and I just made a tool that batch generates previews for files using an open session of Maya. I made something similar in the past but it was slow because it launched a new session of Maya for each file via command line rendering. This is very quick because it just tells an already-open app to make a new scene, import the file, kick out an antialiased viewport 2 render to JPEG, wash, rinse and repeat.

Here is the Automator workflow file to install. Don’t rename it because it contains a shell script (stmaya) that bounces commands to Maya. You need to enable commandPort on port 2222 before Maya will accept input from the action. Do it with this command (I put this line in userSetup.mel so it is executed on Maya’s launch):

commandPort -n ":2222";

The only thing to keep in mind is that the script sets the imported file folder to your working project directory, so just remember to change it to your desired project after you’re done batching or you’ll be rendering into the last-previewed /tmp folder. Also, save your existing open work before you start doing these because it uses the “file -f -new” command meaning it won’t prompt you to save if you have an open doc with unsaved changes.

If you’re on Linux, you can do a similar thing with the two shell scripts that the Automator action uses. This is the script that operates on your input 3D file and this is the stmaya script that passes standard output to Maya. It’s a bit of a hairy combo that would be much nicer as one Python script but I am just updating existing bash scripts.

Sorry, Windows users – there’s no way to pipe standard output to Maya from the command prompt in Windows, so this can’t be adapted for non-UNIX OSes.

0 notes | Permalink

Maya Crash File Opener Updated for OS X

When Maya crashes, it tries to save out a file to a temp folder that you can recover on relaunch. In my 101 Autodesk Maya Tips I mention how you can get this file to open in Maya without digging through temp folders on Mac/Win/Linux but it seems that, due to what I think is V-Ray’s redirection of standard output, I no longer get the path of the crash file in the system log. So, I’m updating the script to work more like the Linux version. It does the exact same thing but by parsing the TMPDIR environment variable:

Grab the updated shell script or Automator Service which doesn’t require a terminal. Just open it from the Services menu in OS X.. After Maya 2014 is out, I’ll be releasing an updated version of 101 Autodesk Maya Tips to incorporate this change and I’ll add some new tips as well. Existing owners should receive the updated copy for free.

1 note | Permalink

V-Ray Tuner 3.2 – Small Maintenance Update for Linear Workflow Tools

I’ve updated V-Ray Tuner with some more robust changes to the handling of materials and textures when using the Gamma Correct Me script. It now works with any type of texture and it no longer gamma corrects a node if it’s parented to a gamma correct already. It’s more foolproof overall and, as always you can do the degamma on textures or the parent V-Ray materials:

Other additions:

  • Edit all selected images script to open all selected file nodes in image editor
  • Shellac me now enables shadows for both base and coat materials. I always use this, so if you don’t want this on, remove these two lines from the script: setAttr ($currentSurfaceShader[0] + “.bumpShadows”) 1; and this: setAttr ($fresnelCoater + “.bumpShadows”) 1;

0 notes | Permalink

My MakeHuman V-Ray SSS Skin Conversion Templates

So, after some tweaks and playing around, I’ve come up with a good starting set of templates to convert MakeHuman output characters to V-Ray for Maya via Nuke. Download the setup files at the bottom of this page (includes Maya V-Ray scene and source images as well). Currently, the Nuke template that I use for the source skin is set up for the caucasian skin PNG files that come with MakeHuman. I tried using it for the Indian-looking skin and it is far too red, but I’m sure someone could quickly get it working with different skin types. That is the advantage to this procedural Nuke template: it requires little work to make variations, unlike a series of Photoshop edits, which would be tricky to do for things like cloning and brushing of the lips. I realize not every uses Nuke for image edits but it’s great for stuff like this and I’m just making my work available to you. So, this is how it works: you take your single input PNG file and plug it into the starting point file input of the Nuke template (click for high res):

The Nuke script then splits up the single RGB input and does the appropriate edits and output for all elements of a V-Ray FastSSS2 map. How good is it? Well, I’m not an expert on skin and SSS but it’s a good start, in my opinion. The source MakeHuman PNG:

The Nuke template has two options for types of image input. If you’ve edited the texture in Mudbox or Mari and used 32-bit mode for the textures, use the linear gamma file input.

Here’s a render in Maya of the caucasian female skin PNG conversion:

It’s using a V-Ray Fresnel Blend Mat setup, so if you want to use it as a template for other work, go ahead. It’s free for use in commercial work. It could still use some tweaks for the lips and the only real problem with this setup is that the bump map can’t be used because of the texture map seams, so it looks a little too uniform. That’s also a fault of the actual texture, which doesn’t have any vein touches or pores – this isn’t meant to be feature actor material, just background figure quality. I left the bump stuff in the template files since I thought you might find it useful to see how it’s done and if you want to make a seamless fix for yourself. The Nuke scene includes a 3D reference model so you can check for seams in a 3D viewport while working on the textures. I’ll work on it eventually and post the revised work here. This is very much a work in progress and this is the 1.0 release of this package.

Download: MakeHuman Maya and Nuke template files v1.0

Just a note that the model is nude, since I was checking for seams. You might not want to freak out your guests by opening an unclothed tween on your screen.

2 notes | Permalink

V-Ray Tuner 3.1 Adds Basic File Texture Manager and Other Features

Updated V-Ray Tuner with some things I think many people will find helpful:

  • Select objects with selected materials script selects objects, not just faces, for selected material:
  • Added feature to Material Copy Dropper: if only one object is selected, it will duplicate the material and upstream nodes and apply it to the selected object
  • Gamma Correct Me now gamma corrects connected subtextures as well as swatches for V-Ray Materials:
  • Gamma Correct Me dialog automatically selects the menu item for the item type you selected: file or V-Ray Mat
  • Added Gamma Correct Me support for VRayFastSSS2 mat. Works for both swatches and attached file nodes
  • Added per-light exposure tweak support for V-Ray Light Materials, V-Ray Materials (self-illum slot is adjusted by exposure), Sun and Environment (Sky).
  • Added script to select and copy files that are outside project sourceimages folder to sourceimages and relink them:

Download link. Enjoy.

0 notes | Permalink

Script to Convert PaintFX Strokes at Render Time

I’ve been using Paint Effects a lot lately with my viewport 2 experiments and hate having to convert strokes to polygons to get them appear, so I made a script to convert them, render and then delete the polygon conversions, so all you’re left with is a good render and editable strokes:

The save button is there because I have found Maya can crash on large conversions, so it’s more of a reminder to save before you do it, but it’s not a necessity. I’m using the Hardware 2.0 renderer but this will work with any renderer that needs PFX strokes turned to polygons for rendering. Download link.

3 notes | Permalink

Tile Renderer for Viewport 2 With Film Back Tips for Maya

I’ve been experimenting with viewport 2 as a minimal look renderer and it’s getting pretty clean results but the main issue is that I want these images to be really big, and viewport 2 currently has a 2048 x 2048 res limit for renders (at least on this 1GB VRAM laptop, it does). So I’ve made a little script to tile render with viewport 2 using a film back translation. Not everyone knows that you can use the Film Offset settings in the selected camera’s attributes to change translate the film back without changing the actual angle or perspective. This lets you keep your current shot while adding bleed or, here, use it for tiling renders and then matching them up using Photoshop’s Auto-Align Layers feature:

I just need to mask out the shadows from the screen-space ambient occlusion at edge of the window and it’s perfect.

There is a great little script called Zoomerator that lets you use this setting to navigate around your shot and zoom in with the overscan settings without altering any actual camera perspective. This lets you work closely on something like a matte background while checking the match-up with a mesh element that may be tiny in your scene.

1 note | Permalink

It’s Your Maya Script Birthday! V-Ray Tuner 3.0 and Facer 2.8

So, after finishing up some jobs and adding some features to these while working on those contracts, I have rolled in some new things to both V-Ray Tuner and Facer. There’s quite a bit that’s added in each and I’ve included some features of one script in the other just because it made sense for things like UVs, which affect both modelling and rendering.

V-Ray Tuner 3.0 new features:
  • Material Copy Dropper in Materials menu. This is similar to the Material Dropper script that lets you apply materials from the first selected object to all the subsequently selected objects but this applies the copied shader from a “Duplicate Network” operation so you can use the source material as a starting point for your next object’s material:
  • Stored Texture Reloader. I got tired of having to dig down to a file node when doing external tweaks on a texture file, so I added this. It lets you store the working texture file and refreshes it when you select the menu item again. Select a new File node and it will replace the stored texture as the one you want to refresh:
  • Gamma Correct Me now has an interface to select the type of thing you want to degamma for a linear workflow: colour swatches of your selected material(s) or selected texture(s). This way, you can just avoid gamma correct nodes, set your swatch colours and just do all the gamma correction in one step with this.
  • Gamma Correct Me script for textures now uses V-Ray attribute for File node to avoid black textures in viewport. It uses a Gamma Correct node for everything else and works with ramps, blendColors, etc. Here’s a demo of those last few features in action:

As you can see from the way I start a linear workflow scene from scratch, this lets you click the LWFMe button to initialize all the right parameters for a linear workflow but then you disable the LWF toggle to work with manually linearized swatches. The Gamma Correct me script for swatches currently only works on V-Ray Materials (not FastSSS2, Light Mats, etc). I’ll add support for those later.

  • Added Brute Force/Brute Force and Light Cache/Light Cache presets to GI modes dropdown.
  • Added Transfer UVs script to Utils menu. Select source first and all targets after that and run script to transfer UVs.
  • DaveBake420 script now automatically enables texture baking render settings and then disables them on completion
  • Select Missing Textures script added to Materials menu. Checks if any of the links to file nodes are missing links and selects them if they are.
  • Added 200% upres option to the R% render preview size. I’ve found I wanted this occasionally. This doubles the actual resolution, not just the preview resolution so it will ask for confirmation. See these last two demoed:
  • Better UV Checker tool in Materials menu. See below.
Facer 2.8 new features
  • Better UV checker tool. I made a custom colour UV grid and the script will prompt you to download it automatically if it can’t find it in your home script path. Because Windows lacks a command line download tool like curl, I had to use Python and it might need a couple tries to grab the file. See it in action:
  • UV Snapshot tool to launch a temp snapshot file. I find I never want to keep this file, I just want to open it in Photoshop to put on another texture, so this saves the snapshot to your OS tmp folder and opens it in whatever app is set to open PNG files.
  • Cull Toggle, toggle normals, toggle face centres and toggle BBox now disables or enables normals for all selected objects instead of simply flipping the individual object’s normal state (leaving you with a mix of normals on/off):
  • Added options dialog to Replace All With Last Selected script. Lets you use instances instead of copies and select scale of copies to keep source or target scale.
.

Often when you work, you’re lazy about using instances to save memory so this lets you just do it all in one step for big memory savings at render time. When you render a bunch of those heads with copies, it takes over 6GB of memory (click for high res):

Use the script to replace those copies with instances and your render memory usage drops to 1.6GB (click for high res):

So, I hope you enjoy these updated scripts – the download links are in the new feature headers for both. If you get a lot of use out of them, maybe consider picking up a copy of the ePUB, Kindle, iPad iBook or PDF version of 101 Autodesk Maya Tips, which is still only $2.99. In the words of Yakov Smirnoff – IS BARGAIN!

2 notes | Permalink

Icons for Maya to Differentiate Versions

After force quitting the wrong version of Maya because all versions since 2011 have had the same icon, I decided to badge each version with a number to identify them so I wouldn’t make that mistake again. I chose a font that would work even at tiny sizes:

and at typical sizes, they look great:

So, here they are for Mac, Linux and Windows:

http://www.can-con.ca/tumblrpics/maya_icons.zip

Install instructions are included but unfortunately, the Windows .ico icons are hard-coded into the app so you can only change a shortcut icon, not the running application icon. If someone knows how to change a Windows app icon, let me know.

2 notes | Permalink