Jump to: Board index » General » Fusion

Looping noise like AE?

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

Goblynn93

  • Posts: 36
  • Joined: Sun Sep 23, 2018 2:13 pm
  • Real Name: Brian Lynn

Looping noise like AE?

PostTue Oct 16, 2018 5:50 pm

Long time After Effects (started with 4) user making the switch to Fusion!

After Effect's "Fractal Noise" effect includes an "Evolution" setting similar to the "Seethe" setting for the "FastNoise". The huge glaring difference is you can choose to "Cycle Evolution" which creates a loop (assuming you've got a full cycle between the key-frames).

Cross-fading is not really an option. That will make nice smooth loops but not truly "seamless".

So far this is the only real roadblock I've come across. I could render out some looping noise from AE and bring it into Fusion for my needs but then I lose the ability to make quick changes and see tweaks in real-time. And it defeats the purpose of trying to abandon Adobe products.

Is there a way to duplicate this functionality in Fusion?

Thanks!
Attachments
Capture.PNG
Capture.PNG (4.58 KiB) Viewed 2991 times
Offline

Okke Verbart

  • Posts: 290
  • Joined: Tue Jan 17, 2017 8:40 pm

Re: Looping noise like AE?

PostWed Oct 17, 2018 6:18 am

Hi Brian - I looked for this as well in the past and I don't think it's very straightforward and will always (at least with Perlin noise) involve some interpolation to get looping.

I re-created a simple noise tool with the custom tool and with this setup it now creates a seamless loop every 100 frames (so frame 0 looks the same as 100, same as 200 etc). You can change the settings via the Controls page, and for the looping, especially n7 (Looping Threshold) is important.

This is certainly not perfect, and I can't right now check how it compares to AE, but maybe it can serve as a starting point? Also, right now it doesn't cater for things like complexity etc, but I may have a little play to make it somewhat more usable.

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 477, 210 } },
      },
      CustomTool1 = Custom {
         CtrlWZoom = false,
         Inputs = {
            NumberIn1 = Input { Value = 5.865, },
            NumberIn2 = Input { Value = 2.808, },
            NumberIn3 = Input { Value = 6.319, },
            NumberIn4 = Input { Value = -0.557, },
            NumberIn5 = Input { Value = -0.035, },
            NumberIn6 = Input { Expression = "(time/100)%1", },
            NumberIn7 = Input { Value = 0.6, },
            LUTIn1 = Input {
               SourceOp = "CustomTool1LUTIn1",
               Source = "Value",
            },
            LUTIn2 = Input {
               SourceOp = "CustomTool1LUTIn2",
               Source = "Value",
            },
            LUTIn3 = Input {
               SourceOp = "CustomTool1LUTIn3",
               Source = "Value",
            },
            LUTIn4 = Input {
               SourceOp = "CustomTool1LUTIn4",
               Source = "Value",
            },
            Intermediate1 = Input { Value = "noise3((n4+x)*n1,(n5+y)*n2,n6)*n3", },
            Intermediate2 = Input { Value = "noise3((n4+x)*n1,(n5+y)*n2,0)*n3", },
            Intermediate3 = Input { Value = "(n6-n7)/(1-n7)", },
            Intermediate4 = Input { Value = "if(n6>n7, (i3*i2)+((1-i3)*i1),i1)", },
            RedExpression = Input { Value = "i4", },
            GreenExpression = Input { Value = "i4", },
            BlueExpression = Input { Value = "i4", },
            AlphaExpression = Input { Value = "i4", },
            NumberControls = Input { Value = 1, },
            NameforNumber1 = Input { Value = "X scale", },
            NameforNumber2 = Input { Value = "Y scale", },
            NameforNumber3 = Input { Value = "Brightness", },
            NameforNumber4 = Input { Value = "X offset", },
            NameforNumber5 = Input { Value = "Y offset", },
            NameforNumber7 = Input { Value = "Looping Threshold", },
            Image1 = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 587, 210 } },
      },
      CustomTool1LUTIn1 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 204, Green = 0, Blue = 0 },
         NameSet = true,
      },
      CustomTool1LUTIn2 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 204, Blue = 0 },
         NameSet = true,
      },
      CustomTool1LUTIn3 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 204 },
         NameSet = true,
      },
      CustomTool1LUTIn4 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 204, Green = 204, Blue = 204 },
         NameSet = true,
      }
   }
}
www.ablackbirdcalledsue.com
Offline

