22
$\begingroup$

I have a model in Blender with a full rig, including IK bones.
I also have a sword with two bones, on the top bone of the sword I have a set of constraints that copy the location and rotation of a child bone in the right hand.

The sword is then attached to the hand as expected. The second bone in the sword rig is the target for the left hand constraints that copy its location and rotation. In blender that works as expected.

I animate the primary rig right hand and the sword and the other hand moves as expected. The problem comes when I import the blender file into unity.

Unity is only seeing the right hand move but not the left. I can parent the sword to the right hand and it moves as expected. But the left hand data is not changing.

Back in blender I thought that if I were to select the left hand insert a keyframe (LocRotScale), when there was a keyframe for the right hand, that blender would then save the global position of the left hand, but when the new keyframe was inserted it had an orange line to the previous keyframe indicating that the position had not changed.

Is there away to get blender to save a keyframe for the left hand when the constraint moves it?

$\endgroup$

4 Answers 4

15
$\begingroup$

You could use Object > Animation > Bake action
(Or if you are in Pose mode, Pose > Animation > Bake action)

enter image description here

Bake action was added to the menu in Blender 2.62 (though it was previously available with Space> Search)
Unfortunately, there does not seem to be any documentation for this feature yet.

$\endgroup$
8
  • $\begingroup$ I don't seem to have that option with a bone contraint. When I open the menu I only have the top three options of your sub-menu. Could the bake option be in a diffent spot for bones? $\endgroup$
    – Goff
    Commented Aug 25, 2013 at 4:59
  • $\begingroup$ Are you using the latest version of blender? $\endgroup$
    – 00Ghz
    Commented Aug 25, 2013 at 8:52
  • $\begingroup$ @user1874355 It seems to be there in 2.68a (r58536) It is there in pose mode and object mode. $\endgroup$
    – gandalf3
    Commented Aug 25, 2013 at 20:36
  • $\begingroup$ I am using blender 2.60, I will upgrade and see if that makes a difference. I havn't upgraded in awhile because that version has done well for me. I will upgrade and post the results. $\endgroup$
    – Goff
    Commented Aug 26, 2013 at 16:45
  • 3
    $\begingroup$ ok, Object > Animation > Bake action does not do anything appearent for me but Pose > Animation > Bake action from in pose mode does. It creates a new action so it is not very conveinent but it does get the motion that the contraint produces. Thank you all. $\endgroup$
    – Goff
    Commented Aug 27, 2013 at 1:25
8
$\begingroup$

Sounds like you want to apply the Visual Transform before keyframing:

Apply Visual Transform CtrlA

Apply (set) the result of a constraint and apply this back to the Object's location, rotation and scale. See the following post for more detailed discussion: Apply visual transform.

$\endgroup$
2
  • $\begingroup$ I did try that, and it produced some odd errors. I set the influence of the two constraints to 1 set then crtl-a, set the influence to 0 and the hand is torn off the body and floating in space. was I missing something? do I need to delete the key frames of the hand then apply, then readd keyframes? $\endgroup$
    – Goff
    Commented Aug 24, 2013 at 21:06
  • $\begingroup$ This only applies to Modifiers that do not depend on any keyframes. Constraines like e.g. TrackTo don't work like that since the target object might be moving in an animation based on keyframes. $\endgroup$
    – derHugo
    Commented Jul 12, 2019 at 11:27
4
$\begingroup$

Use Pose->Animation->Bake Action command location with this settings: bake action settings

it will bake constraint transforms into keyframes on given range. Make sure to select: Visual Keying this will force blender to take visual transforms including transforms that come from constraint and make sure to check Clear Constraints. It wil clear constraint before taking it's visual transforms. If you not check this parameters - retarget won't work properly. This way you can retarget any animation to any rig and from any rig. If you have proper Ik setup, ofc.

PS. This settings are given for blender 3.0 that i'm using currently.

$\endgroup$
3
  • $\begingroup$ where is the Pose menu? $\endgroup$ Commented Sep 12, 2022 at 2:42
  • $\begingroup$ you need to have bone or rig to get access to this menu. in rig go to pose mode and you'l have it. in object mode you can go to -> Object->Animation->BakeAction as well $\endgroup$
    – aftamat4ik
    Commented Sep 13, 2022 at 9:40
  • $\begingroup$ Ha, I realized my mistake shortly after posting that, thanks for your response ;) $\endgroup$ Commented Sep 14, 2022 at 3:18
0
$\begingroup$

If anyone is suffering with the same problem where they need to make a copy of an object but the animation also copies to the copy and then you can not change or transform the copy, then you can delete the keyframes of the copy and then apply Copy Rotation and Copy Transform constraints to the copy.

Then you can select the copy then go to Object > Animation > Bake Action and then check all the boxes except the last one, in Bake Data select Object, and in Channels select all options.

After clicking your animation will be directly baked in the timeline and you can easily change the transform of the copied object. This is for Blender version 4.2 can't say about older versions.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .