Jump to: Board index » General » Fusion

Paint tool in Fusion 9

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

Yogendra Singh

  • Posts: 235
  • Joined: Sun Apr 30, 2017 5:51 pm
  • Location: Chandigarh

Paint tool in Fusion 9

PostThu Nov 01, 2018 1:36 pm

I am trying to clone out some thing, but having hard time connecting it to tracker.
I can remove/clone objects in 1 frame only.
Pls guide TIA
https://www.instagram.com/weddings_by_yogendra/

Resolve Studio 18.0.1
Fusion Studio 16.2.1
Offline

Sander de Regt

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

Re: Paint tool in Fusion 9

PostThu Nov 01, 2018 3:17 pm

Use a regular stroke instead of a multistroke. Multistroke has a single frame duration.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

michael vorberg

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

Re: Paint tool in Fusion 9

PostThu Nov 01, 2018 6:46 pm

Sander de Regt wrote:Use a regular stroke instead of a multistroke. Multistroke has a single frame duration.

That isn't quiet right
You need to set the duration before you start to paint
Offline
User avatar

Bryan Ray

  • Posts: 2491
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Paint tool in Fusion 9

PostThu Nov 01, 2018 8:16 pm

With the regular Stroke, you can set the Duration after painting, but you'd then have to do it for each individual Stroke modifier, which is either tedious or wants a script.

What I usually do is put a TimeStretcher right after the Paint node and use it to freeze-frame the work.

