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:

Using Artisan Painting to Live-Blend Materials in Maya

After using procedural texture workflows for a while, you get used to having access to individual components of a shader and, if you’ve ever used something like UDK where vertex weights can be used for rapidly mixing shader components, going back to a big, static, memory-hog texture for something like terrain is just not appealing. So if you’re looking for way to get the blending benefits of a paint workflow with the control of multiple layers with individual UVs, there is a simple way to do it. Create a Blend Colors utility and plug your two textures into the two slots of the Blend Colors and plug that into a Maya Phong, Lambert or Blinn material (the V-Ray or mental ray shaders come later) so you can see a good preview of the material. Then duplicate your object and assign a new dummy material that will be your paint surface. Once you assign a 3D Paint Tool texture, you can use that resulting file as the input for your blend (you only need to plug in the red, green or blue channel of the texture to the blend slot since it needs a luminance value, not an RGB texture):

The benefit of this slightly odd workflow is that you can get a realtime preview of the blending and change UV parameters for each material. If you lock the layer that the paint object is on and don’t offset the duplicate, it makes it more intuitive without eyeballing two different objects. Here’s an example of that with a slightly more complex shader network, showing that you can blend the bumps (or anything else) with that Paint Tool file:

At that stage, it’s a bit overkill for previewing though. Once you have a good idea of the blend, just plug the textures into V-Ray materials and then plug those into a V-Ray Blend Material, using the 3D Paint Tool texture as the blend amount. Make sure you have Save Texture On Stroke set for this since V-Ray relies on the disk file, not just what’s in memory. If you were really adventurous, you could paint only on the R, G, and B channels and use those separately as inputs for different blends or Fresnel amount, etc, much like a vertex painting operation in UDK (I made a sample file with this setup if you want it). If you want to keep your preview material on your object but render the V-Ray Blend material, that’s easily done. Just link up your two materials:

And have Maya toggle the V-Ray shader at render time using this method. That way, you get the best of both worlds: flexible materials, good visualization, and a proper V-Ray mat for renders.

If you would rather not worry about UVs and things like that, you can always use a Ptex texture painted in Mudbox or 3D-Coat and plug it into the blend slot of a V-Ray Blend Material. But that doesn’t give you a real-time preview like the method above does (at least not yet in Maya 2012 - hopefully we’ll see this in the future). This is really just a technique for preserving UV materials as layers and quickly visualizing things all in Maya.

15 notes | Permalink