Download

Animation Blend Per Bool Issue - Weird Pop or Jump or something..

I created a Handgun Pose / Animation in Maya using ART and exported it to 4.8 using ART. My export presets are set to 2014 FBX with all the boxes ticked as per the Unreal Docs.

Imported the .FBX into unreal and wired up a quick prototype using tab & a flip flop to toggle a bool value inside the AnimBlueprint.

The bool is hen read by a BlendPerBool node which feeds the normal ThirdPerson Animation state or the Handgun pose based on the bool value.

When I hit tab I get a transition but also this weird movement on the feet. I have a feeling this has something todo with the IK Bones attached to my mesh. Any ideas?

You can see the actual happenings here: Animation Pop Example

Looks pretty similar to my own issue (using 4.8.3) and the issue described in that thread: animation blending issue - Animation - Unreal Engine Forums
All those characters are “diving” into the ground just a bit while they are changing the blendspace.
Based on a variable I’m switching from my 1D Idle_walk_run blendspace to my 2D Combat_Idle_walk_run blendspace in the statemachine of my anim blueprint and in the time where he is switching he is diving into the ground a bit like in your video and the video of the other thread (while the pos of my characters pelvis is pretty much the same at the 1D-blendspace and 2D-blendspace - so I’ve no clue from where he got that deeper pos). If I change the duration default value of 0.2 in the transition rule to 0.0 it’s not doing that dive into the ground anymore but it’s snapping too fast from one to the other animation-space (looks ugly).

IK bones are not active by default and are generally used as targets when content points must be maintained.

UE4 does interpolate by default and can cause the kind of effect depending on the key type being either Bezier or linear. As in the video example I don’t think that’s the fundamental problem your having.

Your basic player model, as in always has been and always will be, is broken down into two basic components as a requirement of having legs move and the torso being responsible for action states (as in aiming, reloading stuff) and needs to be layered so the legs are responsible for locomotion while the torso is allowed to preform an action state while moving.

Start here

Layered Bland Per Bone is what you are looking for.

Zak’s basic animation tutorial has a set up for punching that demonstrates use.

Layer your handgun pose on top of the idle state will not only fix the problem but also change the action state even if the player is running.

Hey FrankieV, thank you for taking the time to look at this. I am subscribed to your YouTube channel and familiar with your great work. Your explanation makes perfect sense. I will change to a per bone blend:)

Thx for that hint as well FrankieV. Switched to layered blend per bone too now (have to get deeper into this but it looks like a step forwards). As long as I exclude the root bone (e.g. using spine_01) it’s not diving into the bottom anymore. If I include the root bone it’s doing pretty much the same ugly dive-into-bottom-blending as with standard-blend. So I’m trying to understand why this happens. Is this a bug or expected behaviour? I setup a clean new blank third person template using only the manequin with 4.8.3 now and added the “Animation Starter Pack” animations as second step, retargeted the Idle_Pistol animation from the manequin-version of the starter pack to the manequin-version that comes with the third person template and finally created a 1D blendspace with “ThirdPersonIdle” animation to Idle_Pistol animation. It’s doing the same dive into the bottom (close to it’s knee) as well. But why?

Layering always starts at the parent bone and then transverses up the chain from child to child so if you start your layer at the root bone then once the layer hits the hip bone ,usually the first child after the root, it will split in two directions both down the layer to the legs and up the chain through the torso so the logical starting point would be the first parent after the hips, the first bone that controls the torso movement which in most cases would be a spine, which will only allow the layer to transvers up the chain and not down, effecting the legs, unless you give the layering a depth.

So yes if you apply a layer per bone to the root then the feet moving around would be an expected behavior.

It’s not just the feet… it’s the hole Z-Pos of the mesh. I’ve downloaded an older version of the engine (including old mesh and animations) now to compare. It works like a charm with the blue guy.

New mannequin:



 o                o_
/|\      o        |
/ \     /|-      / \
--------/ \ ---------
Idle   Blend   Idle_Pistol


Old blue guy:



 o       o         o_
/|\     /|-        |
/ \     / \       / \
---------------------
Idle   Blend   Idle_Pistol


As an example like it should work (minute 20:10) in 4.6.1: https://www.youtube.com/watch?v=SgsYsViIRYE

Layering per bone is pretty cool. I could now grab some animations from one body part and put it on top of some other animation. This looks soft and clean. Anyway I realised that I actualy would not just change the hands but the hole animation (even the feet) so the problem which still remains is the messed up z-pos of the hole body in the short time while he’s blending. It’s ok at the first anim - it’s ok at the second anim (either if you switch from one single anim to another single one or if you switch from a blendspace to another). It’s just messed up in the time while he is blending between. So what is the secret of the old blue guy what the new mannequin (and retargeted anims based on him) is missing?

Ah ok if the character model is doing strange things like diving below the ground plane than that’s not a blending problem but an interpolation problem with the root bone. You don’t say if your using in-place or root motion.

In all cases the root bone controls the placement of the rig in 3d space and best practice is the root should always be zeroed out as to 0 0 0 origin as to rotation and equal to the ground plane as to translation (generally 0 0 0). In most cases the hip bone will place the player into the vertical position based on it’s local transform (aka absolute animation) but if the root bone rotates it will cause the player model to dive below the floor plane as an offset.

