Jump to: Board index » General » Fusion

Specific Fusion Code

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Specific Fusion Code

PostThu Mar 11, 2021 2:00 pm

Hey there...,

I need to built a quite complex animation and since the lenght of a lot of things is not clear yet, i want some of the animation be animated by expressions than by keyframes.

To make it easy....i have a MaskPaint drwaing a line. This line is animated by Keyframes ("Write On").

Now i want an eclipse mask (somewhere else in the comp) to open up when the "write on" of the mask paint hits an certain value.

(I of course synced up the width of the eclipse mask with the hight by drawing the expression to it to have a perfect circle)

Now i want a code to animate the size of the eclipse mask based on the write on value of the mask paint.
The values goes from 0 to 1.
I want for example the eclipse size 0 til the write on value hits 0.4. after that it should stay open with a certain size til the end.

I tried things like that:

Code: Select all
if(PolylineStroke1.WriteOnEnd<0.4, 0, 0.8)


If the WriteOn Value is smaller than 0.4 than keep the size of the eclipse 0, otherwise make size 0.8

Well, those nodes turn red and nothing happens. is the code wrong? or cant i take the writeon value?

Thanks for any help

Thomas
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Specific Fusion Code

PostThu Mar 11, 2021 7:11 pm

Use iif() instead of if(). I forget exactly why the alternate syntax is necessary.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Re: Specific Fusion Code

PostFri Mar 12, 2021 8:25 am

Awesome! It worked imidiately! Weird ii, but why not :)

Thanks a lot! Realy!

Thomas
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Re: Specific Fusion Code

PostFri Mar 12, 2021 11:47 am

Is it possible to go even further...to get a specific time/frame from a value and to start another animation at this frame? That would be georgeous...

I still have this MaskPaint with the WriteOnEnd Value

Lets say i also have a transform node and i keyframed an size animation. But i want to start this size animation when the WriteOnEnd hits a specific Value.
What would be the right expression to:

get a Frame/Time out of a Value and than to delay an animation?

Thomas
Offline

Darryl

  • Posts: 143
  • Joined: Sat May 05, 2018 12:07 am
  • Real Name: Darryl Severn

Re: Specific Fusion Code

PostFri Mar 12, 2021 9:39 pm

Bryan Ray wrote:Use iif() instead of if(). I forget exactly why the alternate syntax is necessary.


There is no why! It just is! When the program language designers got to that command, that is what they decided to call it. There are a few languages that use iif instead of if.
Darryl Severn
The Videoverse by Darbeth
Livestreaming, Conferences, Info & Education, Events

Kit:
BMPCC 4K, Studio Cam 4K Pro, ATEM Mini Extreme ISO, Resolve Studio
DJI Inspire 2, Panasonic HCPV100,
Behringer XR16, Sennheiser XSW
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Specific Fusion Code

PostFri Mar 12, 2021 11:55 pm

Well, there is a reason; I remember reading it. I just can't remember what it is. :D

I think it has something to do with if being a reserved word in Lua, so you can't have a function for the Lua-based expression language that collides with it.

--

I'm not sure about controlling a keyframed action through an expression trigger. Depending on exactly what you're doing, you might be able to set up the animation and control its timing using expressions on a TimeStretcher. Or there's that Keyframe Stretcher thing, but I haven't dug into that yet. I think it's meant to assist with creating macros and transitions for Resolve's timeline, when the duration of the effect needs to be variable.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Re: Specific Fusion Code

PostSat Mar 13, 2021 12:13 pm

I'm not sure about controlling a keyframed action through an expression trigger. Depending on exactly what you're doing, you might be able to set up the animation and control its timing using expressions on a TimeStretcher. Or there's that Keyframe Stretcher thing, but I haven't dug into that yet. I think it's meant to assist with creating macros and transitions for Resolve's timeline, when the duration of the effect needs to be variable.


yeah, i tried things like that, but nothing that heplped me...in my comp is the length of the MaskPaint Line the only constant thing wich is already safe. All other things are changing from version to version and i have to keyframe it all again. well, i am using the spline editor to move keyframe sets, but since its a complex comp with hughe maps 10000x6000 and my computer has probs to handle it, it would be awesome, to make the animations variable with expressions...

Well, looks like there is no way to get frames from value...i will look for another solution. Thanks alot though!

Cheers

Thomas
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Specific Fusion Code

PostSat Mar 13, 2021 11:09 pm

I'm not sure what you mean by "get frames from value." I mean, you can get the value of a control at a specific frame, or you can define the value of any control to be a frame number.

And don't jump to the conclusion that there's no way to do something just because I don't know it! There's a lot that I don't know, especially when it comes to motion graphics workflows!

It's also entirely possible that I'm not fully understanding what it is you need to do. Could you paste some example nodes here to give some more context?
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Re: Specific Fusion Code

