- Posts: 4
- Joined: Thu Feb 13, 2020 6:37 am
- Real Name: Antony Ryasnoy
Personally I don't like using the displacement option, because you have less control on the actual position on the path. Working with x/y splines is usally more precise.
What I like to do in cases like this is working with the 'offset position' modifier which can offset a motion both in position and in time. It's a very flexible way of tying things together.
Select the code below and paste it in the flow area to see what I mean. As soon as you change the path of the green rectangle the red 'path' (motion) will change with it.
- Code: Select all
{
Tools = ordered() {
Background1 = Background {
Inputs = {
GlobalOut = Input { Value = 100, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
},
ViewInfo = OperatorInfo { Pos = { 165, 16.5 } },
},
Green = Background {
NameSet = true,
Inputs = {
GlobalOut = Input { Value = 100, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
TopLeftGreen = Input { Value = 1, },
TopLeftBlue = Input { Value = 0.016, },
},
ViewInfo = OperatorInfo { Pos = { 165, 49.5 } },
},
Transform1 = Transform {
Inputs = {
Center = Input {
SourceOp = "Path1",
Source = "Position",
},
Size = Input { Value = 0.25, },
Input = Input {
SourceOp = "Green",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 275, 49.5 } },
},
Path1 = PolyPath {
DrawMode = "InsertAndModify",
Inputs = {
Displacement = Input {
SourceOp = "Path1Displacement",
Source = "Value",
},
PolyLine = Input {
Value = Polyline {
Points = {
{ LockY = true, X = -0.659525631216526, Y = 0.266666666666667, RX = 0.069750437017999, RY = -0.310121568613253 },
{ X = -0.367466222606001, Y = -0.360082022511229, LX = -0.152558534574528, LY = 0.00650555195138963, RX = 0.132597806960993, RY = -0.00565436685814299 },
{ X = -0.161752694460984, Y = 0.24544014067066, LX = -0.130062824820117, LY = -0.04622072163203, RX = 0.149857426386679, RY = 0.0532551741751792 },
{ X = 0.241043759103759, Y = -0.14383444743497, LX = -0.152530382846402, LY = 0.0167804342984283, RX = 0.153740929406844, RY = -0.0169136110245572 },
{ LockY = true, X = 0.67176740627391, Y = 0.153741496598639, LX = -0.138491358881654, LY = -0.157244777529083 }
}
},
},
},
},
Path1Displacement = BezierSpline {
SplineColor = { Red = 255, Green = 0, Blue = 255 },
NameSet = true,
KeyFrames = {
[0] = { 0, RH = { 16.6666666666667, 0.333333333333333 }, Flags = { Linear = true, LockedY = true } },
[50] = { 1, LH = { 33.3333333333333, 0.666666666666667 }, Flags = { Linear = true, LockedY = true } }
}
},
Transform2 = Transform {
CtrlWZoom = false,
Inputs = {
Center = Input {
SourceOp = "Offset1",
Source = "Position",
},
Size = Input { Value = 0.33, },
Input = Input {
SourceOp = "Red",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 275, 82.5 } },
},
Offset1 = Offset {
CtrlWZoom = false,
Inputs = {
Position = Input {
SourceOp = "Path1",
Source = "Position",
},
Offset = Input { Value = { 0, 0 }, },
PositionTimeOffset = Input { Value = -50, },
},
},
Red = Background {
NameSet = true,
Inputs = {
GlobalOut = Input { Value = 100, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
TopLeftRed = Input { Value = 1, },
},
ViewInfo = OperatorInfo { Pos = { 165, 82.5 } },
},
Merge1 = Merge {
Inputs = {
Background = Input {
SourceOp = "Background1",
Source = "Output",
},
Foreground = Input {
SourceOp = "Transform1",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 660, 49.5 } },
},
Merge2 = Merge {
Inputs = {
Background = Input {
SourceOp = "Merge1",
Source = "Output",
},
Foreground = Input {
SourceOp = "Transform2",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 825, 82.5 } },
}
}
}