Page 1 of 1

Trying to setup the canvas size dependecy for dup

PostPosted: Fri Oct 13, 2017 3:03 am
by Eugene Afanasiev
But it starts blinking and jumping chaotically as I move the center point in the viewer(the center point of the duplicate tool)...
Is there any way to set that up to operate correctly?


Code: Select all
{
   Tools = ordered() {
      Background7_16_5 = Background {
         Inputs = {
            GlobalOut = Input { Value = 79, },
            Width = Input { Value = 140, },
            Height = Input { Value = 120, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftGreen = Input { Value = 0.152, },
            TopLeftBlue = Input { Value = 0.24, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { -220, -148.5 } },
      },
      Background7_16_4 = Background {
         CtrlWZoom = false,
         Inputs = {
            GlobalOut = Input { Value = 79, },
            Width = Input {
               Value = 1697,
               Expression = "Merge22_34.Foreground.OriginalWidth^(Duplicate1.Center.X+.5)*Duplicate1.XSize",
            },
            Height = Input {
               Value = 394,
               Expression = "Merge22_34.Foreground.OriginalHeight^(Duplicate1.Center.Y+.5)*Duplicate1.XSize",
            },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftAlpha = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { -110, -115.5 } },
      },
      Merge22_34 = Merge {
         Inputs = {
            Background = Input {
               SourceOp = "Background7_16_4",
               Source = "Output",
            },
            Foreground = Input {
               SourceOp = "Background7_16_5",
               Source = "Output",
            },
            Gain = Input { Value = 0, },
            PerformDepthMerge = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { -110, -148.5 } },
      },
      Duplicate1 = Fuse.Duplicate {
         Inputs = {
            Copies = Input { Value = 5.26, },
            Center = Input { Value = { 0.873629519254425, 0.612848267242457 }, },
            XSize = Input { Value = 1.913, },
            Operator = Input { Value = FuID { "Over" }, },
            GainNest = Input { Value = 1, },
            AlphaGain = Input { Value = 0, },
            RandomSeed = Input { Value = 26024, },
            Background = Input {
               SourceOp = "Merge22_34",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, -148.5 } },
      }
   }
}

Re: Trying to setup the canvas size dependecy for dup

PostPosted: Fri Oct 13, 2017 3:16 am
by Eugene Afanasiev
Also, can't think up, how to set it up for more than 2 copies, any ideas?

Re: Trying to setup the canvas size dependecy for dup

PostPosted: Fri Oct 13, 2017 6:32 pm
by Bryan Ray
You've got a feedback loop going on there. As you adjust parameters in the Duplicate, the expression that controls the Background's size is updating continuously. The Center changes, which updates the Background's dimensions, which changes the relatively location of the Center because you're still adjusting it. If you go slowly enough, the loop can collapse to a stable state. Moving the widget too quickly will likely result in a canvas that's super wide.

You can reduce some of it by only using the controls in a Viewer that is looking at your rectangle while watching the results in the other Viewer. It will still be jiggly when you're doing it interactively because the power function is comparatively slow to update, but if you play back an animated control it should be smooth.

You actually do have more than one duplicate in the scene—the others have just been thrown off the canvas. Pull the Center control back toward the center to see them.

Re: Trying to setup the canvas size dependecy for dup

PostPosted: Sat Oct 14, 2017 2:41 pm
by Eugene Afanasiev
Thanks.
I meant I can't figure out how to make canvas adjusted to the last duplicate