Modeling a Palm Tree

Start by creating a Nurbs Circle at the origin; don't worry about the size just yet. We will be adjusting the size later.

Select the circle you just made and using Control+D duplicate the circle 5 times in the Y direction. Adjust the Scale of each circle how you see fit, I decided to try some different shapes for my tree trunk.

Start at the bottom circle and Shift select the circles to the top.

Loft a surface between the circles.

Click image for larger version.

Adjust the circles you created and the surface will be adjusted. Play with the scale and Y translation of the circles until you get a shape you like for the tree trunk. I ended up with the one below.

Now that I have the shape I want for the trunk; I will convert the Nurbs into Polygons. Make sure to check the options box to adjust the result you will get.

I found the options below to be the best output for what I wanted.

Now the trunk is polygon we are going to cap the top. Activate the Select Border Edge Tool.

Select the top edges of the trunk.

Extrude the edges in the Y direction.

I like to scale them in towards each other just to make selecting the vertices easier.

Select the Vertices of the edge you just extruded

Merge them together.

Now move the final vertex down in the Y direction to make a flat cap for the tree trunk.

Now we are going to Unwrap the UVs so later on we can apply a texture to the tree. Select the trunk in Object Mode and apply Cylindrical Mapping.

Now Select the top faces of your trunk and from the Top Viewport apply Planar Mapping.

After laying the UVs out in the Texture Editor I end up with the result below. You will understand later why I decided to layout the UVs this way.

At this time I decided to put the Tree Trunk onto its own layer so that when I am creating the leaves I don't have to worry about messing up the work I have already done. Make sure you can see your layers and create a new layer, make it a reference layer and then Right Click to Add Selected Objects in order to add your Trunk.

Now we are going to create the Stem for the leaf, I decided to go with a Cone because I wanted depth to the stem, not just a plane, but I didn't want too much geometry so that animating later won't be a burden. Click on the options box next to Cone.

Use the options below.

You should end up with a result similar to the one below.

In the top view port create a Polygon Plane and position it near your Stem.

Add a few subdivisions to the height.

Switch to vertex selection and scale the vertices to get a leaf shape.

Switch back to Object Mode and Activate your Move Tool. Hit the Insert key, hold down V to snap to vertex, and move the pivot point for the leaf to the top vertex.

Move your leaf and position it so that it looks like it is attached to the stem.

Duplicate the leaf using Shift+D and move it to the right. Do not De-Select the leaf you just duplicated when finished.

Now hit Shift+D repeatedly to get a result similar to the one below.

Now individually select the duplicated leaves and adjust the scale in the Z direction of them to get a good leaf shape. At the tip of the leaf rotate the tip 90 degrees and then rotate the leaves close to the tip slightly to even the transition out. While you are adjusting the scale of each leaf, take a look at the position in relation to the Stem, you may have to adjust the Y and Z position slightly to make a better fit.

Select all of the leaves except for the tip.

Group them together.

Select the option box next to Duplicate.

Use the setting below, this will duplicate and mirror the leaves in the Z direction.

Now select all of the leaves and the Stem and group them together.

Before going any further, from the top viewport, apply Planar Mapping. Adjust the UV layout to get a result like the one below. Now you see why I decided to layout the trunk like I did. I like to use one UV layout per model, even though they may be in separate parts.

Now we are going to apply 2 bend deformers to get a good shape to our leaf.

For your First bend handle, use the following settings. Rotate Z 90 degrees, Rotate X 90 degrees and put Curvature to -2.58. The second band handle: Rotate the Z 90 degrees and set Curvature to -.93 now adjust the Y translation of the handle up until the base of the handle is even with the stem. You should end up the result below.

Delete the history to commit the bend deformations.

Select all of the meshes that make up your leaf and Combine them.

Move the new leaf mesh into position similar to this in relation to the tree trunk.

Activate the Move Tool, hit the Insert key and Hold down V. Snap the pivot point for the leaf into the Center point of the cap for the tree trunk.

Duplicate the leaf using Shift+D and rotate the leaf about a third of the way around the trunk. Hit Shift+D again.

Keep duplicating the leaf and rotating it until you get a nice shape for your palm tree. The result should be pretty nice and of low enough polygon count that animating the tree won't be horrible for Maya.

The next section will cover how to set up the tree using Joints and IK to make it dynamic.

You may notice that I have added a couple of coconuts. They are just spheres so I don't feel the need to explain what I did. Select all of your meshes.

Add all of your objects to your mesh layer and set it to Reference.

Open up your Hypershade.

Select lambert1 and hit Control+A to open the attribute editor.

Lower the transparency of the shader about 60%.

Switch to the Front Viewport and Activate your Joint Tool.

Hold down the X key to snap your first joint to the origin of the Grid.

Keep holding X and snap the rest of your joints up the trunk of the tree.

Select the Custom setting under the Joint Size Menu.

Lower the Joint Size to your liking.

Open up the Outliner.

Click image for larger version

Rename the joints you just created and name them something easy to remember. I can't stress this enough, using a good intuitive naming convention will save you lots of headache when you start dealing with larger scenes.

Switch to the Top Viewport and draw another joint chain this time following the stem of one of the leaves.

Switch back to the perspective and notice that it's not in place. Select the joints and move them vertically into place.

Make sure that the pivot point for the joint is inside of the stem for the leaf.

Click image for larger version

Now work your way down the chain and move those joints into place like the first until you get a nice arc and joint chain.

Here is one method for creating the remaining joint chains. Switch to the top viewport and select your chain.
Click image for larger version

Duplicate the chain the move the pivot point into another leaf stem.

