Creating an animation rig in Blender: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(Added Things to know before starting, Tools and relevant tutorials, Rotation order issue between Oni and Blender)
Line 2: Line 2:
This tutorial describes how to create the Animation rig for Blender (ARB) by Geyser, shown here, with some improvements.
This tutorial describes how to create the Animation rig for Blender (ARB) by Geyser, shown here, with some improvements.


The purpose of this rig is to give us much better tools to animate, compared to our [http://oni.bungie.org/forum/viewtopic.php?pid=23698#p23698 previous process in Softimage XSI,] which allowed us to animate exclusively with Forward Kinematics, which, while may work for simple, short animations done on characters with small amount of bones, it does not work well for Oni characters and animations, as it's too labour intensive and ineffective.
The purpose of this rig is to give us much better tools to animate, compared to our [http://oni.bungie.org/forum/viewtopic.php?pid=23698#p23698 previous process in Softimage XSI] by EdT, which allowed us to animate exclusively with Forward Kinematics, which, while may work for simple, short animations done on characters with small amount of bones, it does not work well for Oni characters and animations, as it's too labour intensive and ineffective.


==Prerequisite tutorials==
==Prerequisite tutorials==
Line 37: Line 37:
* [https://www.youtube.com/watch?v=aGBOu-dNZ-w Tracking Constraints - Blender 2.80 Fundamentals]
* [https://www.youtube.com/watch?v=aGBOu-dNZ-w Tracking Constraints - Blender 2.80 Fundamentals]
* [https://www.youtube.com/watch?v=5FK4jDCAOkk Camera Track To vs Damped Track Constraints | Pros & Cons Explained With Examples | Blender] by 5 minutes Blender
* [https://www.youtube.com/watch?v=5FK4jDCAOkk Camera Track To vs Damped Track Constraints | Pros & Cons Explained With Examples | Blender] by 5 minutes Blender
==Things to know before you starting==
There are several things worth knowing before you start creating the rig.
===Tools and relevant tutorials===
===Rotation order issue between Oni and Blender===
The previous XSI process allowed us to get to work pretty quickly: you could simply export any animation from Oni as a COLLADA file using OniSplit, then import it to XSI and it would work without (mostly) any quirks. That is not the case with Blender.
If you import any Oni animation into Blender as it is, the rotations will be all wrong.
That's because Oni's rotations are stored in XYZ Euler rotation order, while Blender's XYZ is actually ZYX, it's just called XYZ.
You can prove that by simply switching the rotation order of the body parts from XYZ to ZYX, as shown below - the image on the left shows KONCOMcomb_p imported to Blender without any adjustments, with the rotation order set as default Blender's XYZ, while image on the right shows the same animation after switching the rotation order to ZYX.
{| class="wikitable"
|-
! KONCOMcomb_p in Blender's XYZ !! KONCOMcomb_p in Blender's ZYX
|-
| [[Image:ARB KONCOMcomb p XYZ.png|500px|frameless]]
| [[Image:ARB KONCOMcomb p ZYX.png|500px|frameless]]
|}
Because of this, Geyser implemented the '''-blender''' argument in OniSplit, which solves this problem by converting Oni assets' rotation order from XYZ to Quaternions and then to ZYX, and vice versa when exporting assets from Blender to Oni. So that conversion flow looks as follows:
*From Oni to Blender:
XYZ → Quaternions → ZYX
*From Blender to Oni:
ZYX → Quaternions → XYZ
To summarize: '''Always use -blender argument when you're exporting assets from Oni to Blender,''' otherwise, expect the problem shown in the above screenshots.


[[Category:Modding tutorials]]
[[Category:Modding tutorials]]

Revision as of 11:10, 7 September 2021

Introduction

This tutorial describes how to create the Animation rig for Blender (ARB) by Geyser, shown here, with some improvements.

The purpose of this rig is to give us much better tools to animate, compared to our previous process in Softimage XSI by EdT, which allowed us to animate exclusively with Forward Kinematics, which, while may work for simple, short animations done on characters with small amount of bones, it does not work well for Oni characters and animations, as it's too labour intensive and ineffective.

Prerequisite tutorials

I highly recommend watching the tutorials below if you feel you're lacking knowledge in any of these subjects:


General Blender basics:


Blender Character Rigging overview showing that you can create a Rigify rig in less than a minute at 5:43, and also rig a character while at it:


Basics of using Rigify:


Rigify Bone Groups and Layers:


Changing Rigify Custom Shapes and Widgets:


Blender custom properties and drivers (Drivers are used to set influence of rig's bone constraints through Pose1 and Pose2 bones locations):

Tracking constraint tutorials

These explain constraints like Damped Track which are used by Rigify - you can skip this if you want, but it might explain a thing or two or come in handy in distant future, but other than that you don't need to know them to animate for Oni:

Things to know before you starting

There are several things worth knowing before you start creating the rig.

Tools and relevant tutorials

Rotation order issue between Oni and Blender

The previous XSI process allowed us to get to work pretty quickly: you could simply export any animation from Oni as a COLLADA file using OniSplit, then import it to XSI and it would work without (mostly) any quirks. That is not the case with Blender.

If you import any Oni animation into Blender as it is, the rotations will be all wrong.

That's because Oni's rotations are stored in XYZ Euler rotation order, while Blender's XYZ is actually ZYX, it's just called XYZ.

You can prove that by simply switching the rotation order of the body parts from XYZ to ZYX, as shown below - the image on the left shows KONCOMcomb_p imported to Blender without any adjustments, with the rotation order set as default Blender's XYZ, while image on the right shows the same animation after switching the rotation order to ZYX.

KONCOMcomb_p in Blender's XYZ KONCOMcomb_p in Blender's ZYX
ARB KONCOMcomb p XYZ.png ARB KONCOMcomb p ZYX.png

Because of this, Geyser implemented the -blender argument in OniSplit, which solves this problem by converting Oni assets' rotation order from XYZ to Quaternions and then to ZYX, and vice versa when exporting assets from Blender to Oni. So that conversion flow looks as follows:

  • From Oni to Blender:

XYZ → Quaternions → ZYX

  • From Blender to Oni:

ZYX → Quaternions → XYZ

To summarize: Always use -blender argument when you're exporting assets from Oni to Blender, otherwise, expect the problem shown in the above screenshots.