Code: Select all
{
   Tools = ordered() {
      Note2 = Note {
         Inputs = {
            Comments = Input { Value = "Black, no alpha to provide a canvas to paint on.", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 311, -148.5 },
            Flags = {
               Expanded = true
            },
            Size = { 131, 109.3 }
         },
      },
      Background1 = Background {
         Inputs = {
            GlobalIn = Input { Value = 1, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 330, -82.5 } },
      },
      Note4 = Note {
         Inputs = {
            Comments = Input { Value = "Apply tracking data to frozen paint strokes.", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 605, 115.5 },
            Flags = {
               Expanded = true
            },
            Size = { 193.122, 116.948 }
         },
      },
      Note1 = Note {
         Inputs = {
            Comments = Input { Value = "Set Loader as the Source Tool in the Paint's control panel.", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 639, -148.5 },
            Flags = {
               Expanded = true
            },
            Size = { 133, 104.3 }
         },
      },
      TimeStretcher1 = TimeStretcher {
         CtrlWZoom = false,
         Inputs = {
            SourceTime = Input { Value = 32, },
            Input = Input {
               SourceOp = "Paint1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 16.5 } },
      },
      Tracker1 = Tracker {
         Trackers = {
            {
               PatternTime = 1,
               PatternX = 0,
               PatternY = 0
            }
         },
         Inputs = {
            Input = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "TimeStretcher1",
               Source = "Output",
            },
            Operation = Input { Value = 1, },
            Merge = Input { Value = 1, },
            MatchMoveSettings = Input { Value = 1, },
            Name1 = Input { Value = "Tracker 1", },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 181.5 } },
         UserControls = ordered() {
            UpdateReferenceFrame = {
               INP_Integer = false,
               LINKID_DataType = "Number",
               BTNCS_Execute = "RunScript([[S:\\net_exe\\BlackMagic\\fusion9\\scripts\\Tool\\updateTrackerReferenceFrame.lua]])",
               ICS_ControlPage = "Operation",
               INPID_InputControl = "ButtonControl",
               LINKS_Name = "Update Reference Frame"
            }
         }
      },
      Paint1 = Paint {
         Inputs = {
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
            Paint = Input {
               SourceOp = "Multistroke1",
               Source = "Out",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 660, -82.5 } },
      },
      Multistroke1 = Multistroke {
         IsThreaded = true,
         Brushes = { "SoftBrush" },
         ApplyModes = {
            "PaintApplyColor",
            "PaintApplyRubThrough"
         },
         Inputs = {
            ApplyMode = Input { Value = FuID { "PaintApplyRubThrough" }, },
            ["PaintApplyRubThrough.SourceTool"] = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
         },
         Strokes = {
         }
      },
      Note3 = Note {
         Inputs = {
            Comments = Input { Value = "View this node while painting", }
         },
         ViewInfo = StickyNoteInfo {
            Pos = { 630.62, 328.5 },
            Flags = {
               Expanded = true
            },
            Size = { 140.38, 104.3 }
         },
      },
      Merge2 = Merge {
         Inputs = {
            UseOpenCL = Input { Value = 0, },
            Background = Input {
               SourceOp = "Loader1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Tracker1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 379.5 } },
      },
      Loader1 = Loader {
         Clips = {
         },
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 330, 379.5 } },
         UserControls = ordered() {
            MakeLocal = {
               INP_Default = 0,
               INPID_InputControl = "ButtonControl",
               BTNCS_Execute = "                  -- Get clip path\n                  attrs=tool:GetAttrs()\n                  path = attrs.TOOLST_Clip_Name[1]\n                  path = string.gsub(path, '/', '\\\\')\n                  elemtable = eyeon.split(path, \"\\\\\")\n                  \n                  -- Store current Trim points\n                  trimIn = attrs.TOOLIT_Clip_TrimIn[1]\n                  print(\"Trim In: \"..trimIn + 1)\n                  trimOut = attrs.TOOLIT_Clip_TrimOut[1]\n                  print(\"Trim Out: \"..trimOut + 1)\n                  \n                  sequence = 1\n                  \n                  -- Check for single frame element\n                  if trimOut == trimIn then\n                     sequence = 0 -- Will be used to pre-set the Sequence flag\n                  end\n                  \n                  print(\"Parsing element path:\")\n                  k = 0\n                  \n                  -- Find last entry in table\n                  for i,j in ipairs(elemtable) do\n                     print(j)\n                     k = i\n                  end\n                  \n                  -- Initialize file extension\n                  extension = \"\"\n                  \n                  elemname = elemtable[k]\n                  elfile = elemtable[k]\n                  elemtable[k] = nil\n                  \n                  -- find last ., which should indicate file extension.\n                  i = 0\n                  while i do\n                     k = i\n                     i = string.find(elfile, \"%.\", i+1)\n                  end\n                  \n                  -- Scan and store file extension\n                  extension = string.sub(elfile, k+1)\n                  \n                  -- Table of recognized video extensions\n                  video = {\"mov\", \"avi\", \"mxf\", \"mkv\", \"vdr\", \"wav\", \"mp4\", \"qt\", \"3gp\", \"mpg\", \"mpeg\", \"m4v\", }\n                  \n                  -- Compare extension against the table\n                  -- If matched, sequence = 0\n                  for i,j in ipairs(video) do \n                     if j == extension then\n                        sequence = 0\n                     end\n                  end\n\n                  print(\"Parsing comp path:\")\n                  fp = eyeon.parseFilename(composition:GetAttrs().COMPS_FileName)\n                  pathtable = eyeon.split(fp.FullPath, \"\\\\\")\n                  k = 0\n\n                  for i,j in ipairs(pathtable) do\n                     print(j)\n                     k = i\n                  end\n                  \n                  pathdepth = k\n                  \n                  k = 0\n                  if elemtable[6] == pathtable[6] then\n                     oops = composition:AskUser(\"Asset is already local. Aborting.\", {})\n                     error(\"Already Local\")\n                  end\n                  \n                  dialog = composition:AskUser(\"\", { \n                     {\"Element Name\", \"Text\", Lines = 1, Default = elemname},\n                     {\"Sequence\", \"Checkbox\", Default = sequence},\n                     })\n                     \n                  path = \"\"\n                  \n                  for i,j in ipairs(elemtable) do\n                     path = path..j..\"\\\\\"\n                  end\n                  \n                  newlocation = \"\"\n                  \n                  for i=1, pathdepth-3 do\n                     newlocation = newlocation .. pathtable[i].. \"\\\\\"\n                  end\n                  \n                  newlocation = newlocation .. \"04_elements\\\\\"..dialog[\"Element Name\"]\n                  \n                  os.execute(\"md \"..newlocation)\n                  \n                  if dialog[\"Sequence\"] == 1 then\n                     print(\"Copying Sequence\")\n                     os.execute(\"copy \\\"\"..path..\"\\\\\\\" \\\"\"..newlocation..\"\\\\\\\"\")\n                  else\n                     print(\"Copying File\")\n                     os.execute(\"copy \\\"\"..path..\"\\\\\"..elfile..\"\\\" \\\"\"..newlocation..\"\\\"\")\n                  end\n                  \n                  tool.Clip = newlocation..\"\\\\\"..elfile\n                  print(\"Setting Trim In to \"..trimIn + 1)\n                  tool.ClipTimeStart = trimIn\n                  print(\"Setting Trim Out to \"..trimOut + 1)\n                  tool.ClipTimeEnd = trimOut\n                  ",
               IC_ControlPage = 0,
               LINKID_DataType = "Number",
               LINKS_Name = "Make Local",
            },
            ExplodeEXR = {
               INP_Default = 0,
               INPID_InputControl = "ButtonControl",
               BTNCS_Execute = "!Py: # Import and Separate EXR passes\n# created by: Steven Benjamin (sbenjamin@musevfx.com)\ntry:\n    import PeyeonScript as eyeon\n    fus = eyeon.scriptapp(\"Fusion\")\n    comp = fus.GetCurrentComp()\nexcept:\n    pass\n\nimport os, re, math, scandir\n\nclass FusionFunctions():\n    def complock(self):\n        if str(comp.GetAttrs(\"COMPB_Locked\")) == \"False\":\n            unlocked = 0\n            while unlocked < 1:\n                if str(comp.GetAttrs(\"COMPB_Locked\")) == \"False\":\n                    comp.Print(\"ExplodeEXR_MT: Locking...\\n\")\n                    comp.Lock()\n                else:\n                    unlocked += 1\n        else:\n            locked = 0\n            while locked < 1:\n                if str(comp.GetAttrs(\"COMPB_Locked\")) == \"True\":\n                    comp.Print( \"ExplodeEXR_MT: Unlocking...\\n\")\n                    comp.Unlock()\n                else:\n                    locked += 1\n        return\n\n    def UpdateColor(self, ldr):\n        try:\n            oldcolor = ldr.TileColor\n            if oldcolor == None:\n                color = {'R':.8,'G':.3,'B':0,'__flags':'256L'}\n            else:\n                r = float(oldcolor[\"R\"])\n                g = float(oldcolor[\"G\"])\n                r += .25\n                g += .25\n                if r > 1:\n                    r = .8\n                if g > 1:\n                    g = .3\n                if r == 1:\n                    if b == 0:\n                        if g == 0:\n                            r,g,b = .8,.3,0\n\n                color = {'R':r,'G':g,'B':0,'__flags':'256L'}\n            ldr.TileColor = color\n        except:\n            pass\n        return\n        \n    def ExplodeEXR(self):\n        mapPaths = comp.GetPrefs()[\"Comp\"][\"Paths\"][\"Map\"]\n        flow = comp.CurrentFrame.FlowView\n        self.complock()\n        comp.Print(\"\\nExplodeEXR_MT: Importing EXR buffers...\\n\")\n        if bool(comp.ActiveTool) == True:\n            if comp.ActiveTool.ID == \"Loader\":\n                if ((comp.ActiveTool.Clip[1]).rsplit(\".\")[-1]) == \"exr\":\n                    exrfile = comp.ActiveTool.Clip[1]\n                    begfilename = exrfile.split(\"\\\\\",1)[0]\n                    restfilename = (\"\\\\\").join(exrfile.split(\"\\\\\",1)[1::])\n                    try:\n                        exrfile = mapPaths[begfilename] + \"\\\\\" + restfilename\n                    except:\n                        exrfile = exrfile\n                    exrfilename = (os.path.basename(exrfile)).rsplit(\"_\",1)[0]\n\n                    origgin = comp.ActiveTool.GetInput(\"GlobalIn\")\n                    origgout = comp.ActiveTool.GetInput(\"GlobalOut\")\n                    origtin = comp.ActiveTool.GetInput(\"ClipTimeStart\")\n                    origtout = comp.ActiveTool.GetInput(\"ClipTimeEnd\")\n                    orighff = comp.ActiveTool.GetInput(\"HoldFirstFrame\")\n                    orighlf = comp.ActiveTool.GetInput(\"HoldLastFrame\")\n                    origrev = comp.ActiveTool.GetInput(\"Reverse\")\n                    origloop = comp.ActiveTool.GetInput(\"Loop\")\n                    origmf = comp.ActiveTool.GetInput(\"MissingFrames\")\n                    origdepth = comp.ActiveTool.GetInput(\"Depth\")\n\n                    channelList = comp.ActiveTool.Clip1.OpenEXRFormat.RedName.GetAttrs(\"INPIDT_ComboControl_ID\")\n                    numofpasses = 0\n                    for x, y in channelList.iteritems():\n                        numofpasses = int(x)\n                    episode = exrfile.split(\"\\\\\")[5]\n                    if numofpasses < 7:\n                        passes = {}\n                        try:\n                            resolution = re.findall(\"\\d{4}?x\\d{4}?\",(exrfile.split(episode,1)[1]))[0]\n                        except:\n                            # print (exrfile.rsplit(\"\\\\\",1)[0])\n                            try:\n                                resolution = re.findall(\"\\d{4}?x\\d{3}?\",(exrfile.split(episode,1)[1]))[0]\n                            except:\n                                resolution = re.findall(\"\\d{3}?x\\d{3}?\",(exrfile.split(episode,1)[1]))[0]\n\n                        mypathlist = exrfile.rsplit(\"\\\\\")\n                        resindex = mypathlist.index(resolution)\n                        mypath = \"\"\n                        count = 0\n                        for i in mypathlist:\n                            if count <= resindex:\n                                mypath = mypath + i + \"\\\\\"\n                            else:\n                                pass\n                            count += 1\n                        for a, b , c in scandir.walk(mypath):\n                            try:\n                                passes['Beauty'] = os.path.abspath(a + \"\\\\\" + c[0])\n                            except:\n                                pass\n                            for i in b:\n                                try:\n                                    if i not in passes.keys():\n                                        for x, y, z in scandir.walk(os.path.abspath(a+\"\\\\\"+i)):\n                                            passes[i] = os.path.abspath(a + \"\\\\\" + i + \"\\\\\" + z[0])\n                                except Exception as e:\n                                    print e\n                                    pass\n\n                            # for x in b:\n                            #     try:\n                            #         bufferfolderpath = a + \"\\\\\" + x\n                            #         for e,f,g in scandir.walk(bufferfolderpath):\n                            #             bufferpath = bufferfolderpath + \"\\\\\" + g[0]\n                            #             if bufferpath not in passfiles:\n                            #                 passfiles.append(bufferpath)\n                            #         passes.append(x)\n                            #         #     try:\n                            #         #         print a\n                            #         #         if os.path.abspath(a + \"\\\\\" + x + \"\\\\\" + g[0]) not in passfiles:\n                            #         #             passfiles.append(os.path.abspath(a + \"\\\\\" + x + \"\\\\\" + g[0]))\n                            #         #             print os.path.abspath(a + \"\\\\\" + x + \"\\\\\" + g[0])\n                            #         #     except Exception as e:\n                            #         #         print e\n                            #         #         comp.Print(\"ExplodeEXR_MT_ERROR: Empty buffer folder: \" + a + \"\\\\\" + x + \"\\\\\" + \"\\n\")\n                            #         # passes.append(x)\n\n                            #     except Exception as e:\n                            #         comp.Print(\"ExplodeEXR_MT_ERROR: Can't load buffers.\\n\")\n                            #         pass\n\n                        myx = math.ceil(flow.GetPosTable(comp.ActiveTool)[1])\n                        myy = math.ceil(flow.GetPosTable(comp.ActiveTool)[2])\n                        myy += 1\n                        index = 0\n                        for x,y in passes.iteritems():\n                            try:\n                                mypassfile = y\n                                if str(mypassfile.rsplit(\".\",2)[0]) not in str(exrfile.rsplit(\".\",2)[0]):\n                                    # try:\n                                    #     index = 1\n                                    #     while index <= len(passes):\n                                    #         if passes[index] in os.path.basename(mypassfile):\n                                    #             break\n                                    #         else:\n                                    #             index += 1\n                                    #     mypass = passes[index]\n                                    # except:\n                                    #     mypass = \"Beauty\"\n\n                                    extraloader = comp.AddTool(\"Loader\", myx, myy + 1)\n                                    extraloader.SetAttrs({\"TOOLS_Name\" : str(x) + \"_\" + str(os.path.basename(exrfilename)) + \"_\", \"TOOLB_NameSet\" : True})\n                                    extraloader.Clip = str(mypassfile)\n                                    extraloader.Reverse = origrev\n                                    extraloader.Loop = origloop\n                                    extraloader.MissingFrames = origmf\n                                    extraloader.GlobalIn = origgin\n                                    extraloader.GlobalOut = origgout\n                                    extraloader.ClipTimeStart = origtin\n                                    extraloader.ClipTimeEnd = origtout\n                                    extraloader.Depth = origdepth\n                                    extraloader.HoldFirstFrame = orighff\n                                    extraloader.HoldLastFrame = orighlf\n                                    print extraloader\n                                    print extraloader.Clip[0]\n                                    try:\n                                        if \"WorldPos\" in mypass:\n                                            extraloader.Clip1.OpenEXRFormat.XPosName = \"R\"\n                                            extraloader.Clip1.OpenEXRFormat.YPosName = \"G\"\n                                            extraloader.Clip1.OpenEXRFormat.ZPosName = \"B\"\n\n                                        if \"ObjPos\" in mypass:\n                                            extraloader.Clip1.OpenEXRFormat.XPosName = \"R\"\n                                            extraloader.Clip1.OpenEXRFormat.YPosName = \"G\"\n                                            extraloader.Clip1.OpenEXRFormat.ZPosName = \"B\"\n\n                                        if \"UV\" in mypass:\n                                            extraloader.Clip1.OpenEXRFormat.UName = \"R\"\n                                            extraloader.Clip1.OpenEXRFormat.VName = \"G\"\n\n                                        if \"Velocity\" in mypass:\n                                            extraloader.Clip1.OpenEXRFormat.XVelName = \"R\"\n                                            extraloader.Clip1.OpenEXRFormat.YVelName = \"G\"\n\n                                        if \"Normals\" in mypass:\n                                            extraloader.Clip1.OpenEXRFormat.XNormName = \"R\"\n                                            extraloader.Clip1.OpenEXRFormat.YNormName = \"G\"\n                                            extraloader.Clip1.OpenEXRFormat.ZNormName = \"B\"\n\n                                        if \"Depth\" in mypass or \"Z\" in mypass:\n                                            extraloader.Clip1.OpenEXRFormat.ZName = \"R\"\n                                    except:\n                                        pass\n                                    try:\n                                        self.UpdateColor(extraloader)\n                                    except:\n                                        pass\n\n                                    myy += 1\n                                    # print mypassfile\n                                    comp.Print(\"ExplodeEXR_MT: \" + mypass + \" added...\\n\")\n\n                                else:\n                                    pass\n                            except:\n                                comp.Print(\"ExplodeEXR_MT_WARNING: Missing buffer: \" + i + \"\\n\")\n                                pass\n\n                        self.UpdateColor(comp.ActiveTool)\n                        comp.Print(\"ExplodeEXR_MT: Buffers for \" + exrfilename + \" added!\\n\")\n\n                    else:\n                        myx = flow.GetPosTable(comp.ActiveTool)[1]\n                        myy = flow.GetPosTable(comp.ActiveTool)[2]\n                        channelList = comp.ActiveTool.Clip1.OpenEXRFormat.RedName.GetAttrs(\"INPIDT_ComboControl_ID\")\n                        channelList.pop(\"1.0\", None)\n                        values = []\n                        myvalues = []\n                        exx = myx\n                        exy = myy + 1\n\n                        for key, value in channelList.iteritems():\n                            channelname = value.split(\".\")[0]\n                            if not channelname in myvalues:\n                                myvalues.append(channelname)\n                        del myvalues[0:5]\n\n                        for item in myvalues:\n                            myloader = comp.AddTool(\"Loader\", exx, exy + 1)\n                            myloader.Clip = exrfile\n                            myloader.SetAttrs({\"TOOLS_Name\" : item + \"_\" + exrfilename + \"_\", \"TOOLB_NameSet\" : True})\n                            # print item + \"_\" + exrfilename\n                            myloader.Reverse = origrev\n                            myloader.Loop = origloop\n                            myloader.MissingFrames = origmf\n                            myloader.GlobalIn = origgin\n                            myloader.GlobalOut = origgout\n                            myloader.ClipTimeStart = origtin\n                            myloader.ClipTimeEnd = origtout\n                            myloader.Depth = origdepth\n                            myloader.HoldFirstFrame = orighff\n                            myloader.HoldLastFrame = orighlf\n                            \n                            for key, value in channelList.iteritems():\n                                channelname = value.split(\".\")[0]\n                                if channelname == item:\n                                    try:\n                                        if value.split(\".\")[1] == \"R\" or value.split(\".\")[1] == \"X\":\n                                            red = value\n                                            myloader.Clip1.OpenEXRFormat.RedName = red\n                                        elif value.split(\".\")[1] == \"G\" or value.split(\".\")[1] == \"Y\":\n                                            green = value\n                                            myloader.Clip1.OpenEXRFormat.GreenName = green\n                                        elif value.split(\".\")[1] == \"B\" or value.split(\".\")[1] == \"Z\":\n                                            blue = value\n                                            myloader.Clip1.OpenEXRFormat.BlueName = blue\n                                        elif value.split(\".\")[1] == \"A\":\n                                            alpha = value\n                                            myloader.Clip1.OpenEXRFormat.AlphaName = alpha\n                                        else:\n                                            pass\n                                    except:\n                                        pass\n                                    try:\n                                        if channelname == 'WorldPos':\n                                            myloader.Clip1.OpenEXRFormat.XPosName = red\n                                            myloader.Clip1.OpenEXRFormat.YPosName = green\n                                            myloader.Clip1.OpenEXRFormat.ZPosName = blue\n\n                                        if channelname == \"ObjectPos\":\n                                            myloader.Clip1.OpenEXRFormat.XPosName = red\n                                            myloader.Clip1.OpenEXRFormat.YPosName = green\n                                            myloader.Clip1.OpenEXRFormat.ZPosName = blue\n\n                                        if channelname == \"UV\":\n                                            myloader.Clip1.OpenEXRFormat.UName = red\n                                            myloader.Clip1.OpenEXRFormat.VName = green\n\n                                        if channelname == \"Velocity\":\n                                            myloader.Clip1.OpenEXRFormat.XVelName = red\n                                            myloader.Clip1.OpenEXRFormat.YVelName = green\n\n                                        if \"Normals\" in str(channelname):\n                                            myloader.Clip1.OpenEXRFormat.XNormName = red\n                                            myloader.Clip1.OpenEXRFormat.YNormName = green\n                                            myloader.Clip1.OpenEXRFormat.ZNormName = blue\n\n                                        if channelname == \"Depth\" or channelname == \"Z\":\n                                            myloader.Clip1.OpenEXRFormat.ZName = \"Z\"\n                                            myloader.Clip1.OpenEXRFormat.RedName = \"Z\"\n                                            myloader.Clip1.OpenEXRFormat.GreenName = \"Z\"\n                                            myloader.Clip1.OpenEXRFormat.BlueName = \"Z\"\n\n                                        if \"UV\" in str(channelname):\n                                            myloader.Clip1.OpenEXRFormat.UName = red\n                                            myloader.Clip1.OpenEXRFormat.VName = green\n\n                                    except:\n                                        pass\n\n                                    comp.Print(\"ExplodeEXR_MT: \" + channelname + \"added...\\n\")\n\n                            self.UpdateColor(myloader)\n                            exy += 1\n                        comp.Print(\"ExplodeEXR_MT: Buffers for \" + exrfilename + \" added!\\n\")\n                        self.UpdateColor(comp.ActiveTool)\n\n                else:\n                    # print \"I'm not an exr.\"\n                    comp.Print(\"ExplodeEXR_MT: Loader not an exr.\")\n            else:\n                # print \"I'm not a Loader.\"\n                comp.Print(\"ExplodeEXR_MT: Tool a Loader.\")\n        else:\n            # print \"Nothing selected.\"\n            comp.Print(\"ExplodeEXR_MT: Nothing selected.\")\n        self.complock()\n        return\n\n\ncomp.Print(\"\\n\")\nff = FusionFunctions()\nff.ExplodeEXR()\ncomp.Print(\"\\n\")",
               IC_ControlPage = 0,
               LINKID_DataType = "Number",
               LINKS_Name = "Explode EXR",
            }
         }
      }
   }
}
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Sander de Regt

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

