Jump to: Board index » General » Fusion

## Combining 2 or more shapes

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

rsf123

• Posts: 140
• Joined: Tue May 21, 2019 3:05 pm
• Real Name: Roger Smith
I know how to draw individual shapes using the various ellipse/polygon/rectangle nodes, and linking it into a background node.

But my question is: Is there a way to combine several shapes into one entity so that movement animation to the entire group.

e.g. if I draw a circle and square, how do I merge the circle and square so they form one entity, so that I can apply timeline effects to that one entity?

Frank Feijen

• Posts: 112
• Joined: Tue Dec 13, 2016 10:04 am
• Location: Vilvoorde, Belgium
By adding a transform node?
Code: Select all
`{   Tools = ordered() {      Rectangle1 = RectangleMask {         Inputs = {            MaskWidth = Input { Value = 1920, },            MaskHeight = Input { Value = 1080, },            PixelAspect = Input { Value = { 1, 1 }, },            ClippingMode = Input { Value = FuID { "None" }, },            Center = Input { Value = { 0.234015345268542, 0.490909090909091 }, },            Width = Input { Value = 0.124040920716112, },            Height = Input { Value = 0.231818181818182, },         },         ViewInfo = OperatorInfo { Pos = { 330, 247.5 } },      },      Ellipse1 = EllipseMask {         Inputs = {            MaskWidth = Input { Value = 1920, },            MaskHeight = Input { Value = 1080, },            PixelAspect = Input { Value = { 1, 1 }, },            ClippingMode = Input { Value = FuID { "None" }, },            Center = Input { Value = { 0.80690537084399, 0.529545454545455 }, },            Width = Input { Value = 0.126978942069631, },            Height = Input { Value = 0.126978942069631, },            EffectMask = Input {               SourceOp = "Rectangle1",               Source = "Mask",            }         },         ViewInfo = OperatorInfo { Pos = { 440, 247.5 } },      },      Transform1 = Transform {         CtrlWZoom = false,         Inputs = {            Angle = Input {               Value = 1070,               Expression = "time*10",            },            Input = Input {               SourceOp = "Ellipse1",               Source = "Mask",            },         },         ViewInfo = OperatorInfo { Pos = { 550, 247.5 } },      },      Background1 = Background {         Inputs = {            Width = Input { Value = 1920, },            Height = Input { Value = 1080, },            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },            TopLeftRed = Input { Value = 1, },            EffectMask = Input {               SourceOp = "Transform1",               Source = "Output",            }         },         ViewInfo = OperatorInfo { Pos = { 660, 247.5 } },      }   }}`

Bryan Ray

• Posts: 1536
• Joined: Mon Nov 28, 2016 5:32 am
• Location: Los Angeles, CA, USA
Frank answered indirectly. You can chain mask tools together using their Effect Mask inputs, and they'll Merge. When you connect them, the downstream masks will get a new input that allows you to choose the blend method. If you need a slightly more complex arrangement—for instance, you need to invert some of the masks together prior to combining with another set, you can use the Bitmap tool to tie two branches together.

The Bitmap's own controls affect the Background input, so if you're Subtracting, the Background masks will be subtracted _from_ the masks coming in on the Effect Mask. I like to use Bitmap also to get a single Level and Softness control for a group of masks so they don't have to be adjusted individually if they all represent a single object. It's also useful to be able to Invert a combined matte, since Inverting the masks individually will cause them to merge unpredictably.
Bryan Ray
http://www.bryanray.name
http://www.musevfx.com

Sander de Regt

• Posts: 1807
• Joined: Thu Nov 13, 2014 10:09 pm
I think the OP was also asking about ways to make them move as one, would a transform tool help for that? I've always found that part to be a bit flakey.
Sander de Regt

The Netherlands

rsf123

• Posts: 140
• Joined: Tue May 21, 2019 3:05 pm
• Real Name: Roger Smith
Sander de Regt wrote:I think the OP was also asking about ways to make them move as one, would a transform tool help for that? I've always found that part to be a bit flakey.

Yes. the only reason I asked about combining two objects is so that, when I apply movement, both objects move in tandem.

Also, I'm new to Fusion/Resolve and haven't got around to understanding codes.

Frank Feijen

• Posts: 112
• Joined: Tue Dec 13, 2016 10:04 am
• Location: Vilvoorde, Belgium
Did you try my example? Just copy-paste the code into Fusion with the node-view active. It's 2 masks concatenated with a transform. Works like a charm

rsf123

• Posts: 140
• Joined: Tue May 21, 2019 3:05 pm
• Real Name: Roger Smith
Frank Feijen wrote:Did you try my example? Just copy-paste the code into Fusion with the node-view active. It's 2 masks concatenated with a transform. Works like a charm

Thanks, but I new to Davinci Resolve and VFX. I haven't seen any tutorials on youtube on how to paste in the code.

Frank Feijen

• Posts: 112
• Joined: Tue Dec 13, 2016 10:04 am
• Location: Vilvoorde, Belgium
in my first post (thus the second post in this list), select all the code from and including the first { and the last }, copy it (ctrl-c), go to your fusion tab in resolve, make sure that the node-area is active, and paste (ctrl-v). The nodes should magically appear!

Don't use the auto-select feature, it doesn't seem to work...

rsf123

• Posts: 140
• Joined: Tue May 21, 2019 3:05 pm
• Real Name: Roger Smith
Frank Feijen wrote:in my first post (thus the second post in this list), select all the code from and including the first { and the last }, copy it (ctrl-c), go to your fusion tab in resolve, make sure that the node-area is active, and paste (ctrl-v). The nodes should magically appear!

Don't use the auto-select feature, it doesn't seem to work...

I did the copy and paste, and this is what appeared in the Fusion tab (see below), but it is not clear how the two diagrams move together as one?
Attachments
test.jpg (65.98 KiB) Viewed 1740 times

Sander de Regt

• Posts: 1807
• Joined: Thu Nov 13, 2014 10:09 pm
Select just the transform tool, and move the center cross-hair, the other shapes will move with it.
Sander de Regt