maya paintFX leaf UV layout script

david | mentalray,python,rendering,vray | Thursday, March 10th, 2011

Update 2012-07-28: The script has been updated with new features, which include a user interface replacing the command-line stuff. The leaf layout details explained here are still relevant and correct, except for the command to run the script. The new command can be found at the end of the new post.

There is a long, long thread on cgTalk called "Forests in maya mental ray".  The discussion is all about techniques for creating and rendering the vast numbers of polygons needed to make convincing grass and trees in large numbers.

Maya's paintFX can be used to make trees which can be converted to polygons with leaves that consist of just a few polys per leaf. Texture maps (color, opacity, bump etc) are then applied. The default output from the paintFX conversion has each leaf mapped to fill the standard uv quadrant, so each leaf gets a copy of the texture. This can look pretty good, but the repetition is usually very obvious. You could break the leaf mesh into a few parts and assign variations of the leaf textures to each part. But a more efficient way is to layout the uv's so that groups of leaves are mapped to different parts of the uv quadrant in a 4x4 tiled patternfor example. Then you can make a texture map with leaf variations arranged in the same 4x4 tile pattern. Now you can have 16 different looking leaves on the tree, almost as easily as you can have one.

Default paintFX conversion gives you this


But what you really want is something like this 4x4 tile pattern (or maybe 2x2 or 3x3)


The problem is that you might have 50,000 leaves on your tree. It would be very difficult to select and edit the uv's for different leaves by hand. This is something that needs to be automated (more...)

Powered by WordPress | Based on a theme by Roy Tanck