Okke Verbart

  • Posts: 290
  • Joined: Tue Jan 17, 2017 8:40 pm

Re: Looping noise like AE?

PostWed Oct 17, 2018 6:48 am

Actually, this one loops better (minor update in the interim i2 formula)

Code: Select all
{
   Tools = ordered() {
      Background1 = Background {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 416, 166 } },
      },
      CustomTool1 = Custom {
         CtrlWZoom = false,
         Inputs = {
            NumberIn1 = Input { Value = 4, },
            NumberIn2 = Input { Value = 3, },
            NumberIn3 = Input { Value = 4.678, },
            NumberIn4 = Input { Value = -0.557, },
            NumberIn5 = Input { Value = -0.035, },
            NumberIn6 = Input {
               Value = 0.88,
               Expression = "(time/100)%1",
            },
            NumberIn7 = Input { Value = 0.6, },
            LUTIn1 = Input {
               SourceOp = "CustomTool1LUTIn1",
               Source = "Value",
            },
            LUTIn2 = Input {
               SourceOp = "CustomTool1LUTIn2",
               Source = "Value",
            },
            LUTIn3 = Input {
               SourceOp = "CustomTool1LUTIn3",
               Source = "Value",
            },
            LUTIn4 = Input {
               SourceOp = "CustomTool1LUTIn4",
               Source = "Value",
            },
            Intermediate1 = Input { Value = "noise3((n4+x)*n1,(n5+y)*n2,n6)*n3 ", },
            Intermediate2 = Input { Value = "noise3((n4+x)*n1,(n5+y)*n2,n6-1)*n3 ", },
            Intermediate3 = Input { Value = "(n6-n7)/(1-n7)", },
            Intermediate4 = Input { Value = "if(n6>n7, (i3*i2)+((1-i3)*i1),i1)", },
            RedExpression = Input { Value = "i4", },
            GreenExpression = Input { Value = "i4", },
            BlueExpression = Input { Value = "i4", },
            AlphaExpression = Input { Value = "i4", },
            NumberControls = Input { Value = 1, },
            NameforNumber1 = Input { Value = "X scale", },
            NameforNumber2 = Input { Value = "Y scale", },
            NameforNumber3 = Input { Value = "Brightness", },
            NameforNumber4 = Input { Value = "X offset", },
            NameforNumber5 = Input { Value = "Y offset", },
            NameforNumber7 = Input { Value = "Looping Threshold", },
            Image1 = Input {
               SourceOp = "Background1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 578, 164 } },
      },
      CustomTool1LUTIn1 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 204, Green = 0, Blue = 0 },
         NameSet = true,
      },
      CustomTool1LUTIn2 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 204, Blue = 0 },
         NameSet = true,
      },
      CustomTool1LUTIn3 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 0, Green = 0, Blue = 204 },
         NameSet = true,
      },
      CustomTool1LUTIn4 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true } },
               [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 204, Green = 204, Blue = 204 },
         NameSet = true,
      }
   }
}
www.ablackbirdcalledsue.com
Offline

Okke Verbart

  • Posts: 290
  • Joined: Tue Jan 17, 2017 8:40 pm

Re: Looping noise like AE?

PostWed Oct 17, 2018 7:25 am

btw, I do realise that it's not overly different from effectively overlaying, but it does make it easier to manage. You could probably also accomplish this by having a fastnoise and a instanced version of it with a de-instanced seethe parameter and merge the 2. With this setup you can then re-create the same logic as in my earlier example.
www.ablackbirdcalledsue.com
Offline

Okke Verbart

  • Posts: 290
  • Joined: Tue Jan 17, 2017 8:40 pm

Re: Looping noise like AE?

PostWed Oct 17, 2018 7:42 am

And this is the example with 2 fastnoise tools and a merge; this one loops every 150 frames (just change the expression in Fastnoise 1 to whatever you want). Again, it's essentially an overlay type technique, but much easier to manage this way.

Maybe one other thought. June coded a fractal noise tool (a Fuse) which is really awesome....maybe you can ask him to see if he can implement a cycle evolution type function in it? Even without it though, I thoroughly recommend purchasing it (only 20 dollars or so as I recall) as it contains a great number of different noise functions and it's really fast.



Code: Select all
{
   Tools = ordered() {
      FastNoise1 = FastNoise {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 117, 124 } },
      }
   },
   ActiveTool = "FastNoise1"
}
www.ablackbirdcalledsue.com
Offline
User avatar