Re: Paint tool in Fusion 9

PostThu Nov 01, 2018 11:00 pm

michael vorberg wrote:
Sander de Regt wrote:Use a regular stroke instead of a multistroke. Multistroke has a single frame duration.

That isn't quiet right
You need to set the duration before you start to paint

You're right of course, but nine times out of ten this is a fairly entry level question and then switching to a regular stroke (that defaults to the global in/out duration) is easier to explain then setting a duration in advance, so that's why I answered what I did.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

Bryan Ray

  • Posts: 2491
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Paint tool in Fusion 9

PostFri Nov 02, 2018 4:12 am

Sander de Regt wrote: a regular stroke (that defaults to the global in/out duration)


Oh! I hadn't realized that. I guess my brain never actually processed the presence of that combo box except when I wanted to do a write on/off.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline
User avatar

Yogendra Singh

  • Posts: 235
  • Joined: Sun Apr 30, 2017 5:51 pm
  • Location: Chandigarh

Re: Paint tool in Fusion 9

PostFri Nov 02, 2018 2:54 pm

Input clip to tracker then to paint node and then output. I painted with stroke. But I can't connect the painted clone to follow tracker. Bryan script not working for me it can track but does not paint the source color, only black. Pls advise. TIA

Edit: Ok I found a solution.
I add a paint node and then modify with tracker position.
Fusion adds tracker in paint node. working fine.
Code: Select all
https://www.youtube.com/watch?v=fY5op_A8PKY
https://www.instagram.com/weddings_by_yogendra/

