Welcome to WSL!

Make yourself at home, but before posting, please may I ask you to read the following topics.


Posting 101
Server space, screenshots, and you

Thank you!

PS. please pretty please:


Image

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

Moderator: SecondMan

User avatar
brysend
Posts: 31
Joined: Sat Nov 09, 2019 6:04 pm
Been thanked: 1 time

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

#1

Post by brysend » Sun Feb 09, 2020 8:33 pm

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?

User avatar
SecondMan
Site Admin
Posts: 4447
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 26
Location: Vancouver, Canada
Been thanked: 107 times
Contact:

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

#2

Post by SecondMan » Sun Feb 09, 2020 9:16 pm

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...

User avatar
brysend
Posts: 31
Joined: Sat Nov 09, 2019 6:04 pm
Been thanked: 1 time

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

#3

Post by brysend » Wed Feb 12, 2020 1:28 pm

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

User avatar
SirEdric
Fusionator
Posts: 2310
Joined: Tue Aug 05, 2014 10:04 am
Answers: 12
Real name: Eric Westphal
Been thanked: 42 times
Contact:

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

#4

Post by SirEdric » Wed Feb 12, 2020 1:57 pm

Hmmm.....maybe instanced Transforms with an offset PivotPoint might help?
Sorry, but I find your description a bit vague....

User avatar
Tory
Fusioneer
Posts: 90
Joined: Fri Apr 13, 2018 11:29 am
Real name: Tory Hooton
Been thanked: 3 times
Contact:

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

#5

Post by Tory » Wed Feb 12, 2020 3:08 pm

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.

User avatar
Midgardsormr
Fusionator
Posts: 1756
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 14
Location: Los Angeles, CA, USA
Been thanked: 89 times
Contact:

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

#6

Post by Midgardsormr » Wed Feb 12, 2020 3:39 pm

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.

User avatar
SecondMan
Site Admin
Posts: 4447
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 26
Location: Vancouver, Canada
Been thanked: 107 times
Contact:

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

#7

Post by SecondMan » Wed Feb 12, 2020 11:12 pm

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

User avatar
Tory
Fusioneer
Posts: 90
Joined: Fri Apr 13, 2018 11:29 am
Real name: Tory Hooton
Been thanked: 3 times
Contact:

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

#8

Post by Tory » Thu Feb 13, 2020 8:27 am

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?

User avatar
Midgardsormr
Fusionator
Posts: 1756
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 14
Location: Los Angeles, CA, USA
Been thanked: 89 times
Contact:

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

#9

Post by Midgardsormr » Thu Feb 13, 2020 8:47 am

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?

User avatar
Tory
Fusioneer
Posts: 90
Joined: Fri Apr 13, 2018 11:29 am
Real name: Tory Hooton
Been thanked: 3 times
Contact:

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

#10

Post by Tory » Thu Feb 13, 2020 9:30 am

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! :)

User avatar
Midgardsormr
Fusionator
Posts: 1756
Joined: Wed Nov 26, 2014 8:04 pm
Answers: 14
Location: Los Angeles, CA, USA
Been thanked: 89 times
Contact:

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

#11

Post by Midgardsormr » Thu Feb 13, 2020 9:45 am

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?

User avatar
Tory
Fusioneer
Posts: 90
Joined: Fri Apr 13, 2018 11:29 am
Real name: Tory Hooton
Been thanked: 3 times
Contact:

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

#12

Post by Tory » Thu Feb 13, 2020 10:05 am

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...