How do I ... solid colour gradient to transparent?

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

Tukcedo

  • Posts: 50
  • Joined: Mon Jul 09, 2018 3:21 pm
  • Location: Netherlands
  • Real Name: Michel van der Kleij

How do I ... solid colour gradient to transparent?

PostSat Sep 22, 2018 7:09 pm

Hi everyone,

I would like a solid colour bar as a background to a title in a video that is solid on one end and fades to transparency at the other end, a bit short of the opposite edge. I can make the bar and the solid background fill easily enough but then I get stuck.

I can do this in GIMP by creating a PNG (GIMP has a gradient tool) but I was wondering how to go about this IN DR15. I played a bit with Fusion but couldn't find anything to my liking (or it crashed DR ....).

Any ideas? Thx!
HW: Dell XPS15, i7-8750 6 core, 32Gb RAM, 1Tb SSD
GPU: NVIDIA GeForce 1050Ti 4Gb on 4K
SW: DVR 16.1.1.005 Lite on CentOS 7
Offline
User avatar

JPOwens

  • Posts: 1511
  • Joined: Fri Apr 12, 2013 8:04 pm
  • Location: Victoria, British Columbia, Canada

Re: How do I ... solid colour gradient to transparent?

PostSat Sep 22, 2018 8:08 pm

You might need to create an alpha channel with falloff. Within Resolve you could do this by converting the generator into a compound clip.

jPo, CSI
Offline
User avatar

waltervolpatto

  • Posts: 10536
  • Joined: Thu Feb 07, 2013 5:07 pm
  • Location: 1146 North Las Palmas Ave. Hollywood, California 90038 USA

Re: How do I ... solid colour gradient to transparent?

PostSat Sep 22, 2018 8:09 pm

In resolve 15,
create a ramp
Compound clip it
Go to fusion
Use the tool the add the key from another channel, pipe the green to the alpha.

Done
W10-19043.1645- Supermicro MB C9X299-PGF - RAM 128GB CPU i9-10980XE 16c 4.3GHz (Oc) Water cooled
Decklink Studio 4K (12.3)
Resolve 18.5.1 / fusion studio 18
GPU 3090ti drivers 512.59 studio
Offline

Tukcedo

  • Posts: 50
  • Joined: Mon Jul 09, 2018 3:21 pm
  • Location: Netherlands
  • Real Name: Michel van der Kleij

Re: How do I ... solid colour gradient to transparent?

PostSun Sep 23, 2018 4:00 pm

Thanks for that so far Walter, but oh dear, I'm going to need a few more pointers on this, I don't know much about Fusion yet ...

waltervolpatto wrote:In resolve 15, create a ramp

Speed ramp Walter? But I can't imagine why you'd want a speed ramp ...
What I've done is use the generator to create a solid colour, then crop top and bottom so it's in the right position and of the correct size.
waltervolpatto wrote:Compound clip it
Go to fusion

Yep, done that
waltervolpatto wrote:Use the tool the add the key from another channel, pipe the green to the alpha.

I know how to work with the nodes, so I understand that last bit (I think), but I can't find a way to create the alpha channel and then how you would apply it so that it fades slowly from solid to transparent ...
HW: Dell XPS15, i7-8750 6 core, 32Gb RAM, 1Tb SSD
GPU: NVIDIA GeForce 1050Ti 4Gb on 4K
SW: DVR 16.1.1.005 Lite on CentOS 7
Offline
User avatar

waltervolpatto

  • Posts: 10536
  • Joined: Thu Feb 07, 2013 5:07 pm
  • Location: 1146 North Las Palmas Ave. Hollywood, California 90038 USA

Re: How do I ... solid colour gradient to transparent?

PostSun Sep 23, 2018 5:33 pm

speed ramp was a typo!!!..

as i understand you have a gradient (like a gray ramp) and you want make that an alpha channel dissolve.

go to fusion
add the [ChannelBoolean]
ToAlpha=GreenFG

that should do it.
W10-19043.1645- Supermicro MB C9X299-PGF - RAM 128GB CPU i9-10980XE 16c 4.3GHz (Oc) Water cooled
Decklink Studio 4K (12.3)
Resolve 18.5.1 / fusion studio 18
GPU 3090ti drivers 512.59 studio
Offline

Tukcedo

  • Posts: 50
  • Joined: Mon Jul 09, 2018 3:21 pm
  • Location: Netherlands
  • Real Name: Michel van der Kleij

Re: How do I ... solid colour gradient to transparent?

PostSun Sep 23, 2018 7:52 pm

waltervolpatto wrote:as i understand you have a gradient (like a gray ramp) and you want make that an alpha channel dissolve.

go to fusion
add the [ChannelBoolean]
ToAlpha=GreenFG

