Dynamic keyframes

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

puhovik

  • Posts: 169
  • Joined: Wed Nov 14, 2018 10:00 pm
  • Real Name: Nikita Kozhemyakin

Dynamic keyframes

PostThu Sep 24, 2020 1:22 pm

Hello. Can somebody help with my task. I want to do a dynamic keyframe. i think i should use CompRenderEnd param. i want to have a possibility to change a fusion composition lenght wiouth a manual moving of keyframes. for example i want to make my animation in 30 frames before the end
Ryzen 3700x
32ram
RTX 3060Ti
Windows 10
Resolve 17.0 Studio
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Dynamic keyframes

PostThu Sep 24, 2020 1:49 pm

puhovik wrote:Hello. Can somebody help with my task. I want to do a dynamic keyframe. i think i should use CompRenderEnd param. i want to have a possibility to change a fusion composition lenght wiouth a manual moving of keyframes. for example i want to make my animation in 30 frames before the end
Yeah you can use comp.RenderEnd to get the last frame of the render range, and comp.RenderStart is the first frame.

As a very simple example, you could animate a Mask's Level property with this expression:
Code: Select all
iif(time >= comp.RenderEnd - 50, 1, 0)
This would set Level to 1 for the last 50 frames of the composition, and 0 before that.

If you want Level to do a linear animation, eg from 0 to 1 over the last 50 frames of the composition, you could do:
Code: Select all
: diff = comp.RenderEnd - time ; return (diff <= 50) and 1 - (diff / 1/50) or 0
This example uses full Lua syntax, which is specified by the : at the start of the line.

To do a custom animation curve with easing is a bit more complex. Let me know if you need that.

Note there is also the option of using the Keyframe Stretcher node or modifier. This allows the automatic stretching of hardcoded keyframes to be adjusted according to composition length. I don't know if it's suitable for what you need - read about it on page 2223 of the Resolve 16.2.7 manual. Let us know if you need more info on that method.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline

puhovik

  • Posts: 169
  • Joined: Wed Nov 14, 2018 10:00 pm
  • Real Name: Nikita Kozhemyakin

Re: Dynamic keyframes

PostThu Sep 24, 2020 3:21 pm

Thx a lot. i will try it. u are very helpfull
Ryzen 3700x
32ram
RTX 3060Ti
Windows 10
Resolve 17.0 Studio
Offline

joymonger

  • Posts: 69
  • Joined: Wed Apr 15, 2020 3:28 pm
  • Real Name: Paige Saunders

Re: Dynamic keyframes

PostMon Jan 03, 2022 9:54 pm

TheBloke wrote:To do a custom animation curve with easing is a bit more complex. Let me know if you need that.

I'd be interested to know what the simplest way is to do this with a basic ease? I've ended up using the Vector Result modifier for my dynamic start position, but is there a better way?
MBP M1Max

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], ErrkaPetti, Google [Bot], panos_mts, Romualdas Budriunas, simauma and 150 guests