[Fuse] Time Machine Modifier Fuse

User avatar
SecondMan
Site Admin
Posts: 2893
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 2 times
Contact:

[Fuse] Time Machine Modifier Fuse

#1

Post by SecondMan » Tue Sep 30, 2014 11:44 pm

What once was a very complicated Macro is now a handy and much, much faster Modifier Fuse:

Please note that a newer version of Time Machine is available on Reactor.


TimeMachine1.6_Screenshot.PNG

Retiming has never been this much fun in Fusion! :mrgreen:

A quick rundown of the modes:

Warp: scrubs inside the Source Start to Source End range using the Time Warp slider.
Remap: maps Source Start-End to Target Start-End.
Delta: steps through a range in user definable steps. *NEW in 1.2!*
Lock Start: locks Source Start to Target Start frame, and you can use Speed/Step to go from there.
Lock End: locks Source End to Target End frame, and you can use Speed/Step to go from there.
Random: random frames from within the Source range.
Hold: holds a frame.
Skip: skips frames, so a setting of 2 starting from 1 does 111444777...
Offset: offsets your source range forward or backward.
Trigger: repeatedly runs through your frames, based on thresholds. *NEW in 1.4!*
XSheet: retime your source frames using an exposure sheet! *NEW in 1.3!* with a mini scripting engine! *NEW in 1.5!*
Switch: easily switch to user definable starting points. *NEW in 1.6!* (requires Fusion 7.7 or later)

Before/After Time defines the behaviour before or after the Target Range. You can also force a Target Range in modes that don't require it, like Random or Offset.

Now that it's a Modifier Fuse you can use it on a TimeStretcher, or a Time3D, or even (in Fusion 7) any other parameter in Fusion.

Enjoy! :)

Time Machine is free to use. Donations are not required, but if you find Time Machine useful, they are very much appreciated and can be made out to pieter@steakunderwater.com using Paypal, or to 1Hbzert3Km5TRSnBo4qj4qd8s6WPocwQeB in Bitcoin.
You do not have the required permissions to view the files attached to this post.

Tags:

User avatar
Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#2

Post by Tilt » Wed Oct 01, 2014 10:04 am

All hail the newest Fuse developer in town :-)

User avatar
Chad
Fusionator
Posts: 1310
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 1 time

Re: [Fuse] Time Machine Modifier Fuse

#3

Post by Chad » Wed Oct 01, 2014 1:45 pm

Pet peeve, the multibutton control should using FuID so it's easier to animate. Just had this issue with Twixtor, where the modes are numbers, but have no business interpolating.

User avatar
Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#4

Post by Tilt » Wed Oct 01, 2014 3:40 pm

Chad wrote:Pet peeve, the multibutton control should using FuID so it's easier to animate. Just had this issue with Twixtor, where the modes are numbers, but have no business interpolating.
This is a good start for the upcoming list of best practices and the Fuse collaboration subforum.

edit:

next up: how to change this without breaking existing comps :-) Is that possible without changing the input ID and using the LegacyID attribute?

User avatar
Chad
Fusionator
Posts: 1310
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 1 time

Re: [Fuse] Time Machine Modifier Fuse

#5

Post by Chad » Wed Oct 01, 2014 4:02 pm

And you also want to have the same mappings between like inputs on other tools. So changing this would mean changing the others too.

User avatar
PeterLoveday
Fusioneer
Posts: 128
Joined: Sun Sep 14, 2014 6:09 pm

Re: [Fuse] Time Machine Modifier Fuse

#6

Post by PeterLoveday » Wed Oct 01, 2014 4:26 pm

I would probably be inclined to use a multibutton for the rounding mode too. The tristate checkbox is less than obvious I think, and three descriptive buttons on one line would make more sense for no extra space.

User avatar
Chad
Fusionator
Posts: 1310
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 1 time

Re: [Fuse] Time Machine Modifier Fuse

#7

Post by Chad » Wed Oct 01, 2014 4:43 pm

