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:

Getting Accurate Displacement Previews in Maya

When you start tweaking a cage mesh that has a displacement texture in Maya, it gets really tricky to predict what is going to happen when the displacement kicks in after you’ve edited the base mesh. Luckily Maya has a displacement to polygons filter in the Modify/Convert menu that facilitates these edits. Duplicate and smooth your base mesh and then apply the filter and you’ll get an idea of what your tessellated and displaced mesh looks like at render time. It isn’t perfect since it doesn’t smooth UVs but it gives a pretty accurate rendition:

I’m using a simple script that I’ll be adding to V-Ray Tuner but it works with any renderer. Here it is:

string $meshy[] = `duplicate -rr`;
move -r 0 0 -10;
polyPerformAction "polySmooth -mth 0 -dv 1 -c 1 -kb 1 -ksb 1 -khe 0 -kt 1 -kmb 1 -suv 1 -sl 1 -dpe 1 -ps 0.1 -ro 1" f 0;
delete $meshy;

You’ll probably notice that my displacement is not following the 1 gain / -0.5 offset alpha settings. I have tweaked it manually so these settings have changed.

0 notes | Permalink

Increasing V-Ray Material Preview Resolution in Maya’s Viewport 2

So I am working on something that needs some tricky UV and vertex tweaks and, if you’re a V-Ray user, you probably know that viewport 2 is fast but V-Ray’s default baked previews in Maya are really low res – I don’t even think that 64x64 pixels qualifies as “low res,” it’s so bad. Luckily, after getting in touch with Chaos Group about it, they let me know that there is a workaround to get high res previews. Jack up the resolution in viewport 2’s “Bake Resolution for Unsupported Texture Types” setting, save and reload the scene and you’ll have a high res preview:

Thanks again to Chaos Group for the exceptional support. After years of struggling with all the problems and dearth of support for mental ray, it’s so refreshing to have such good support in V-Ray. They never cease to impress me.

1 note | Permalink

V-Ray Tuner 3.5 Posted for Download

The latest version of V-Ray Tuner is out now. 3.5 includes some

  • Optimize button’s V-Ray dynamic memory adjustment now works automatically with versions 2014 and over. No more manual setting of RAM amount needed.
  • Added an SSS Prepass Rate Switch script to Materials menu. This dialog prompt lets you set the prepass rate for all SSS materials at once so you can dial it down to something like -1 for draft renders and then put it back up to 1 or something like that for final renders. Can save a lot of time. Just enter the negative or positive integer value and the script sets all V-Ray SSS mats at once.
  • Removed Disable Texture Filtering script from Materials menu. It turns out that disabling texture filtering will load the full resolution textures (no matter how small it is in the scene) so it can use a lot of memory needlessly.
  • Per-light exposure tweak fixed for non-VRay lights.
  • Select Z-Depth RE added to Utilities. Saves digging into render settings to adjust Z-Depth parameters.
  • Select V-Ray Sky added to Utilities. Same as above but for sky node.
  • Start/Stop IPR Render menu items added to RT menu so you can start V-Ray RT from there.
  • Render log/console script in Utilities menu now opens the vray4maya_renderlog.txt in OS X’s Console.app
  • Make Frustum script added to Utils menu. It makes a Nuke style 3D frustum for selected cameras and parents it under your camera node:
  • Split Utilities and put render stuff into a Render menu because there was too much stuff in the Utilities menu before
  • Replaced “D” displacement toggle checkbox with “PL” for prefilter light cache since it’s more commonly used.
  • Per-light render script now has a simple interface and toggle for VFB curves and levels. The “Proceed to next light” option is used to cancel renders. If you uncheck it and hit escape, it won’t proceed to the next light. This prevents hammering cancel to stop it from rendering all your lights if you want to stop the operation.

1 note | Permalink

MEL Commands to Control the V-Ray Framebuffer

If you need to script the V-Ray Framebuffer, there are a series of options that are shown when you enter “vray vfbControl;” in the MEL command line.

While there is no way to query current settings, you can turn them off with something like:

vray vfbControl -exposure 0;
vray vfbControl -curve 0;

It’s good to turn off the exposure and curves setting when doing stuff like wireframe batch renders that can be messed up by contrast and exposure controls.

0 notes | Permalink

V-Ray for Maya Log Location

