Animation reuse

I’m creating a dance moves program where the user can request to view a sequence of dance steps. Some steps are repeated sections of the animation in different locations on the dance floor and at different orientations.
Rather than recreate the sections in the different locations I would like to be able to effectively run the sections of moves in the new locations and at the new angles. I have been struggling with this problem for many years and have seen no practical answer. It stems from the fact that at some point animations in Blender refer to world coordinates resulting in the dancer jumping back to the original location and rotation.
It seems impractical to use path following as the moves involve stepping backward and forward in the same section. The path follow either makes the dancer follow the curve or be independent of it but not mixed.
Root bones don’t help as the end of the section leaves the bones at a different location to the object centre, then when the action is required again, the character jumps.
I have tried using NLA but again the character jumps back. after the section is played.
I would be very grateful to have any thoughts on the subject.

Hi Ramses

Hey this is funny I am finding I’ve replied to several help requests on here with very similar answers.

Basically in a situation like this baking is your best friend. Especially if the animation doesn’t need to change much apart from moving location. I would think a good solution to this would be the baking using helper objects and constraints method I suggested for the walking animation for short film question earlier.

This is a method I’ve used for several real time game engine projects in the past where running simillar animations in different locations was required. It also works well for pre rendered work.

1 : Firstly and most important. I would always keep the character rigs root at the center of the scene for all your animation actions and sequences. Keep it for all times at 0.0.0 in the scene. And the same for the rotation. Always have the rotation of the root zeroed out.
This way you know as long as the character is at 0.0.0 in the scene or engine anything you do should all match up. Be it with set’s props or other characters.

2 : You first need to set up a simple hierarchy of empty objects. One for each foot and one for the pelvis. Then one for the empty hierarchy root node which would be between the feet. Parent both feet and the pelvis empties to the root empty.

3 : Next load the dance action animation onto your rig and position the root empty with it’s children between the feet of your rig. Now position and orient constrain the feet empties to both your rigs feet and the pelvis empty to the rigs pelvis. Now they will follow the action of the rig but remain parented to their own root.

4 : Now bake the movement into the empties as an animation action. Make sure to set a key on every frame. This needs to be solid and to record the dance actions of the feet and pelvis exactly.
You should have a fully baked and independent animation now on the empty hierarchy. To test this try moving the root node. The animation should move with it and be totally solid.

5 : Now the magic part. Take your rig and this time you position and orient constrain it’s feet to the feet empties you just baked out. Next do the same for the pelvis. Position and orient constrain it to the pelvis empty.
Now if you move the root empty the whole rig ( … Apart from it’s root controller which you want to stay at 0.0.0 … ) with it’s dancing animation should move along with it. Use the root empty to position your dance animation exactly where you want it in the scene.

6 : You guessed it. Next bake the animation from the empties back into you rig controllers at this new location. For both the feet and the pelvis. Don’t forget to duplicate and create a new dance action for this. You won’t need to delete to original keys though. Just constrain and bake.

7 : Now you should have a solid baked version of you original dance animation but in the new location. This new action can then be saved. It should replay exactly at this location every time you load it. The key is that the position and orientation of the feet and pelvis have been re set relative to the rigs main root node controller. So as long as it’s always positioned and oriented at 0.0.0 in the scene or game engine, the animation will always play back in the exact right place.

This is the most widely used, reliable and common method I know for solving problems like this. Best part is … it’s cross compatible with pretty much all major 3D animation apps. This is the most common sort of method I’ve experienced being used anywhere I’ve worked on complex character animation projects. Also its the method I always preferred over wrestling with different types of non liner animation editors. They normally all have quirks and complications and I like to work with raw key frames and curves as much as possible and keep it all clear and straight forward.

Anyway all the best.

I’m not sure what your end game plan is, but when I have a similar situation; I key a Delta Transformation on the original rotation location and then I copy all the keys I want into a new action and then change the Delta Transforms key frame to the new location rotation etc. with the same action. I only have to key one keyframe that way and all the others just follow along.

Thanks for the suggestion. I am in the process of testing the method. I’ll let you know how I get on.

Toka,
Thanks very much for the detailed method. I am in the process of testing it and will let you know how I get on once I have finished testing.

Stilltrying,
I think I understand what you are suggesting:- The delta location and rotation can be tweaked in the NLA editor which is where I intend to build my composite actions. I tried your suggestion on a dummy file and it really seems to work :>) I can now start making the action segments in earnest knowing that there is a way to stitch them together smoothly with each action following on from the last in a single baked action which I can use in the game engine. Also I think I can change / correct a segment and it should change / correct all instances of its use. Obviously I would have to re-bake the composite action again.
Thank you so much for your help.

Toka,
I thank you very much for your suggestion but it is too arduous and complex for me. Also baking each segment of the action does not allow tweaks to be made to a segment and be reflected in each instance of its use. I will use the technique suggested by “stilltrying” where in the NLA editor a single delta keyframe on the location and rotation of the armature object is tweaked in each instance of use of an action segment to form a smooth composite action where all identical segments of the action can be changed / corrected with one edit. The whole composite action then needs to be baked only once per change for use in the game engine which is the ultimate environment for the program.
Thanks once again for your suggestion.

Hey that’s cool. Thanks for getting back.

There are normally multiple solutions to problems and issues like this. Nobody has a monopoly on all the knowledge. The best thing about a forum like this is it sort of resembles a studio team situation where you would have several heads reaching for the best solution. Everyone learns from each other and one solution offered might work for another problem down the road.
The method I explained is very common but I’ve been doing this a long time. It’s mainly used for putting complex walks and runs on to paths and also to combine different saved animations that were originally in different locations.
I really need to explore the NLA editor much more myself too. When I read it I thought that sounded a great and simple solution if it works and can be baked. I think the key thing is baking though. It doesn’t seem widely known how common and widely used baking is as a problem solving animation tool.

I replied to quite a few issues here over the last weeks and almost all of them could be solved by simple constraining and baking methods.

All the best.