Jump to: Board index » General » Fusion

Shape is cropped when the resolution is changed

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

mableflat

  • Posts: 19
  • Joined: Sun Jul 19, 2020 1:31 pm
  • Real Name: Stepan Bondar

Shape is cropped when the resolution is changed

PostSun Apr 11, 2021 12:09 pm

Hi guys!
Today I ran into a problem and I cannot understand why this is happening. I have two Polygons connected to a Merge and this Merge is the mask of the Background. When I change the resolution in the "Image" of this Background, my shape is cropped for some reason.
Here is this simple construction:
Code: Select all
{
   Tools = ordered() {
      Merge5 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Polygon5",
               Source = "Mask",
            },
            Foreground = Input {
               SourceOp = "Polygon4",
               Source = "Mask",
            },
            PerformDepthMerge = Input { Value = 0, },
            ReferenceSize = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 6270, 874.5 } },
      },
      Background1 = Background {
         CtrlWZoom = false,
         Inputs = {
            GlobalOut = Input { Value = 119, },
            Width = Input { Value = 1452, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 1, },
            TopLeftBlue = Input { Value = 0.901960784313726, },
            EffectMask = Input {
               SourceOp = "Merge5",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 6490, 874.5 } },
      },
      Polygon4 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.0549, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               SourceOp = "Polygon4Polyline",
               Source = "Value",
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 6270, 775.5 } },
      },
      Polygon4Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [35] = { 0, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.176156580448151, Y = -0.256329119205475, RX = 0.139383154336809, RY = 0.185654010199293 },
                     { Linear = true, X = 0.241992875933647, Y = 0.300632923841476, LX = -0.139383154336809, LY = -0.185654010199293 }
                  }
               } }
         }
      },
      Polygon5 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.11, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               SourceOp = "Polygon5Polyline",
               Source = "Value",
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 6105, 874.5 } },
      },
      Polygon5Polyline = BezierSpline {
         SplineColor = { Red = 173, Green = 255, Blue = 47 },
         NameSet = true,
         KeyFrames = {
            [35] = { 0, Flags = { Linear = true, LockedY = true }, Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.158362984657288, Y = 0.259493678808212, RX = 0.0966785275073521, RY = -0.171940930910754 },
                     { Linear = true, X = 0.131672590970993, Y = -0.256329119205475, LX = -0.0966785275073521, LY = 0.171940930910754 }
                  }
               } }
         }
      }
   }
}
Offline

Sander de Regt

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

Re: Shape is cropped when the resolution is changed

PostSun Apr 11, 2021 2:02 pm

Merges are meant to combine images not masks. In your case you can just put the two polygons in line and use them straight into the blue mask input of the background. They will be combined automatically.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

bentheanimator

  • Posts: 50
  • Joined: Mon May 13, 2019 10:38 pm
  • Real Name: Ben Hall

Re: Shape is cropped when the resolution is changed

PostMon Apr 12, 2021 2:41 pm

The problem with what you have here is that the bounding area is defined by the first node in your flow. You'd think it was the Poly going into the first Merge connection(yellow) followed by the green Poly and then the Merge and then the Background but the Background is actually considered first in the chain. It's screen size is defining the bounding region of where your points that make up your Poly line is going to and from in a 0-1 relationship over the span of the Pixel distance on the background(1452x1080). It also is defining the bounding of the Poly by the point position not the farthest pixel created so the stroke and the round edge isn't being taken into account. THAT is then being squeezed into the 1452x1080 screen space. Sigh... Long story short, you need to define the pixel space of the polys since they are pure math.

Add a Bitmap node after the Merge. Set the Output size either manually or by default which in this case is fine. That will "flatten" the Polys into actual pixels that then behave how you would think.

Grouping Polys for use and then merging the groups could work for certain cases so this isn't a totally wrong idea just... not optimum?
Offline

Sander de Regt

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

Re: Shape is cropped when the resolution is changed

PostMon Apr 12, 2021 3:05 pm

Ben, I appreciate the feedback, but I think it's not a good idea to keep entertaining the concept that polys can be merged the way 'normal' images can. It's just not the way Fusion works. Although you're correct that polys are basically just math, you should not use them as regular images.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

bentheanimator

  • Posts: 50
  • Joined: Mon May 13, 2019 10:38 pm
  • Real Name: Ben Hall

Re: Shape is cropped when the resolution is changed

PostMon Apr 12, 2021 4:31 pm

That's why I gave the reasons for why it didn't work. When making art, first know the rules, then break them.

Houdini is an excellent example of doing it right. It let's you have access to all the data and let's you use it however you want. There is no 'right way". If Fusion let's you merge something and not crash, then it works. Whether you can keep track of what you are doing with a new method and get the results you're after is up to you.

