Opacity based on keyframes

Hi Spark Ar creators,
I have quick question. So I have a filter in which I need a rectangle to appear and disappear with slightly odd timing so using loop animation doesn’t work.

I thought I could control the shader opacity through the keyframes but that doesn’t seem possible.

If anyone has a suggestion or a solution I would really appreciate it as I am struggling here.

Attached picture is how I have changed colours of objects based on keyframe.

1 Like

U can find Texture Opacity patch at Asset Gallery and manipulate opacity as you wish.

Keyframe only supports 3 channels from what I can see. You’d need another keyframe patch for controlling opacity, but you’d probably want to change the diffuse texture and not the emissive. I don’t think setting emissive alpha will actually hide the object.

I alway animate alpha by sticking a Mix patch in between the Texture and the Diffuse channel and animating that alpha with the progress values you get from Animation Players.
Don’t know if applicable in your case but I’ll drop an example here

(the texture in the screenshot is a color value but a texture would work the same)