Especially for interactions with objects, it can be very useful to fine-tune the location and or rotation of inidividual body parts. To achieve this, we can add offsets to sections of the ControlRig using the UE sequencer. (In this case, UE 4.27 was used)
Especially for interactions with objects, it can be very useful to fine-tune the location and or rotation of inidividual body parts. To achieve this, we can add offsets to sections of the ControlRig using the UE sequencer. (In this case, UE 4.27 was used)
>**WARNING:** Editing animations in the sequence editor has proven to be very unstable, prone to crashing (at least in UE 4.27). Make sure to save *very* frequently and do not move around to much while the animation is playing.
## I. Prepare the Work Space
## I. Prepare the Work Space
1. Create a new Level Sequence ```Cinematics->Add Level Sequence```\
1. Create a new Level Sequence ```Cinematics->Add Level Sequence```\
@@ -16,6 +19,12 @@ Now your workspace should look something like this:
...
@@ -16,6 +19,12 @@ Now your workspace should look something like this:
2. Now add an additive Track (Click on the "+ Section" in the MetaHuman_ControlRig line and select "Additive"). This is where we can add offsets to edit the animation.\
2. Now add an additive Track (Click on the "+ Section" in the MetaHuman_ControlRig line and select "Additive"). This is where we can add offsets to edit the animation.\
Enable Auto-Keyframe to automatically set a keyframe whenever a value is changed (i.e. a change is automatically applied). When multiple keyframes are set, UE will interpolate between them (the exact setting can be changed with right-click on the keyframe). Make sure to always be at the correct position in the timeline to apply the changes at the right point in time. Also, as always, ensure you are working on the additive track.
#### Inverse Kinematics (IK)
Instead of moving each part of the limbs individually, IK allows you to e.g. place the hand at a certain position with the arm and shoulder following in a natural way. This setting can be enabled and disabled in the ctrl-track. By default it is disabled (at every frame) in the imported animation. To be able to set our own values, we need to first delete all keys in the animation, that set the variable. For this setting it is sensible to work on the original animation track (not the additive track). For most usecases it will suffice to set the IK at the first frame for the entire animation. But of course we can also use keyframes on the ctrl track to en-/disable IK for different sections of the timeline.
Your sequencer should now look like this. If you play the sequence, the animation will play in the editor window:\
Your sequencer should now look like this. If you play the sequence, the animation will play in the editor window:\
## III. Edit the Position/Rotation/Scale of a Body Part
## III. Edit the Position/Rotation/Scale of a Body Part
...
@@ -24,7 +33,10 @@ Your sequencer should now look like this. If you play the sequence, the animatio
...
@@ -24,7 +33,10 @@ Your sequencer should now look like this. If you play the sequence, the animatio
2. On the left of the screen, in the animation tab the Location, Rotation, Scale values are shown. You can either edit those values directly (more fine-grained control) or change the position within the preview window. Your edits will be applied on the additive track.
2. On the left of the screen, in the animation tab the Location, Rotation, Scale values are shown. You can either edit those values directly (more fine-grained control) or change the position within the preview window. Your edits will be applied on the additive track.
**Note:** The edits will be applied onward from the point in the timeline, where the cursor is positioned. If you want to apply the edits to the entire animation, place the cursor at the start and keep it there.
### Editing the original animation
While for most corrections the additive track should be used, the original animation can also be edited. For example
-**Deleting frames**: This can be especially helpful if there is a small number of frames with bad animation data, if there is a gap between the animation keyframes, UE will interpolate between them.
-**Duplicating frames**: We can extend the animation by duplicating frames, we can also use !(EDIT SELECTION) to add & multiply the timeline positions. E.g. multiplying by -1 reverses the order of the selected keyframes, i.e. reverses the animation; multiplying by 2 stretches the animation over double the time, effectively slowing it down to half speed (interpolating between the frames) !(CORRECT?!), etc.
## IV. Export the Edited Animation
## IV. Export the Edited Animation
1. Right-Click on the "Body"-Entry in the sequencer, select "Bake Animation Sequence" choose a location and save with default settings.
1. Right-Click on the "Body"-Entry in the sequencer, select "Bake Animation Sequence" choose a location and save with default settings.