Bryan Ray

  • Posts: 2488
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Looping noise like AE?

PostWed Oct 17, 2018 4:42 pm

If anybody's up for a weird and interesting coding challenge, the way Perlin (and Simplex, which is what FastNoise actually is) noise works is that it's a cross section of a 3-dimensional noise field. The seething (evolution) is created by moving your viewing plane "vertically" through that field. Rather than performing a simple z-translation, you could, theoretically, instead perform a rotation through the noise field. In order to prevent one edge from noticeably seething faster than the other, you'd need your center of rotation to be at least five or six screen-widths away from the center, giving the illusion that you're traveling straight up when you're actually moving in an arc. I don't know, maybe it would need to be an even larger circle than that. Anyway, completing a full revolution would wind up back where you started, resulting in a seamless loop.

As I think a little harder on it, it might be possible to reduce the lop-sided evolution speed by performing a secondary rotation from the center of the plane to counteract the difference in speed between the inner and outer edges. That would enable you to use a smaller large circle and therefore get shorter cycles.

And thinking on this even further, Fusion does have a 3d noise node. I wonder if it would be possible to set this up using only Fusion tools instead of writing a Fuse for it…

Yes, indeed it is:
Code: Select all
{
   Tools = ordered() {
      FastNoiseTexture1 = FastNoiseTexture3D {
         Inputs = {
            OutputMode = Input { Value = FuID { "ThreeD" }, },
            Seethe = Input { Value = 1.193, },
            MaterialID = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 550, 82.5 } },
      },
      TextureTransform1 = TextureTransformOperator {
         CtrlWZoom = false,
         Inputs = {
            ["Translation.Nest"] = Input { Value = 1, },
            ["Translation.W"] = Input { Value = 0.12, },
            ["Rotation.Nest"] = Input { Value = 1, },
            ["Rotation.U"] = Input {
               SourceOp = "TextureTransform1URotation",
               Source = "Value",
            },
            ["Pivot.Nest"] = Input { Value = 1, },
            ["Pivot.V"] = Input { Value = 5, },
            MaterialInput = Input {
               SourceOp = "FastNoiseTexture1",
               Source = "MaterialOutput",
            },
            MaterialID = Input { Value = 3, },
         },
         ViewInfo = OperatorInfo { Pos = { 660, 82.5 } },
      },
      TextureTransform1URotation = BezierSpline {
         SplineColor = { Red = 245, Green = 228, Blue = 102 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 33.3333333333333, 120 }, Flags = { Linear = true } },
            [100] = { 360, LH = { 66.6666666666667, 240 }, Flags = { Linear = true } }
         }
      },
      ImagePlane3D1 = ImagePlane3D {
         Inputs = {
            ["Transform3DOp.Translate.Z"] = Input { Value = -0.0298884446616154, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            MaterialInput = Input {
               SourceOp = "TextureTransform1",
               Source = "MaterialOutput",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
         },
         ViewInfo = OperatorInfo { Pos = { 880, 82.5 } },
      },
      UVMap3D1 = UVMap {
         Inputs = {
            SceneInput = Input {
               SourceOp = "ImagePlane3D1",
               Source = "Output",
            },
            Orientation = Input { Value = 2, },
            CenterNest = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 990, 82.5 } },
      }
   }
}


Apologies for the stream-of-consciousness answer. I didn't actually expect to solve that in the middle of writing it.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

Goblynn93

  • Posts: 36
  • Joined: Sun Sep 23, 2018 2:13 pm
  • Real Name: Brian Lynn

Re: Looping noise like AE?

PostThu Oct 18, 2018 6:56 pm

Wow... This is way beyond the assistance I was hoping for! It'll take me a bit to figure out everything you guys shared but the "rotation through 3d field" sounds very promising.

Thanks for the help!!
Offline

Jinxer

  • Posts: 59
  • Joined: Thu Sep 23, 2021 3:06 pm
  • Real Name: Sergey Zinchenko

Re: Looping noise like AE?

PostFri Sep 24, 2021 2:01 pm

Bryan Ray wrote:it might be possible to reduce the lop-sided evolution speed by performing a secondary rotation from the center of the plane.


Can you tell how to do that? I can't change the speed of animation.

Return to Fusion

Who is online

Users browsing this forum: Mixolydian and 28 guests