Trouble with getting animation to work in PlayCanvas

Hey everyone,

Our 3D artist is having some trouble getting some working blender animations to work on PlayCanvas. Here’s what he says -

Flicker_Animation - I’m asking for a flicker-like animation in which the mesh vanishes and reappears in the given frames, as if you’re mimicking a transparency effect with basic animation.

Squish Animation- I want to ‘0’ scale the object on a single axis in this animation, as if you were converting a 3d mesh to 2d like paper.

This is the link to the google drive folder of the animation effects that he wants - Playcanvas_Animation_Fix? - Google Drive. The drive folder also contains a google doc with a link to an example project.

How can this be approached?

1 Like

Whats the issue that they are having?

I understand that animating “visibility” as a common parameter along with translation, rotation, and scale, is not yet supported. Having said that, scaling something from a zero scale over one frame, or moving an object in and out of frame, to imitate visibility toggling, hasn’t worked for me either.

I assume it has something to do with the export process interpolating or optimizing animation curve data, so that, basically, a single keyframe followed by another keyframe immediately, doesn’t get preserved. I have ended up animating the material opacity or mask with a high alpha cut-off to create effects like your “flicker”.

Hello, this is Kartikay, I’m the animator on this project. I’m having problems transferring the identical animation from blender to Playcanvas for the most part.

Also, Is it possible to animate any material parameters in playcanvas without needing scripts(code), such as the opacity slider or emissive intensity?

I see, I’ll give it a shot. Could you also tell me if you used any scripts to convert blender material data to Playcanvas?, If you could just let me know, that would be great.

No, right now that isn’t possible. There is support in the engine for that in the future, but right now you need to use code to animate it.

I see, so we’ll handle the coding for that. However, is there any way to get the “Squish Animation” animation to work? I’ve tried the “Interpolation constants” but it’s not working either (which is Value A will get held until Value B is encountered).
thanks for your help so far

You can do that easily using the PlayCanvas tween library, it has an example on how to animate scale on an entity:

1 Like

@Mr_Kartikay @shadowlab

Side note on the importing animations and keyframes, you can control the sample rate in the asset tasks settings. For something like this, you would probably want to disable the sampling and keep the keys as is