unwind actions ?

Issue #297 closed
Alessandro Padovani created an issue

I see the unwind action note in the blog. How this differs from the bake action tool in blender ? That is, what’s the advantage of using it instead of bake action ?

https://docs.blender.org/manual/en/latest/animation/actions.html

Comments (10)

  1. Thomas Larsson repo owner

    Not at all. It was only implemented because I wasn’t aware of the tools that Blender already has. Now removed again.

    As I pointed out at the bottom of the blog post, a custom button could have dealt with the extra layer of “Drv” bones and also added action for JCMs. Perhaps I make a separate button for JCMs, unless Blender already has a tool for that too.

  2. Xin

    There is a difference since Blender’s “Bake Action…” doesn’t seem to work well if you import V7 with, for example, Face Units “MouthOpen” (and keyframing eCTRLMouthOpen) or “MouthSmile” (and keyframing eCTRLMouthSmile).

    To reproduce: import V7 and don’t Add Extra Face Bones, just import the face units mentioned above, create a new action and keyframe the face units from the addon’s sliders to create a simple animation. Then try to bake the action with Blender’s command (and try variations by enabling Visual Keying and Clear Constraints options), and you will see that the resulting baked action ends up empty, or alternatively wrongly detecting the bones' transformations and ending up keying a few bones that remain untransformed in the resulting Action.

    But here is the thing though, when you export as FBX after keyframing the properties from above and also keyframing some other bones like from the arm (without doing any baking in Blender at all), the script ran by the exporter works well. I tested it on Unreal 4. It even takes into account the driven Shape Keys in the animation that ends up in Unreal 4: the imported animation affects the corresponding Unreal 4’s Morph Targets. If you keyframed bones from the arm like I mentioned above, the JCM Shape Keys driven by those will work automatically as expected in Unreal 4 too.

    So the baker inside blender and the baking done by the FBX exporter seem to be quite different. The one inside Blender seems to be limited, while the latter works better and can directly handle keyframes of the eCTRL… mentioned above. It also “bakes” Shape Keys too, which is quite important for JCMs.

    So if you wanted baking inside Blender just for exporting purposes, then there doesn’t seem to be any need for it, at least for Unreal 4. The FBX exporter already does the job well. Although more testing might be needed to be sure.

  3. Alessandro Padovani reporter

    @Xin Unless I miss something, baking the face units seems to work fine here. I just have to select the bones to be affected. No extra face bones added.

  4. Xin

    You still have the eCTRL properties there. If you scroll to the bottom of the baked result you will see them there too, they aren’t being baked. You would expect Visual Keying to handle them just fine, but they are being preserved as the same properties in the new action created by “Bake Action…” (try disabling them and you will see that the resulting action doesn’t open the mouth). A true bake wouldn’t depend on anything but keyframes of the bones (and optionally keyframes of Shape Keys set up in the Dope Sheet’s Shape Key Editor).

    On the other hand, the exporter to FBX does bake the eCTRL properties (and also bakes the Shape Keys in the Shape Key Editor). You can try this by exporting to FBX and then re-importing the FBX inside Blender if you don’t want to try it on Unreal 4. Then check both the Dope Sheet’s Action Editor and the Shape Key Editor. There are no longer any Drivers involved and the animation looks the same.


    As a suggestion for Thomas: maybe resurrect your Unwind Action button? I think it could be interesting to have this option inside Blender for editing animations more carefully. For example, you might want to convert keyframes of eCTRL properties to bones' keyframes to get a base animation for a custom animation you might want to do inside Blender, since bones' keyframes are independent from each other and more intuitive to edit, as opposed to having everything bundled in an eCTRL property.

    For full bakes for portability purposes the FBX exporter already does a good job.

  5. Alessandro Padovani reporter

    @Xin As a matter of fact the baking works fine because we can see the generated keyframes there. But you’re right that if we delete the eCTRL keyframes then the animation seems not to work anymore. This is not because the baking doesn’t work though, but because the plugin takes control of the eCTRL channels and doesn’t allow the baked animation to be seen. We have to disable the plugin to see the baked animation.

    1. animate
    2. bake
    3. disable the plugin to see the baked animation

  6. Xin

    Oh ok, thanks for noticing that. That makes more sense since Visual Keying should have worked.

    The problem is that this addon turns the Drv named bones unposable by being driven by Drivers (this restriction is imposed by Blender’s Drivers). When Blender bakes them, the Drivers remain, so they remain unposable afterwards although the poses are correctly recorded because the Visual Keying option just looks at the final poses of the bones without caring about what is driving them. Disabling the addon just gets rid of those Drivers so the bones can be posed again, but that’s hardly a solution. There is also another problem with this approach: after making all bones posable with the addon, Blender’s “Bake Action…” will produce an Action that affects the Drv named bones, but that’s not something you usually want (you want to affect the children, which are posable and properly named like the original bones in the original rig).

    A possible solution is for the “Unwind Action” button to first require that all bones be posable (if you can’t freely pose bones you are just stuck, nothing you can do, Drivers work like that). Once all bones are posable, when baking, detect the Drv bones' poses but record them as poses of their children (their children are the freely posable ones without Drivers on them), instead of directly recording the poses of the Drv bones. The poses of those children are what should be in the new baked Action. This new Action can be freely edited inside Blender with the addon enabled. It would be the equivalent of the user making all bones posable with this addon, and proceeding to pose the character by hand to emulate what the rig property does. Maybe should be renamed to something like “Convert Driven Action to Posable Action”. This new Action has the advantage that it can be freely edited and also applied on the original rig too (which had no Drv named bones).

    Blender can’t do that, that’s why I liked the Unwind Action button idea. Not so much for exporting (the FBX exporter works fine and does its own baking), but to allow more control inside Blender of animations which are governed by rig properties.

  7. Alessandro Padovani reporter

    In my opinion baking is not useful to animation. That is, modifying a baked animation is very difficult because of the big number of keyframes. This is not what baking is for. Baking is for exporting the animation to another software for playback, such as games. As this, it makes sense to bake the animation as a last pass, and thus it may also make sense to disable the plugin since we don’t need it anymore for baked animations.

    That said, having multiple choices to get a result doesn’t harm.

  8. engetudouiti

    My opinion is it depend user. Once you truned pose controller values as baked pose bone transform value, you can manipulate curve more strictly for each pose bone. so it still useful.

    pose controller usually move many bones at same time, then you can not divide it as individual bone transform curve. actually it is reason, blender official movie animator not use daz type pose controller much. I actually hajim reply so when someone ask to make kind of pose controller from saved pose library.

    By the way, I think, if use “child of” constrain, in spite of, current “real parent relation”, for pose (deform) bones and drv bones, we can easy mix use baked pose I suppose. It seems new merit of #299

    Because, if use constrain “child of”, for posed bones, and select only posed bones, then now it can bake animation as posed bone transform values . because drv bones transform value will be baked as pose controll transform values. (posed bones are not actually parented with drv bone, but change visual transform by constrain (child of drv bones only)

    then after bake animation, all pose controll (face units) value are simply converted as pose bone local transform . (though I still not test it, but basically it should work so)

    And I hope Thomas keep enhance this tool, to actually change pose controller value as pure pose bone transform value. even though blender offer “bake action” to export with “all bones posable”. because current rig heralchy is unique, so baking action tool may need to be offered add on side to fit well, if you can. ( you may plan it without use child of , keep current hieralchy)

  9. Log in to comment