Jump to: Board index » General » Fusion

Can you draw math functions in Fusion?

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

Eugene Afanasiev

  • Posts: 600
  • Joined: Sun Aug 30, 2015 2:57 pm
  • Location: Russia

Can you draw math functions in Fusion?

PostSun May 08, 2016 8:27 pm

I feel it could be useful but don't know how to do this...
__
--[[BMD's cameras and Resolve all-post workflow evangelist
My old stuff: http://www.youtube.com/rebelorelse
Debug: Asus ROG Duo GX550 i9 10980 48Gb RAM RTX2080MaxQ DaVinci Resolve Studio / Fusion Studio Latest Version]]--
Offline
User avatar

Eric Westphal

  • Posts: 214
  • Joined: Thu Nov 20, 2014 1:59 pm

Re: Can you draw math functions in Fusion?

PostTue May 10, 2016 5:15 pm

Here's a Q&D approach...:-)

Code: Select all
{
   Tools = ordered() {
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Duplicate1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 313.5, }, },
      },
      Duplicate1 = Fuse.Duplicate {
         CtrlWZoom = false,
         Inputs = {
            Copies = Input { Value = 200, },
            TimeOffset = Input { Value = 0.5, },
            RandomSeed = Input { Value = 26024, },
            Background = Input {
               SourceOp = "Background1_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 214.5, }, },
      },
      Background1_2 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            TopLeftRed = Input { Value = 1, },
            TopLeftGreen = Input { Value = 0.507759081990998, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
            EffectMask = Input {
               SourceOp = "Ellipse1",
               Source = "Mask",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 214.5, }, },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background1_1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 313.5, }, },
      },
      Ellipse1 = EllipseMask {
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1, }, },
            ClippingMode = Input { Value = FuID { "None", }, },
            Center = Input {
               Value = { 0.995, 0.316985642489871, },
               Expression = "Point(myX,math.sin((myX-0.5)*20)/2.5+.5)",
            },
            Width = Input { Value = 0.025, },
            Height = Input { Value = 0.025, },
            myX = Input {
               Value = 0.995,
               Expression = "time/100",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 214.5, }, },
         UserControls = ordered() {
            myX = {
               LINKID_DataType = "Number",
               INP_Default = 0,
               INPID_InputControl = "SliderControl",
               IC_ControlPage = 0,
            },
         },
      },
      Rectangle1 = RectangleMask {
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1, }, },
            ClippingMode = Input { Value = FuID { "None", }, },
            Width = Input { Value = 1, },
            Height = Input { Value = 0.005, },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 181.5, }, },
      },
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            TopLeftAlpha = Input { Value = 0, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 313.5, }, },
      },
      Background1_1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2", }, },
            TopLeftRed = Input { Value = 0.526666666666667, },
            TopLeftGreen = Input { Value = 0.526666666666667, },
            TopLeftBlue = Input { Value = 0.526666666666667, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1, },
                     [1] = { 1, 1, 1, 1, },
                  },
               },
            },
            EffectMask = Input {
               SourceOp = "Rectangle1_1",
               Source = "Mask",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 247.5, }, },
      },
      Rectangle1_1 = RectangleMask {
         Inputs = {
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1, }, },
            ClippingMode = Input { Value = FuID { "None", }, },
            Width = Input { Value = 0.0025, },
            Height = Input { Value = 1, },
            EffectMask = Input {
               SourceOp = "Rectangle1",
               Source = "Mask",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 214.5, }, },
      },
   },
}
my hovercraft is full of eels.
Offline
User avatar

Eugene Afanasiev

  • Posts: 600
  • Joined: Sun Aug 30, 2015 2:57 pm
  • Location: Russia

Re: Can you draw math functions in Fusion?

PostWed May 11, 2016 6:17 pm

Thanks!)
__
--[[BMD's cameras and Resolve all-post workflow evangelist
My old stuff: http://www.youtube.com/rebelorelse
Debug: Asus ROG Duo GX550 i9 10980 48Gb RAM RTX2080MaxQ DaVinci Resolve Studio / Fusion Studio Latest Version]]--

Return to Fusion

Who is online

Users browsing this forum: Steve@Aberdeen and 42 guests