Page 1 of 1

Is there a "Null" Tool for custom user controls in Fusion?

PostPosted: Thu Nov 16, 2017 12:58 pm
by daniel.partzsch
Hey,

is there something like a "null" tool in Fusion. Basically I would like to have a blank tool, where I can only add custom user controls which would be used as inputs to be used with expressions on other tools. And how do I delete the controls again? Somehow I can only add and edit already existing user controls but cannot find a delete option for already available controls in the "Edit Control" window.

Thanks in advance!

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Thu Nov 16, 2017 2:41 pm
by Umberto Uderzo
Don't know if it's what you're after, but you can try this one:

1) Add a custom tool
2) Config the tool showing only what you need
3) Name each parameter accordingly with your needs
4) Go to "Controls" and for each control publish it
5) Now you can Connect other parameters to that controls

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            TopLeftGreen = Input {
               SourceOp = "Publish2",
               Source = "Value",
            },
            TopLeftBlue = Input {
               SourceOp = "Publish3",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 715, 115.5 } },
      },
      Publish1 = PublishNumber {
         Inputs = {
            Value = Input { Value = 0.517, },
         },
      },
      Publish2 = PublishNumber {
         Inputs = {
            Value = Input { Value = 0.219, },
         },
      },
      Publish3 = PublishNumber {
         Inputs = {
            Value = Input { Value = 0.465, },
         },
      },
      CustomTool = Custom {
         CtrlWZoom = false,
         NameSet = true,
         Inputs = {
            NumberIn1 = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            NumberIn2 = Input {
               SourceOp = "Publish2",
               Source = "Value",
            },
            NumberIn3 = Input {
               SourceOp = "Publish3",
               Source = "Value",
            },
            LUTIn1 = Input {
               SourceOp = "CustomTool1LUTIn1",
               Source = "Value",
            },
            LUTIn2 = Input {
               SourceOp = "CustomTool1LUTIn2",
               Source = "Value",
            },
            LUTIn3 = Input {
               SourceOp = "CustomTool1LUTIn3",
               Source = "Value",
            },
            LUTIn4 = Input {
               SourceOp = "CustomTool1LUTIn4",
               Source = "Value",
            },
            NameforNumber1 = Input { Value = "Red", },
            NameforNumber2 = Input { Value = "Green", },
            NameforNumber3 = Input { Value = "Blue", },
            ShowNumber4 = Input { Value = 0, },
            ShowNumber5 = Input { Value = 0, },
            ShowNumber6 = Input { Value = 0, },
            ShowNumber7 = Input { Value = 0, },
            ShowNumber8 = Input { Value = 0, },
            ShowPoint1 = Input { Value = 0, },
            ShowPoint2 = Input { Value = 0, },
            ShowPoint3 = Input { Value = 0, },
            ShowPoint4 = Input { Value = 0, },
            ShowLUT1 = Input { Value = 0, },
            ShowLUT2 = Input { Value = 0, },
            ShowLUT3 = Input { Value = 0, },
            ShowLUT4 = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 115.5 } },
      },
      CustomTool1LUTIn1 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 204, Green = 0, Blue = 0 },
         NameSet = true,
      },
      CustomTool1LUTIn2 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 204, Blue = 0 },
         NameSet = true,
      },
      CustomTool1LUTIn3 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 204 },
         NameSet = true,
      },
      CustomTool1LUTIn4 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 204, Green = 204, Blue = 204 },
         NameSet = true,
      }
   }
}

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Thu Nov 16, 2017 10:59 pm
by Bryan Ray
No, there's no Null among Fusion's built-in tools, but I have a Fuse:

Can't attach it directly, but save this code to your Fuses folder as Null.Fuse:

Code: Select all
FuRegisterClass("Null", CT_Tool, {
   REGS_Name = "Null",
   REGS_Category = "Fuses",
   REGS_OpIconSTring = "Nul",
   REGS_OpDescription = "Null node.",
   REGS_Company = "Muse VFX",
   REGS_URL = "http://www.musevfx.com",
})

