Jump to: Board index » General » Fusion

Remove seam from fast noise

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

ykarmin88

  • Posts: 14
  • Joined: Wed Sep 21, 2022 2:00 pm
  • Real Name: yizzy karmin

Remove seam from fast noise

PostWed Sep 21, 2022 2:12 pm

A bit new to Fusion and just having some fun. I'm trying to create a blob using a sphere connected to displace3d driven by fast noise. My problem is the seam in the middle that's ruining the look. Any way to get rid of it? Someone had a similar problem here in the Forums only he was problematic with how fast noise wraps around his "cloud" and has a seam as well. Wasn't really solved in that thread though.

Code: Select all
{
   Tools = ordered() {
      Displace3D1 = Displace3D {
         CtrlWZoom = false,
         Inputs = {
            SceneInput = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            Scale = Input { Value = 1, },
            Input = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1021.93, 93.2458 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.SubdivisionLevelBase"] = Input { Value = 40, },
            ["SurfaceSphereInputs.SubdivisionLevelHeight"] = Input { Value = 40, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 818.595, 93.2458 } },
      },
      FastNoise1 = FastNoise {
         Inputs = {
            GlobalOut = Input { Value = 119, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SeetheRate = Input { Value = 0.165, },
         },
         ViewInfo = OperatorInfo { Pos = { 1025.07, 46.1053 } },
      }
   }
}
Offline

birdseye

  • Posts: 347
  • Joined: Fri Jun 12, 2020 2:36 pm
  • Real Name: Iain Fisher

Re: Remove seam from fast noise

PostWed Sep 21, 2022 8:30 pm

You could try a mask on the FastNoise, with a soft edge and vary the border width to see if that floats your boat.
Code: Select all
{
   Tools = ordered() {
      Shape3D1 = Shape3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.SubdivisionLevelBase"] = Input { Value = 40, },
            ["SurfaceSphereInputs.SubdivisionLevelHeight"] = Input { Value = 40, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 132.665, 68.5758 } },
      },
      Ellipse1 = EllipseMask {
         CtrlWZoom = false,
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            SoftEdge = Input { Value = 0.1008, },
            BorderWidth = Input { Value = -0.097, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Width = Input { Value = 0.975935828877005, },
            Height = Input { Value = 0.385026737967914, },
         },
         ViewInfo = OperatorInfo { Pos = { 226, 21.9091 } },
      },
      FastNoise1 = FastNoise {
         Inputs = {
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            UseFrameFormatSettings = Input { Value = 1, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            SeetheRate = Input { Value = 0.165, },
            EffectMask = Input {
               SourceOp = "Ellipse1",
               Source = "Mask",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 339.14, 21.4352 } },
      },
      Displace3D1 = Displace3D {
         CtrlWZoom = false,
         Inputs = {
            SceneInput = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
            Scale = Input { Value = 1, },
            CameraDisplacement = Input { Value = 1, },
            Input = Input {
               SourceOp = "FastNoise1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 336, 68.5758 } },
      }
   },
   ActiveTool = "Displace3D1"
}
Offline
User avatar

Bryan Ray

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

Re: Remove seam from fast noise

PostWed Sep 21, 2022 11:03 pm

Here's the method I usually use to get a seamless texture:

Code: Select all
{
   Tools = ordered() {
      FastNoise2 = FastNoise {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            XScale = Input { Value = 10.71, },
            SeetheRate = Input { Value = 0.213, },
            Color1Alpha = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 726, -28.394 } },
      },
      Transform1 = Transform {
         Inputs = {
            Center = Input { Value = { 0, 0 }, },
            Edges = Input { Value = 1, },
            FlattenTransform = Input { Value = 1, },
            Input = Input {
               SourceOp = "FastNoise2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 836, -29 } },
      },
      Transform2 = Transform {
         Inputs = {
            Center = Input { Value = { 0.5, 0.240837696335079 }, },
            FlipHoriz = Input { Value = 1, },
            Input = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
            EffectMask = Input {
               SourceOp = "Rectangle1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 946, -29.6061 } },
      },
      Transform3 = Transform {
         Inputs = {
            Center = Input { Value = { 0.652542372881356, 0.5 }, },
            FlipVert = Input { Value = 1, },
            Input = Input {
               SourceOp = "Transform2",
               Source = "Output",
            },
            EffectMask = Input {
               SourceOp = "Rectangle1_1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1056, -29.6061 } },
      },
      Rectangle1 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            SoftEdge = Input { Value = 0.0268, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Width = Input { Value = 1.06374355195284, },
            Height = Input { Value = 0.150523560209424, },
         },
         ViewInfo = OperatorInfo { Pos = { 944, 22.5151 } },
      },
      Rectangle1_1 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            SoftEdge = Input { Value = 0.0268, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Width = Input { Value = 0.0887988209285217, },
            Height = Input { Value = 1.12434554973822, },
         },
         ViewInfo = OperatorInfo { Pos = { 1061.33, 27.9697 } },
      },
      Shape3D2 = Shape3D {
         CtrlWZoom = false,
         Inputs = {
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            MaterialInput = Input {
               SourceOp = "Transform3",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { 1210, -13.8485 } },
      }
   }
}


In the first Transform, I activate the Wrap edges mode and set the offset such that it moves the edges, where the discontinuities happen, to the center of the image. Then I use two more Transforms, one to address the vertical edge and one for the horizontal edge. Mask them with a soft, narrow rectangle and translate nearby pixels. In order to prevent the obvious pattern repetition, I flip or flop the translated pixels.

You can do this with photographic textures, too, but the soft transition areas are more obvious if there's much detail, and the flip/flop thing may not work if there's an obvious light direction.

One of these days I should probably wrap these nodes up in a macro for Reactor.

edit: Oh, and since you're using a displace, I should point out that you'll get a discontinuity at the edge anyway unless your geometry resolution is much higher. Set it to the size of your texture -1 for best results. That will give you a polygon per pixel. You'll probably need to set the depth of the fast noise to float16, or even float 32, to avoid terracing.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

ykarmin88

  • Posts: 14
  • Joined: Wed Sep 21, 2022 2:00 pm
  • Real Name: yizzy karmin

Re: Remove seam from fast noise

PostThu Sep 22, 2022 4:33 pm

Bryan Ray wrote:Here's the method I usually use to get a seamless texture:

Code: Select all
{
   Tools = ordered() {
      FastNoise2 = FastNoise {
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            XScale = Input { Value = 10.71, },
            SeetheRate = Input { Value = 0.213, },
            Color1Alpha = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 726, -28.394 } },
      },
      Transform1 = Transform {
         Inputs = {
            Center = Input { Value = { 0, 0 }, },
            Edges = Input { Value = 1, },
            FlattenTransform = Input { Value = 1, },
            Input = Input {
               SourceOp = "FastNoise2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 836, -29 } },
      },
      Transform2 = Transform {
         Inputs = {
            Center = Input { Value = { 0.5, 0.240837696335079 }, },
            FlipHoriz = Input { Value = 1, },
            Input = Input {
               SourceOp = "Transform1",
               Source = "Output",
            },
            EffectMask = Input {
               SourceOp = "Rectangle1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 946, -29.6061 } },
      },
      Transform3 = Transform {
         Inputs = {
            Center = Input { Value = { 0.652542372881356, 0.5 }, },
            FlipVert = Input { Value = 1, },
            Input = Input {
               SourceOp = "Transform2",
               Source = "Output",
            },
            EffectMask = Input {
               SourceOp = "Rectangle1_1",
               Source = "Mask",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1056, -29.6061 } },
      },
      Rectangle1 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            SoftEdge = Input { Value = 0.0268, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Width = Input { Value = 1.06374355195284, },
            Height = Input { Value = 0.150523560209424, },
         },
         ViewInfo = OperatorInfo { Pos = { 944, 22.5151 } },
      },
      Rectangle1_1 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            SoftEdge = Input { Value = 0.0268, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Width = Input { Value = 0.0887988209285217, },
            Height = Input { Value = 1.12434554973822, },
         },
         ViewInfo = OperatorInfo { Pos = { 1061.33, 27.9697 } },
      },
      Shape3D2 = Shape3D {
         CtrlWZoom = false,
         Inputs = {
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            MaterialInput = Input {
               SourceOp = "Transform3",
               Source = "Output",
            },
            ["MtlStdInputs.MaterialID"] = Input { Value = 2, },
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 3, }
         },
         ViewInfo = OperatorInfo { Pos = { 1210, -13.8485 } },
      }
   }
}


In the first Transform, I activate the Wrap edges mode and set the offset such that it moves the edges, where the discontinuities happen, to the center of the image. Then I use two more Transforms, one to address the vertical edge and one for the horizontal edge. Mask them with a soft, narrow rectangle and translate nearby pixels. In order to prevent the obvious pattern repetition, I flip or flop the translated pixels.

You can do this with photographic textures, too, but the soft transition areas are more obvious if there's much detail, and the flip/flop thing may not work if there's an obvious light direction.

One of these days I should probably wrap these nodes up in a macro for Reactor.

edit: Oh, and since you're using a displace, I should point out that you'll get a discontinuity at the edge anyway unless your geometry resolution is much higher. Set it to the size of your texture -1 for best results. That will give you a polygon per pixel. You'll probably need to set the depth of the fast noise to float16, or even float 32, to avoid terracing.


Sorry where do I set this geometry resolution to -1 again?
Offline
User avatar

Bryan Ray

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

Re: Remove seam from fast noise

PostFri Sep 23, 2022 7:19 pm

I mean if your FastNoise is 256 x 256, you set the subdivisions Width and Height to 255 x 255 in order to get the same number of polygons as you have pixels.

Although when I sanity check myself on that, it looks as though the number of polygons is equal to the number of subdivisions (which doesn't make sense to me), so forget that. Set it to the same as your texture's resolution.

I must have been thinking of behavior in different software.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

ykarmin88

  • Posts: 14
  • Joined: Wed Sep 21, 2022 2:00 pm
  • Real Name: yizzy karmin

Re: Remove seam from fast noise

PostSat Sep 24, 2022 12:02 am

Bryan Ray wrote:I mean if your FastNoise is 256 x 256, you set the subdivisions Width and Height to 255 x 255 in order to get the same number of polygons as you have pixels.

Although when I sanity check myself on that, it looks as though the number of polygons is equal to the number of subdivisions (which doesn't make sense to me), so forget that. Set it to the same as your texture's resolution.

I must have been thinking of behavior in different software.


oh -1, got it. That sounded like vfx type math lingo I wasn't familiar with haha. So I did set it to equals and it looks better now but I still have those points at the top and bottom where the fast noise wrinkles.
Offline
User avatar

Bryan Ray

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

Re: Remove seam from fast noise

PostSun Sep 25, 2022 1:22 am

That's due to the UVs. There's unfortunately not really a good way to map a 2d plane to a sphere. Every projection has its flaws. The default spherical projection is known as equirectangular or latlong, which is the kind of projection you see in world maps where the north and south poles are stretched across the entire width of the map, and the landmasses close to the poles appear much larger than they really are.

If Fusion had a triplanar projection node, that would probably be ideal in this kind of situation. In triplanar, you do a planar projection along all three axes and blend the results together. I think it would require a plug-in to make that happen in Fusion, and it's well outside what I know how to do.

You could play with the options in UVMap3D to see if one of them gets you something you like. Beyond that, I think I'm at the limit of my suggestions. Maybe someone else has a thought?
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline
User avatar

Jacob Danell

  • Posts: 290
  • Joined: Tue Aug 28, 2012 2:25 pm
  • Location: Sweden

Re: Remove seam from fast noise

PostSun Sep 25, 2022 8:08 am

Bryan Ray wrote:If Fusion had a triplanar projection node, that would probably be ideal in this kind of situation. In triplanar, you do a planar projection along all three axes and blend the results together. I think it would require a plug-in to make that happen in Fusion, and it's well outside what I know how to do.


https://davidkohen.gumroad.com/l/triplanarmap

Windows 10, Fusion 18.x
AMD Ryzen 9 5950X 16-Core Processor 3.40 GHz
Nvidia GeForce RTX 3090 Ti
128 GB ram
Offline
User avatar

Bryan Ray

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

Re: Remove seam from fast noise

PostSun Sep 25, 2022 6:06 pm

Well there ya go!
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com

Return to Fusion

Who is online

Users browsing this forum: No registered users and 36 guests