PostSun Mar 14, 2021 12:28 am

Ok, i will give it a try...

Here you can download an simple explanaition comp with sticky notes. its only a path and two circles.

https://www.dropbox.com/s/mdszkkeoo2v20 ... .comp?dl=0

is a dropbox link ok for you? Or what else can i do to paste my nodes here?

Cheers and thanks for brainstorming with me :)

Thomas

Edit: And there is the code:


Code: Select all
{
   Tools = ordered() {
      Background3 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Ellipse1",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 0.906, },
         },
         ViewInfo = OperatorInfo { Pos = { 1430, 49.5 } },
      },
      Ellipse1_1Code = EllipseMask {
         NameSet = true,
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.858843537414966, 0.790030211480363 }, },
            Width = Input {
               Value = 0.8,
               Expression = "Height",
            },
            Height = Input {
               Value = 0.8,
               Expression = "iif(PolylineStroke1.WriteOnEnd<0.4, 0, 0.8)",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -245.911, -51.5908 } },
      },
      Background3_1 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Ellipse2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 0.906, },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 49.5 } },
      },
      Ellipse1 = EllipseMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.460254372019078, 0.15819209039548 }, },
            Width = Input {
               Value = 0.079,
               Expression = "Height",
            },
            Height = Input {
               SourceOp = "Ellipse1Height",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1430, -16.5 } },
      },
      Ellipse1Height = BezierSpline {
         SplineColor = { Red = 0, Green = 255, Blue = 255 },
         KeyFrames = {
            [25] = { 0, RH = { 26, 0.021 }, Flags = { Linear = true } },
            [28] = { 0.063, LH = { 27, 0.042 }, RH = { 28.3333333333333, 0.0576666666666667 }, Flags = { Linear = true } },
            [29] = { 0.047, LH = { 28.6666666666667, 0.0523333333333333 }, RH = { 29.6666666666667, 0.0576666666666667 }, Flags = { Linear = true } },
            [31] = { 0.079, LH = { 30.3333333333333, 0.0683333333333333 }, RH = { 31.6666666666667, 0.0683333333333333 }, Flags = { Linear = true } },
            [33] = { 0.047, LH = { 32.3333333333333, 0.0576666666666667 }, RH = { 34, 0.0576666666666667 }, Flags = { Linear = true } },
            [36] = { 0.079, LH = { 35, 0.0683333333333333 }, Flags = { Linear = true } }
         }
      },
      Merge3 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background3_1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, 148.5 } },
      },
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background3",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1430, 148.5 } },
      },
      Background1 = Background {
         Inputs = {
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 1, },
            TopLeftGreen = Input { Value = 1, },
            TopLeftBlue = Input { Value = 1, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 770, 148.5 } },
      },
      Background2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "MaskPaint1",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 990, 49.5 } },
      },
      Merge1 = Merge {
         CtrlWZoom = false,
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 990, 148.5 } },
      },
      Ellipse2 = EllipseMask {
         EnabledRegion = TimeRegion { { Start = 17, End = 141.9999, FrameLength = 1 } },
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input { Value = { 0.239671049105947, 0.749741783640089 }, },
            Width = Input {
               Value = 0.079,
               Expression = "Height",
            },
            Height = Input {
               SourceOp = "Ellipse2Height",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1540, -16.5 } },
      },
      Ellipse2Height = BezierSpline {
         SplineColor = { Red = 0, Green = 255, Blue = 255 },
         KeyFrames = {
            [72] = { 0, RH = { 73.6666666666667, 0.0313333333333333 }, Flags = { Linear = true } },
            [77] = { 0.094, LH = { 75.3333333333333, 0.0626666666666667 }, RH = { 79, 0.0783333333333333 }, Flags = { Linear = true } },
            [83] = { 0.047, LH = { 81, 0.0626666666666667 }, RH = { 84.3333333333333, 0.0576666666666667 }, Flags = { Linear = true } },
            [87] = { 0.079, LH = { 85.6666666666667, 0.0683333333333333 }, Flags = { Linear = true } }
         }
      },
      MediaOut1 = MediaOut {
         Inputs = {
            Index = Input { Value = "0", },
            Input = Input {
               SourceOp = "Merge3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1870, 148.5 } },
      },
      MaskPaint1 = PaintMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            PaintMode = Input { Value = FuID { "None" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Paint = Input {
               SourceOp = "PolylineStroke1",
               Source = "Out",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 990, -16.5 } },
      },
      PolylineStroke1 = PolylineStroke {
         Points = {
         },
         IsThreaded = false,
         Brushes = { "SoftBrush" },
         ApplyModes = { "PaintApplyColor" },
         CtrlWZoom = false,
         Inputs = {
            StrokeControls = Input { Value = 1, },
            WriteOnStart = Input {
               SourceOp = "PolylineStroke1Start",
               Source = "Value",
            },
            WriteOnEnd = Input {
               SourceOp = "PolylineStroke1End",
               Source = "Value",
            },
            StrokeSize = Input { Value = 0.946, },
            Spacing = Input { Value = 0.071, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = 0.369634330272675, Y = -0.350282490253448, RX = -0.251722307229206, RY = -0.00470809646918948 },
                     { Linear = true, X = -0.385532587766647, Y = -0.364406794309616, LX = 0.251722307229206, LY = 0.00470809646918948, RX = -0.000302501621941694, RY = 0.210034918573743 },
                     { Linear = true, X = -0.386440092632472, Y = 0.265697961411612, LX = 0.000302501621941694, LY = -0.210034918573743, RX = 0.240896034343143, RY = -0.00287860809489661 },
                     { Linear = true, X = 0.336248010396957, Y = 0.257062137126923, LX = -0.240896034343143, LY = 0.00287860809489661, RX = 0.00105988418670577, RY = -0.0828625202852454 },
                     { Linear = true, X = 0.339427649974823, Y = 0.00847457628697157, LX = -0.00105988418670577, LY = 0.0828625202852454, RX = -0.155802856959012, RY = -0.00282485877986288 },
                     { Linear = true, X = -0.127980920902212, Y = -5.26170808312632e-11, LX = 0.155802856959012, LY = 0.00282485877986288 }
                  }
               },
            },
         },
      },
      PolylineStroke1Start = BezierSpline {
         SplineColor = { Red = 232, Green = 6, Blue = 244 },
         KeyFrames = {
            [10] = { 0, RH = { 15, 0 }, Flags = { Linear = true } },
            [25] = { 0, LH = { 20, 0 }, RH = { 31, 0 }, Flags = { Linear = true } },
            [43] = { 0, LH = { 37, 0 }, RH = { 50.3333333333333, 0 }, Flags = { Linear = true } },
            [65] = { 0, LH = { 57.6666666666667, 0 }, RH = { 76.6666666666667, 0 }, Flags = { Linear = true } },
            [100] = { 0, LH = { 88.3333333333333, 0 }, Flags = { Linear = true } }
         }
      },
      PolylineStroke1End = BezierSpline {
         SplineColor = { Red = 72, Green = 233, Blue = 54 },
         KeyFrames = {
            [10] = { 0, RH = { 15, 0.0555555666666667 }, Flags = { Linear = true } },
            [25] = { 0.1666667, LH = { 20, 0.111111133333333 }, RH = { 31, 0.233333355555556 }, Flags = { Linear = true } },
            [43] = { 0.366666666666667, LH = { 37, 0.300000011111111 }, RH = { 50.3333333333333, 0.366666666666678 }, Flags = { Linear = true } },
            [65] = { 0.3666666666667, LH = { 57.6666666666667, 0.366666666666689 }, RH = { 76.6666666666667, 0.5777777777778 }, Flags = { Linear = true } },
            [100] = { 1, LH = { 88.3333333333333, 0.7888888888889 }, Flags = { Linear = true } }
         }
      },
      Note4 = Note {
         Inputs = {
            Comments = Input { Value = "In reality its going to be a route animation for a seightseeing company with a realy hughe map, camera movement and a lot of things wich shall show up. Means everytime we want to change the timing, i have big problems.", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 1430, 214.5 },
            Flags = {
               Expanded = true
            },
            Size = { 481.537, 79.5679 }
         },
      },
      Note5 = Note {
         Inputs = {
            Comments = Input { Value = "Solution ideas?\n\nin this case above the first animation starts, when the path has a vallue (WriteToEnd) of 0.1666667 and the second blob starts at a vallue of 0.4933333333334\n\ni want to be able to let the blobs start at those vallues. Or get the frames out of the vallues and delay the blobs by this amount (i would make the blobs start at frame 0 and than delay them)\n\nanother idea would be to put the blob animation in something like a container. like a compound clip and to get this container startet at the vallues,\n\n", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 935, 346.5 },
            Flags = {
               Expanded = true
            },
            Size = { 948.101, 181.364 }
         },
      },
      Note2 = Note {
         Inputs = {
            Comments = Input { Value = "These red blobs are my animations wich shall show up with a litle animated movement in the exact moment when the path/route hits it.", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 1320, -115.5 },
            Flags = {
               Expanded = true
            },
            Size = { 439.546, 77.023 }
         },
      },
      Note3 = Note {
         Inputs = {
            Comments = Input { Value = "Now imagine i have 50 red blobs\ni animated them, like i did it here in this example\nthan we need to change the speed of the path or the length of the break or the timing of start and/or end\n\nthan i have to readjust all 50 red blobs", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 770, 214.5 },
            Flags = {
               Expanded = true
            },
            Size = { 616.84, 104.169 }
         },
      },
      Note1 = Note {
         Inputs = {
            Comments = Input { Value = "This is my route made with a MaskPaint\n\nThe path lenght is totaly safe and will stay as it is. But the timing of the path (the start, the break, the end) is not safe yet and will change a few times in the future along the creating process", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 770, -82.5 },
            Flags = {
               Expanded = true
            },
            Size = { 196, 201.404 }
         },
      }
   }
}
Last edited by kalony on Mon Mar 15, 2021 8:30 am, edited 1 time in total.
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Specific Fusion Code