function Create()
   InImage = self:AddInput("Input", "Input", {
      LINKID_DataType = "Image",
      LINK_Main = 1,
      })
   OutImage = self:AddOutput("Output", "Output", {
      LINKID_DataType = "Image",
      LINK_Main = 1,
      })
end

function Process(req)
   local img1 = InImage:GetValue(req) -- Gets the input image
   out = img1
   OutImage:Set(req, out) -- Send the result to the output

end


You can also add User Controls to Groups.

You used to be able to hide existing controls, but for some reason that option went away. If you just want to tuck a control out of sight, you can put it on another tab.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Thu Nov 16, 2017 11:07 pm
by Sander de Regt
You used to be able to hide existing controls, but for some reason that option went away. If you just want to tuck a control out of sight, you can put it on another tab.


I think you can still do this, if you turn the tool into a macro after you've added the user controls and then turn off all the stuff you don't want to see.

For now I'd advise against using a group as the placeholder for your controls, since the current version of Fusion doesn't show the keyframes of animated User Controls on group inside the spline editor.
If you add them to 'regular' tools, they *do* show up.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Thu Nov 16, 2017 11:58 pm
by Chad Capeland
A piperouter will work.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Fri Nov 17, 2017 1:10 am
by Bryan Ray
Chad Capeland wrote:A piperouter will work.


How is that done? The context menu from a pipe router doesn't show the Edit Controls menu, nor the Script menu.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Fri Nov 17, 2017 11:24 am
by daniel.partzsch
Bryan Ray wrote:No, there's no Null among Fusion's built-in tools, but I have a Fuse:

Can't attach it directly, but save this code to your Fuses folder as Null.Fuse:

Code: Select all
FuRegisterClass("Null", CT_Tool, {
   REGS_Name = "Null",
   REGS_Category = "Fuses",
   REGS_OpIconSTring = "Nul",
   REGS_OpDescription = "Null node.",
   REGS_Company = "Muse VFX",
   REGS_URL = "http://www.musevfx.com",
})

function Create()
   InImage = self:AddInput("Input", "Input", {
      LINKID_DataType = "Image",
      LINK_Main = 1,
      })
   OutImage = self:AddOutput("Output", "Output", {
      LINKID_DataType = "Image",
      LINK_Main = 1,
      })
end

function Process(req)
   local img1 = InImage:GetValue(req) -- Gets the input image
   out = img1
   OutImage:Set(req, out) -- Send the result to the output

end


You can also add User Controls to Groups.

You used to be able to hide existing controls, but for some reason that option went away. If you just want to tuck a control out of sight, you can put it on another tab.



Hey,

thanks but when I try this, I am getting an error saying: unexpected smybol near '{'

And how does this actually work with Fuses? I've never tried this /used them before.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Fri Nov 17, 2017 4:13 pm
by Chad Capeland
Bryan Ray wrote:
Chad Capeland wrote:A piperouter will work.


How is that done? The context menu from a pipe router doesn't show the Edit Controls menu, nor the Script menu.


Select another tool, add piperouter to selection, get context menu, cancel first dialog box. :mrgreen:

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Sat Nov 18, 2017 12:27 am
by Bryan Ray
daniel.partzsch wrote:

Hey,

thanks but when I try this, I am getting an error saying: unexpected smybol near '{'

And how does this actually work with Fuses? I've never tried this /used them before.


Hmmm... Did you use a plain text editor to save it? A word processor adds extra hidden characters that can mess with things. In any case, let's try just zipping it. Seems like a waste of time for a 1k file…

Anyway, a Fuse is a custom scripted tool. They can be a little more powerful than macros since they don't rely on existing tools, but they're not as flexible as full plug-ins. On the other hand, they work in the free version of Fusion. All you need to do to use one is to put it in the Fuses folder; it will show up in the Tools menu just like everything else. This one will appear in the Fuses category.

Chad Capeland wrote:
Select another tool, add piperouter to selection, get context menu, cancel first dialog box. :mrgreen:


Ha! I don't think that would ever have occurred to me.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Mon Nov 20, 2017 12:11 pm
by daniel.partzsch
Bryan Ray wrote:
daniel.partzsch wrote:

