Can sShapes function as a mask?

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

rsf123

  • Posts: 458
  • Joined: Tue May 21, 2019 3:05 pm
  • Real Name: Roger Smith

Can sShapes function as a mask?

PostSun Apr 21, 2024 8:05 am

In the following example, I've created an sShape that is a white rectangle having 7 red stars on top of the white strip.

I want to mask part of it, and tried to use the sBoolean to 'intersection' formed by an sEllipse over the white-strip-stars.

But the output of the sBoolean is only the sEllipse over the white rectangle. Specifically, the sBoolean ignores the red stars.

(I know how to use conventional masks outside of the sShapes vector environment, but am wanting to use a mask inside the sShapes environment. This is so that I can magnify the size without the image becoming a bit-mapped mass of fuzz.

Is there any way to do masking inside the sShape environment prior to it being sRendered?

(In the example, in the sBoolean node, swapping the foreground and background inputs does not make a difference).

I wonder if there have been extra features added in Davinci 19?

boolean.png
boolean.png (461 KiB) Viewed 693 times


Code: Select all
{
   Tools = ordered() {
      sBoolean1 = sBoolean {
         CtrlWZoom = false,
         Inputs = {
            Input1 = Input {
               SourceOp = "sMerge2",
               Source = "Output",
            },
            Input2 = Input {
               SourceOp = "sEllipse1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -1320, 379.5 } },
      },
      sMerge2 = sMerge {
         Inputs = {
            Input1 = Input {
               SourceOp = "sRectangle1",
               Source = "Output",
            },
            Input2 = Input {
               SourceOp = "sDuplicate1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -1522.36, 313.5 } },
      },
      sRectangle1 = sRectangle {
         Inputs = {
            Width = Input { Value = 0.835, },
            Height = Input { Value = 0.15, },
         },
         ViewInfo = OperatorInfo { Pos = { -1687.36, 313.5 } },
      },
      sDuplicate1 = sDuplicate {
         Inputs = {
            Copies = Input { Value = 5, },
            XOffset = Input { Value = 0.124, },
            Input = Input {
               SourceOp = "sStar2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -1522.36, 247.5 } },
      },
      sEllipse1 = sEllipse {
         ViewInfo = OperatorInfo { Pos = { -1155, 313.5 } },
      },
      sRender1 = sRender {
         Inputs = {
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 3840, },
            Height = Input { Value = 2160, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Input = Input {
               SourceOp = "sBoolean1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -1320, 445.5 } },
      },
      Merge6 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background1_1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "sRender1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { -1320, 511.5 } },
      },
      Background1_1 = Background {
         Inputs = {
            GlobalOut = Input { Value = 124, },
            Width = Input { Value = 3840, },
            Height = Input { Value = 2160, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { -1650, 511.5 } },
      },
      sStar2 = sStar {
         Inputs = {
            Points = Input { Value = 14, },
            ["Translate.X"] = Input { Value = -0.283, },
            Width = Input { Value = 0.142, },
            Height = Input {
               Value = 0.142,
               Expression = "Width",
            },
            Green = Input { Value = 0.149019607843137, },
            Blue = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { -1522.36, 181.5 } },
      },
      MediaOut1 = MediaOut {
         Inputs = {
            Index = Input { Value = "0", },
            Input = Input {
               SourceOp = "Merge6",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { -1100, 511.5 } },
      },
      Note1 = Note {
         Inputs = {
            Comments = Input { Value = "White strip with red stars", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { -1760, 141.197 },
            Flags = {
               Expanded = true
            },
            Size = { 397.964, 221.667 }
         },
      }
   },
   ActiveTool = "sBoolean1"
}
Offline

Sander de Regt

  • Posts: 3634
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Can sShapes function as a mask?

PostSun Apr 21, 2024 8:22 am

If you select 'keep' instead of replace where it says 'style' the stars will be just fine.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

rsf123

  • Posts: 458
  • Joined: Tue May 21, 2019 3:05 pm
  • Real Name: Roger Smith

Re: Can sShapes function as a mask?

PostSun Apr 21, 2024 11:14 am

Sander de Regt wrote:If you select 'keep' instead of replace where it says 'style' the stars will be just fine.


Thanks. I assume you mean, in the sBoolean node, at the STYLE MODE menu option.

As shown in the screenshot below, when I click the menu, there is only the REPLACE option. There is no KEEP option in the pulldown menu.

I ascertained, from a YouTube tutorial below, that the KEEP option is only in Davinci 19.

Can you confirm that you are using the Davinci 19 beta?

keep.png
keep.png (560.5 KiB) Viewed 355 times


Tutorial where it says the KEEP option is part of Davinci 19 at 2:26 in the video.

Offline

Sander de Regt

  • Posts: 3634
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Can sShapes function as a mask?

PostSun Apr 21, 2024 1:38 pm

That's right. I'm using the 19 beta. For some reason I always do run the cutting edge of technology :-)
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

rsf123

  • Posts: 458
  • Joined: Tue May 21, 2019 3:05 pm
  • Real Name: Roger Smith

Re: Can sShapes function as a mask?

PostTue Apr 30, 2024 7:59 am

Sander de Regt wrote:If you select 'keep' instead of replace where it says 'style' the stars will be just fine.


I managed to test Beta 1 DVR 19 and, yes, it does work. But I had to use a sBoolean (and not an sMerge) to combine the red stars and white rectangle.

Whereas, in the version above - where the red stars and white rectangle are combined using an sMerge, it did not work.

Return to DaVinci Resolve

Who is online

Users browsing this forum: Google [Bot], Roberto Duarte and 125 guests