Resolve Studio 18.0.1
Fusion Studio 16.2.1
Offline
User avatar

Yogendra Singh

  • Posts: 235
  • Joined: Sun Apr 30, 2017 5:51 pm
  • Location: Chandigarh

Re: Paint tool in Fusion 9

PostMon Nov 05, 2018 7:11 am

I have color variation in cloned part. still learning to fix it in fusion.
https://www.instagram.com/weddings_by_yogendra/

Resolve Studio 18.0.1
Fusion Studio 16.2.1
Offline
User avatar

Adelson Munhoz

  • Posts: 271
  • Joined: Thu Mar 05, 2015 5:44 pm

Re: Paint tool in Fusion 9

PostMon Nov 05, 2018 9:33 am

A fundamental difference between Stroke and Multistroke is that the cloning in the Stroke tool is "cumulative".

In other words, it uses the previous stroke as the source of next stroke.

The Multistroke tool will always use the clean image as source for cloning.
Offline

Sam Steti

  • Posts: 2504
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Paint tool in Fusion 9

PostThu Nov 08, 2018 12:14 pm

Yogendra Singh wrote:Edit: Ok I found a solution.
I add a paint node and then modify with tracker position.
Fusion adds tracker in paint node. working fine.
Code: Select all
https://www.youtube.com/watch?v=fY5op_A8PKY