Hey,

thanks but when I try this, I am getting an error saying: unexpected smybol near '{'

And how does this actually work with Fuses? I've never tried this /used them before.


Hmmm... Did you use a plain text editor to save it? A word processor adds extra hidden characters that can mess with things. In any case, let's try just zipping it. Seems like a waste of time for a 1k file…

Anyway, a Fuse is a custom scripted tool. They can be a little more powerful than macros since they don't rely on existing tools, but they're not as flexible as full plug-ins. On the other hand, they work in the free version of Fusion. All you need to do to use one is to put it in the Fuses folder; it will show up in the Tools menu just like everything else. This one will appear in the Fuses category.

Chad Capeland wrote:
Select another tool, add piperouter to selection, get context menu, cancel first dialog box. :mrgreen:


Ha! I don't think that would ever have occurred to me.


ok, cool, that worked. Thanks a lot. Thanks a s well for that brief introduction into Fuses. Do you think, with a Fuse you could also set a specific fixed render range before a saver node? I was asking this question here in the forum as well (viewtopic.php?f=22&t=66894), but so far there seem to be no solution for the current version of Fusion...?

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Mon Nov 20, 2017 6:55 pm
by Bryan Ray
That wouldn't be a job for a Fuse. It's possible it could be done, but it would be pretty hacky. A better way would be an InTool Start Render Script. Click the little gear icon in any tool to access an area where InTool scripts can be placed. It will take some cleverness to manage multiple Savers all trying to modify the render range at once. Maybe you could set up a master control Saver with a Frame Render Script that turns other Savers on or off at designated times. The other Savers could have User Controls that designate their ranges, maybe.

Okay, I'm getting a little deeper into that than I have time for at the moment!

Fusion's paradigm is that the render environment is controlled at the composition level rather than at the output level.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Sun Jul 07, 2019 6:24 pm
by Jack Chavez
I'm going to stitch together several posts in an attempt at clarity. What's outlined below sounds marvelous but I get lost in the particulars. Would you mind clarifying a bit more?


is there something like a "null" tool in Fusion. Basically I would like to have a blank tool, where I can only add custom user controls which would be used as inputs to be used with expressions on other tools. And how do I delete the controls again? Somehow I can only add and edit already existing user controls but cannot find a delete option for already available controls in the "Edit Control" window.


A piperouter will work.


How is that done? The context menu from a pipe router doesn't show the Edit Controls menu, nor the Script menu.


Select another tool, add piperouter to selection, get context menu, cancel first dialog box. :mrgreen:


Ha! I don't think that would ever have occurred to me.


This sounds exactly like what I want to do (frustrated by the lack of a null tool in Fusion) but I've sat with Fusion in front of me and tried to deduce what is being described here with no luck (It's probably my limited experience with Fusion but I have spent hours on this with no success). Any chance you could walk through it step by step?

