Jump to content

Creating an animation rig in Blender: Difference between revisions

(Added the "Overview of the rig" header)
Line 61: Line 61:
At the same time, the rig would have to be capable of the opposite thing - snapping itself to the animated character. That's because most often the way we start out with making a new animation is copying the first or last frame of the preceeding animation. This functionality has been implemented, and is called Pose Matching. The way it works is simple - it uses bone constraints in rig controller bones targeting the character model in order to snap the rig to the model.
At the same time, the rig would have to be capable of the opposite thing - snapping itself to the animated character. That's because most often the way we start out with making a new animation is copying the first or last frame of the preceeding animation. This functionality has been implemented, and is called Pose Matching. The way it works is simple - it uses bone constraints in rig controller bones targeting the character model in order to snap the rig to the model.


The rig contains three Konokos by default: One T-Posed Konoko and two animated ones, all stored in their own collections. The T-Posed Konoko is there because it was easiest to build the rig off a T-Pose, while the remaining two ones, stored in Pose 1 and Pose 2 collections, is where you are supposed to store your animated characters, to which you can Pose Match.
The rig uploaded on Oni Mod Depot contains three Konokos by default: One T-Posed Konoko and two animated ones, all stored in their own collections. The T-Posed Konoko is there because it was easiest to build the rig off a T-Pose, while the remaining two ones, stored in Pose 1 and Pose 2 collections, is where you are supposed to store your animated characters, to which you can Pose Match.
 
Because Oni does not store its animations in form of an armature, but rather as locations and rotations of 19 objects organized in a parent-child relationship, this forces us to use the earlier mentioned object and bone constraints. This is also creates a big problem: in order to animate, rotation and location data from the 19 character body parts have to be transformed onto the rig, and then the body parts have to be constrained to the rig. Once you are done animating and you want to export your animation, you have to do the reverse: transform the animation from the rig onto the 19 body parts, and then disable the constraints. This is quite inconvenient, because all of the constraints (and there's a lot of them) in both the body parts and rig have to be turned on and off.
 
The general workflow of making animations using this rig is the following, assuming you want to make a single animation (i.e. you don't want to make a throw animation):
 
# Open up a Blender scene containing the rig.
# Delete either the model in Pose1 or Pose2.
# (OPTIONAL) Assuming you want to animate a different character, delete the T-posed model.
## Import your desired character with textures using -noanim.
# Import the animation you are using as a starting point.
# Using the RigBoneConstraintTargetSetter script available [Blender#Rig_bone_constraint_target_setting_script HERE,] set the targets of the rig's bone constraints to be the body parts of the animation you've imported.
# Using the Pose Matching functionality, constrain the rig to the imported animation (Set the IK-FK sliders on rig limbs to 1, as Pose Matching works only through FK controllers)
# For each frame that you want to remain in your animation, while having all the bones selected (or the ones you want), press Ctrl+A, select Apply Visual Transform to Pose and keyframe it.
# Disable bone constraints on the rig using the BoneConstraintEnabler script available [Blender#Script_for_enabling.2Fdisabling_bone_constraints_in_the_selected_armature HERE.]
# '''Create your animation.'''
# Once your animation is ready, use the Visual Transformer script available [https://wiki.oni2.net/Blender#Visual_transformer_script HERE,] to bake the rig keyframes into the character model.
# Using the ObjectConstraintEnabler script available [Blender#Script_for_enabling.2Fdisabling_constraints_in_selected_objects HERE,] disable the object constraints on the character model. '''The character model should now be animated and have the needed rotations and locations.
# Export the animation as a DAE.


==Importing animations and preparing the Blender scene==
==Importing animations and preparing the Blender scene==
191

edits