Page 1 of 1

Align Node's X,Y To [object's X,Y] behavior

Posted: Sun Feb 09, 2020 8:33 pm
by brysend
Hello WSL!

In other motion graphics software, there exists Nodes, or Objects that take two input as parameters, and we can select
Align X's top to Y's bottom
Align X'bottom to Y's right side
Align Y's top to X' left side

and after adding keyframe, it respects those Alignments set earlier ?

Does such capability exist in Fusion?

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Sun Feb 09, 2020 9:16 pm
by SecondMan
What exactly are X and Y, and can you give a visual example? Perhaps a comp setup where you "fake" it?

Sounds like something that should be fairly easy to set up - I just don't quite know what you mean...

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Wed Feb 12, 2020 1:28 pm
by brysend
X can be a Text Node
Y can be Paint Tool, Or Polygon Node, or Background Node
__

X can be Paint Tool, or Polygon Node
Y can be Text Node, or BG.

__

The closest thing I have seen is with the Text Node's H or V Anchor property, which lets you define the point or side the Text will enlarge from or grow

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Wed Feb 12, 2020 1:57 pm
by SirEdric
Hmmm.....maybe instanced Transforms with an offset PivotPoint might help?
Sorry, but I find your description a bit vague....

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Wed Feb 12, 2020 3:08 pm
by Tory
After Effects has several behaviors for aligning that would be great to have when working in Fusion.

1. Align/Distribute Layers - This operates on two or more layers and aligns them or spreads them out evenly. It has options for center left / right justified etc.
2. Snapping - Smart operation that can snap to centers or edges of other elements (this is an option that is off by default)
3. Grid and Guide - You can pull out a guide from the rulers on the edge of the viewer and snap edges of elements to it.

You could for example drag a guide out from the side... snap several elements left edge to it. and then us distribute layers to have them evenly spaced vertically.

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Wed Feb 12, 2020 3:39 pm
by Midgardsormr
Trouble is, we don't have layers. It would have to be something like a script that creates Transform nodes. But how do you determine where they'd be placed? edit: Just read the original post, which is not quite what I was thinking. Aligning to common bottom, or center to bottom of the DoD, etc should be possible.

I've thought about adding the feature to MultiMerge, but it's low-priority for me since that's not the kind of thing I do with the tool. I can see where it would be really useful for people doing UI design or mograph, but that isn't me.

Added in 4 minutes 7 seconds:
Actually, now that I think about it, didn't June Yu post something a few months ago along these lines? I think it was a macro.

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Wed Feb 12, 2020 11:12 pm
by SecondMan
Midgardsormr wrote:
Wed Feb 12, 2020 3:43 pm
didn't June Yu post something a few months ago
He did indeed - Advanced Pivot?

viewtopic.php?f=6&t=3257

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Thu Feb 13, 2020 8:27 am
by Tory
Well the closest to the behavior I have found in fusion is maybe batch parameter change?

I get that we don't have the layer paradigm but... this is more about being able to adjust or effect multiple parameters in relation to one another. I would really like to see the ability to have multiple transform widgets on screen (if they are selected in the flow) and then be able to align them in relation to one another etc. in the viewer.

As long as they are selected in the flow why could we not have these kinds of layout helpers?

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Thu Feb 13, 2020 8:47 am
by Midgardsormr
I'm still not entirely sure how it could be implemented using the tools we have at hand, but it's maybe not impossible. Seems like a good candidate for the forum's new Ideas function, yes?

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Thu Feb 13, 2020 9:30 am
by Tory
Yeah if it doesn't ring a bell for you, I doubt it is currently possible ;)

I agree I think this would need to be something added at the core. But I think it would also open up some great workflow refinements. But it is currently it is not possible to select multiple transform or other controls in the viewer... You CAN see multiple but only manipulate one at a time.

The workflow I would envision would be like this.

1. select the nodes you want to manipulate in the flow (this brings up the manipulators in the viewer)
2. box select multiple controls in the viewer
3. drag to move all, or
4. have buttons in the viewer to align or distribute or copy.

You can kind of use the batch change parameter script ... especially now... the last time I checked you could not change only one point X or Y but it had to match both. This is great but it still is a bit complicated and not visual.

I have a feeling that this is something really missing for those looking at fusion as a replacement for After Effects and may have a bigger focus on Motion Graphics (at least the alignment) but adjusting multiple controls from selected nodes in the viewer seems like a way to speed up several tasks...

BTW the updated Batch Change Parameters Script is Awesome! :)

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Thu Feb 13, 2020 9:45 am
by Midgardsormr
I'm reminded of my frustration with the CornerPositioner tool. You can't multi-select the Point controls in that, either, so I usually use a GridWarp to do my corner-pinning instead. So what if…?

Code: Select all