Ideally, assume you have, for example, ten Loader Nodes and you want to attach them to this Custom Null Tool. What are the steps in order? What does selection mean in context? (If this can be done with only 1 Loader, I'm still interested).


Thanks

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Sun Jul 07, 2019 10:59 pm
by Bryan Ray
Create two tools, say a Background and a Blur. Connect the Background to the Blur, then alt-click the pipe between them to create a PipeRouter (elbow).

Select either of the tools, then Ctrl+Click the PipeRouter. Right-click the first tool and choose "Edit Controls..."

Cancel the first Edit Controls window. In the second one, set up your User Control. When you click OK, you'll have a PipeRouter with a User Control.

You can't connect more than one tool to it, though. It's still just a PipeRouter, with a single Input and Output.

It's not a good idea in any case, really, since a PipeRouters tends to get deleted when you delete either of the nodes it's connected to. You're far better off either putting your controls on a node that will persist or making a Group and putting the controls on that.

What's your use case? We might be able to give you better guidance if we know what you're trying to do.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Mon Jul 08, 2019 3:39 am
by Jack Chavez
First of all, thanks for replying and I want you to know that I'm in the virtual line for the book when it lands.

Moving on; I was able to follow your instructions (thx) and get it to work and I think I get why you say it's not a good approach.

What I'm looking for is not specific, but rather a good general replacement for a null object in 2D space (and really, 3D space as well). As you know, in AE or any 3D program it's often useful to be able to attach 1 or 100 objects to a null or create hierarchies of nulls to create a camera rig, or joints, or a flock of objects shooting past the camera, or a solar system, etc.

Part of the issue is that there seem to be very few tools (Merge 3D is the only one I know off the top of my head) that allow for more than a few non-mask inputs. What I've come up with on my own is to have, say 10 objects [e.g. photos], connect each one to a Transform node (so I can manipulate/size them in 2D space), then daisy chain the outputs to series of merge nodes and then group the whole thing (the group container being the null). Pipe that output to a series of 2 Transform nodes and Voila! I have a node hierarchy that I can offset and keyframe. Only it doesn't feel like voila. It feels like it should be much simpler to accomplish this with fewer nodes.

Perhaps I'm just looking at it the wrong way. I've studied several languages and one of the first barriers to overcome when learning a new language is to realize that they DON'T work the same way and you can't brute force that which works in one on another. You have to change your way of thinking.

So, I'm sure this has been solved by more experienced people, but I have yet to come across a relevant tutorial and I've watched SCADS. What's a good approach that works for both 2D and 3D? Work in 3D and use 3D Merge for everything? Pick-whipping? (AE has this cool feature where you can SHIFT+pick-whip another object B and the current object A inherits the position parameters of B. That kind of thing leads to super efficiency).

In the end, I'm mostly looking to be as efficient as possible. I'm really digging Fusion but this has me in a tizzy.

Thanks,
- Jack (sorry for the long post)

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Mon Jul 08, 2019 7:41 am
by Hendrik Proosa
Every time you see a layer in AE, it is internally comped to stuff below it using a merge operation. It is just the nature of layers vs nodes, in node graph every merge is explicit, in layer based representation it is implicit.

I think you can create an uber merge by simply grouping lots of chained merges and exposing their inputs. It is still just a merge after merge, but visual representation differs.

Pich whipping is just quick expression linking, not sure but maybe there is equivalent in Fu.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Mon Jul 08, 2019 8:16 am
by Sander de Regt
Pick whipping is in Fusion as well. Just add an expression to any value (type '=' in a value field) and you get a small expression field with a '+' button on the left side of it. This is the equivalent of a pick whip in Fusion. Just drag it to the value you need and it will fill in the correct 'scripted' name.
This doesn't work exactly in 3D space, because for some reason all objects in 3D space in Fusion work with some sort of local coordinates, so if they're transformed down the line with 3D transforms etc you can't pickwhip their final position in 3D space.

For combining multiple layers you can also install Multimerge from inside of Reactor which allows for basic merging of a lot of layers into 1 tool.

Re: Is there a "Null" Tool for custom user controls in Fusio

PostPosted: Mon Jul 08, 2019 6:40 pm
by Jack Chavez
I think you can create an uber merge by simply grouping lots of chained merges and exposing their inputs. It is still just a merge after merge, but visual representation differs. - Hendrik Proosa


Yeah, that's what I'd come up with on my own, but it seems inelegant, which is why I'm wondering if there is a better way.

Pick whipping is in Fusion as well. -Sander de Regt


Yes. I'm wondering if there is some expert way of using that to create the kind of relationship between objects I'm looking for. That's why I gave the Shift+pick-whip example from AE. It's extremely powerful and useful but (in my experience) not many people know about it. I was wondering if there may be a similar situation here where the answer is not apparently obvious, but simple and powerful once you know the method.
Such as using a node (Transform?) and using a pick-whip to create positional relationships between it and a large number of Loader nodes (piped to other Tranforms?) with the ability to create an offset for each loader in X and Y? But then, I'd need the Merge nodes and it's basically the same solution I'd already arrived at previously.

For combining multiple layers you can also install Multimerge from inside of Reactor which allows for basic merging of a lot of layers into 1 tool. -Sander de Regt


That sounds extremely promising! I was completely unaware of that node. I will check it out.

Thanks for the replies.


- JC