Opening two items from the timeline in fusion

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

joewav

  • Posts: 2
  • Joined: Sun Mar 23, 2025 2:15 pm
  • Real Name: yoav kleinfeld

Opening two items from the timeline in fusion

PostSun Mar 23, 2025 2:34 pm

Screenshot 2025-03-23 212922.png
Screenshot 2025-03-23 212922.png (34.33 KiB) Viewed 297 times

Screenshot 2025-03-23 212545.png
Screenshot 2025-03-23 212545.png (365.17 KiB) Viewed 297 times

I honestly spent a few good hours trying to find a tutorial / explanation on this.

At the end of a promotional video I'm compiling, I have my logo fading in on the side of the frame, and I then wanted the image to fade out, leaving the logo with the image showing through it.

I can open the logo in the fusion tab, and then open the same image from the media pool and connect them, which creates this effect, without saving the positions of both elements, so the (now) background image is showing through, but the elements aren't keeping their position in relation to each other.

What I would like to do is open both images together (the last image frame and the logo) in fusion, so that each keep their position in relation to each other (the logo zoomed out and positioned on the side of the image), creating a smooth transition. But all I can do is choose one of them to be opened in fusion, and then basically grab a new file from the media pool, and then I can't find a way to reposition them.

Any help appreciated.
Online

Christoph Schmid

  • Posts: 785
  • Joined: Thu Sep 26, 2019 10:15 am
  • Real Name: Christoph Schmid

Re: Opening two items from the timeline in fusion

PostMon Mar 24, 2025 11:08 am

Paste the following code into an empty Fusion Comp:
Code: Select all
{
   Tools = ordered() {
      MediaOut1 = MediaOut {
         Inputs = {
            Index = Input { Value = "0", },
            Input = Input {
               SourceOp = "Merge3",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 715, 49.5 } },
      },
      Merge3 = Merge {
         CtrlWZoom = false,
         Inputs = {
            Blend = Input {
               SourceOp = "Merge3Blend",
               Source = "Value",
            },
            Background = Input {
               SourceOp = "Merge2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, }
         },
         ViewInfo = OperatorInfo { Pos = { 550, 49.5 } },
      },
      Merge3Blend = BezierSpline {
         SplineColor = { Red = 205, Green = 205, Blue = 205 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [25] = { 1, RH = { 50, 0.666666666666667 }, Flags = { Linear = true } },
            [100] = { 0, LH = { 75, 0.333333333333333 }, Flags = { Linear = true } }
         }
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "YourBackground",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "YourLogo",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, }
         },
         ViewInfo = OperatorInfo { Pos = { 385, 16.5 } },
      },
      YourLogo = TextPlus {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            LayoutRotation = Input { Value = 1, },
            TransformRotation = Input { Value = 1, },
            Red1 = Input { Value = 0, },
            Green1 = Input { Value = 0, },
            Blue1 = Input { Value = 0, },
            Softness1 = Input { Value = 1, },
            StyledText = Input { Value = "LOGO", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.2835, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalJustificationNew = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { 330, 49.5 } },
      },
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "YourBackground",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "YourLogo",
               Source = "Output",
            },
            Operator = Input { Value = FuID { "Mask" }, },
            PerformDepthMerge = Input { Value = 0, }
         },
         ViewInfo = OperatorInfo { Pos = { 385, 82.5 } },
      },
      YourBackground = Background {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Type = Input { Value = FuID { "Corner" }, },
            TopLeftRed = Input { Value = 1, },
            TopRightGreen = Input { Value = 1, },
            BottomLeftBlue = Input { Value = 1, },
            BottomRightRed = Input { Value = 1, },
            BottomRightGreen = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 165, 49.5 } },
      }
   }
}


In Merge2 the Operator is set to Mask.
Merge3 is animated to blend between Merge1 and Merge2.

Davinci Resolve Studio 20.0B2 Build 27
Windows 10 Pro 22H2
Davinci Resolve Studio 19.1.4 Build 11
Linux Ubuntu Studio 24.04 (Rocky 8.6 Container)
Offline
User avatar

KrunoSmithy

  • Posts: 4447
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: Opening two items from the timeline in fusion

PostMon Mar 24, 2025 4:40 pm

There are many ways to do it, and Christoph is a good way. Here is yet another, but all will work.

Same thing. Either open clip that is longer than 250 frames (that is my lenght of animation, but you can change it) or use empty fusion composition generator and drag Media In from media pool.

I used dissolve tool in fusion to dissolve between two versions and linked dissolve to blend slider of the merge 2 so you only need to animate blend slider and the other will follow. And I used brightness / contrast to animate logo and text fade in, but if you are doing it, you can do the same in the text + tool, I just did it with brightness / contrast if you want to replace my text + with your logo and text and not have to animate it again.

If you want, you can animate positing and zoom and even opacity from text plus node. And if its an image you can use transform node after it to do the same.

There is probably half a dozen ways to do the same thing, so these are just two.

sshot-949.jpg
sshot-949.jpg (71.63 KiB) Viewed 250 times


sshot-950.jpg
sshot-950.jpg (68.63 KiB) Viewed 250 times


Copy and paste this code to your fusion node area.

