- Posts: 2
- Joined: Wed Oct 14, 2020 9:15 am
- Real Name: Sabina Raymond
This turned out to be a fun little project. I tried doing it with Duplicate, like you, and couldn't get very far. Then I tried a much more powerful duplicator, provided by a member of the Fusion community: Cloner, by Steve Watson. I could more easily achieve nice positioning with this, but I still couldn't solve the fundamental problem of the last blade(s) going over the first.
I looked up how to make a real mechanical iris and realised that the key to it looking right is that each blade needs to go under the next one. Eg with 8 blades, blade 1 goes under blade 2, which goes under blade 3, etc, and then blade 8 needs to also go under blade 1. That's the part that I cannot replicate with either Duplicate or Cloner. There may well be a way, but if so I couldn't figure it out.
So instead I did it manually. I made a blade, I transformed and merged it 7 times to make 8 blades total, and used a mask on a couple of the merges to ensure that blade 8 went under blade 1.
Here's a look at the comp with some explanatory notes added (click for larger):
And here's the node code - when you have a comp open in Resolve's Fusion page or Fusion standalone, you can copy this code and paste it directly into the flow to re-create the nodes I made:
- Code: Select all
{
Tools = ordered() {
BladeMerging = Note {
NameSet = true,
Inputs = {
Comments = Input { Value = "Each blade is merged under the previous one.\n\nWhen we get to the final two blades, there's a complication: we need blade 8 to go under blade 1. To achieve this, blade1's image is used as a Mask to MergeBlades78, so that blade 8 does not appear on top of blade 1.\n\nThe same mask is also needed for MergeBlades67, as these blades will cross over blade 1 during iris open/close.\n\nNote that MergeBlades67 and 78 have \"Apply Mask Inverted\" set.", }
},
ViewInfo = StickyNoteInfo {
Pos = { 1109.69, -147.842 },
Flags = {
Expanded = true
},
Size = { 395.809, 132.065 }
},
},
Background1 = Background {
Inputs = {
GlobalOut = Input { Value = 900, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Type = Input { Value = FuID { "Gradient" }, },
TopLeftRed = Input { Value = 0.417, },
TopLeftGreen = Input { Value = 0.41164572, },
TopLeftBlue = Input { Value = 0.283143, },
TopRightRed = Input { Value = 0.441, },
TopRightGreen = Input { Value = 0.302967, },
TopRightBlue = Input { Value = 0.302967, },
BottomLeftRed = Input { Value = 0.29593632, },
BottomLeftGreen = Input { Value = 0.402, },
BottomLeftBlue = Input { Value = 0.26532, },
BottomRightRed = Input { Value = 0.300935, },
BottomRightGreen = Input { Value = 0.303048040000001, },
BottomRightBlue = Input { Value = 0.433, },
Start = Input { Value = { -0.00210970464135021, 0.995 }, },
End = Input { Value = { 1.10618846694796, -0.08375 }, },
Gradient = Input {
Value = Gradient {
Colors = {
[0] = { 0.872721408, 0.984, 0.251904, 1 },
[1] = { 0.976, 0.838384, 0.838384, 1 }
}
},
},
},
ViewInfo = OperatorInfo { Pos = { 2123.52, 15.6161 } },
},
MergeBlades34 = Merge {
NameSet = true,
Inputs = {
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "MergeBlades23",
Source = "Output",
},
Foreground = Input {
SourceOp = "TransBlade4",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1107.06, 73.3825 } },
},
MergeBlades23 = Merge {
NameSet = true,
Inputs = {
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "MergeBlades12",
Source = "Output",
},
Foreground = Input {
SourceOp = "TransBlade3",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 977.912, 72.6847 } },
},
Text1 = TextPlus {
Inputs = {
GlobalOut = Input { Value = 900, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
Red1 = Input { Value = 0, },
Green1 = Input { Value = 0, },
StyledText = Input { Value = "IRIS!", },
Font = Input { Value = "Open Sans", },
Style = Input { Value = "Bold", },
VerticalJustificationNew = Input { Value = 3, },
HorizontalJustificationNew = Input { Value = 3, },
ManualFontKerningPlacement = Input {
Value = StyledText {
Array = {
},
Value = ""
},
},
},
ViewInfo = OperatorInfo { Pos = { 1982.09, 78.5411 } },
},
Merge1 = Merge {
Inputs = {
Background = Input {
SourceOp = "Background1",
Source = "Output",
},
Foreground = Input {
SourceOp = "Text1",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 2123.52, 78.5411 } },
},
MergeBlades12 = Merge {
NameSet = true,
Inputs = {
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
Foreground = Input {
SourceOp = "TransBlade2",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 842.871, 72.6847 } },
},
MergeBlades67 = Merge {
NameSet = true,
Inputs = {
EffectMask = Input {
SourceOp = "PipeRouter4",
Source = "Output",
},
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "MergeBlades56",
Source = "Output",
},
Foreground = Input {
SourceOp = "TransBlade7",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1491.58, 73.3825 } },
},
TransBlade2 = Transform {
NameSet = true,
Inputs = {
Pivot = Input { Value = { 0.442465751004643, 0.38647251285028 }, },
Angle = Input {
Value = -45,
Expression = "-45 * (BladeNumber - 1)",
},
Input = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
BladeNumber = Input {
Value = 2,
Expression = ": return self.Name:gsub(\"TransBlade\",\"\")",
},
},
ViewInfo = OperatorInfo { Pos = { 842.871, 126.677 } },
UserControls = ordered() {
BladeNumber = {
INP_MaxAllowed = 100,
INP_Integer = true,
INPID_InputControl = "ScrewControl",
INP_MaxScale = 100,
INP_MinScale = 1,
INP_MinAllowed = 1,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "BladeNumber"
}
}
},
MergeBlades45 = Merge {
NameSet = true,
Inputs = {
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "MergeBlades34",
Source = "Output",
},
Foreground = Input {
SourceOp = "TransBlade5",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1226.92, 73.3825 } },
},
MergeBlades56 = Merge {
NameSet = true,
Inputs = {
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "MergeBlades45",
Source = "Output",
},
Foreground = Input {
SourceOp = "TransBlade6",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1358.29, 73.3825 } },
},
MergeBlades78 = Merge {
NameSet = true,
Inputs = {
EffectMask = Input {
SourceOp = "PipeRouter4",
Source = "Output",
},
ApplyMaskInverted = Input { Value = 1, },
Background = Input {
SourceOp = "MergeBlades67",
Source = "Output",
},
Foreground = Input {
SourceOp = "TransBlade8",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1616.23, 73.3825 } },
},
CentreBlades = Transform {
NameSet = true,
Inputs = {
Center = Input { Value = { 0.55898901843764, 0.610164441707485 }, },
Input = Input {
SourceOp = "MergeBlades78",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 1741.6, 73.3825 } },
},
PipeRouter4 = PipeRouter {
Inputs = {
Input = Input {
SourceOp = "CloseIris",
Source = "Output",
},
},
ViewInfo = PipeRouterInfo { Pos = { 1027.47, -21.9515 } },
},
AnimatingIris = Note {
NameSet = true,
Inputs = {
Comments = Input { Value = "CloseIris is a Transform on the original blade. It moves the blade to create the iris open/close effect.\n\nA UserControl called AnimateIris is added, with values 0 to 1. Adjust AnimateIris to close (1) or open (0) the Iris. \n\nAnimateIris is referenced in an expression on Centre. Center->X moves according to the value of AnimateIris. When AnimateIris is 0, Center is 0.5,05. When AnimateIris is 1, Center is 0.34, 0.5. \n\nYou might need to adjust the Center expression if the blades change shape or size.", }
},
ViewInfo = StickyNoteInfo {
Pos = { 632.274, -99.4432 },
Flags = {
Expanded = true
},
Size = { 276.792, 149.397 }
},
},
MergeFinal = Merge {
NameSet = true,
Inputs = {
Background = Input {
SourceOp = "Merge1",
Source = "Output",
},
Foreground = Input {
SourceOp = "Merge4_2_1",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 2123.52, 147.655 } },
},
Merge4_2_1 = Merge {
Inputs = {
Background = Input {
SourceOp = "BGOuterRing",
Source = "Output",
},
Foreground = Input {
SourceOp = "Merge3_1_1",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1995.86, 147.655 } },
},
BGTransparent_1_1 = Background {
NameSet = true,
Inputs = {
GlobalOut = Input { Value = 900, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
TopLeftAlpha = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1755.86, 147.655 } },
},
Merge3_1_1 = Merge {
Inputs = {
EffectMask = Input {
SourceOp = "Instance_EllipseRing",
Source = "Mask",
},
Background = Input {
SourceOp = "BGTransparent_1_1",
Source = "Output",
},
Foreground = Input {
SourceOp = "CentreBlades",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 1873.86, 147.655 } },
},
TransBlade3 = Transform {
NameSet = true,
Inputs = {
Pivot = Input {
Value = { 0.439560463381168, 0.396803091362677 },
Expression = "TransBlade2.Pivot",
},
Angle = Input {
Value = -45,
Expression = "-45 * (BladeNumber - 1)",
},
Input = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
BladeNumber = Input {
Value = 2,
Expression = ": return self.Name:gsub(\"TransBlade\",\"\")",
},
},
ViewInfo = OperatorInfo { Pos = { 842.061, 176.645 } },
UserControls = ordered() {
BladeNumber = {
INP_MaxAllowed = 100,
INP_Integer = true,
INPID_InputControl = "ScrewControl",
INP_MaxScale = 100,
INP_MinScale = 1,
INP_MinAllowed = 1,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "BladeNumber"
}
}
},
BGOuterRing = Background {
NameSet = true,
Inputs = {
EffectMask = Input {
SourceOp = "EllipseRing",
Source = "Mask",
},
GlobalOut = Input { Value = 900, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
},
ViewInfo = OperatorInfo { Pos = { 1995.86, 200.382 } },
},
PipeRouter5 = PipeRouter {
Inputs = {
Input = Input {
SourceOp = "CloseIris",
Source = "Output",
},
},
ViewInfo = PipeRouterInfo { Pos = { 696.204, 204.169 } },
},
BladeTransformation = Note {
NameSet = true,
Inputs = {
Comments = Input { Value = "TransBlade 2 - 8 create the extra blades. The name of the node is important, as an expression is used on a UserControl called BladeNumber. This expression strips off \"TransBlade\" from the node's name, to get the node's number.\n\nThen in Angle, the BladeNumber is multiplied by -45 to get the angle for this blade. Note that if more or less blades were needed, this -45 should be changed (or we could add a \"NumberOfBlades\" property to calculate this automatically by dividing 360).\n\nThe Pivot point of TransBlade2 is manually set to the centre of a circle. Then the other TransBlade nodes reference TransBlade2's pivot.\n\nIf a larger or smaller iris is desired, adjust TransBlade2's Pivot accordingly", }
},
ViewInfo = StickyNoteInfo {
Pos = { 322.241, 131.939 },
Flags = {
Expanded = true
},
Size = { 394.959, 151.696 }
},
},
CloseIris = Transform {
NameSet = true,
Inputs = {
Center = Input {
Value = { 0.34, 0.5 },
Expression = "Point(0.5 - (AnimateIris*0.16), 0.5)",
},
Pivot = Input { Value = { 0.6740401763493, 0.3629363962183 }, },
Input = Input {
SourceOp = "MergeBladeOutline",
Source = "Output",
},
AnimateIris = Input {
SourceOp = "CloseIrisAnimateIris",
Source = "Value",
},
},
ViewInfo = OperatorInfo { Pos = { 629.061, 73.5591 } },
UserControls = ordered() {
AnimateIris = {
INP_MaxAllowed = 1,
INP_Integer = false,
INPID_InputControl = "SliderControl",
INP_MaxScale = 1,
INP_MinScale = 0,
INP_MinAllowed = 0,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "AnimateIris"
}
}
},
CloseIrisAnimateIris = BezierSpline {
SplineColor = { Red = 8, Green = 231, Blue = 82 },
NameSet = true,
KeyFrames = {
[0] = { 1, RH = { 41.6666666666667, 1 }, Flags = { Loop = true, LoopRel = true } },
[125] = { 0, LH = { 83.3375006914139, 0 }, RH = { 133.333333333333, 0 } },
[150] = { 0, LH = { 141.666666666667, 0 }, RH = { 199.994999170303, 0 }, Flags = { Linear = true } },
[300] = { 1, LH = { 250, 1 }, Flags = { Loop = true, LoopRel = true } }
}
},
EllipseRing = EllipseMask {
NameSet = true,
Inputs = {
Filter = Input { Value = FuID { "Fast Gaussian" }, },
SoftEdge = Input { Value = 0.003, },
BorderWidth = Input { Value = 0.0376, },
Solid = Input { Value = 0, },
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1 }, },
ClippingMode = Input { Value = FuID { "None" }, },
Center = Input { Value = { 0.500050267286271, 0.498687643451409 }, },
Width = Input { Value = 0.392289696391838, },
Height = Input { Value = 0.392289696391838, },
},
ViewInfo = OperatorInfo { Pos = { 1995.86, 248.534 } },
},
TransBlade4 = Transform {
NameSet = true,
Inputs = {
Pivot = Input {
Value = { 0.439560463381168, 0.396803091362677 },
Expression = "TransBlade2.Pivot",
},
Angle = Input {
Value = -45,
Expression = "-45 * (BladeNumber - 1)",
},
Input = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
BladeNumber = Input {
Value = 2,
Expression = ": return self.Name:gsub(\"TransBlade\",\"\")",
},
},
ViewInfo = OperatorInfo { Pos = { 842.061, 217.971 } },
UserControls = ordered() {
BladeNumber = {
INP_MaxAllowed = 100,
INP_Integer = true,
INPID_InputControl = "ScrewControl",
INP_MaxScale = 100,
INP_MinScale = 1,
INP_MinAllowed = 1,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "BladeNumber"
}
}
},
Instance_EllipseRing = EllipseMask {
NameSet = true,
SourceOp = "EllipseRing",
Inputs = {
EffectMask = Input { },
SettingsNest = Input { },
BorderWidth = Input { },
Solid = Input { },
["ShapeRasterizer.Nest"] = Input { },
CommentsNest = Input { },
FrameRenderScriptNest = Input { },
StartRenderScripts = Input { },
EndRenderScripts = Input { },
},
ViewInfo = OperatorInfo { Pos = { 1873.86, 250.079 } },
},
TransBlade5 = Transform {
NameSet = true,
Inputs = {
Pivot = Input {
Value = { 0.439560463381168, 0.396803091362677 },
Expression = "TransBlade2.Pivot",
},
Angle = Input {
Value = -45,
Expression = "-45 * (BladeNumber - 1)",
},
Input = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
BladeNumber = Input {
Value = 2,
Expression = ": return self.Name:gsub(\"TransBlade\",\"\")",
},
},
ViewInfo = OperatorInfo { Pos = { 839.71, 257.872 } },
UserControls = ordered() {
BladeNumber = {
INP_MaxAllowed = 100,
INP_Integer = true,
INPID_InputControl = "ScrewControl",
INP_MaxScale = 100,
INP_MinScale = 1,
INP_MinAllowed = 1,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "BladeNumber"
}
}
},
MaskingIris = Note {
CtrlWZoom = false,
NameSet = true,
Inputs = {
Comments = Input { Value = "An ellipse is used to hide the edges of the blade. The ellipse is Instanced. One ellipse is used to mask the blades, and the other is used to create a black ring for design purposes.\n\nThe black ring ellipse has Solid = No, and Border Width set. These properties are Deinstanced so they can differe between the ellipse and its Instance.", }
},
ViewInfo = StickyNoteInfo {
Pos = { 1900.31, 276.482 },
Flags = {
Expanded = true
},
Size = { 250.115, 100.573 }
},
},
BlurForOutline = Blur {
NameSet = true,
Inputs = {
Filter = Input { Value = FuID { "Fast Gaussian" }, },
XBlurSize = Input { Value = 13, },
Input = Input {
SourceOp = "PipeRouter2_1",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 510.071, -93.9817 } },
},
SubtractForOutline = ChannelBoolean {
NameSet = true,
Inputs = {
Operation = Input { Value = 2, },
Background = Input {
SourceOp = "BGBlade",
Source = "Output",
},
Foreground = Input {
SourceOp = "BlurForOutline",
Source = "Output",
},
},
ViewInfo = OperatorInfo { Pos = { 487.405, -30.3453 } },
},
BGShadowOutline = Background {
NameSet = true,
Inputs = {
EffectMask = Input {
SourceOp = "SubtractForOutline",
Source = "Output",
},
GlobalOut = Input { Value = 900, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
},
ViewInfo = OperatorInfo { Pos = { 487.405, 16.5941 } },
},
MergeBladeOutline = Merge {
NameSet = true,
Inputs = {
Background = Input {
SourceOp = "BGBlade",
Source = "Output",
},
Foreground = Input {
SourceOp = "BGShadowOutline",
Source = "Output",
},
PerformDepthMerge = Input { Value = 0, },
},
ViewInfo = OperatorInfo { Pos = { 487.405, 72.6847 } },
},
TransBlade6 = Transform {
NameSet = true,
Inputs = {
Pivot = Input {
Value = { 0.439560463381168, 0.396803091362677 },
Expression = "TransBlade2.Pivot",
},
Angle = Input {
Value = -45,
Expression = "-45 * (BladeNumber - 1)",
},
Input = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
BladeNumber = Input {
Value = 2,
Expression = ": return self.Name:gsub(\"TransBlade\",\"\")",
},
},
ViewInfo = OperatorInfo { Pos = { 839.71, 299.198 } },
UserControls = ordered() {
BladeNumber = {
INP_MaxAllowed = 100,
INP_Integer = true,
INPID_InputControl = "ScrewControl",
INP_MaxScale = 100,
INP_MinScale = 1,
INP_MinAllowed = 1,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "BladeNumber"
}
}
},
TransBlade7 = Transform {
NameSet = true,
Inputs = {
Pivot = Input {
Value = { 0.439560463381168, 0.396803091362677 },
Expression = "TransBlade2.Pivot",
},
Angle = Input {
Value = -45,
Expression = "-45 * (BladeNumber - 1)",
},
Input = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
BladeNumber = Input {
Value = 2,
Expression = ": return self.Name:gsub(\"TransBlade\",\"\")",
},
},
ViewInfo = OperatorInfo { Pos = { 840.494, 336.962 } },
UserControls = ordered() {
BladeNumber = {
INP_MaxAllowed = 100,
INP_Integer = true,
INPID_InputControl = "ScrewControl",
INP_MaxScale = 100,
INP_MinScale = 1,
INP_MinAllowed = 1,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "BladeNumber"
}
}
},
PipeRouter2_1 = PipeRouter {
Inputs = {
Input = Input {
SourceOp = "BGBlade",
Source = "Output",
},
},
ViewInfo = PipeRouterInfo { Pos = { 384.738, -93.9817 } },
},
BGBlade = Background {
NameSet = true,
Inputs = {
EffectMask = Input {
SourceOp = "EllipseBlade",
Source = "Mask",
},
GlobalOut = Input { Value = 900, },
Width = Input { Value = 1920, },
Height = Input { Value = 1080, },
["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
TopLeftRed = Input { Value = 0.21201, },
TopLeftGreen = Input { Value = 0.21201, },
TopLeftBlue = Input { Value = 0.37, },
},
ViewInfo = OperatorInfo { Pos = { 327.405, 12.6851 } },
},
CreatingBlades = Note {
NameSet = true,
Inputs = {
Comments = Input { Value = "An ellipse is used, set to Solid = No to create an outline. Its Length is set to less than 1, creating a partial ring.\n\nIn order to see individual blades, we want an outline on them. This is created by blurring the original blade, then subtracting that blur from the original image using a ChannelBooleans. \n\nThis is a basic \"edge outline\" method. This is then used as the mask for a black background, which is merged over the blade to add a soft black outline to the blade.", }
},
ViewInfo = StickyNoteInfo {
Pos = { 125.613, -147.109 },
Flags = {
Expanded = true
},
Size = { 274.223, 129.387 }
},
},
EllipseBlade = EllipseMask {
NameSet = true,
Inputs = {
Filter = Input { Value = FuID { "Fast Gaussian" }, },
BorderWidth = Input { Value = 0.112, },
Solid = Input { Value = 0, },
WriteLength = Input { Value = 0.183, },
MaskWidth = Input { Value = 1920, },
MaskHeight = Input { Value = 1080, },
PixelAspect = Input { Value = { 1, 1 }, },
ClippingMode = Input { Value = FuID { "None" }, },
Center = Input { Value = { 0.4409660984768, 0.3842973336988 }, },
Width = Input {
Value = 0.462,
Expression = "Height",
},
Height = Input { Value = 0.462, },
},
ViewInfo = OperatorInfo { Pos = { 214.861, 11.1392 } },
},
TransBlade8 = Transform {
NameSet = true,
Inputs = {
Pivot = Input {
Value = { 0.439560463381168, 0.396803091362677 },
Expression = "TransBlade2.Pivot",
},
Angle = Input {
Value = -45,
Expression = "-45 * (BladeNumber - 1)",
},
Input = Input {
SourceOp = "PipeRouter5",
Source = "Output",
},
BladeNumber = Input {
Value = 2,
Expression = ": return self.Name:gsub(\"TransBlade\",\"\")",
},
},
ViewInfo = OperatorInfo { Pos = { 841.278, 377.575 } },
UserControls = ordered() {
BladeNumber = {
INP_MaxAllowed = 100,
INP_Integer = true,
INPID_InputControl = "ScrewControl",
INP_MaxScale = 100,
INP_MinScale = 1,
INP_MinAllowed = 1,
LINKID_DataType = "Number",
ICS_ControlPage = "Controls",
LINKS_Name = "BladeNumber"
}
}
}
}
}
The key to the animation in this comp is the node "CloseIris", which is a Transform node, transforming the first blade before it gets duplicated into 8 blades. I added a custom UserControl called "AnimateIris" which goes from 0 to 1, and then referenced this in an expression. When AnimateIris is 0 the iris is fully open, and when it's 1 it's fully closed. You can then keyframe AnimateIris from 0 to 1 and set any animation curve you like in the Spline Editor. Which is what I did for the example video.
The nodes as copied will animate the iris from closed to open, pause, then back to closed, over 300 frames.
The big downside of this method (vs Duplicate etc) is that if you want to change the number of blades, you have to manually make more Transform and Merge nodes. However the big advantage is it actually looks right I added some simple expressions to make it a bit less work to add or remove blades. These are explained in the notes in the comp.
I noticed that currently the iris opening isn't always a perfect circle. I think to improve this, a different blade shape could be used. And/or I might have got the positioning fractionally off. Currently the 'closed' position still leaves a small opening, like most real mechanical irises have, but you could adjust the CloseIris node if you want the node to close completely. Note that I implemented CloseIris using a position movement on Center; really it should have been a rotation, but I couldn't get it looking right (I probably made a mistake somewhere.) You can see how that looks as things stand by setting AnimateIris to 0 to open the iris, then adjusting Angle in CloseIris: this will also results in the iris closing, but will look quite different, and not like a real mechanic iris.
Hope that might be useful to you. Let me know if you have any questions regarding the setup or how to change any aspect.