I have not see this problem using the stock animations as I make my own but have had a similar problem of the player model diving and it’s not an easy problem to spot. An old trick to make sure that the orientation of the root is correct is to add an arrow component to the root bone pointing in the proper direction with visible in game turned on. If you are using in-place then the root should never rotate or translate relative to 0 0 0 origin and in root motion should only rotate or translate relative to the position it needs to be in so that the next state is appended.

Could be reproduced easy with stock animations (without any user content) of 4.8 and it’s all done in-place. Just create a 1D blendspace between the “ThirdPersonIdle” animation (comes with creating a fresh third person project) and the “Idle_Pistol” animation (comes with the free Animation Starter Pack). All you have to do is to retarget the Idle_Pistol animation to the skeleton of the Mannequin of the ThirdPerson template and build a 1D blendspace between those 2 animations. This is working well with the old blue guy (< 4.8). But it’s messed up with the new mannequin (4.8 +).

OK a ShadowPlay play blast from start to finish.

The root bones for the IK are linked to the main root of the rig.

So

As I mentioned above the problem is the rotating root that is pulling the hips down as it interpolates from one position to another so yes it’s a bug as the base animations IK was not constrained when exported

Thx FrankieV this explains that issue very well.

If I’m not mistaken, this issue is only occurring when you mix animitions from two sources, in which case, Zak covers how to handle this at about the [3:40] mark of this video:

https://www.youtube.com/watch?v=S8ardXXy5pE&list=PLZlv_N0_O1gaCL2XjKluO7N2Pmmw9pvhE&index=75.

Essentially you set the pelvis bone to animation scaled… Please try this fix and post whether it resolves this issue or not. Thanks!

Hey Guys! Thanks to everyone for all the feedback! I am amazed daily by how awesome the Unreal Community is! I have been swamped at work and will give these fixes a try tonight and post my findings!

It’s not an issue that I doubt can be fixed in UE4 as the IK chain in the template as well as the free animation package was not constrained to the proper links causing the root to rotate 90 degrees forward.

More or less the template and the starter animation packages are broken at the source and with the starter package being a sub-set of the base mannequin character model it should not require retargeting no more than any of the animations in the market place that uses the same rigging would need to be retargeted.

Hey Steve Hardister, Thanks for your info. I have tried it as per Zak’s video but sadly that does not help. I still get the Phantom Feet as shown in my video. I looked at what FrankieV said and I think he is right. There seems to be an issue with the animations or skeleton in the editor or in art. Or I am missing the plot completely which is probably the case. I create all my animations with the ART Tools using the latest files from Jeremy’s drop box and it seems like I need to re-target animations that uses the same skeleton which seems wrong to me or is that the way it works? Pardon all the noob questions but please bear with me as I come from C#/C++ so I am completely new to the whole animation scene. I also noticed in some of the animations the IK/FK bones lie face falt where in others they match the hands.

No unfortunately this does not fix that issue. As I mentioned earlier this issue could be reproduced easy without using any user content. Just blend from ThirdPersonIdle animation (from a blank third person template from Epic Games) to Idle_Pistol animation (Animation Starter Pack from Epic Games). My pelvis bone was already at animation scaled because I followed the steps here: Animation Retargeting | Unreal Engine Documentation (“Recursvively Set Translation Retargeting to Skeleton” for hole skeleton - afterwards changed Pelvis to “Animation Scaled” and finally root to “Animation”). Additionally I saw the nice tutorial from Zak some time later so this is somewhat standard for me now after importing a new skeleton mesh.

I think this is a serious issue for all guys that are new to this engine and are trying to make their first steps (either by themself or following some of the various tutorials that worked well with older versions). The longer I look into this issue (and your videos makes this pretty clear) the more my hope leaves that I could use any of the modified animations based on that template anims any further. Few weeks to scratch now … looks like a trap to me. :frowning:

Thanks for the feedback FrankieV and Neutronux. I was going for the simplest solution first and also overlooked the repro steps you posted earlier. I have since used this information to submit the following bug report: JIRA [UE-19659] When this is addressed, we will add an update to this post. Thanks again for the detailed descriptions and repro steps!

Just found some quick workaround to rescue my already done modifications based on the new (but bugged) mannequin anims (so I could continue until we get some bugfix).

UE 4.8: Exported messed up anim: ThirdPersonRun
UE 4.6: Exported old but ok anim: ThidPersonRun (old one is T pose and new one is A pose but I just grab the root an pelvis so I don’t care)

MayaLT:
Imported old (but good) anim of the blue guy first
Removed spine_01, Thigh_L and Thigh_R recursive
Renamed all remaining bones e.g. root to root_02, pelvis to pelvis_02 and parent to parent_02
Imported new (but messed up) anim of new mannequin (there are 2 skeleton trees now)
Unparent spine_01, Thigh_L and Thigh_R from bones of messed up anim
Parent spine_01, Thigh_L and Thigh_R to old (but correct rotated) remaining bone pelvis_02
Removed obsolete root and pelvis and parent form the new but messed up anim
Renamed root_02, pelvis_02 and parent back to original names and export the anim as fbx for UE4

Don’t try this with Blender 2.75a (you would get stuck already at import …with a weird rotated root bone or (if you convert to dae first) miss at least any root rotation/motion)

Hoping this will be fixed soon! Been running into this as well recently, even though I plan on making my own animations I’d like to use these for prototyping.