Code: Select all
{
   Tools = ordered() {
      YourLogo_and_Text = TextPlus {
         NameSet = true,
         Inputs = {
            GlobalOut = Input { Value = 250, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Center = Input { Value = { 0.084, 0.662 }, },
            LayoutRotation = Input { Value = 1, },
            LineSpacing = Input { Value = 0.622, },
            TransformRotation = Input { Value = 1, },
            SelectElement = Input { Value = 1, },
            Select = Input { Value = 1, },
            Red1 = Input { Value = 0, },
            Green1 = Input { Value = 0, },
            Blue1 = Input { Value = 0, },
            Softness1 = Input { Value = 1, },
            StyledText = Input { Value = "YOUR LOGO\nAND TEXT\nGOES HERE", },
            Font = Input { Value = "Open Sans", },
            Style = Input { Value = "Bold", },
            Size = Input { Value = 0.1772, },
            VerticalJustificationNew = Input { Value = 3, },
            HorizontalLeftCenterRight = Input { Value = -1, },
            HorizontalJustificationNew = Input { Value = 3, },
            Red2 = Input { Value = 0, },
            Softness2 = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { -10.0726, -30.2121 } },
      },
      FadeInBrightnessContrast = BrightnessContrast {
         NameSet = true,
         Inputs = {
            Alpha = Input { Value = 1, },
            Gain = Input {
               SourceOp = "BrightnessContrast1Gain",
               Source = "Value",
            },
            ClipBlack = Input { Value = 1, },
            ClipWhite = Input { Value = 1, },
            PreDividePostMultiply = Input { Value = 1, },
            Input = Input {
               SourceOp = "YourLogo_and_Text",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 179.936, -30.2121 } },
      },
      BrightnessContrast1Gain = BezierSpline {
         SplineColor = { Red = 104, Green = 144, Blue = 233 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 16.6666666666667, 0.333333333333333 }, Flags = { Linear = true } },
            [50] = { 1, LH = { 33.3333333333333, 0.666666666666667 }, Flags = { Linear = true } }
         }
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "FadeInBrightnessContrast",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
            Operator = Input { Value = FuID { "In" }, },
            PerformDepthMerge = Input { Value = 0, }
         },
         ViewInfo = OperatorInfo { Pos = { 228.732, 25.5454 } },
      },
      YourFootage = Background {
         NameSet = true,
         CustomData = {
            Path = {
               Map = {
                  ["Setting:"] = "Macros:\\"
               }
            },
         },
         Inputs = {
            GlobalOut = Input { Value = 250, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            Type = Input { Value = FuID { "Corner" }, },
            TopLeftRed = Input { Value = 1, },
            TopRightGreen = Input { Value = 1, },
            BottomRightBlue = Input { Value = 1, },
            Comments = Input { Value = "Useful to test transformation and distortion tools when you need to see how much and what way the image is adjusted\nby Gregory Chalenko\nwww.compositing.ru", }
         },
         ViewInfo = OperatorInfo { Pos = { -6.30141, 79.4848 } },
      },
      PipeRouter1 = PipeRouter {
         Inputs = {
            Input = Input {
               SourceOp = "YourFootage",
               Source = "Output",
            }
         },
         ViewInfo = PipeRouterInfo { Pos = { 108.721, 79.4848 } },
      },
      Dissolve1 = Dissolve {
         Transitions = {
            [0] = "DFTDissolve",
            "DFTAddDissolve",
            "DFTErode",
            "DFTRandomNoise",
            "DFTLumaRamp"
         },
         Inputs = {
            Mix = Input {
               Value = 0.00242975974675354,
               Expression = "Merge2.BlendClone",
            },
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "FadeInBrightnessContrast",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 384.794, 25.5454 } },
      },
      Merge2 = Merge {
         CtrlWZoom = false,
         Inputs = {
            Blend = Input {
               SourceOp = "Merge2Blend",
               Source = "Value",
            },
            Background = Input {
               SourceOp = "Dissolve1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
            Operator = Input { Value = FuID { "Under" }, },
            PerformDepthMerge = Input { Value = 0, }
         },
         ViewInfo = OperatorInfo { Pos = { 384.794, 79.4848 } },
      },
      Merge2Blend = BezierSpline {
         SplineColor = { Red = 205, Green = 205, Blue = 205 },
         CtrlWZoom = false,
         NameSet = true,
         KeyFrames = {
            [76] = { 1, RH = { 123.52, 0.671630486200014 }, Flags = { Linear = true } },
            [220] = { 0, LH = { 172.48, 0 } }
         }
      }
   }
}
Offline

joewav

  • Posts: 2
  • Joined: Sun Mar 23, 2025 2:15 pm
  • Real Name: yoav kleinfeld

Re: Opening two items from the timeline in fusion

PostThu Mar 27, 2025 11:40 am

Thanks for the answers, even though they both seem to be over my head.

I never saw an option to put code anywhere, and wouldn't know how.

But I'm not sure both answers fix the actual issue - I think what you did was open both directly in Fusion, and this doesn't save their relative position to each other, which I fixed in the timeline tab via inspector and the zoom and x y positions.

Before I saw your answers I just ended up creating the image I wanted in Gimp, taking care the position is correct, and dissolved the black logo with the cut out logo.

Thanks anyway, would still appreciate any reply that would explain how to do this next time, if you're not too bothered.
Offline
User avatar

KrunoSmithy

  • Posts: 4447
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: Opening two items from the timeline in fusion

PostFri Mar 28, 2025 12:12 am

joewav wrote:Thanks for the answers, even though they both seem to be over my head.

I never saw an option to put code anywhere, and wouldn't know how.

Thanks anyway, would still appreciate any reply that would explain how to do this next time, if you're not too bothered.


Fusion nodes / tools are in lua code, so you can share them across compositions, users and over forum via ordinary text. All you need to do is copy the code you see here in forums to your clipboard and paste it in empty area of the fusion node tree or node area. And you should see the same node set up as we do. Than you can use it as inspiration to do your own or build upon what we have done and modify it to your needs.

Return to DaVinci Resolve

Who is online

Users browsing this forum: 68arti, Bing [Bot], panos_mts, Pecusx and 392 guests