Rotate the chain until you get a good match to the orientation of the stem.

Rotate the chain again vertically to match the stem. I prefer to create each chain individually the same way I created the first chain. It adds a little bit of random placement and rotation, so when animation they will not look like clones. This is a minor detail though.

Select the main joint of your stem chain and shift select the top joint of the tree trunk.
Click image for larger version

Hit 'p' to parent the new stem joint chain to the top of the tree trunk.

Repeat this step for every joint chain you have created and placed.

When you select the tree trunk you should see the branched being selected also.

Be patient and repeat these steps to create a nice joint structure for your palm tree. I usually choose to use more joints than really needed in order to make the motion later on smoother.

Open up the options for the IK Spline Handle Tool.

Make sure that you have Auto Parent and Auto Simplify turned off.
Click image for larger version

Select the Trunk_Root and then attach the handle to the top of the tree trunk, for me it was Trunk_6.

Continue to use the IK Spline Handle Tool to create Spline handles on each of the branches. Start on the joint closest to the top of the tree trunk and then put the handle right on the tip of the branch.

At then end you should end up with each branch having its own IK Spline Handle, and it should look like a strange spider.
Click image for larger version

The next section will cover the dynamics of the palm tree..

Follow Part 3 Dynamics very soon

Switch to the panel layout where you have your perspective and outline active.

We are going to do some house keeping and shelf setup to make out tasks coming up much easier. Click on the options for Create Soft Body.

We want to Duplicate and Make the original soft. Make sure that the non-soft object is a goal and make the weight 1.0. Now close that window.

Now click on the options for Create Springs.

Set the Method to Min Max. Min Distance .001 Max Distance 23 (Max Distance depends on how large your model is, but I measured mine and it's 23 units tall) Check the box next to Per-Spring Damping. Change the Stiffness to 104.

Create a new shelf and name it Dynamic_Setup. Hold Control+Shift and go back and select Create Soft Body. Hold Control+Shift and go select Create Springs. We also want to add the Component Editor. Hold Control+Shift and select the Component Editor.

Also hold Control+Shift and select the Dynamic Relationships Editor.

You should now have a shelf that looks something like this one. We have a lot of repeated tasks coming so this will speed up the work flow greatly.

Select Curve1 from the out liner and Click on your Create Soft Bodies button from the shelf. Now click the + next to Curve1 and select the Curve1particle. To be able to select them easily, activate component mode and click on points. Like below. Now you can click and drag and select all of the particle points.

With all of the curve1particles selected click on the component editor button, navigate to the particles tab and change the settings for goalPP making pt[0] = 1 and gradually change the value going down until the last particle is pt[8]=.8

After you change the goalPP, select Curve1 and click on your Create Springs button. Now create a Uniform field. Change the settings of the field to Magnitude 4.

Select Curve1 again and click on your Dynamic Relationships Editor button. Under fields click on uniformField1 so that is is highlighted yellow. You now have a dynamic joint chain that is affected by field.

Select Curve2 and repeat the process of Creating a Soft Body, Adjusting the particles goalPP. Creating a Spring for the Curve and then Connecting the Curve to the uniform field.
Click image for larger version

However we want the leaves to be affected by the wind more than the trunk so adjust the goalPP starting at 1.0 and ending at .1 for the last particle.

After you have made each curve dynamic and connected it to the uniform field, unhide everything in your scene.

Parent the Copy of Curves to their correct joint. I do this by selecting the copy curve and Control clicking in the out liner until I see that I have selected the correct joint. Then I just hit P. The copy curves are now going to move where and tree moves and the springs are tied to them.

Do not parent the curve for the tree trunk to the joint; you want it to stand alone. You should now have a scene that when you hit play, the joints will sway and the leaves will flap as if in a slight wind. Now we need to skin the tree to the joints. Return to your initial pose.

Skinning the Palm Tree

Select all of your polygon objects and shift select the Trunk_Root joint. Now click on the option box for Smooth Bind.

Change the options to match below. This is not the only way to do this, but it has given me good results and it is easy to edit the results.

Now select your tree trunk mesh and activate the Paint Skin Weights Tool. We are going to edit the influence on the each polygon object.

You will notice that for the tree trunk is being influenced by several leaf joints. This doesn't make sense; the tree trunk is what moves the leaves on a tree, not the other way around. So, select each of the Leaf joints in the Influence window set your Paint Operation to Replace and make the Min value -1 and then set the Value to -1. For each Leaf joint just click Flood. This will remove any influence of those joints for the mesh you have selected.

When you are finished, you should be able to select each of the Tree_Trunk joints in the Influence window and see a nice overlap of how the tree trunk will deform.

Let your simulation play out for a decent amount of frames, if you look around your leaves you will see some unnatural stretching

Select that leaf mesh and activate your Paint Skin Weights Tool once again. Remove influence from any joints that are not apart of the chain you want to influence the leaf. Now find the joint that is the area you want to be influenced.

Set the Paint Operation to Replace and set the value to 1. Using the brush (you can resize the brush by holding B and dragging with the Middle Mouse Button) paint a few strokes to make the leaves be influenced by only joint. This will solve that stretching.

You now have a tree that is rigged, set up to react to wind, and weighted to move fairly naturally. Now add lots of key frames, 2000 or so, and select your uniform field. Play your animation (make sure you have play every frame set) and start playing with the magnitude, you can have a gentle breeze wave your tree, or you can have it go nuts in a hurricane! I usually like to write an expression to have the magnitude be influenced by a sin wave. In the magnitude box click and put = (sin(.9*time)*12); now sit back and watch.

Fetching comments...

Post a comment