I'm used to the timestretcher solution, but this one looks fine too and a bit quicker probably. Thank you
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline
User avatar

Yogendra Singh

  • Posts: 235
  • Joined: Sun Apr 30, 2017 5:51 pm
  • Location: Chandigarh

Re: Paint tool in Fusion 9

PostThu Nov 08, 2018 6:42 pm

Sam Steti wrote: the timestretcher solution

tell me about it.
https://www.instagram.com/weddings_by_yogendra/

Resolve Studio 18.0.1
Fusion Studio 16.2.1
Offline

Sam Steti

  • Posts: 2504
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Paint tool in Fusion 9

PostThu Nov 08, 2018 8:16 pm

Yogendra Singh wrote:
Sam Steti wrote: the timestretcher solution

tell me about it.

It's the 4th post here in this thread, B. Ray's one... The timestretcher node freezes the video for you to paint the frame, and use a polylined mask to be used with the tracker. I may post a clip link here, but ... it's in french ;)
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline
User avatar

Bryan Ray

  • Posts: 2491
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Paint tool in Fusion 9

PostFri Nov 09, 2018 3:12 pm

I don't even use a mask. I put a transparent Background into the Paint node's input, then put the image to be sampled from in the Source Tool field in the Paint node's control panel, and Merge it over the top. The output of the Paint has only the paint strokes and therefore doesn't need to be masked.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline
User avatar

