animation.rst 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. Animation
  2. =========
  3. Animation supported:
  4. - transform animation of all types of objects
  5. - transform animation of pose bones
  6. - shape key animation
  7. - light animation
  8. - camera animation
  9. Multiple Actions For Single Object
  10. ----------------------------------
  11. In most games, one object would have several animations to switch between.
  12. This add-on has support for exporting multiple actions all at once into
  13. a single AnimationPlayer and makes it easy to switch actions.
  14. This workflow makes use of blender nla_tracks. Here is a brief guide on how
  15. to use this feature:
  16. **1. Stash active action**
  17. New created action is always an active action bound to object. There are
  18. several ways to place an active action into NLA track,
  19. one is of course doing it in ``NLA Editor``
  20. .. image:: img/nla_editor.jpg
  21. .. image:: img/nla_pushdown.jpg
  22. Or it can be done stashing the action in ``Dope Sheet``
  23. .. image:: img/dope_sheet.jpg
  24. .. image:: img/stash_action.jpg
  25. **2. Check mute status of NLA tracks**
  26. An NLA track can be ``mute`` or ``unmute``, the exporter will export all
  27. the ``mute`` NLA track as a separate action, while blends all the ``unmute``
  28. NLA tracks into every action (including the action) being exported.
  29. .. image:: img/nla_strip.jpg
  30. **3. Export the scene**
  31. Make sure the ``Export Stashed Actions`` option has been turned on.
  32. .. image:: img/stash_action_option.jpg
  33. Then all the stashed actions, as well as the active action, are exported
  34. to an AnimationPlayer.
  35. .. image:: img/in_godot.jpg
  36. Constraints
  37. -----------
  38. Sometimes complicated animation is built with object constraint; a usual
  39. example is inverse kinematics. The add-on would automatically check if an
  40. object has some constraint; if it does, all the constraints are baked into
  41. actions and then exported along with the object.
  42. Animation Mode
  43. ---------------------------
  44. Godot and Blender have different structure to store animation data.
  45. In Godot animation data is stored in an AnimationPlayer node, instead
  46. of in each animated node. In order to fix this inconsistence and still
  47. make the animation play versatile, this add-on has three animation exporting
  48. modes.
  49. **Mode 'Animation as Actions'**
  50. Treat all the animations as object actions, so in the exported scene, every
  51. object would have its own AnimationPlayer and hold its actions.
  52. **Mode 'Scene Animation'**
  53. If you want your animation to generate the same result as playing at Blender's
  54. timeline, this is what you want. In this mode, all the animations in the scene
  55. are placed in just one AnimationPlayer in the scene root.
  56. **Mode 'Animation as Action with Squash'**
  57. This mode has very similar behavior of mode 'Animation as Action', but it
  58. can generate fewer AnimationPlayers; objects in parent-children relationship would
  59. share their AnimationPlayer. It is useful when you have several rigs, and each
  60. Skeleton and Mesh has actions; then one rig would have just one AnimationPlayer.