Jump to: Board index » General » Fusion

How to get sharp/crisp edges to rectangles?

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

tokintmash

  • Posts: 24
  • Joined: Sun Feb 04, 2018 5:34 pm
  • Real Name: Miikael Volkonski

How to get sharp/crisp edges to rectangles?

PostTue Oct 04, 2022 7:40 am

I put two rectangles with identical height on top of each other, one red and the other one black. The black one is covering the red but I get the red bleeding out at the edges. I made the red first, then copied the nodes and just simply changed the color to black so they are identical. I've tried rectangle and srectangle. I've made them bigger initially and then sized down. Nothing seems to help. Resolution is 4K.

I guess the problem is that they are not pixel perfect i.e their height value is not a round number in pixels but with a comma and so there's blur? How to get rid of this?

Capture.PNG
Capture.PNG (79.84 KiB) Viewed 1494 times
Offline

bentheanimator

  • Posts: 449
  • Joined: Mon May 13, 2019 10:38 pm
  • Location: Minneapolis, MN
  • Real Name: Ben Hall

Re: How to get sharp/crisp edges to rectangles?

PostTue Oct 04, 2022 7:08 pm

There are a few ways to do it but this is a pretty straight forward way. Start both Backgrounds on top of each other. Then use a transform to move the top, Black BG out of the way. Use the top Black BG piped into the Merge of the red BG over your main canvas BG. Picture is easier to understand...

Screenshot 2022-10-04 140630.png
Screenshot 2022-10-04 140630.png (140.8 KiB) Viewed 1387 times



Code: Select all
{
   Tools = ordered() {
      Background2 = Background {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1000, },
            Height = Input { Value = 501, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 330, 82.5 } },
      },
      Background2_1 = Background {
         Inputs = {
            Width = Input { Value = 1000, },
            Height = Input { Value = 500, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 330, 214.5 } },
      },
      Transform1 = Transform {
         Inputs = {
            Center = Input { Value = { 0.401548038534062, 0.5 }, },
            Pivot = Input { Value = { 1, 0.5 }, },
            UseSizeAndAspect = Input { Value = 0, },
            XSize = Input { Value = 0.81, },
            Input = Input {
               SourceOp = "Background2_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 214.5 } },
      },
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
            EffectMask = Input {
               SourceOp = "Background2_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 605, 82.5 } },
      },
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 16.5 } },
      },
      Merge1_1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 214.5 } },
      }
   }
}
Resolve & Fusion Studio 18.6.5
Windows 10
Intel Xeon CPU 2699A @ 2.40GHz | 128GB RAM | 2xRTX3090 | 512NVME System | 8TB NMVE Scratch | 80TB 8Gbps Fiber

MacOS 12.7.2
MacBook Pro 13,3 | 16GB | Radeon 460 4GB | 256GB System | 256GB Scratch
Offline

GalinMcMahon

  • Posts: 715
  • Joined: Sun Sep 29, 2019 10:14 pm
  • Real Name: Galin McMahon

Re: How to get sharp/crisp edges to rectangles?

PostThu Oct 06, 2022 6:38 pm

Could this be fixed with a pre divide / post multiply? There is a check box in I think 'settings' for the nodes. Easy fix if it works.
Water cooled Windows 11 laptop
i9 12th gen - 64GB RAM - 16GB 3080ti
2TB 4th gen nvme main - 4TB 4th gen nvme scratch
Micro panel (thank you BM :) ) - Stream Deck
Resolve Studio 18.5
BenQ ultrawide - DeckLink 4k mini via Sonnet - 48” LG C2 OLED
Offline

tokintmash

  • Posts: 24
  • Joined: Sun Feb 04, 2018 5:34 pm
  • Real Name: Miikael Volkonski

Re: How to get sharp/crisp edges to rectangles?

PostSat Oct 08, 2022 7:21 pm

bentheanimator wrote:There are a few ways to do it but this is a pretty straight forward way. Start both Backgrounds on top of each other. Then use a transform to move the top, Black BG out of the way. Use the top Black BG piped into the Merge of the red BG over your main canvas BG. Picture is easier to understand...


Actually no, it does not work. I forgot to mention that I mask these BGs with animated rectangles. A black box is sliding over the red one.

When I only use BGs the solution works, but the moment I apply masks the edges bleed again. :(

Yours is on the left with mask applied and mine is on the right.
Capture.PNG
Capture.PNG (346.36 KiB) Viewed 1083 times
Last edited by tokintmash on Mon Oct 10, 2022 5:55 am, edited 1 time in total.
Offline

tokintmash

  • Posts: 24
  • Joined: Sun Feb 04, 2018 5:34 pm
  • Real Name: Miikael Volkonski

Re: How to get sharp/crisp edges to rectangles?

PostWed Oct 12, 2022 6:41 am

Finally managed to do it. Thanks Ben. Your advice lead me to the right direction.

My background is Adobe Illustrator and in there, if you put two identical shapes on top of each other, the one on top covers the one one below perfectly. That's why it was so difficult for me to grasp. The approach is so different.

In my case I have the black rectangle sliding on the red one and stopping in the middle. Also the length of the red one is animated. I thought I just use two shapes and animate them. Instead I had to animate masks.

So I created several animated masks that, first, cut the black rectangle and then cut the red rectangle exactly where the mask of the black rectangle is. Plus, it's an info box for a TV series so I had to make sure it's easy to multiply as I need to create many variations with different lengths.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 29 guests