Designing and Animating a Birch Tree in Maya using Paint Effects
Trees, plants and other forms of vegetation can go a long way in adding additional detail and a level of believability to any scene. And what was once considered to be an extremely difficult, time consuming task, has been made considerably easier with advances in modeling tools such as Maya's Paint Effects.
Gone are the days of pushing and pulling verts in an attempt to create something believable, realistic trees can now be created extremely fast and efficiently directly inside Maya and they've never been easier to animate. In this lesson you'll learn how to do just that, as author Chandan Kumar walks you through the entire process of designing, texturing, shading, animating and rendering your very own birch tree inside of Maya.
Additional Files/ Plugins:
In this tutorial, we will be creating a tree in Maya using Paint Effects. So let’s start and create a poly Plane in the viewport.
Now click on Window>General Editors and then click on Visor.
This opens the Visor window. Click on the Paint Effects tab and then click on the Tree folder. Select the birchBlowingLight icon, and then drag the birchBlowingLight icon onto the plane to create the tree.
Now press Ctrl+A to open the Attribute Editor. Then click on strokeShapeBirchBlowingLight1, open the Mesh Output folder and then check on the Output Quads option.
Next click on birchBlowingLight1 tab, and then choose Mesh as the Brush Type.
And then set the Global Scale value to 10.
Now with the tree selected, click on Modify>Convert and then click on the Paint Effects to Polygons options box.
It opens the Convert Paint Effects to Polygons Options box. Here check on Quad Output and keep the Poly limit value at 0, then click on the Convert button.
In the Tree Attribute Editor, first expend the Tubes and Growth parameter stacks and then check off the Twigs and Leaves check boxes. Now the twigs and leaves become hidden on the tree branches.
Now expand the Creation parameter stack and play with the settings. You will see the default values, but you can change some of the parameters according to your wishes.
Expand the Width Scale parameter stack also, and you can play with the parameters here too (or can go with the default values for all parameters.)
Next, inside the Branches parameter stack, keep either the default values or modify them according to your wishes. Also turn off the Middle Branch option check box.
Now turn on the Twigs option inside the Growth parameter stack which we turned off previously. Also expand the Twigs folder and either enter the same values as shown below, or play with the parameters until you get your desired look.
Now open the Forces parameter stack and change the Random value to 0.175 and the Gravity to 0.115. Also set the Turbulence values for animation purposes.
Now check on the Leaves option inside the Growth stack (which we had turned off previously.) Also expand the Leaves parameter stack, and play with the values until you get your desired result.
After setting the tree attributes as per your tree design and leaf style, we will create a custom shader for the Mental ray render. So, click on the Render Settings button to open its window and change the renderer engine from Maya Software to Mental Ray.
Now click on the Indirect Lighting tab and then click on the Physical Sun and Sky ‘Create’ button, to create a Physical Sun and Sky in the scene.
Now open the Final Gathering stack and set the Point Density value to 0.250 and the Point Interpolation value to 20, for fast rendering. After that, close the Render Settings window.
Now we will create the shader for the tree trunk and leaves. So click on Window>Rendering Editors and then click on the Hypershade command to open the Hypershade window.
In the Hypershade window, create two similar materials using mia_material_X and rename them as TrunksMat and LeavesMat. We’ll use one for the trunks and the other for the leaves.
Select the leaf mesh by clicking on the leaves in the viewport. And then Right-click on the LeavesMat, and choose Assign Material To Selection.
Do the same for the trunks and apply the TrunksMat to them.
Now click on TrunksMat in the Hypershade window to open the Material Attribute Editor. In the Attribute editor, slide down the Color slider to make it darker. Do the same for the LeavesMat also.
Now let’s render the scene to see how it looks like. So, press the Render the Current frame button in the main status tool bar.
Now you can see the first draft of the rendered result. The trunks are not looking smooth.
To make the tree trunks smooth, first press the F11 key to jump into Face mode and then select all the trunk faces together.
With all the faces selected on the entire trunk mesh, click on the Mesh menu in the main menu bar and then click on the Smooth command.
Now let’s check the render once again. And this time you will see the trunk has become much smoother.
Now we will create the material shader network. So, first click on TrunksMat and then click on the Color checker icon to link the tree shader to a texture file.
This opens the Create Render Node window. Select 2D textures and then choose File node in the texture list.
After applying the file texture node, you can see it in the hypershade window. Again click on the Image Name folder icon to choose the trunk texture image.
Now locate the file path where you saved the bark_seamless.tif file on your computer. These textures have been provided with the tutorial. You can also use your own textures too.
Now with the file node selected, expend the Effects parameter stack and change the filter value to 0.100.
Now select the TrunkMat node and then in the Attribute editor, change the Roughness value to 0.150 in the Diffuse group. In the Reflection group, change the Reflectivity to 1.00, Glossiness to 0.200 and in BRDF group. Change the 0 Degree Reflection value to 0.100 and the 90 Degree Reflection value to 0.400.
Now with the Utilities group selected, choose the Gamma Correct node in the Hyper shade window.
With the Gamma Correct node selected, set theGamma Value to 0.454 for all three dimensions.
Now, to connect the file node to the Gamma Correct node, first middle mouse click on the File3 node and then drag it onto the Gamma Correct node. It will display a list, so select Value here.
Follow the same process again. With the Gamma Correct node selected, middle mouse click and drag and drop it onto the TrunksMat node. And then choose Diffuse from the list.
After connecting, Delete the old connection which is shown with the yellow wire. Just select the connected wire and press the Delete button.
Now we’ll add a Bump node. So, first select the TrunkMat node and then expand the Bump parameter stack and click on the Standared Bump checker icon.
Now click on File in the Create Render Node window.
With the Bump file node selected, add the Bump texture file as we did previously.
Also, select the Bump node and set the Bump Depth value to 0.500.
Now select the Placement 2d Texture node, click on it and drag and drop with the Middle mouse button onto File 4 and then choose Default from the list.
Now it should look like the image shown below.
Now, with the Place 2d Texture node selected, set the ‘V’ value to 4.000 in the Repeat UV option. This will repeat/tile the texture four times.
Next, we will create a node network for the Leaf material. So first select the LeavesMat shader node and then click on the Color checker icon. And select the File node in the Create Render Node window.
After applying the File node for the leaf material, select the File node and then load the Leaf.tif file for the leaves.
Again create a Gamma Correct node and with the File node selected, middle mouse drag and drop it onto the Gamma Correct node and connect it by choosing ‘Value’ from the list.
Now with the Gamma Correct node selected, drag and drop it onto the Leaves Mat and then choose ‘Diffuse’.
With the Gamma Correct node selected, enter Gamma Values of 0.454 in all three dimensions in the Attribute Editor.
Now, for the leaf transparency. Click on the Utilities group and then create both a Reverse and a Luminance node.
Now, connect the Reverse node to the Luminance node by choosing ‘Value’.
Now middle mouse click on the File node and drag and drop it onto the Reverse node, and then select ‘Other’ from the list to open the Connection Editor.
In the Connection Editor, select outTransparency from the "Outputs" list. And select input from the "Inputs" list.
Now middle mouse click on the Luminance node and drag and drop it onto the LeavesMat node. Then select ‘Other’ to open the Connection Editor.
In the Connection Editor, select outValue from the "Outputs" list, and select cutout_opacity from the "Inputs" list.
Now, we are done. Hit the Render button and see the result. If you need more leaves, you can always increase the density.
To increase the density of the leaves, first select the tree leaf mesh and then click on the ‘birchblowingLight1 tab’ in the Attribute Editor. Change the ‘Leaves in Cluster’ value to 5 and the ‘Num Leaf Clusters’ value to 30.00.
Here is the final render of the tree. Since we have already set it's parameters for animation, you just have to render it for the desired amount of frames to have an animated clip.