Ah OK, understand the ramp bit now. No, I don't have that yet, I think that's the missing link because I could then use that as a mask probably. Here is what I've got and the idea as I made it using GIMP and converting the PNG to a compound clip.

Solid2Transparent1.png
Solid2Transparent1.png (185.31 KiB) Viewed 13603 times
Attachments
Solid2Transparent2.png
Solid2Transparent2.png (422.22 KiB) Viewed 13603 times
HW: Dell XPS15, i7-8750 6 core, 32Gb RAM, 1Tb SSD
GPU: NVIDIA GeForce 1050Ti 4Gb on 4K
SW: DVR 16.1.1.005 Lite on CentOS 7
Offline
User avatar

waltervolpatto

  • Posts: 10536
  • Joined: Thu Feb 07, 2013 5:07 pm
  • Location: 1146 North Las Palmas Ave. Hollywood, California 90038 USA

Re: How do I ... solid colour gradient to transparent?

PostSun Sep 23, 2018 10:40 pm

Tukcedo wrote:
waltervolpatto wrote:as i understand you have a gradient (like a gray ramp) and you want make that an alpha channel dissolve.

go to fusion
add the [ChannelBoolean]
ToAlpha=GreenFG

Ah OK, understand the ramp bit now. No, I don't have that yet, I think that's the missing link because I could then use that as a mask probably. Here is what I've got and the idea as I made it using GIMP and converting the PNG to a compound clip.

Solid2Transparent2.png


yes you can build it combining a ramp (as alpha), your background color and slap them together, then I will save it for future use.
W10-19043.1645- Supermicro MB C9X299-PGF - RAM 128GB CPU i9-10980XE 16c 4.3GHz (Oc) Water cooled
Decklink Studio 4K (12.3)
Resolve 18.5.1 / fusion studio 18
GPU 3090ti drivers 512.59 studio
Offline
User avatar

Jack Swart

  • Posts: 769
  • Joined: Fri Aug 15, 2014 8:09 pm
  • Location: Sydney, Australia

Re: How do I ... solid colour gradient to transparent?

PostTue Sep 25, 2018 5:46 am

In DR Fusion,

On the timeline select your clip for the lower 1/3

Open the Fusion tab.

Paste in the composition below.

Break the link between the media in and out and connect them in and out of the Merge 1 node

Adjust text and other stuff to taste...





