Shape keys animation and blendin possible ? [with test file]

hello,

it seems shape actions cannot be blended using the blendin param of an action,
am I wrong ?

here is a testfile:
action_shapes_blend.blend (1.2 MB)

on the left, Suzanne is animated by an armature action, blendin is ok,
and on the right, she is animated by shapes, and I can’t produce the same effect.

if this is achievable just by using bge api / action actuator parameters please let me know by modding this file. <3

cheers

ps: I using upBGE 0.36.1

hello,

i dont use upbge 0.3+ and i never tried blending shape keys , let alone, trying with the action actuator.

But since, shapekeys can be keyframed … you can animate yourself the blending … no ?

i.e : If you have 2 shapekeys to blend, just keyframe on a single action something like this

SK1 : 0 ----- 1 ----- 0 ----- 1 ----- 1
SK2 : 0 ----- 1 ----- 1 ----- 0 ----- 1

Just play 1 of those 4 sections forward or reverse … that’s 8 blending transitions u may want .

Ofc, you can also play 2 action actuators in same time, but then , dont put them on the same layer.

hello @blenderaptor thanks for your time,
but well its not my question :slight_smile:

suppose you have 30 shape keys,
you setupped around 30 ‘poses’ with it (with a shape action obviously)
if you want transitions between each pair of pose, this means (30x29)/2 = 435 intervals.

A <> B <> C <> D <> E <> A’<> C <> E … etc

so yes I could do that, I could write a little something in Python I think, but this is tedious to manage. I can tell. for example if you change one shape value on pose A you also need to change the value on each frame where A was also copied for transition need.

and unfortunately, with shapes, blendin with action actuators or playAction() from any ‘pose’ to another one does not seem to be feasible.

I was also wondering about bone drivers.

But even so, with bones, u gonna see that the BlendIn doesnt work properly in the first place. It just does blend the last frame of the previous action into the new action …Whilst this visually tricks us to think it works with bones, shapekeys are not blending on the same channels, so this is maybe why BlendIn with Shapekeys doesnt seems to work whilst it just does the same stuff than with bones : Previous ShapeKey action just stops on last frame, and there’s nothing to blend into the new Shapekey since they are not playing with the same channels ; new ShapeKey will just ADD its geometry transformation onto the last state of the old ShapeKey

And so , it’s YOU, that have to play the old action for some more frame. And for that, as i said, run 2 action actuators with your old and new shapekey but put the layer parameter with 2 different numbers ( 0 et 1 typically)

image

maybe I dont understand what you said, if so sorry.

you should try the sample file I think:
shapekeys ARE blending on the same channels since this is the same shape action, just with different intervals - since its even worse with 2 shape actions for the same object.

you can play with actuator parameters, like add some frames for the blendin to operate, but I didn’t find anything.
maybe I let the 2nd actuator on layer 0 while testing any setup.

i don’t have ubpge installed.

According your screenshot, u playing the same KeyAction on 2 different layers but with different intervals. “Play1” actuator will have all the power since u set LayerWeight to 0 ( “how much the previous layer blends in this one”) . If you put 2 different actions, and they don’t share same channels, they will play together independently, but if they share same channels, the upper layer plays on the top of the other one.

U have to know that “Blendin” is for horizontal blending ( = blending on time) , whilst the layers is to blend animation vertically .

I suggest you to make 2 new different KeyAction for this KeyAction (0-150) replicating the same stuff but on different intervals.

KeyAction(0-150) → make 2 copies → rescale their time range → KeyActionA (0-50 ) + KeyActionB (0-30)

If you want to play with the layerWeight, u gonna have to do it with the Actuator on “Properties” mod since layerWeight cannot change its value when Action is played with other mods