Tanawat Wattanachinda

  • Posts: 97
  • Joined: Sat Dec 20, 2014 3:47 pm
  • Location: Bangkok, Thailand

Re: Paint tool in Fusion 9

PostMon Nov 12, 2018 9:23 am

I wish someone could teach a proper way to use paint tool in Fusion (in video). I mean all the tool.
I try reading the manual, but doesn't take me to very far. Basic use is fine. but what people doing with it professionally is what I want to learn.
Offline
User avatar

Yogendra Singh

  • Posts: 235
  • Joined: Sun Apr 30, 2017 5:51 pm
  • Location: Chandigarh

Re: Paint tool in Fusion 9

PostMon Nov 12, 2018 1:59 pm

Bryan Ray wrote:I don't even use a mask. I put a transparent Background into the Paint node's input, then put the image to be sampled from in the Source Tool field in the Paint node's control panel, and Merge it over the top. The output of the Paint has only the paint strokes and therefore doesn't need to be masked.

Couldn't get it to work.
I connected background node on yellow input to paint node and connected my clip node to same yellow input with Alt.
Dragged clip node to source tool.
Painted with single stroke clone tool. There is nothing on background node. Whats wrong? TIA

Code: Select all
{
   Tools = ordered() {
      Paint1 = Paint {
         CtrlWZoom = false,
         Inputs = {
            Input = Input {
               SourceOp = "Merge5",
               Source = "Output",
            },
            Paint = Input {
               SourceOp = "Stroke2",
               Source = "Out",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 664, 545 } },
      },
      Stroke2 = Stroke {
         Points = {
         },
         IsThreaded = false,
         Brushes = { "SoftBrush" },
         ApplyModes = {
            "PaintApplyColor",
            "PaintApplyRubThrough"
         },
         Inputs = {
            Paint = Input {
               SourceOp = "Stroke1",
               Source = "Out",
            },
            ApplyMode = Input { Value = FuID { "PaintApplyRubThrough" }, },
            ["PaintApplyRubThrough.Offset"] = Input { Value = { 0.5125, 0.491203703703704 }, },
            ["PaintApplyRubThrough.SourceTool"] = Input {
               SourceOp = "Loader1_1_1",
               Source = "Output",
            },
         },
      },
      Stroke1 = Stroke {
         Points = {
            { X = 0, Y = 0, Time = 1794255 },
            { X = 0, Y = 0, Time = 0 }
         },
         IsThreaded = false,
         Brushes = { "SoftBrush" },
         ApplyModes = {
            "PaintApplyColor",
            "PaintApplyRubThrough"
         },
         Inputs = {
            ApplyMode = Input { Value = FuID { "PaintApplyRubThrough" }, },
            Center = Input { Value = { 0.651302099227905, 0.654629647731781 }, },
            ["PaintApplyRubThrough.Offset"] = Input { Value = { 0.5125, 0.491203703703704 }, },
            ["PaintApplyRubThrough.SourceTool"] = Input {
               SourceOp = "Loader1_1_1",
               Source = "Output",
            },
         },
      },
      Merge5 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "PipeRouter1",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Loader1_1_1",
               Source = "Output",
            },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 554, 545 } },
      },
      PipeRouter1 = PipeRouter {
         Inputs = {
            Input = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = PipeRouterInfo { Pos = { 554, 509 } },
      },
      Loader1_1_1 = Loader {
         Clips = {
            Clip {
               ID = "Clip1",
               Filename = "G:\\Vishal Garima\\Wedding\\Kukku Ji\\2\\PRIVATE\\M4ROOT\\CLIP\\C0026.MP4",
               FormatID = "QuickTimeMovies",
               Length = 2232,
               Multiframe = true,
               TrimIn = 0,
               TrimOut = 2231,
               ExtendFirst = 0,
               ExtendLast = 0,
               Loop = 1,
               AspectMode = 0,
               Depth = 0,
               TimeCode = 0,
               GlobalStart = 0,
               GlobalEnd = 2231
            }
         },
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 439, 545 } },
      },
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 487, 483 } },
      }
   },
   ActiveTool = "Paint1"
}
https://www.instagram.com/weddings_by_yogendra/