PostSun Mar 14, 2021 2:10 am

The Dropbox is fine. I'll try to remember to take a look on Monday.

To paste nodes here, you can just copy them from your Flow view and paste them between [code] [/code] tags. Then another user can copy that text and paste it back into their Fusion to get the same nodes.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

UserNoah

  • Posts: 458
  • Joined: Fri Oct 04, 2019 3:32 pm
  • Location: Germany
  • Real Name: Noah Hähnel

Re: Specific Fusion Code

PostSun Mar 14, 2021 9:51 am

Bryan Ray wrote:Well, there is a reason; I remember reading it. I just can't remember what it is. :D


I asked the same question once, this is probably where you've read (and forgot) the answer :lol:
I even found the Lounge chat where I asked it:
https://www.steakunderwater.com/wesuckl ... ?start=930

It basically has to do with the fact that the if() Expression doesn't necessarily return anything. But you can manually specify to return a value, then you can use the standard Lua if(), like here:

Code: Select all
{
   Tools = ordered() {
      Text1_1 = TextPlus {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            StyledText = Input { Value = "iif(time<10, 1, 0)", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = ""
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 82.5 } },
      },
      Dissolve1 = Dissolve {
         Transitions = {
            [0] = "DFTDissolve"
         },
         Inputs = {
            Mix = Input { Expression = "iif(time<10, 1, 0)", },
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Text1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 247.5 } },
      },
      Background1 = Background {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 247.5 } },
      },
      Text1 = TextPlus {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            StyledText = Input { Value = ":if time > 10 then return 1 else return 0 end", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.0472, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, },
            ManualFontKerningPlacement = Input {
               Value = StyledText {
                  Array = {
                  },
                  Value = ""
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 82.5 } },
      },
      Dissolve2 = Dissolve {
         Transitions = {
            [0] = "DFTDissolve"
         },
         CtrlWZoom = false,
         Inputs = {
            Mix = Input { Expression = ":if time > 10 then return 1 else return 0 end", },
            Background = Input {
               SourceOp = "Dissolve1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Text1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 247.5 } },
      }
   }
}


