3D Brush Strokes & Character Animation - Maya

Embed Size (px)

Citation preview

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    1/29

    In t roduc t ion to 3D b rush s tok es , organ ic shapes andi n t e r ac t i v e c h a r a c t e r a n i m a t i o nSciviz 2006 - Jean-Marc Gauthier - All rights reserved

    Animated creatures with moving arms, blades of grass, trees moving in the windcan be fully interactive. They can be animated in real time using sensors andinput devices. This tutorial shows how to create a real time kinematics system forinteractive character animation using Maya and Virtools.The roadmapPar t 1 shows how to m ode l and r ig a cha rac t e r in Maya .Par t 2 shows how to add in te rac t iv i t y in Vi r too l s

    1-1, 2,3 Modeling a tree structure using curves, from extrusion to smoothing inMaya

    Left illustration -1-4, 5 Rigging and animating the tree structure in MayaRight Illustration 2.1 The tree becomes interactive in Virtools with a real timeanimation controlled by only two points connected to input devices..

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    2/29

    Top view of the interactive tree in Virtools.

    Par t 1- model i ng a f lex ible t ube a long a Curve1 .1 Mode l ing tubes w i th c urves and Pa in t Effec t sLets draw the curve. By default the curve snaps on the grid. ( Go to Display >

    Grid). Go to Create > Create a CV curve, select 3 cubic, uniform. Press Enter.To smooth the curve, go to Edit Curve > Rebuilding CurveTo edit the curve, go to Edit Curves > Curve Editing Tool

    Lets modify the curve by projecting on the shape ofa 3D object, for example asphere. Please not that the 3D object needs to be a Nurbs object. Select thecurve, SHIFT select the sphere, go to Edit Nurbs > Project Curve on Surface, seeoptions in following illustration.

    Please note that Active View projects the curve along the ray of the perspectivecamera if you are in the perspective view or along the ray of the default camerain the active window of your choice, for example top camera in top view.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    3/29

    After projection, the new curve is part of the surface of the sphere. You need toduplicate the new curve in order to use it independently.Go to Edit Curves > Duplicate Surface Curves.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    4/29

    Lets apply a paint effect to the curve. Select the curve. Go to Windows >General Editors > Visor, select Oils > LMB on OilTexBlue. Go to Rendering >Paint effects > Curve Utilities > Attach Brush to Curve. The curve changes color.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    5/29

    Make sure that the curve is selected. In the attribute Editor, check OilTexBlue>Global Scale to adjust the size of the brush applied to the curve. Render thecurve.

    Go to Modify > Convert > Paint Effects to Polygons, render the curve andcompare with the previous rendering. SAVE YOUR WORK.

    1 .2 Mode l ing a t r ee s t ruc tu re w i th c urves and ex t rus ionLets model a tube along a curve by using the extrusion tool. Please note that thismethod allows you to create tubes of various profiles and branching structures.Lets draw the curve. By default the curve snaps on the grid. ( Go to Display >Grid). Go to Create > Create a CV curve, select 3 cubic, uniform. Press Enter.Go to Create > Polygons Primitives > Plane, set subdivisions = 1. Place theplane facing the starting point of the curve. The first point created when drawingthe curve.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    6/29

    Select the Plane, SHIFT select the curve. Go to Edit Polygons > Extrude face,

    Tapper and Twist to refine your volume. Check Other Values > choose a divisionnumber between 10 and 20

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    7/29

    Select the object mode, LMB on the tube, the tube looks green,Adjust the taper curve in order to reserve sections of growth along the plant.

    Lets create a secondary branch.

    Go to Selection by Components > Faces Make sure that only one face isselected. Hold the shift key and click selected face in order to deselect them.

    Lets extrude the selected face. Go to Edit Polygons > Extrude Face, make surethat Other Values > Division Number is set to 1. SAVE YOUR WORK.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    8/29

    Please note that the extrude tool combines move tool and scale tool. Step 1,

    LMB+drag the arrows. Step 2, LMB + drag the cubes.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    9/29

    Lets draw a second curve with the CV Curve Tool.To create a branch from the main tree, we are going to extrude one face of thetree along the second curve.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    10/29

    Step 1, in the Object Component > Face mode, select the face of the tree to beextruded. Make sure that you select only one face.Step 2, SHIFT + select the curve. Right click on the curve and select objectmode in the selection wheels that pops up on the screen.Step 3, go to Edit Polygons > Extrude Face. The branch appears along the

    curve. See following illustration.Select the object mode, LMB on the tube, the tube looks green, go to AttributesEditor > Polyextrude2 (or 3) change the number of divisions.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    11/29

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    12/29

    You can change the number of polygons, Check Other Values > type a higherdivision number.SAVE YOUR WORK.

    To smooth the curve, go to Edit Curve > Rebuilding CurveTo edit the curve, go to Edit Curves > Curve Editing ToolYou can change the number of polygons again , Check Other Values > choose ahigher division number for example 60.

    You can also delete the branch. If you are left with a hole, you can fill the hole byrecreating the missing polygon(s) on the tree. Go to Polygon > Append PolygonTool, LMB on the edge of the hole, purple arrows are visible, LMB the edgesfollowing the arrows. A pink poly is recreated in place of the hole.

    After creating your design, enjoy a smooth organic look for your tube. Select theobject mode, LMB on the tube, the tube looks green, go to Polygons > Smooth.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    13/29

    Top view, single tube. Bottom view tube with branching, check the cleanintersection

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    14/29

    Now we are ready to rig the tree for animation. Lets make the tube see throughso we can create joint in the middle of the tube.

    Go to Shading > Smooth Shade > Shade Options > XRay

    SAVE YOUR WORK.1.3 Rigging and animat ing - for tubes and t ree s t ruc tur es

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    15/29

    Please note that you can use the following rigging regardless of the way youcreate the geometry. For example using Paint Effects convertd to polygonsinstead of extrusion.

    Change your windows layout. Go to Panels > Layouts > Two Panels Side bySide, Choose Top view and Side view.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    16/29

    After creating the joints for the main tree, lets create branching joints for thebranches. Step 1, select the nearest joint on the main tree for example joint 6 isselected in Outliner

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    17/29

    Go to animation > Skeleton > Joint Tool, insert a point in the middle of the branch> a joint is created between the main chain and the branch.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    18/29

    Continue to create joints for the branch joints 16 to 26. The following illustrationshows the relationships between the tree structure in top view, in Outliner and inHypergraph ( Windows > Hypergraph}..

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    19/29

    SAVE YOUR WORK.Lets bind the tube the skin- and the joints the skeleton.Go to Outliner, select joint #1, SHIFT + select the tube. Go to Skin > Bind >Smooth Bind.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    20/29

    SAVE YOUR WORK. Test the rig by selecting a joint and applying the rotate toolor scale DO NOT APPLY TH E MOVE TOOL

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    21/29

    1 .4 Inverse Kinemat ic s

    Lets apply an Inverse Kinematics chain to the tree structure from joint 1 origin ofthe tree, to joint 17 at the end of the tree. Go to Skeleton > IK Handle Tool, selectLMB joint 1, select LMB joint 17. The Inverse Kinematics connection shows up ingreen between the two joints. Select the move tool and test the IK chain bymoving joint 17. All the in-between joints move together and follow the motion of

    joint 17.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    22/29

    Lets add a second Inverse Kinematics chain for the branch starting at joint 19ending at joint 30. Test joint 30 with the move tool. See the following illustration.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    23/29

    Lets look at the updated Hypergraph with IK chains

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    24/29

    At this point you can create an animation of the tree in Maya, with or without IKSAVE YOUR WORK. This is half of the fun in comparison to a fully interactivetree that can react to wind simulations recreated with sensors and input devices.

    1 .5 Le t s expor t the t r ee to Vi r too l s .

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    25/29

    IMPORTANT: save the t ree in t he data resourc e > Charact ersfo lde r in o rde r to keep the jo in t s ac t ive in Vi r too l s

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    26/29

    Par t 2 In ter act ive animat ion in Vir tools2 .1 The t r ee becomes in te rac t ive

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    27/29

    Go to your data resource folder on the right side of the interface > Characters >tree, drag the tree inside 3D layout. Add lights if needed.Go to Level Manger > Characters > tree > Body Parts > joints, check that youhave all the elements of the tree created in Maya.Since we are going to move the IK handles in order to animate the mesh of the

    tree we want to be sure that all of these elements have Initial Conditions.Step 1- Go to Level Manager > Levels > Meshes > select Plane-mesh or tree-mesh and set Initial Conditions.Step 2- Go to Level Manager > Levels > 3D frames > select IK handle 1 and IKhandle 2, and set Initial Conditions.

    We need to reconnect the Inverse Kinematics chain in Virtools using the IKbuilding block.

    Go to Building Blocks > Characters > IK > IK Position, You can drag and drop the

    BB on the tree in 3D Layout. The dialogue window for the BB will open on top ofthe tree.

    Another way - see illustration below - is to LMB and drag the BB in LevelManager > Levels > Characters > tree. A tree script is added under the name ofthe tree. LMB on the tree script to open the BB in Schematic.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    28/29

    You need to edit the IK Position BB with the information that you created inMaya.Zone red in the illustration below.Starting joint number to start the chain. Ending joint number to end the chain,name of IKHandle or goal.

    Zone yellow in the illustration below.Repeat the same steps for each branch.

    Now it is time to test the IK Handles press play select the move tool and gentlymove the IK Handles, the whole tree animates by moving only two control points.

  • 7/31/2019 3D Brush Strokes & Character Animation - Maya

    29/29

    The t r ee in mot ion .