{
	Tools = ordered() {
		Polygon1 = PolylineMask {
			DrawMode = "InsertAndModify",
			DrawMode2 = "InsertAndModify",
			CtrlWZoom = false,
			Inputs = {
				MaskWidth = Input { Value = 1920, },
				MaskHeight = Input { Value = 1080, },
				PixelAspect = Input { Value = { 1, 1 }, },
				ClippingMode = Input { Value = FuID { "None" }, },
				Polyline = Input {
					SourceOp = "Polygon1Polyline",
					Source = "Value",
				},
				Polyline2 = Input {
					Value = Polyline {
					},
					Disabled = true,
				},
				Point0 = Input { Value = { 0.375520840287209, 0.550925923718347 }, },
				Point1 = Input { Value = { 0.514583333333333, 0.627777781144337 }, },
				Point2 = Input { Value = { 0.536458332339922, 0.403703705359388 }, },
			},
			ViewInfo = OperatorInfo { Pos = { 1705, 280.5 } },
		},
		Polygon1Polyline = BezierSpline {
			SplineColor = { Red = 173, Green = 255, Blue = 47 },
			NameSet = true,
			KeyFrames = {
				[1014] = { 0, Flags = { Linear = true, LockedY = true }, Value = Polyline {
						Closed = true,
						Points = {
							{ Linear = true, X = -0.124479159712791, Y = 0.0509259237183466, LX = 0.0536458306842379, LY = -0.0490740727863194, RX = 0.0463541643487082, RY = 0.0256172858086633, PublishID = "Point0" },
							{ Linear = true, X = 0.0145833333333333, Y = 0.127777781144337, LX = -0.0463541643487082, LY = -0.0256172858086633, RX = 0.00729166633552968, RY = -0.0746913585949827, PublishID = "Point1" },
							{ Linear = true, X = 0.0364583323399223, Y = -0.0962962946406117, LX = -0.00729166633552968, LY = 0.0746913585949827, RX = -0.0536458306842379, RY = 0.0490740727863194, PublishID = "Point2" }
						}
					} }
			}
		},
		Transform2 = Transform {
			Inputs = {
				Center = Input { Expression = "Polygon1.Point1", },
				Input = Input {
					SourceOp = "Ellipse1",
					Source = "Mask",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 1925, 313.5 } },
		},
		Ellipse1 = EllipseMask {
			Inputs = {
				MaskWidth = Input { Value = 1920, },
				MaskHeight = Input { Value = 1080, },
				PixelAspect = Input { Value = { 1, 1 }, },
				ClippingMode = Input { Value = FuID { "None" }, },
				Width = Input { Value = 0.0330882920297262, },
				Height = Input { Value = 0.0330882920297262, },
			},
			ViewInfo = OperatorInfo { Pos = { 1815, 280.5 } },
		},
		Transform1 = Transform {
			Inputs = {
				Center = Input { Expression = "Polygon1.Point0", },
				Input = Input {
					SourceOp = "Ellipse1",
					Source = "Mask",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 1925, 280.5 } },
		},
		Transform3 = Transform {
			Inputs = {
				Center = Input { Expression = "Polygon1.Point2", },
				Input = Input {
					SourceOp = "Ellipse1",
					Source = "Mask",
				},
			},
			ViewInfo = OperatorInfo { Pos = { 1925, 346.5 } },
		},
		Merge2_1 = Merge {
			Inputs = {
				UseOpenCL = Input { Value = 0, },
				Background = Input {
					SourceOp = "Transform3",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Merge2",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 2035, 346.5 } },
		},
		Merge2 = Merge {
			Inputs = {
				UseOpenCL = Input { Value = 0, },
				Background = Input {
					SourceOp = "Transform2",
					Source = "Output",
				},
				Foreground = Input {
					SourceOp = "Transform1",
					Source = "Output",
				},
				PerformDepthMerge = Input { Value = 0, },
			},
			ViewInfo = OperatorInfo { Pos = { 2035, 313.5 } },
		}
	}
}
If you select the Polygon node, you'll see three published points. You can marquee-select them in the Viewer and move all selected expression-linked Transform controls at once.

It should be possible to make some script buttons to set the coordinates of the published points to distribute or align them. And Fusion being resolution-independent actually makes the algorithm easier.

There's still some conceptual work to be done there to figure out exactly what the feature might look like. Is it a Fuse? A script? Is it possible to make some kind of interactive Viewer overlay that would permit us to create Guides?

Re: Align Node's X,Y To [object's X,Y] behavior

Posted: Thu Feb 13, 2020 10:05 am
by Tory
Interesting!

Could this be something that "grabs" the transforms and then releases control?

I was just playing with Batch Change Parameters and realized that you can have multiple instances running and that the control of the script lasts even after you no longer have the nodes selected.

So for example you could have a script open for a group of transforms that pulls the x axis to .5 but then play with the positioning along y in the viewer and then come back and clean up the alignment.

If there could be on screen controls that could be visible when you launch the batch parameters script but then go away when the script window is closed you still have the ability to manipulate the individual controls...