Jump to: Board index » General » Fusion

reshape image

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

Laurie Hughes

  • Posts: 7
  • Joined: Mon Jan 04, 2016 1:22 am

reshape image

PostSun Jan 17, 2016 11:22 pm

Hi,
I have a photo to comp into a newspaper. The newspaper gets scrunched up a bit at one point so the area I need the photo to be in is not a rectangle. I have corner pined, and I am looking at the grid warp but I need the top center of the photo to be higher then the left and right top corners (a bit like a house). Is there a tool in fusion that would allow me to change the shape of the boundary of my photo to be something other then a rectangle?
thanks in advance
Offline
User avatar

michael vorberg

  • Posts: 943
  • Joined: Wed Nov 12, 2014 8:47 pm
  • Location: stuttgart, germany

Re: reshape image

PostMon Jan 18, 2016 10:38 pm

gridwarp sounds like the tool to use here, the secret seems to be to put the image on a bigger "canvas" first

Code: Select all
{
   Tools = ordered() {
      Merge1 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "GridWarp1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 214.5 } },
      },
      GridWarp1 = GridWarp {
         SrcDrawMode = 1,
         DestDrawMode = 1,
         CtrlWZoom = false,
         Inputs = {
            MagnetDistance = Input { Value = 0.623809523809524, },
            DstXGridSize = Input { Value = 4, },
            DstYGridSize = Input { Value = 4, },
            SrcXGridSize = Input { Value = 4, },
            SrcYGridSize = Input { Value = 4, },
            SrcPointTolerance = Input { Value = 0.00999999977648258, },
            SrcOverSizeAmount = Input { Value = 0.0500000007450581, },
            SrcSnapDistance = Input { Value = 0.0199999995529652, },
            SrcGridChange = Input {
               Value = Mesh {
                  Count = 25,
                  Col = 5,
                  DeltaR = 0.25,
                  DeltaC = 0.25,
                  P1X = -0.5,
                  P1Y = -0.5,
                  Points = {
                     { X = -0.5, Y = -0.5, L_CX = 0, T_CY = 0, },
                     { X = -0.25, Y = -0.5, T_CY = 0, },
                     { X = 0, Y = -0.5, T_CY = 0, },
                     { X = 0.25, Y = -0.5, T_CY = 0, },
                     { X = 0.5, Y = -0.5, T_CY = 0, R_CX = 0, },
                     { X = -0.5, Y = -0.25, L_CX = 0, },
                     { X = -0.25, Y = -0.25, },
                     { X = 0, Y = -0.25, },
                     { X = 0.25, Y = -0.25, },
                     { X = 0.5, Y = -0.25, R_CX = 0, },
                     { X = -0.5, Y = 0, L_CX = 0, },
                     { X = -0.25, Y = 0, },
                     { X = 0, Y = 0, },
                     { X = 0.25, Y = 0, },
                     { X = 0.5, Y = 0, R_CX = 0, },
                     { X = -0.5, Y = 0.25, L_CX = 0, },
                     { X = -0.25, Y = 0.25, },
                     { X = 0, Y = 0.25, },
                     { X = 0.25, Y = 0.25, },
                     { X = 0.5, Y = 0.25, R_CX = 0, },
                     { X = -0.5, Y = 0.5, L_CX = 0, B_CY = 0, },
                     { X = -0.25, Y = 0.5, B_CY = 0, },
                     { X = 0, Y = 0.5, B_CY = 0, },
                     { X = 0.25, Y = 0.5, B_CY = 0, },
                     { X = 0.5, Y = 0.5, R_CX = 0, B_CY = 0, }
                  },
                  SavePoints = {
                  }
               },
            },
            SrcPolyline = Input {
               Value = Polyline {
               },
            },
            DstGridChange = Input {
               Value = Mesh {
                  Count = 25,
                  Col = 5,
                  DeltaR = 0.25,
                  DeltaC = 0.25,
                  P1X = -0.5,
                  P1Y = -0.5,
                  Points = {
                     { X = -0.499728874768766, Y = -0.521186018068837, Z = 1.1604159896795e-005, U = -0.5, V = -0.5, L_CX = 0, T_CY = 0, R_CX = 0.0832429582562555, R_CY = 0.0070620060229455, B_CX = 0.000351474960450427, B_CY = 0.055868700739133, },
                     { X = -0.25, Y = -0.5, L_CX = -0.0833378826133392, T_CY = 0, B_CX = 2.98556266556478e-005, B_CY = 0.0776443956104878, },
                     { X = 0, Y = -0.5, T_CY = 0, B_CX = -0.00033420900112752, B_CY = 0.0859657531271593, },
                     { X = 0.25, Y = -0.5, T_CY = 0, R_CX = 0.0836713765621587, B_CX = 0.000212088152184919, B_CY = 0.0785309887421567, },
                     { X = 0.50080447685978, Y = -0.518215893044902, Z = 8.60790239964996e-006, U = 0.5, V = -0.5, L_CX = -0.0836014922865934, L_CY = 0.00607196434830053, T_CY = 0, R_CX = 0, B_CX = 0.00140590968509029, B_CY = 0.0514991044887782, },
                     { X = -0.498674449887415, Y = -0.353579915851438, Z = 5.67335448186285e-005, U = -0.5, V = -0.25, L_CX = 0, T_CY = -0.0558721875638413, R_CX = 0.0829213389224606, R_CY = 0.0288377008943005, B_CY = 0.0919397831315295, },
                     { X = -0.249910433120033, Y = -0.267066813168536, Z = 8.09026683114408e-006, U = -0.25, V = -0.25, L_CX = -0.0844962884132409, T_CY = -0.0776444137141183, R_CX = 0.0831014718507634, B_CY = 0.0774570296885907, },
                     { X = -0.00100262700338286, Y = -0.24210274061852, Z = 3.26160099760774e-005, U = 0, V = -0.25, L_CX = -0.0831014718507634, T_CY = -0.085967802066467, R_CX = 0.0839840361991612, B_CY = 0.0975815193136305, },
                     { X = 0.250636264456555, Y = -0.26440703377353, Z = 6.8080296851385e-006, U = 0.25, V = -0.25, L_CX = -0.0839840361991612, T_CY = -0.0785318920020163, R_CX = 0.0863318495164287, B_CY = 0.083586374814045, },
                     { X = 0.505022205915051, Y = -0.363718579578568, Z = 5.37376032910487e-005, U = 0.5, V = -0.25, L_CX = -0.0847953138194988, L_CY = 0.0331038486016789, T_CY = -0.051559594496885, R_CX = 0, B_CY = 0.0895339709881697, },
                     { X = -0.497875368447912, Y = -0.184354575719367, Z = 9.86857942178659e-005, U = -0.5, V = 0, L_CX = 0, T_CY = -0.056410430115026, R_CX = 0.0821834661249315, R_CY = 0.0443517038382256, B_CY = 0.205625927532784, },
                     { X = -0.251324970073118, Y = -0.0512994642046858, Z = 1.96652302860078e-005, U = -0.25, V = 0, L_CX = -0.0858941778167203, T_CY = -0.0719273241577597, R_CX = 0.0865802688297298, B_CY = 0.107973403185845, },
                     { X = -0.00319458172361142, Y = 0.060957602226712, Z = 9.16581073578452e-006, U = 0, V = 0, L_CX = -0.0853517006845726, T_CY = -0.101028447607075, R_CX = 0.0891461719568628, B_CY = 0.0891061177474724, },
                     { X = 0.251185133229898, Y = -0.0276409837698941, Z = 1.89041912801827e-005, U = 0.25, V = 0, L_CX = -0.0864085241649117, T_CY = -0.0789226855013198, R_CX = 0.090411666059379, B_CY = 0.102980087459555, },
                     { X = 0.5092195848686, Y = -0.208760475634638, Z = 9.86495580940154e-005, U = 0.5, V = 0, L_CX = -0.0860114838795671, L_CY = 0.0603731639549145, T_CY = -0.0517124314141018, R_CX = 0, B_CY = 0.189635719586574, },
                     { X = -0.499239625934502, Y = 0.137006412650637, Z = 5.51967997397002e-005, U = -0.5, V = 0.25, L_CX = 0, T_CY = -0.107123373813591, R_CX = 0.0822256860219992, R_CY = 0.0258621021382748, B_CY = 0.166817543448647, },
                     { X = -0.252562567868505, Y = 0.214592719065464, Z = 8.90347559476364e-006, U = -0.25, V = 0.25, L_CX = -0.0835052751549097, T_CY = -0.088633755703708, R_CX = 0.0948597024460841, B_CY = 0.089356615290973, },
                     { X = -0.00111926734306109, Y = 0.40895552080495, Z = 1.35396588110789e-005, U = 0, V = 0.25, L_CX = -0.0914095894015924, T_CY = -0.116005811700053, R_CX = 0.0929779198733263, B_CY = 0.0265348064369164, },
                     { X = 0.247771788220026, Y = 0.25465858371924, Z = 1.28004885635014e-005, U = 0.25, V = 0.25, L_CX = -0.087873182733101, T_CY = -0.0941215479653024, R_CX = 0.0893903304211467, B_CY = 0.0653556529543367, },
                     { X = 0.499279550842729, Y = 0.0726280054858206, Z = 3.63962118745784e-005, U = 0.5, V = 0.25, L_CX = -0.0838359208742343, L_CY = 0.0606768594111386, T_CY = -0.0939805535945091, R_CX = 0, B_CY = 0.149499111948079, },
                     { X = -0.500095339854874, Y = 0.476163114836379, Z = 9.14775152967665e-006, U = -0.5, V = 0.5, L_CX = 0, T_CX = 0.000285237973457143, T_CY = -0.113052234061914, R_CX = 0.0830044923298817, R_CY = -0.00185215047129676, B_CY = 0, },
                     { X = -0.251081862865229, Y = 0.470606663422493, Z = 5.9674354943612e-005, U = -0.25, V = 0.5, L_CX = -0.083011043974733, T_CX = -0.000493568334425287, T_CY = -0.0853379814523418, R_CX = 0.0879864186936339, B_CY = 0, },
                     { X = 0.000173406836158334, Y = 0.578486611589161, Z = 8.29237996078488e-007, U = 0, V = 0.5, L_CX = -0.0861647159548448, T_CX = -0.000430891393073323, T_CY = -0.0565103635947365, R_CX = 0.085923815103917, B_CY = 0, },
                     { X = 0.246757552467786, Y = 0.470791626532453, Z = 2.13247524506388e-005, U = 0.25, V = 0.5, L_CX = -0.0846437714403078, T_CX = 0.000338078584079923, T_CY = -0.0720443476044035, R_CX = 0.0843100402301072, B_CY = 0, },
                     { X = 0.485011996272821, Y = 0.318692115228839, Z = 9.78438491766595e-005, U = 0.5, V = 0.5, L_CX = -0.0794181479350119, L_CY = 0.050699837101204, T_CX = 0.00475585152330248, T_CY = -0.082021369914339, R_CX = 0, B_CY = 0, }
                  },
                  SavePoints = {
                  }
               },
            },
            DstPolyline = Input {
               Value = Polyline {
               },
            },
            Input = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 148.5 } },
      },
      Background2 = Background {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 495, 214.5 } },
      },
      Transform1 = Transform {
         Inputs = {
            Size = Input { Value = 0.59047619047619, },
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 82.5 } },
      },
      Background1 = Background {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            Type = Input { Value = FuID { "Corner" }, },
            TopLeftRed = Input { Value = 1, },
            TopRightGreen = Input { Value = 1, },
            BottomLeftBlue = Input { Value = 1, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 605, 49.5 } },
      }
   }
}

Return to Fusion

Who is online

Users browsing this forum: No registered users and 54 guests