Resolve Studio 18.0.1
Fusion Studio 16.2.1
Offline
User avatar

Bryan Ray

  • Posts: 2491
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Paint tool in Fusion 9

PostMon Nov 12, 2018 2:52 pm

Like this:
Attachments
Untitled.png
Untitled.png (42.2 KiB) Viewed 5111 times
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline
User avatar

Yogendra Singh

  • Posts: 235
  • Joined: Sun Apr 30, 2017 5:51 pm
  • Location: Chandigarh

Re: Paint tool in Fusion 9

PostMon Nov 12, 2018 11:15 pm

Thx Bryan,
That I already did. How do you track the brush stroke? for next, say 100 frames?
https://www.instagram.com/weddings_by_yogendra/

Resolve Studio 18.0.1
Fusion Studio 16.2.1
Offline

Sam Steti

  • Posts: 2504
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Paint tool in Fusion 9

PostTue Nov 13, 2018 11:14 am

Yogendra Singh wrote:Thx Bryan,
That I already did. How do you track the brush stroke? for next, say 100 frames?

At the bottom of the Bryan screenshot, you can see "brush controls" : open it, right click "center" and then Modify with > tracker position in the 2 menus...
Then you'll have a track line in the Paint parameters : drag and drop your clip node (or MediaIn) in the source box and track forward...
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline
User avatar