iif() is weird to figure out but once you got it then it's a little shorter than the normal if(). Altough it might be easier to teach this with the longer if() because it's almost a full sentence and it's very clear what happens.
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Re: Specific Fusion Code

PostMon Mar 15, 2021 8:35 am

iif() is weird to figure out but once you got it then it's a little shorter than the normal if(). Altough it might be easier to teach this with the longer if() because it's almost a full sentence and it's very clear what happens.


Yeah, got it. Makes sense.. And i prefer the short iif version now that i know it :)


I edited my upper post and put in the code, so noone has to download the dropbox comp.

Thanks to yall

Thomas
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Specific Fusion Code

PostMon Mar 15, 2021 7:00 pm

You know, I was writing a big, complicated expression to solve this, and then I remembered that TimeMachine exists, and it will probably do everything you need.

If you don't already have Reactor, go to https://www.steakunderwater.com/wesuckl ... m.php?f=40 and install it.

Then download TimeMachine and have a go with it. It's a big, powerful tool, so it's helpful to look through the support thread at WSL: https://www.steakunderwater.com/wesuckl ... p=578#p578
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Re: Specific Fusion Code

PostMon Mar 15, 2021 11:23 pm

i dont know how to say...let me...well...you know....ahhhmmmm....yes.

IT DID EXACTLY WHAT I WANT!

Hell yeah, that will save me a lot of time! awesome. The trigger mode is what i was looking for.
Thanks alot man...if you ever come to tow, gimme a note, i have to spend some drinks for you :)

Thomas
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Specific Fusion Code

PostTue Mar 16, 2021 6:01 am

Maybe offer them to Pieter Van Houte (SecondMan), since he wrote the thing. :D
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

kalony

  • Posts: 47
  • Joined: Wed Apr 10, 2019 8:42 pm
  • Real Name: Thomas Baumgärtel

Re: Specific Fusion Code

PostTue Mar 16, 2021 8:03 am

I did. He can at least buy a few beers now :)

Return to Fusion

Who is online

Users browsing this forum: birdseye, martyeu and 33 guests