I just recently noticed that render output from V-Ray for Maya doesn’t go straight to the Console so I had to ask Chaos Group where the render log is on OS X. Both OS X and Linux’s are called vray4maya_log.txt and they are stored in /tmp. Open it in Console.app under OS X or tail in Linux and it will refresh automatically as messages are added:

The log location on Windows is in C:\Users\you\Appdata\Local\Temp.

1 note | Permalink

Maya’s “Duplicate Shading Network”: Not Just for Materials

Sometimes in Maya, you duplicate certain things like V-Ray lights with attached HDR images and only the light itself is duplicated, forcing you to reattach the image connections. In scenarios like this, you should use the Duplicate Shading Network command in the Hypershade:

That will duplicate the light and duplicate connections, so that get the linked sub-nodes. Those sub-nodes are also duplicates, so you can change the colour of an image connection without affecting the colour of the original network’s nodes. Since I use this often, I have this command bound to a hotkey in the Hotkey Editor:

hyperShadePanelMenuCommand("hyperShadePanel1", "duplicateShadingNetwork")

0 notes | Permalink

Making V-Ray Renderable Curves from ZBrush Fibermesh Output

I’ve been playing with a lot of different hair workflows lately and found that ZBrush’s Fibermesh is good for making shaped, long hair, where this can be difficult to do with plug-ins like Shave and a Haircut or Yeti. Many people use hand-drawn guide curves with a Maya hair system and there is a good tutorial for that here. But I am using straight OBJ output from ZBrush’s Fibermesh and converting it to renderable curves with this Python script for Maya. The reason you want to do this is because faceted polygons will face in one direction and give you an unrealistic reflection while a renderable curve will more accurately imitate a round hair. So, here is a quick rundown of how you get your polygonal Fibermesh into Maya for use with V-Ray:

The nice thing about that script is that it lets you pick a threshold, so if you use a ton of hairs in ZBrush, you can set the conversion threshold to 0.5 so you only make half the curves. If you have too few curves even at 1.0, try using the linked workflow above to use the hair system approach to fill in spaces between the guide curves instead. You’ll want to use a much lower threshold for that though, since it is really slow to generate with a lot of curves. I had to do just that workflow in my example above. Here is the 1:1 fibermesh conversion:

It’s too sparse (and my hair is too thick).

and a 0.1 ratio curve conversion from the Fibermesh with a hair system applied and 28 hairs per clump assigned in the hairSystemShape1 settings:

the result:

Still needs work, but obviously it’s a lot closer already. Thanks to Roman Lapaev for the script link.

1 note | Permalink

Making a Shaped Water Ripple in ZBrush and Photoshop

So I’m working on this piece with a guy floating in the water and thought I’d share the workflow I used to make the simple water ripple around his body. Within ZBrush, have your water plane and object meeting and then take a screenshot from above with perspective off. Open the screenshot in Photoshop, crop it to square – since you’ll be making an alpha map for your brush – and then use outline as a selection. Offset the selection, stroke it and blur, and you now have an alpha map for ZBrush:

My water cube is too small but it’s just for a still, so I can clone out that wonky bit at the top. Also, water has an index of refraction of 1.333 but I used 1.6 to increase the refractive effect since I’m not going for realism. As you can see in the video, I like to use Smart Objects for my Photoshop layers since the blur filter can always be changed later if I want less or more of the filter and I can scale the stroked layers non-destructively.

0 notes | Permalink

V-Ray Tuner 3.4.2 – Another Small Update

Just did a few fixes and small additions to V-Ray Tuner. Changelog lady:

Tumblr is all bunged up so read the changelog on the Creative Crash page.

0 notes | Permalink

Using V-Ray Material Hair Materials with Shave and a Haircut

There is a dearth of workflow information around about using V-Ray with Shave and a Haircut (or Yeti), so I had to contact Vlado at Chaos Group about how to use the V-Ray Material Hair 3 material with Shave and a Haircut. In typical Chaos Group amazing support fashion, I got an answer when he woke up the next day. To apply a V-Ray material, you need to apply it to the “shavedisplay” node – select it in the Outliner…:

and then, in a viewport, right click and select Assign New Material and pick V-Ray Material Hair 3. Then you can change the hair colour settings but it won’t render in place of the default Shave material until you disable “Override Geom Shader” in the material section of the shape node for the selected fur:

Then you’re good to go:

I’ll be updating V-Ray Tuner’s linearize colour script to work with V-Ray Material Hair shortly. Keep you posted.

0 notes | Permalink