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