NatronGitHub / Natron

Open-source video compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
http://NatronGitHub.github.io
GNU General Public License v2.0
4.65k stars 338 forks source link

retime node in Dope Sheet window ,display BUG #502

Open rr4e opened 4 years ago

rr4e commented 4 years ago
1 2 3
devernay commented 4 years ago

This is wrong: https://github.com/NatronGitHub/Natron/blob/8f2cf8f5dea9c385aedacac2e9f124967631e736/Gui/DopeSheetView.cpp#L1941

It's taking the frame range of the input, (fmin,fmax), and then asking ReTime which frames from the input are used to produce fmin and fmax on output. So if the speed is 2, these will be fmin and fmin+(fmax-fmin)/2.

Getting the frame range of a retime node is a bit more complicated that it looks (especially because of the time warp curve), I'll try to make a fix.

devernay commented 4 years ago

Proposed solution:

in DopeSheetView, make no special case for the retime node: getTimeDomain() should be used

unfortunately,

rr4e commented 4 years ago

Proposed solution:

  • add an "average speed" parameter to retime, which cannot be animated, and is only used to compute the timedomain. "average speed" should have the same value as "speed" in a simple setup.
  • add an "update average speed" button, which has to loop on output frame numbers starting from srcRange.min, and compute the required input frame (by integrating speed), until it goes out of the source range: _speed->integrate(srcRange.min, time) > srcRange.max
  • remove the (unused) "duration" parameter from retime which is not used in Natron
  • let getTimeDomain() use the new "average speed" parameter to compute the time domain.

in DopeSheetView, make no special case for the retime node: getTimeDomain() should be used

unfortunately,

super cool!