And another thought (which I don't know how to do)... This is a number modifier. If you wanted other modifiers like Point, Gradient, etc... you'd want to reuse as much code as possible. So either keeping the common functions in one file, or having one .fuse that has all of the types in it. Possible?

User avatar
PeterLoveday
Fusioneer
Posts: 128
Joined: Sun Sep 14, 2014 6:09 pm

Re: [Fuse] Time Machine Modifier Fuse

#8

Post by PeterLoveday » Wed Oct 01, 2014 10:08 pm

There are two ways this is commonly done by Tools in Fusion.

One is the way the Expression modifier does it, which results in it having outputs for all types (Number, Point) regardless of which input it was connected to. This requires a "DataTypeArray" to be used, which is not available for Fuses unfortunately. (I'll add that now)

But the other option *does* work in Fuses... and that is to do it like 'Publish' does.

This involves registering the plugin more than once, with different attributes. The particular 'type' of tool or modifier constructed can be detected at create time, and so the plugin can adapt its behaviour based on that.

I have attached a very simple Fuse which does just that. It outputs a random number within a specified range, to either a Number or a Point, depending what input it gets created on.

It's much simpler than it sounds, as one can see from the Fuse.

Love, Light and Peace,
- Peter Loveday
You do not have the required permissions to view the files attached to this post.

User avatar
SecondMan
Site Admin
Posts: 2893
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 2 times
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#9

Post by SecondMan » Thu Oct 02, 2014 12:02 am

Ooooh! This thread is already exactly what I hoped it would be! :D
Chad wrote:Pet peeve, the multibutton control should using FuID so it's easier to animate. Just had this issue with Twixtor, where the modes are numbers, but have no business interpolating.
Great idea! Also makes the code much easier to read.

Although couldn't interpolation be avoided by setting the control to INP_Integer = true?

EDIT: oh right, you wouldn't want to interpolate between whole numbers either...

I was wondering how to do FuID's when I wanted to add an option in the middle of the Before and After Time behaviour lists and I ended up counting all the time. It took me a hell of a long time to find it in VFXPedia though. Searched for "FuID" first, which came up as a dead link.
Chad wrote:And you also want to have the same mappings between like inputs on other tools. So changing this would mean changing the others too.
Not entirely sure if I understand this. Is it about consistency between Fuses? What is the mapping you speak of?
ploveday wrote:I would probably be inclined to use a multibutton for the rounding mode too. The tristate checkbox is less than obvious I think, and three descriptive buttons on one line would make more sense for no extra space.
Good point. In fact I had never made a tristate checkbox before so I just wanted to give that a go... :)

I also have a question. Is it possible to change the UI based on the state of multiple inputs?
Specifically, some controls don't require a Target Range. Like Lock Start only requires the Target Start Frame. So I would ideally hide the Target End Frame, unless Force Target Range is turned on. But when I would then switch modes again I could end up with the Target End Frame hidden when Force Target Range is on.

I guess what I am asking is: can I do something like "if Force Target Range is "1" AND mode is set to "Lock Start" then show Target End Frame.

And finally I updated the Fuse to version 1.1:
  • All ComboControls and MultiButtonControls now use FuID as their datatype.
  • Rounding mode is now a MultiButtonControl, too.
I left v1.0 in the opening post should people want to follow progress. Good idea, if potentially messy?

User avatar
Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#10

Post by Tilt » Thu Oct 02, 2014 11:17 am

SecondMan wrote:Ooooh! This thread is already exactly what I hoped it would be! :D

I guess what I am asking is: can I do something like "if Force Target Range is "1" AND mode is set to "Lock Start" then show Target End Frame.
Yes, you can. You can query other inputs in NotifyChanged. Here's a snippet from my SmoothCam Fuse:

Code: Select all

if inp == InTransformationType then
  local m = math.floor(InMode:GetSource(time, REQF_SecondaryTime).Value)
  InDoTranslation:SetAttrs({ IC_Visible = param.Value == 0 and m == 1 })
end
What it does is that it sets the DoTranslation's visibility based on both the InTransformationType value (which needs to be 0) and the value of InMode (which needs to be 1).

I've used that REQF_SecondaryTime flag but I'm not sure whether that's necessary. Maybe Peter can shed some light on this :-)

edit: the important thing, however, is that you need to be able to determine the visibility of each input control at all times based on the current values of your inputs. You can't set a helper variable at one point and use it again later because if you close and reload your comp, Fusion needs to be able to set the visibilities correctly based on nothing more than the current state of the Fuse.

User avatar
SecondMan
Site Admin
Posts: 2893
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 2 times
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#11

Post by SecondMan » Fri Oct 03, 2014 7:50 am

Oh neat! Thanks Tilt!

Must try as soon as I can - pretty exciting I can actually read that stuff now :)

(although I have no idea what REQF_SecondaryTime does, either - couldn't find anything useful on VFXPedia about it)

User avatar
SecondMan
Site Admin
Posts: 2893
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 2 times
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#12

Post by SecondMan » Mon Oct 06, 2014 7:22 pm

Just a quick update. :)

I got the UI stuff working nicely - and I could have updated the Fuse straight away but I got a little sidetracked.

Which does mean that very very soon it will be easy to do stuff like this:


User avatar
Tilt
Global Moderator
Posts: 336
Joined: Sat Aug 02, 2014 4:10 am
Location: Munich, Germany
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#13

Post by Tilt » Tue Oct 07, 2014 11:33 am

does it produce the timecode or modify it? Does it hold frames randomly?

User avatar
SecondMan
Site Admin
Posts: 2893
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 2 times
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#14

Post by SecondMan » Tue Oct 07, 2014 2:16 pm

PS. Make sure to turn your volume up... ;)

User avatar
SecondMan
Site Admin
Posts: 2893
Joined: Thu Jul 31, 2014 5:31 pm
Location: Vancouver, Canada
Been thanked: 2 times
Contact:

Re: [Fuse] Time Machine Modifier Fuse

#15

Post by SecondMan » Tue Oct 07, 2014 6:29 pm

Another tip: