Video – Animation with Expression

Welcome to 3d modeling lesson in 3d modeling and animation software Maya. This 3d modeling and animation lesson is for 3d animation learners and beginner of the 3d modeling and animation software Autodesk Maya.
In this 3d modeling and animation lesson you will learn how make animation of the car using Maya Mel in Expression Editor, Maya Mel is coded language for 3d modeling and animation in 3d software Maya. Expression Editor is extension of Maya Mel is for making Mel commanding system more user friendly and flexible. Here in this lesson we shall write single expression for rotating our four car wheels when the car is moving during 3d animation. This 3d animation lesson is one of the most important animation lessons for the 3d game designing, 3d animated film making or any type of 3d animation related to cars using 3d modeling and animation software Autodesk Maya.

    Steps:

  1. Just import a car 3d model from internet to 3d software Maya but it should be real 3d model with sub-object level mean its tires should be separate from its body and etc.
  2. Then select all the four wheels, and then got to Edit menu and invert selection and then go to display menu and hide selection.
  3. Open the Outliner from Window in main menu.
  4. Click on the rotate tool and then check the rotation axis of the car here it is rotating around x-axis.
  5. Then go to create menu and click on ‘Locator’ now move this locator to centre at axel place of first wheel, then selecting the locator go to edit menu and click on centre pivot, to centre the pivot point of locator at right place. Now create locators for other three wheels in the same way and then finally a fifth locator as parent of all. Place it at origin and then select the four locators of the wheels first from Outliner and then select the fifth locator and then go to Edit menu and click parent option. Now the fifth locator is parent of all locator motion of this locator makes others to move as well.
  6. Rename it as ‘carMove’
  7. You notice that car moves forward backward at z-axis and wheels rotate around x-axis.
  8. Now open the Expression Editor from Window > Animation editor > Expression Editor.
  9. Now select the first wheel from outliner and then select the appropriate axis of wheel rotation that is rotate-x select it from attributes there an expression will appear in ‘Selected Object and Attribute’ option, you copy it and paste in Expression box, then remember the axis of car motion that was translate-z when locator named carMove is moved forward, so now you have to give Mel command so that when your locator carMove move forward your wheels should rotate on x-axis as in real world,
  10. So simply write this for wheel one,

    =(carMove.translateZ/(2*3.14*1))*360;
    You have to copy paste expression for attribute of each rotate-x of four wheels before the sign of equality.Then go to display menu again and show selected.

  11. Then make animation by setting keys.
  12. For details watch this free 3d modeling video now.