As more people come over from pixel based backgrounds I think you're going to see a bunch of people making these types of mistakes/not mistakes. It's just a new group of people in a new medium. It'll get messy, but there are going to be some happy accidents too. You have YEARS of experience in Fusion but zero in After Effects. Ae is a killer program for a lot of stuff and Fusion artists are going to see more canvas based workflows come around. Motion graphics don't really work with the dynamic nature of a 0-1 ratio based system. There are times when you want to know a pixel number not a X = .00234 or worse X= -2.34567 because the object you moved is smaller than your background. Too much. You just want something to be 100 pixels from the bottom of the screen. Not 1.0/1080 - howervemuchonehundredpixelsis!

There ARE correct ways of doing certain things in Fusion but there is more than one way to skin an eel. Knowing why is better than knowing how.

Not trying to pick a fight but do want to express that that there are times when unconventional methods are useful. This might be one of them.
Offline

Sander de Regt

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

Re: Shape is cropped when the resolution is changed

PostMon Apr 12, 2021 7:22 pm

Ben, you're always very helpful on the forums, so there's no way I'd want to pick a fight with you.
It's just that from your response I couldn't tell that it was a method that wasn't adviced.

As for your working in pixels example: do you know that you can use the option 'reference size' in merges and transforms to move in pixels? It's a pretty well hidden fact that can be useful for people who want to work in pixels inside of Fusion.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

bentheanimator

  • Posts: 50
  • Joined: Mon May 13, 2019 10:38 pm
  • Real Name: Ben Hall

Re: Shape is cropped when the resolution is changed

PostTue Apr 13, 2021 2:28 am

It's cool. I think this method does have it's place. I've used this software for about 4 years and had never tried to do that before. I feel stupid that I didn't because there have been times when I've been building mattes that this would have reduced the complexity by a fair bit. Or at the least made it easier to identify different parts of the mattes.

After you mentioned the pixel thing I thought about it for a minute and had to open Fusion to figure out why I don't use it. Then I ran into why immediately using the comp above. When you check the frame format option it re-computes the dimensions again.

Using Frame Format makes it use the dimensions of the Comp that you set in Preferences not the dimensions of the incoming node. It also doesn't do any good here because it's using the Poly plate's dimensions instead of the background it's supposed to be moving over. Unchecking it leaves it in the Pixel co-ordinate system so there's no going back later. AND in this instance it causes a double transform to occur and the image it is translating is offset from the Xf proportionally greater over time. Also not every tool has the ability, like the bitmap Center. So it makes it of limited use for myself at least. I think I had tried this for the first couple of months when I came from After Effects originally.

I've learned everything I know from you, Noah, Bryan, Andrew, Vito, Milo and what I consider the other gods of Fusion(and Simon Ubsdell, who's comping tutorials blew my little After Effects mind). So I always give a great deal of consideration when one of you say something isn't advised. The only exception I have kept is the placing of an initial Bkg Tool to start off my flow. It's a remnant of After Effect that I think still is better than going to Preferences and setting the Comp size there. Then going to your initial start of the flow and using it's frame count. This way it's all in one place to look at when I come back to a project or reuse it in another comp. It might be wrong but it's my way of being right.