{
Tools = ordered() {
Merge1 = Merge {
Inputs = {
Foreground = Input {
SourceOp = "Merge2",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 430, 141 } },
},
Merge2 = Merge {
Inputs = {
Background = Input {
SourceOp = "Paint1",
Source = "Output",
},
Foreground = Input {
SourceOp = "Text1",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 430.333, 260.455 } },
},
Text1 = TextPlus {
CtrlWZoom = false,
Inputs = {
HorizontalJustificationNew = Input { Value = 3, },
VerticalJustificationNew = Input { Value = 3, },
GlobalOut = Input { Value = 250, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Center = Input { Value = { 0.223456790123457, 0.172875816993464 }, },
Font = Input { Value = "Open Sans", },
StyledText = Input { Value = "Soft Lower Third", },
Style = Input { Value = "Bold", },
ManualFontKerningPlacement = Input {
Value = StyledText {
Array = {
},
Value = ""
},
},
Blue1 = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 252.667, 265.727 } },
},
Paint1 = Paint {
Inputs = {
Input = Input {
SourceOp = "Background1",
Source = "Output",
},
Paint = Input {
SourceOp = "Rectangle1",
Source = "Out",
},
EffectMask = Input {
SourceOp = "Background2",
Source = "Output",
}
},
ViewInfo = OperatorInfo { Pos = { 432, 363.151 } },
},
Rectangle1 = Rectangle {
IsThreaded = false,
Brushes = {
},
ApplyModes = { "PaintApplyColor" },
CtrlWZoom = false,
Inputs = {
Center = Input { Value = { 0.505937970877708, 0.173292328050367 }, },
Width = Input { Value = 1.01551279548995, },
Height = Input { Value = 0.0935185253620148, },
["PaintApplyColor.Red"] = Input { Value = 0, },
["PaintApplyColor.Green"] = Input { Value = 0.3, },
},
},
Background2 = Background {
Inputs = {
GlobalOut = Input { Value = 250, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Type = Input { Value = FuID { "Gradient" }, },
TopRightAlpha = Input { Value = 0, },
Gradient = Input {
Value = Gradient {
Colors = {
[0.389261744966443] = { 0, 0, 0, 1 },
[0.808724832214765] = { 1, 1, 1, 0 }
}
},
},
Repeat = Input { Value = FuID { "Repeat" }, },
},
ViewInfo = OperatorInfo { Pos = { 608.334, 378.272 } },
},
Background1 = Background {
Inputs = {
GlobalOut = Input { Value = 250, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
TopLeftAlpha = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 281.334, 393.484 } },
}
}
}
DR Studio 18.6.3 b19, OS 13.2.1
2023 Mac Studio M1 Ultra, 20 core CPU, 48 core GPU, 128 GB ram
BM 3G ultra studio, 12TB SSDs in raid 0, 16TB HDD backup, 56TB archive server.
Tangent Elements panel, TV logic XVW-245W
Offline

dcolacino

  • Posts: 269
  • Joined: Sat Mar 21, 2020 10:17 pm
  • Real Name: Don Colacino

Re: How do I ... solid colour gradient to transparent?

PostWed Oct 14, 2020 1:13 am

I have a similar situation and was trying to do this with a rectangle instead of a paint node in order to have my client's gradient of colors in the shape behind the text.

Code: Select all
{
   Tools = ordered() {
      Rectangle1 = RectangleMask {
         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.5, 0.187 }, },
            Width = Input { Value = 1, },
            Height = Input { Value = 0.165, },
         },
         ViewInfo = OperatorInfo { Pos = { 16.0003, 10.9092 } },
      },
      Background1 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle1",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 299, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Type = Input { Value = FuID { "Gradient" }, },
            TopLeftRed = Input { Value = 1, },
            TopLeftGreen = Input { Value = 0.769841269841188, },
            TopLeftBlue = Input { Value = 0.1428571428571, },
            TopRightRed = Input { Value = 0.1924686192469, },
            TopRightGreen = Input { Value = 0.560669456067129, },
            TopRightBlue = Input { Value = 1, },
            BottomLeftRed = Input { Value = 1, },
            BottomLeftGreen = Input { Value = 0.3198380566802, },
            BottomLeftBlue = Input { Value = 0.631578947368487, },
            BottomRightRed = Input { Value = -0.00699999999999569, },
            BottomRightGreen = Input { Value = -0.0459999999999628, },
            BottomRightBlue = Input { Value = -0.153, },
            Start = Input { Value = { 0.252783964365256, 0.810891089108911 }, },
            End = Input { Value = { 0.865256124721604, -0.0821782178217822 }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 1, 0.7698412698412, 0.2222222222222, 0 },
                     [0.0447761194029851] = { 1, 0.3198380566802, 0.6315789473685, 256 },
                     [0.119402985074627] = { 0.7341269841271, 0.4325396825397, 1, 256 },
                     [0.278606965174129] = { 0.1924686192469, 0.5606694560671, 1, 256 },
                     [0.532338308457711] = { 0.046, 0.134, 0.239, 256 }
                  }
               },
            },
            Offset = Input { Value = -0.007, },
         },
         ViewInfo = OperatorInfo { Pos = { 239.333, 12.1213 } },
      },
      Background4 = Background {
         CtrlWZoom = false,
         Inputs = {
            GlobalOut = Input { Value = 299, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 12, 89.6969 } },
      },
      Merge5 = Merge {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
            Background = Input {
               SourceOp = "Background4",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 242, 88.4848 } },
      },
      Background2 = Background {
         Inputs = {
            GlobalOut = Input { Value = 299, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Type = Input { Value = FuID { "Gradient" }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0.218905472636816] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 0 }
                  }
               },
            },
            Repeat = Input { Value = FuID { "Repeat" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 456.667, 53.9394 } },
      }
   }
}


It takes the lower 3rd to black instead of transparent. Any idea why it doesn't work the same as Jack's example that uses the Paint node?
Resolve Studio 18.6.6 (build 7); iMac 27 inch, Retina 5K; 4.2 GHz Quad-Core Intel Core i7 processor; 64 GB 2400 MHz DDR4; Internal 2TB SSD; Radeon Pro 580 8 GB graphics running Ventura 13.6.4.
Offline

cloudyIdea

  • Posts: 1
  • Joined: Thu Aug 10, 2023 3:34 pm
  • Real Name: Matthew Pidgeon

Re: How do I ... solid colour gradient to transparent?

PostThu Aug 10, 2023 3:39 pm

This was bugging me too because it should be really simple.

What I found worked was... ( and we're talking Fusion here - not Resolve )

Create a background node. Set the type to Gradient. Play around with the onscreen widget to get it in the correct position etc.

The way I got this to work was to make the gradient and alpha mask for a merge. The key thing is that you'll need to knock the alpha down to zero on either the black or the white end of the gradient.

That should be enough to get you on the right track. It's pretty simple after that.

Return to DaVinci Resolve

Who is online

Users browsing this forum: Robert Niessner and 135 guests