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:

Some Tips on Efficiently Building and Texturing Terrains in Maya

So, I’m relatively new to the world of organic world building. I’m mostly experienced in illustration in the product-visualization vein but I’m getting into more fully-fleshed scenery and I’ve been investigating some options like Vue, Terragen, etc. But, I like to keep things in Maya if possible, so I’m going to post some helpful tips and things I’ve learned from other tutorials, along with my own texturing workflow.

I’m using the awesome iDisplace with a crater texture to build a basic height terrain to shape out some hills with a naturally-looking fractal mapping. The nice thing about doing it procedurally with iDisplace is that you can use textures and blend them or add them with texture utilities and you can increase your plane mesh resolution any time and it will propagate through the node chain nondestructively. The next thing I do is map a ramp along the vertical with a projection node:

Once you get the basics of that approach down, it’s time to think a little out of the box and use the individual ramp channels as a mask for your actual textures. If you make a ramp from pure red to pure blue and then look at the individual channels in greyscale, you can see how this can be exploited as two-channel mask. Using the Node Editor (or Connection Editor in older Maya versions), you can then connect these individual colour channels to the blend input of a V-Ray Blend Material or any similar blend material for mental ray or the Maya layered shader. That way, you use your mesh UVs for the textures and the projection node and ramps for the blending. If your terrain shape changes, your water line doesn’t move unrealistically – just hit fit to bounding box again and you’re good. So, here I am using the projection ramp as a mask for a V-Ray Blend Material to interactively mask the water line:

This is a really basic shader but you can see how this type of thing is pretty flexible and can be built on nicely. Put the 100% green point back into the ramp and you have another blend channel for more flexibility. If you don’t quite follow the video, grab the scene here and tinker around with it to see how it works (requires iDisplace and V-Ray for Maya).

You can see in the video that viewport 1 and 2 don’t yet support the texture-mapped blend but support for that should come as viewport 2 support becomes more robust. Autodesk is trying very hard to get viewport 2 up to task but you can imagine that this stuff takes a bit of time.

Tangentially related, tonight someone on CGSociety asked how to derive a height map from a terrain mesh, and the answer is straightforward, knowing what we know about the projection node and ramp texture. Assign a surface shader (that receives no specular, light, or shadow) and map a greyscale ramp along the side of your mesh. Then render it from above and you have a height map:

I can’t take credit for that cool workflow – it’s something I learned a while ago from some other CG forum.

2 notes | Permalink

  1. polygonspixelsandpaint posted this