logo

Friction Quick Tip #4 - Use expression and current scene frame to create procedural animation

time6 mo agoview22 views

In friction, you can use the current frame number through expresions to create quickly and without any keyframe simple animations.

  • Create a square to animate its rotation
  • Open the expression editor by right clicking the rotation property
  • In the Binding section, create a named variable for the $frame scene attribute : current_frame=$frame
  • In the Calculate section, return this variable for friction to use it as Rotation value : return current_frame
  • The square is now rotationg without any keyframe
  • In the expression editor, speed up the rotation by multiplying the frame value with a number : return current_frame*100
  • To control the rotation speed, use a custom property (dummy user-created properties), create a Speed property (activate layer's Custom Property through right-click menu, then add a single value property)
  • Use it in the expression editor by binding it to a variable : speed=properties.speed
  • Then use this variable as the multiplier in the Calculate section : return current_frame*speed
  • You can now change the speed through this property !

Do you know friction ? It is an awesome open source 2d animation software, early stage, which could replace after effect

Unofficial discord https://discord.gg/FkjnM2r2JD Official page https://friction.graphics/

Loading comments...