Code: Select all
{
   Tools = ordered() {
      Note1 = Note {
         Inputs = {
            Comments = Input { Value = "Left Side", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 220, 82.5 },
            Flags = {
               Expanded = true
            },
            Size = { 93.9884, 181.364 }
         },
      },
      Polygon5_1 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.11, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.158362984657288, Y = 0.259493678808212, RX = -0.0454735247997659, RY = -0.0886075993378957 },
                     { Linear = true, X = -0.294783559056586, Y = -0.00632911920547502, LX = 0.0454735247997659, LY = 0.0886075993378957 }
                  }
               },
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 181.5 } },
      },
      Polygon5 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.11, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.158362984657288, Y = 0.259493678808212, RX = 0.0966785275073521, RY = -0.171940930910754 },
                     { Linear = true, X = 0.131672590970993, Y = -0.256329119205475, LX = -0.0966785275073521, LY = 0.171940930910754 }
                  }
               },
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 181.5 } },
      },
      Note1_1 = Note {
         Inputs = {
            Comments = Input { Value = "Center", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 385, 82.5 },
            Flags = {
               Expanded = true
            },
            Size = { 93.9884, 181.364 }
         },
      },
      Polygon4_2 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.0549, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.176156580448151, Y = -0.256329119205475, RX = -0.0476337627467918, RY = 0.0733351737692735 },
                     { Linear = true, X = -0.319057868688526, Y = -0.0363235978976545, LX = 0.0476337627467918, LY = -0.0733351737692735 }
                  }
               },
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
            EffectMask = Input {
               SourceOp = "Polygon5_1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 385, 214.5 } },
      },
      Polygon4 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.0549, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.176156580448151, Y = -0.256329119205475, RX = 0.139383154336809, RY = 0.185654010199293 },
                     { Linear = true, X = 0.241992875933647, Y = 0.300632923841476, LX = -0.139383154336809, LY = -0.185654010199293 }
                  }
               },
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
            EffectMask = Input {
               SourceOp = "Polygon5",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 220, 214.5 } },
      },
      Polygon4_1 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.0549, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = 0.327847487395202, Y = -0.07516969891562, RX = -0.0286182038205184, RY = 0.125267540919032 },
                     { Linear = true, X = 0.241992875933647, Y = 0.300632923841476, LX = 0.0286182038205184, LY = -0.125267540919032 }
                  }
               },
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 181.5 } },
      },
      Polygon4_1_1 = PolylineMask {
         DrawMode = "InsertAndModify",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            EffectMask = Input {
               SourceOp = "Polygon4_1",
               Source = "Mask",
            },
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            BorderWidth = Input { Value = 0.0549, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            UseFrameFormatSettings = Input { Value = 1, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = 0.327847487395202, Y = -0.0787928873214171, RX = -0.0607368147784152, RY = -0.0740078213998086 },
                     { Linear = true, X = 0.145637043059957, Y = -0.300816351520843, LX = 0.0607368147784152, LY = 0.0740078213998086 }
                  }
               },
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 214.5 } },
      },
      Note1_2 = Note {
         Inputs = {
            Comments = Input { Value = "Rightside", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 550, 82.5 },
            Flags = {
               Expanded = true
            },
            Size = { 93.9884, 181.364 }
         },
      },
      Background2 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 1, },
            TopLeftGreen = Input { Value = 1, },
            TopLeftBlue = Input { Value = 1, },
            EffectMask = Input {
               SourceOp = "Merge5_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo {
            Pos = { 715, 280.5 },
            Flags = {
               ShowPic = true
            }
         },
      },
      Merge5 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Polygon4_2",
               Source = "Mask",
            },
            PerformDepthMerge = Input { Value = 0, },
            ReferenceSize = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 385, 280.5 } },
      },
      Merge5_1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge5",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Polygon4_1_1",
               Source = "Mask",
            },
            PerformDepthMerge = Input { Value = 0, },
            ReferenceSize = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 280.5 } },
      },
      PipeRouter1 = PipeRouter {
         Inputs = {
            Input = Input {
               SourceOp = "Polygon4",
               Source = "Mask",
            },
         },
         ViewInfo = PipeRouterInfo { Pos = { 220, 280.5 } },
      },
      Transform1 = Transform {
         Inputs = {
            Angle = Input {
               Value = -376,
               Expression = "time*-8",
            },
            Input = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 280.5 } },
      },
      Shadow1 = Shadow {
         Inputs = {
            SettingsNest = Input { Value = 0, },
            UseGPU = Input { Value = 0, },
            Red = Input { Value = 0.642909, },
            Green = Input { Value = 0.861755608, },
            Blue = Input { Value = 0.961, },
            LightPosition = Input { Value = { 0.5, 0.5 }, },
            LightDistance = Input { Value = 0.52, },
            Input = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 346.5 } },
      },
      Trails1 = Trails {
         Inputs = {
            GainRed = Input { Value = 0.795, },
            ApplyMode = Input { Value = 2, },
            MergeUnder = Input { Value = 1, },
            Input = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1100, 280.5 } },
      },
      Merge1 = Merge {
         CtrlWZoom = false,
         Inputs = {
            Background = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Trails1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1320, 280.5 } },
      },
      Merge2 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Merge1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Shadow1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 1320, 346.5 } },
      },
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1452, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input { Value = 1, },
            TopLeftBlue = Input { Value = 0.901960784313726, },
         },
         ViewInfo = OperatorInfo {
            Pos = { 1320, 49.5 },
            Flags = {
               ShowPic = true
            }
         },
      }
   }
}


There are some people out there in the After Effects community that will bring crazy ass ideas to Fusion so I hate to say something is flat out wrong. They might be wrong-ish but who are we to say which way is correct when making art? I've felt really stupid in my confidence of having the right way too many time to count.

Anyways, thanks for the convo as always!

Return to Fusion

Who is online

Users browsing this forum: aomay77 and 14 guests