Bryan Ray

  • Posts: 2491
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Paint tool in Fusion 9

PostTue Nov 13, 2018 9:11 pm

I usually insert a Tracker node between the Paint and the Merge. The Loader goes into the Background input, and the Paint tool in the Foreground. Perform the track, then in the Operation tab, set it up to Matchmove, FG Only. Assuming you began tracking from the frame on which you painted (track in one direction, then return to that frame and track in the other), set the Reference to Select time, and the paint shouldn't displace. If it does, you can correct with a Transform node after the Tracker.

I like to have each operation in its own node instead of compounding several in a single tool, as Sam describes. That's a matter of personal preference, though. Either way works, or a couple of others, for that matter.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Sam Steti

  • Posts: 2504
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Paint tool in Fusion 9

PostTue Nov 13, 2018 11:27 pm

Bryan Ray wrote:I like to have each operation in its own node instead of compounding several in a single tool, as Sam describes. That's a matter of personal preference, though. Either way works, or a couple of others, for that matter.
Usually too, I admit, and this is also the reason why I've always used the timestretcher way to paint in Fusion, where you can come back to tune every parameters if you like to...

But after years of use, you sometimes want to go straight to the more basic way to reach your goal, at least I do; to achieve it, one simple tool is often the solution, moreover if the thing to fix can be done with a simple tool...
In our example, the basic patch tool in Resolve can do 75% of what you must do, that's to say every basic pixels replacement operation. But if the clip is more tricky, then Fusion (personally I quickly choose Mocha but this is off-topic).
So, since I consider Fusion nodes as bricks to build a tool more than standalone ready to use tools, if I'm in this very mood which leads me to "use the less to reach the best", then I add the tracker inside the Paint node as I described it before, even if the timestretcher way along with a separated tracker node allow more precision and tidiness... It's a question of state of mind at the time of the job for me ;)
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin

Return to Fusion

Who is online

Users browsing this forum: KrunoSmithy and 29 guests