Jump to: Board index » General » Fusion

pCustom Follow a path w/custom velocity

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

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

pCustom Follow a path w/custom velocity

PostMon Jun 03, 2024 10:06 am

Suppose this is more of a request for some help with lua because I am almost certain it can be achieved, just I dont know how it works.

I came across this great tut on how to have particles follow a path.



I need to add some particles randomly falling from the path. Of course more difficult than I anticipated. I tried working backwards and can get every fifth particle to be affected by py for example, but when i plug that into my existing comp it seems to be ignored. if (id%5==0,-.005,vy)

I kinda understand because I think I am telling the particles to follow a path, yet on another line telling them to not follow a path and be affected by velocity.

Code: Select all
{
   Tools = ordered() {
      Rectangle2 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0.995, 0.5 },
               Expression = "Point((time/300)-1/200,0.5)",
            },
            Width = Input { Value = 0.01, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 247.5 } },
      },
      Background2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 300, },
            Height = Input { Value = 32, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "CoordTransform3D2",
               Source = "Position.X",
            },
            TopLeftGreen = Input {
               SourceOp = "CoordTransform3D2",
               Source = "Position.Y",
            },
            TopLeftBlue = Input {
               SourceOp = "CoordTransform3D2",
               Source = "Position.Z",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 280.5 } },
      },
      CoordTransform3D2 = CoordTransform3D {
         CtrlWZoom = false,
      },
      Trails2 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 346.5 } },
      },
      pEmitter1 = pEmitter {
         ID = 8,
         CtrlWZoom = false,
         Inputs = {
            Number = Input { Value = 0.8, },
            Lifespan = Input { Value = 300, },
            VelocityControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1666, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 247.5 } },
      },
      pEmitter1SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
      },
      pEmitter1BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pCustom1 = pCustom {
         ID = 12,
         Inputs = {
            MassExpression = Input { Value = "rand(0,100)/100", },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 280.5 } },
      },
      pCustom1_1 = pCustom {
         ID = 13,
         Inputs = {
            NumberIn2 = Input { Value = 0.34, },
            PositionXExpression = Input { Value = "getr1d(age+n1,mass)+rands(-1,1,id)*n2", },
            PositionYExpression = Input { Value = "getg1d(age+n1,mass)+rands(-1,1,id+1)*n2", },
            PositionZExpression = Input { Value = "getb1d(age+n1,mass)+rands(-1,1,id+2)*n2", },
            VelocityYExpression = Input { Value = "if (id%5==0,-.005,vy)", },
            Input = Input {
               SourceOp = "pCustom1",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 346.5 } },
      },
      pRender1 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 3, },
            Input = Input {
               SourceOp = "pCustom1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 478.5 } },
      }
   }
}
Aaron
Offline
User avatar

KrunoSmithy

  • Posts: 422
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Real Name: Kruno Stifter

Re: pCustom Follow a path w/custom velocity

PostMon Jun 03, 2024 2:01 pm

For some reason when you post YouTube link with no .com at the end, it does not show properly. Try posting a video with .com at the end of the youtube link.
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostMon Jun 03, 2024 11:47 pm


Still doesn't seem to work or I am doing something wrong.
YouTube Channel - DarkWhite Productions
Video Name - Quicktip 3D Particles Along a Path
Aaron
Offline
User avatar

KrunoSmithy

  • Posts: 422
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Real Name: Kruno Stifter

Re: pCustom Follow a path w/custom velocity

PostTue Jun 04, 2024 12:01 am

amellon wrote:Suppose this is more of a request for some help with lua because I am almost certain it can be achieved, just I dont know how it works.

I came across this great tut on how to have particles follow a path.





I'll try to repost it here. Plus another tutorial on the particles follow path of the 3D object.

DarkWhite Productions - QuickTip - 3D Particles Along a Path in Fusion | DaVinci Resolve



Particles Along A Path EyeOnSoftware




.................................................
amellon wrote:I need to add some particles randomly falling from the path. Of course more difficult than I anticipated.


Maybe you can use sets for that. Here is a tutorial. Also other good tutorials on particles from the same channel.

Darren Frenette - DaVinci Resolve 16: Particle Sets Tutorial

Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostTue Jun 04, 2024 4:32 am

The links for the 2 vids you posted came through. For whatever reason the one I put up still doesn't. Doesn't matter because its obvious the one I posted is exactly the same as the one you posted from eyeonsoftware.

I dont think sets are going to help me out. My particle system has for eg 2 particles being generated per frame so I am not sure how I can keyframe a set change. Further, I want a portion of the particles to fall off the path as they are following it. So they still need to follow that path, and when they do, I don't know how to get them off that path. Maybe another way of saying it is I want maybe a fifth of the particles to be affected by a velocity while the rest are not.

For example I made and instance of the same particle system and merged it with the existing one. In the instance I added a pDirectional force. And the particles (all of them) are affected by it, but they still follow the path, they are just running a slighter lower path.

I feel like the answer is in this post but I cant wrap my head around it

viewtopic.php?f=22&t=152693
Aaron
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostMon Jun 10, 2024 9:52 am

Basically bumping this hoping someone with thee knowledge can help me out. Still stuck at the same point, can get velocity applied to some particles, but they continue to follow the path, and not fall out of it.

Code: Select all
{
   Tools = ordered() {
      Rectangle2_2 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0.738333333333333, 0.5 },
               Expression = "Point((time/300)-1/200,0.5)",
            },
            Width = Input { Value = 0.01, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 973.5 } },
      },
      Background2_2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle2_2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 300, },
            Height = Input { Value = 32, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.X",
            },
            TopLeftGreen = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Y",
            },
            TopLeftBlue = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Z",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 1006.5 } },
      },
      CoordTransform3D2_2 = CoordTransform3D {
         CtrlWZoom = false,
      },
      Trails2_2 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 1072.5 } },
      },
      pCustom1_1_3 = pCustom {
         ID = 173,
         CtrlWZoom = false,
         Inputs = {
            NumberIn2 = Input { Value = -0.478, },
            PositionXExpression = Input { Value = "getr1d(age+n1,id)+rands(-1,1,id)*n2", },
            PositionYExpression = Input { Value = "getg1d(age+n1,id)+rands(-1,1,id+1)*n2", },
            PositionZExpression = Input { Value = "getb1d(age+n1,id)+rands(-1,1,id+2)*n2", },
            VelocityYExpression = Input { Value = "if(age==0,if(id%5==0,n2,vy),vy)", },
            Input = Input {
               SourceOp = "pCustom1_4",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1072.5 } },
      },
      pCustom1_4 = pCustom {
         ID = 172,
         Inputs = {
            MassExpression = Input { Value = "rand(0,100)/100", },
            Input = Input {
               SourceOp = "pEmitter1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1006.5 } },
      },
      pEmitter1_3 = pEmitter {
         ID = 169,
         Inputs = {
            Number = Input { Value = 0.8, },
            Lifespan = Input { Value = 300, },
            VelocityControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1666, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1_3SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1_3BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 973.5 } },
      },
      pEmitter1_3SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
      },
      pEmitter1_3BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pRender1_3 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 3, },
            Input = Input {
               SourceOp = "pCustom1_1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1204.5 } },
      }
   }
}
Aaron
Offline
User avatar

KrunoSmithy

  • Posts: 422
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Real Name: Kruno Stifter

Re: pCustom Follow a path w/custom velocity

PostMon Jun 10, 2024 12:17 pm

amellon wrote:Basically bumping this hoping someone with thee knowledge can help me out. Still stuck at the same point, can get velocity applied to some particles, but they continue to follow the path, and not fall out of it.

Code: Select all
{
   Tools = ordered() {
      Rectangle2_2 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0.738333333333333, 0.5 },
               Expression = "Point((time/300)-1/200,0.5)",
            },
            Width = Input { Value = 0.01, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 973.5 } },
      },
      Background2_2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle2_2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 300, },
            Height = Input { Value = 32, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.X",
            },
            TopLeftGreen = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Y",
            },
            TopLeftBlue = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Z",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 1006.5 } },
      },
      CoordTransform3D2_2 = CoordTransform3D {
         CtrlWZoom = false,
      },
      Trails2_2 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 1072.5 } },
      },
      pCustom1_1_3 = pCustom {
         ID = 173,
         CtrlWZoom = false,
         Inputs = {
            NumberIn2 = Input { Value = -0.478, },
            PositionXExpression = Input { Value = "getr1d(age+n1,id)+rands(-1,1,id)*n2", },
            PositionYExpression = Input { Value = "getg1d(age+n1,id)+rands(-1,1,id+1)*n2", },
            PositionZExpression = Input { Value = "getb1d(age+n1,id)+rands(-1,1,id+2)*n2", },
            VelocityYExpression = Input { Value = "if(age==0,if(id%5==0,n2,vy),vy)", },
            Input = Input {
               SourceOp = "pCustom1_4",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1072.5 } },
      },
      pCustom1_4 = pCustom {
         ID = 172,
         Inputs = {
            MassExpression = Input { Value = "rand(0,100)/100", },
            Input = Input {
               SourceOp = "pEmitter1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1006.5 } },
      },
      pEmitter1_3 = pEmitter {
         ID = 169,
         Inputs = {
            Number = Input { Value = 0.8, },
            Lifespan = Input { Value = 300, },
            VelocityControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1666, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1_3SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1_3BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 973.5 } },
      },
      pEmitter1_3SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
      },
      pEmitter1_3BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pRender1_3 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 3, },
            Input = Input {
               SourceOp = "pCustom1_1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1204.5 } },
      }
   }
}



What am I looking at here. I copy the code to Fusion and all I see is particles forming in place. What am I supposed to be seeing? The same or something else? I am not sure what the point of it is in current state.

I also fail to see the valid argument you made about sets not doing what you described. Are you sure you are not doing something wrong?
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostMon Jun 10, 2024 12:46 pm

Apologies for not including the shape3D node that drives the path. Even so, in my experience, after loading this comp you are going to have to go into the BD node CoordTransform modifier and relink the Shape3d, let it play through, and let the Trails node play through. I dont know why, to populate the data? The end result should be just like the eyeson tut you kindly posted.

Now if I were to use sets, they are still going to follow the same path because thats what I have pCustom setup to do. If you can elaborate on how to implement this I am all ears. Am I certain I am not "doing something wrong"? Most definitely not, hence me asking for help here

Code: Select all
{
   Tools = ordered() {
      Rectangle2_2 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0.738333333333333, 0.5 },
               Expression = "Point((time/300)-1/200,0.5)",
            },
            Width = Input { Value = 0.01, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 973.5 } },
      },
      Background2_2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle2_2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 300, },
            Height = Input { Value = 32, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.X",
            },
            TopLeftGreen = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Y",
            },
            TopLeftBlue = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Z",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 1006.5 } },
      },
      CoordTransform3D2_2 = CoordTransform3D {
         CtrlWZoom = false,
         Inputs = {
            TargetObject = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
      },
      Trails2_2 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 55, 1072.5 } },
      },
      pCustom1_1_3 = pCustom {
         ID = 173,
         CtrlWZoom = false,
         Inputs = {
            NumberIn2 = Input { Value = -0.478, },
            PositionXExpression = Input { Value = "getr1d(age+n1,id)+rands(-1,1,id)*n2", },
            PositionYExpression = Input { Value = "getg1d(age+n1,id)+rands(-1,1,id+1)*n2", },
            PositionZExpression = Input { Value = "getb1d(age+n1,id)+rands(-1,1,id+2)*n2", },
            VelocityYExpression = Input { Value = "if(age==0,if(id%5==0,n2,vy),vy)", },
            Input = Input {
               SourceOp = "pCustom1_4",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1072.5 } },
      },
      pCustom1_4 = pCustom {
         ID = 172,
         Inputs = {
            MassExpression = Input { Value = "rand(0,100)/100", },
            Input = Input {
               SourceOp = "pEmitter1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1006.5 } },
      },
      pEmitter1_3 = pEmitter {
         ID = 169,
         Inputs = {
            Number = Input { Value = 0.8, },
            Lifespan = Input { Value = 300, },
            VelocityControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1666, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1_3SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1_3BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 973.5 } },
      },
      pEmitter1_3SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
      },
      pEmitter1_3BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pRender1_3 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 3, },
            Input = Input {
               SourceOp = "pCustom1_1_3",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 165, 1204.5 } },
      },
      Shape3D1 = Shape3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["Transform3DOp.Translate.X"] = Input {
               SourceOp = "Shape3D1XOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Y"] = Input {
               SourceOp = "Shape3D1YOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "Shape3D1ZOffset",
               Source = "Value",
            },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 55, 115.5 } },
      },
      Shape3D1XOffset = BezierSpline {
         SplineColor = { Red = 250, Green = 59, Blue = 49 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { -10, LH = { 50.0025004148483, -10 }, RH = { 99.9974995851517, -10 } },
            [150] = { 0, LH = { 125.002500414848, -3.33299994468689 }, RH = { 174.997499585152, 3.33299994468689 } },
            [225] = { 10, LH = { 200.002500414848, 10 }, RH = { 249.997499585152, 10 } },
            [300] = { 0, LH = { 275, 0 } }
         }
      },
      Shape3D1YOffset = BezierSpline {
         SplineColor = { Red = 252, Green = 131, Blue = 47 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { 5, LH = { 50.0025004148483, 3.83345001935959 }, RH = { 99.9792012233657, 6.1656960570904 } },
            [150] = { 7, LH = { 125.007494864871, 6.16691649549571 }, RH = { 174.997499585152, 7.83324998617172 } },
            [225] = { 10, LH = { 200.002500414848, 9.16675001382828 }, RH = { 249.992505135129, 10.8330835045043 } },
            [300] = { 12, LH = { 275, 12 } }
         }
      },
      Shape3D1ZOffset = BezierSpline {
         SplineColor = { Red = 254, Green = 207, Blue = 46 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { -5, RH = { 25, -5 } },
            [75] = { 0, LH = { 50.0025004148483, 0 }, RH = { 99.9974995851517, 0 } },
            [150] = { -5, LH = { 125.002500414848, -5 }, RH = { 174.997499585152, -5 } },
            [225] = { 0, LH = { 200.002500414848, -1.66649997234344 }, RH = { 249.997499585152, 1.66649997234344 } },
            [300] = { 5, LH = { 275, 5 } }
         }
      }
   }
}
Aaron
Offline
User avatar

KrunoSmithy

  • Posts: 422
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Real Name: Kruno Stifter

Re: pCustom Follow a path w/custom velocity

PostMon Jun 10, 2024 1:16 pm

amellon wrote:Apologies for not including the shape3D node that drives the path. Even so, in my experience, after loading this comp you are going to have to go into the BD node CoordTransform modifier and relink the Shape3d, let it play through, and let the Trails node play through. I dont know why, to populate the data? The end result should be just like the eyeson tut you kindly posted.


Well, something is not quite right. I don't see a shape 3D node. For most of the process nothing much happens, except few frames of flashing particles.

amellon wrote: Now if I were to use sets, they are still going to follow the same path because thats what I have pCustom setup to do. If you can elaborate on how to implement this I am all ears. Am I certain I am not "doing something wrong"? Most definitely not, hence me asking for help here


You said in your original post: "I need to add some particles randomly falling from the path."

I shared a tutorial on how to achieve this with sets. Since I still don't quite understand what is the end result you are trying to get, or why you are approaching it in this way, I am not sure where you are making are deviating from your stated goal.

In the tutorial for sets, you can see how its used, and in that particular tutorial it is used to do what you said you wanted. To have particles fall from the path. So I'm not sure what problem or even goal you have for this process to not be usable.

From your shared info and nodes I see just particles showing up randomly and not following anything. Or going anywhere. Just to clarify. What end result you want. What is the project you are doing and what is should look like when its done and for what purpose. That at least gives some target to aim for. At the moment its becoming convoluted and unclear and it may not have to be.
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostMon Jun 10, 2024 2:01 pm

Fully understand if you cant understand what I am trying to achieve. Putting it into words can be difficult. Perhaps someone else that comes across this will understand. But the tut regarding sets that you provided DOES NOT include following a path. I have seen that tut before, its where i learned about sets.

I don't know how else to state it. Look at that eyeson tut you provided. the particles follow a path. I just want a portion of those particles to fall off that path like a you might see leaves stuck in a mini cyclone.

If you know someway to merge the two techniques demonstrated in the tuts you provided, please share.

As stated before, I am not surprised you find the particles showing up randomly and not following anything. If you follow the tut you provided, share your nodes here, pretty sure I will have to the same thing happen unless I follow the same steps i just posted.
Aaron
Offline
User avatar

KrunoSmithy

  • Posts: 422
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Real Name: Kruno Stifter

Re: pCustom Follow a path w/custom velocity

PostMon Jun 10, 2024 3:26 pm

I find some time to try to follow the tutorial and retrace your steps, and I think I understand now why the nodes you shared didn't work, they were incomplete to share, but when it comes to using sets and randomly dropping out particles, the basic premise should work, I just didn't have time now to work it out to the end, but one thing I can still recommend is to find fireworks example in the templates, particles for fusion. The use sets to spawn and control various particles in different time and have some fall off. You can look into that for some more info on sets. Also maybe look into blowing leaves template there as well, and add a vortex node or something and work form there.

Also you can find some more info here that you can use:

Particles stick on custom mesh in Fusion - pCustom Examples - With Tutorial (DaVinci Resolve)



https://noahhaehnel.com/blog/pcustom-examples/

I am working on something else at the moment, so I don't have the priority of playing with it myself to illustrate my approach, but maybe in the future.

Also check out this if you haven't.

Twister made in Fusion



How to make a Twister in Fusion.

Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostTue Jun 11, 2024 12:58 am

Thanks for the advice and links. Will check them out.
Aaron
Offline

birdseye

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

Re: pCustom Follow a path w/custom velocity

PostTue Jun 11, 2024 6:35 am

I've only ever created smoke (and who hasn't?) with particles but the costom tool seems to be overriding the other nodes in what I have tried. I messed around with different set settings (that's not typing error) but no combination seemed to work. Without the pCustom tool it works as expected.

Code: Select all
{
   Tools = ordered() {
      pEmitter1_3 = pEmitter {
         ID = 1,
         Inputs = {
            Number = Input { Value = 1, },
            Lifespan = Input { Value = 300, },
            VelocityControls = Input { Value = 1, },
            Velocity = Input { Value = 0.071, },
            SpinControls = Input { Value = 1, },
            Set1 = Input { Value = 1, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1_3SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1_3BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 152.324, 64.8355 } },
      },
      pEmitter1_3SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pEmitter1_3BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pSpawn1 = pSpawn {
         ID = 4,
         Inputs = {
            Number = Input { Value = 20, },
            NumberVariance = Input { Value = 1, },
            Lifespan = Input { Value = 150, },
            LifespanVariance = Input { Value = 8, },
            VelocityControls = Input { Value = 1, },
            VelocityTransfer = Input { Value = 0.7, },
            VelocityVariance = Input { Value = 0.107, },
            NewSet2 = Input { Value = 1, },
            Input = Input {
               SourceOp = "pEmitter1_3",
               Source = "Output",
            },
            RegionMode = Input { Value = FuID { "Entering" }, },
            Region = Input { Value = FuID { "RectRgn" }, },
            SetMode = Input { Value = FuID { "Affect" }, },
            Set2 = Input { Value = 0, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pSpawn1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pSpawn1BlurOverLife2D",
               Source = "Value",
            },
            ["RectRgn.Width"] = Input { Value = 0.1, },
            ["RectRgn.Height"] = Input { Value = 0.1, },
            ["RectRgn.Translate.X"] = Input { Value = 0.387979832188834, },
            ["RectRgn.Translate.Y"] = Input { Value = -0.0174640525885337, },
            ["RectRgn.Translate.Z"] = Input { Value = 0.0202699417660714, },
            ["RectRgn.Rotate.Y"] = Input { Value = -78.3, },
         },
         ViewInfo = OperatorInfo { Pos = { 260.605, 65.306 } },
      },
      pSpawn1SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pSpawn1BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pDirectionalForce1 = pDirectionalForce {
         ID = 7,
         Inputs = {
            ["SphereRgn.Translate.Y"] = Input { Value = 5.04073339643448, },
            ["SphereRgn.Translate.X"] = Input { Value = 3.32596477415736, },
            ["SphereRgn.Size"] = Input { Value = 0.587, },
            ["SphereRgn.Translate.Z"] = Input { Value = -5.39542132198121, },
            Strength = Input { Value = 0.5, },
            Input = Input {
               SourceOp = "pSpawn1",
               Source = "Output",
            },
            RegionMode = Input { Value = FuID { "Intersecting" }, },
            Region = Input { Value = FuID { "RectRgn" }, },
            SetMode = Input { Value = FuID { "DontAffect" }, },
            Set2 = Input { Value = 0, },
            ["RectRgn.Width"] = Input { Value = 0.1, },
            ["RectRgn.Height"] = Input { Value = 0.1, },
            ["RectRgn.Translate.X"] = Input { Value = 0.781575257277039, },
            ["RectRgn.Rotate.Y"] = Input { Value = -90, },
         },
         ViewInfo = OperatorInfo { Pos = { 374.195, 64.6999 } },
      },
      pRender1_3 = pRender {
         CtrlWZoom = false,
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 3, },
            Input = Input {
               SourceOp = "pDirectionalForce1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 486, 64.9394 } },
      }
   },
   ActiveTool = "pRender1_3"
}


With the pCustom setup it doesn't, at least not as I tried it.

edit Sorry I posted the wrong node there, it should have looked like this. It didn't work anyway but ho hum.

Code: Select all
{
   Tools = ordered() {
      Background2_2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle2_2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 300, },
            Height = Input { Value = 32, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.X",
            },
            TopLeftGreen = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Y",
            },
            TopLeftBlue = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Z",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 159.333, 45.1211 } },
      },
      CoordTransform3D2_2 = CoordTransform3D {
         CtrlWZoom = false,
         Inputs = {
            TargetObject = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
      },
      Rectangle2_2 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0.525, 0.5 },
               Expression = "Point((time/300)-1/200,0.5)",
            },
            Width = Input { Value = 0.01, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 159.333, 12.1211 } },
      },
      Trails2_2 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 159.333, 82.0301 } },
      },
      Shape3D1 = Shape3D {
         CtrlWZoom = false,
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["Transform3DOp.Translate.X"] = Input {
               SourceOp = "Shape3D1XOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Y"] = Input {
               SourceOp = "Shape3D1YOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "Shape3D1ZOffset",
               Source = "Value",
            },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 34.6664, 83.212 } },
      },
      Shape3D1XOffset = BezierSpline {
         SplineColor = { Red = 250, Green = 59, Blue = 49 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { -10, LH = { 50.0025004148483, -10 }, RH = { 99.9974995851517, -10 } },
            [150] = { 0, LH = { 125.002500414848, -3.33299994468689 }, RH = { 174.997499585152, 3.33299994468689 } },
            [225] = { 10, LH = { 200.002500414848, 10 }, RH = { 249.997499585152, 10 } },
            [300] = { 0, LH = { 275, 0 } }
         }
      },
      Shape3D1YOffset = BezierSpline {
         SplineColor = { Red = 252, Green = 131, Blue = 47 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { 5, LH = { 50.0025004148483, 3.83345001935959 }, RH = { 99.9792012233657, 6.1656960570904 } },
            [150] = { 7, LH = { 125.007494864871, 6.16691649549571 }, RH = { 174.997499585152, 7.83324998617172 } },
            [225] = { 10, LH = { 200.002500414848, 9.16675001382828 }, RH = { 249.992505135129, 10.8330835045043 } },
            [300] = { 12, LH = { 275, 12 } }
         }
      },
      Shape3D1ZOffset = BezierSpline {
         SplineColor = { Red = 254, Green = 207, Blue = 46 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { -5, RH = { 25, -5 } },
            [75] = { 0, LH = { 50.0025004148483, 0 }, RH = { 99.9974995851517, 0 } },
            [150] = { -5, LH = { 125.002500414848, -5 }, RH = { 174.997499585152, -5 } },
            [225] = { 0, LH = { 200.002500414848, -1.66649997234344 }, RH = { 249.997499585152, 1.66649997234344 } },
            [300] = { 5, LH = { 275, 5 } }
         }
      },
      pCustom1_1_3 = pCustom {
         ID = 9,
         Inputs = {
            NumberIn2 = Input { Value = -0.478, },
            PositionXExpression = Input { Value = "getr1d(age+n1,id)+rands(-1,1,id)*n2", },
            PositionYExpression = Input { Value = "getg1d(age+n1,id)+rands(-1,1,id+1)*n2", },
            PositionZExpression = Input { Value = "getb1d(age+n1,id)+rands(-1,1,id+2)*n2", },
            VelocityYExpression = Input { Value = "if(age==0,if(id%5==0,n2,vy),vy)", },
            Input = Input {
               SourceOp = "pEmitter1_3",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails2_2",
               Source = "Output",
            },
            SetMode = Input { Value = FuID { "DontAffect" }, },
            Set1 = Input { Value = 0, },
            Set2 = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 361.333, 82.0301 } },
      },
      pEmitter1_3 = pEmitter {
         ID = 10,
         Inputs = {
            Number = Input { Value = 0.8, },
            Lifespan = Input { Value = 300, },
            VelocityControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Set1 = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1666, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1_3SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1_3BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 361.333, 8.48409 } },
      },
      pEmitter1_3SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pEmitter1_3BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pSpawn1 = pSpawn {
         ID = 13,
         Inputs = {
            Number = Input { Value = 20, },
            NewSet2 = Input { Value = 1, },
            Input = Input {
               SourceOp = "pCustom1_1_3",
               Source = "Output",
            },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            EndAge = Input { Value = 0.494, },
            RegionMode = Input { Value = FuID { "Intersecting" }, },
            Region = Input { Value = FuID { "RectRgn" }, },
            SetMode = Input { Value = FuID { "DontAffect" }, },
            Set2 = Input { Value = 0, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pSpawn1SizeOverLife1",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pSpawn1BlurOverLife2D1",
               Source = "Value",
            },
            ["RectRgn.Width"] = Input { Value = 3, },
            ["RectRgn.Height"] = Input { Value = 3, },
            ["RectRgn.Translate.X"] = Input { Value = -6.55959506440902, },
            ["RectRgn.Translate.Y"] = Input { Value = 6.16361732673265, },
            ["RectRgn.Translate.Z"] = Input { Value = -2.21412566531286, },
            ["RectRgn.Rotate.Y"] = Input { Value = 91.3, },
         },
         ViewInfo = OperatorInfo { Pos = { 503.333, 82.9691 } },
      },
      pSpawn1SizeOverLife1 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pSpawn1BlurOverLife2D1 = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pDirectionalForce1 = pDirectionalForce {
         ID = 16,
         Inputs = {
            Strength = Input { Value = 10, },
            Input = Input {
               SourceOp = "pSpawn1",
               Source = "Output",
            },
            EndAge = Input { Value = 0.556, },
            RegionMode = Input { Value = FuID { "Intersecting" }, },
            Region = Input { Value = FuID { "RectRgn" }, },
            SetMode = Input { Value = FuID { "DontAffect" }, },
            Set2 = Input { Value = 0, },
            ["RectRgn.Width"] = Input { Value = 3, },
            ["RectRgn.Height"] = Input { Value = 3, },
            ["RectRgn.Translate.X"] = Input { Value = 0.858134387428372, },
            ["RectRgn.Translate.Y"] = Input { Value = 7.21113759928897, },
            ["RectRgn.Translate.Z"] = Input { Value = -4.88705099049446, },
            ["RectRgn.Rotate.Y"] = Input { Value = 90, },
         },
         ViewInfo = OperatorInfo { Pos = { 639.333, 82.5151 } },
      },
      pRender1_3 = pRender {
         CtrlWZoom = false,
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 3, },
            Input = Input {
               SourceOp = "pDirectionalForce1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 788.667, 81.9091 } },
      }
   },
   ActiveTool = "pRender1_3"
}


You might need a second emitter where you want the particles to drop out and have some original particles that go through the pCustom die around that area.
Last edited by birdseye on Wed Jun 12, 2024 9:22 am, edited 2 times in total.
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostTue Jun 11, 2024 2:33 pm

Thanks for the reply. And yes that is my problem, pCustom seems to take precedence. I guess that makes sense. If I want some particles to follow a specific path it would only make sense that I have to explicitly state that I don't want some of them to follow that specific path.

I have not been able to play around today with it, and probably wont for a few days but I did try and put a pSpawn into the flow, assign it a set, and have pDirectionaForce affect that set, but the spawned particles still follow the path defined in pCustom. If i set it up with a pretty strong pForce they do appear below the original path. They also dont start appearing until frame 121, haven't figured that out yet.
Aaron
Offline

birdseye

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

Re: pCustom Follow a path w/custom velocity

PostWed Jun 12, 2024 8:31 am

I'd like to find an answer to this myself, there doesn't appear to be much information on sets, it might be safe to assume they follow the same rules as Venn diagrams. There are only so many monkeys and typewriters in this problem, so it can't be that difficult.
Something weird I've noticed, when I copy the nodes into a new comp, all I get is a load of bunched up blobs emerging and yet the nodes I copied from produced a spiraling stream of particles. The problem seems related to the nodes generating the colour bar. The colours are generated in the nodes you posted but not when I copy the nodes to a new comp or when I post the nodes in this thread. I thought I had posted the wrong nodes above but it appears to be the same problem.
The problem is that when the nodes are copied the Background node colours are not animating in the copy, what are you using to drive the animation of the colours?

Found it, you had a Shape3D node way out of view that I didn't know was there, assuming thats positioning the particles then you'll probably need a separate emitter. Although the method is good for demonstrating a technique, it might not be the best option for what you are trying to achieve.
Offline

Okke Verbart

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

Re: pCustom Follow a path w/custom velocity

PostFri Jun 14, 2024 6:02 am

I did something like this in the past. Key here is that the pCustom reads the values of the path (via the input image which in turn is generated by reading the path x and y values and storing these via a trails node) and that this mechanism stops at a random point; at this point as the px and py values are no longer explicitly set, your pTurbulence, pDirectionalForce will start taking effect. Prior to this, no matter what these forces do, the px and py are set to the path values.

The way I go about this (many different ways possible) is to use the "mass" variable. This is unused in Fusion, but by default is set to 1. I then use the below formula in the mass field:

Code: Select all
if(mass==1 && rands(0,1,time+id)>0.99,2,mass)


This means in essence that: if the mass is still at its initial value, and if a random value (between 0 and 1) based on the particles ID value AND based on the time is greater than 0.99, it will set the mass value to 2.

This mass variable is then used in both the px and py fields:

Code: Select all
if(mass==1,i1+rands(-n1,n1,id),px)


So, if the mass is at its initial value use i1 (which refers to the interim variable that reads the image generated via the trails tool). I also use a random offset (to make the trail somewhat thicker) based on the number tab NumberIn1 value. If the mass is no longer 1 (i.e. set to 2 via the function in the mass field), then it will just return px. This means that if mass is no longer 1, it will have recorded the latest px, but from there on, px is no longer determined by the input image and will therefore be subject to the particle forces.

To use the below comp, you first need to run through the timeline, displaying the trails node. Once the image has been generated, you can view the particle system. This should now follow the path; if it doesn't, hit the "restart" in the pRender node. Whenever you want to change the path (Polygon 1), you'd need to go through the same procedure (don't forget to restart the particle system in the pRender!)

Code: Select all
{
   Tools = ordered() {
      Trails1 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background1_1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 686.667, 45.5454 } },
      },
      Polygon1 = PolylineMask {
         DrawMode = "ClickAppend",
         DrawMode2 = "InsertAndModify",
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 2560, },
            MaskHeight = Input { Value = 1440, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Polyline = Input {
               SourceOp = "Publish1",
               Source = "Value",
            },
            Polyline2 = Input {
               Value = Polyline {
               },
               Disabled = true,
            }
         },
         ViewInfo = OperatorInfo { Pos = { 687.334, -31.091 } },
      },
      Publish1 = PublishPolyLine {
         CtrlWZoom = false,
         Inputs = {
            Value = Input {
               Value = Polyline {
                  Points = {
                     { Linear = true, X = -0.4509765625, Y = 0.0652777777777778, RX = 0.0666015625000001, RY = -0.0579861111111108 },
                     { X = -0.251171875, Y = -0.108680555555556, LX = -0.0390634216974603, LY = 0.0356133759065175, RX = 0.0707655075640116, RY = -0.0645155624515206 },
                     { X = -0.0783203125, Y = 0.183680555555555, LX = -0.0971943297986578, LY = -0.00418040128166547, RX = 0.0736402987898296, RY = 0.00316732467913245 },
                     { X = 0.134375, Y = 0.290277777777778, LX = -0.0382457044516595, LY = -0.0696359080923596, RX = 0.0669161602567863, RY = -0.125318906732464 },
                     { X = 0.31796875, Y = 0.0138888888888893, LX = -0.0611979166666666, LY = 0.09212962962963 }
                  }
               },
            }
         },
      },
      Background1_1 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle1",
               Source = "Mask",
            },
            Width = Input { Value = 1024, },
            Height = Input { Value = 576, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               Value = 0.81796875,
               Expression = "Get_Path.X",
            },
            TopLeftGreen = Input {
               Value = 0.513888888888889,
               Expression = "Get_Path.Y",
            },
            Get_Path = Input {
               SourceOp = "Path1",
               Source = "Position",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 829.33, 44.6061 } },
         UserControls = ordered() {
            Get_Path = {
               LINKS_Name = "Get_Path",
               LINKID_DataType = "Point",
               INPID_InputControl = "OffsetControl",
               ICS_ControlPage = "Color",
            }
         }
      },
      Path1 = PolyPath {
         DrawMode = "InsertAndModify",
         CtrlWZoom = false,
         Inputs = {
            Displacement = Input {
               SourceOp = "Path1Displacement",
               Source = "Value",
            },
            PolyLine = Input {
               SourceOp = "Publish1",
               Source = "Value",
            }
         },
      },
      Path1Displacement = BezierSpline {
         SplineColor = { Red = 255, Green = 0, Blue = 255 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { 0, RH = { 66.3333333333333, 0.333333333333333 }, Flags = { Linear = true } },
            [199] = { 1, LH = { 132.666666666667, 0.666666666666667 }, Flags = { Linear = true } }
         }
      },
      Rectangle1 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 2560, },
            MaskHeight = Input { Value = 1440, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0, 0.5 },
               Expression = "Point(time/200, 0.5)",
            },
            Width = Input { Value = 0.005, },
            Height = Input { Value = 1, }
         },
         ViewInfo = OperatorInfo { Pos = { 827.997, -33.5152 } },
      },
      pDirectionalForce1 = pDirectionalForce {
         ID = 146,
         Inputs = {
            Strength = Input { Value = 0.01, },
            Input = Input {
               SourceOp = "pCustom1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 800, 118.879 } },
      },
      pTurbulence1 = pTurbulence {
         ID = 147,
         Inputs = {
            XStrength = Input { Value = 0.01, },
            YStrength = Input { Value = 0.01, },
            StrengthOverLifeLUT = Input {
               SourceOp = "pTurbulence1StrengthOverLifeLUT",
               Source = "Value",
            },
            Input = Input {
               SourceOp = "pDirectionalForce1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 910, 118.879 } },
      },
      pTurbulence1StrengthOverLifeLUT = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.3, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.7, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 255, Green = 255, Blue = 0 },
         CtrlWZoom = false,
         NameSet = true,
      },
      pCustom1 = pCustom {
         ID = 4,
         Inputs = {
            NumberIn1 = Input { Value = 0.02, },
            Intermediate1 = Input { Value = "getr1w(age,0.5)-0.5", },
            Intermediate2 = Input { Value = "(getg1w(age,0.5)-0.5)*(1080/1920)", },
            PositionXExpression = Input { Value = "if(mass==1,i1+rands(-n1,n1,id),px)", },
            PositionYExpression = Input { Value = "if(mass==1,i2+rands(-n1,n1,id*2),py)", },
            RedExpression = Input { Value = "mass/2", },
            MassExpression = Input { Value = "if(mass==1 && rands(0,1,time+id)>0.99,2,mass)", },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 690, 118.879 } },
      },
      pEmitter1 = pEmitter {
         ID = 1,
         Inputs = {
            Number = Input {
               Value = 3,
               Expression = "3",
            },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["SphereRgn.Size"] = Input { Value = 0, },
            ["ParticleStyle.ColorControls"] = Input { Value = 1, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 1, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BlurOverLife2D",
               Source = "Value",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 514, 118.273 } },
      },
      pEmitter1SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pEmitter1BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pRender1 = pRender {
         CtrlWZoom = false,
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            Width = Input { Value = 2560, },
            Height = Input { Value = 1440, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            OutputMode = Input { Value = FuID { "TwoD" }, },
            ["MaterialID.MaterialID"] = Input { Value = 1, },
            ["ObjectID.ObjectID"] = Input { Value = 1, },
            Input = Input {
               SourceOp = "pTurbulence1",
               Source = "Output",
            }
         },
         ViewInfo = OperatorInfo { Pos = { 1024.67, 120.698 } },
      }
   },
   ActiveTool = "pRender1"
}
www.ablackbirdcalledsue.com
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostFri Jun 14, 2024 12:49 pm

Thanks for replying and helping me out. AGAIN. You're a legend. Its going to take me some time to unpack what you provided but I wanted to get a thank-you out.
What you have provided is 2d, I am trying to output is 3d.

The approach you took is different than the tut I followed above. He uses a CoordTransformPostion modifier on the BG node. I have not really tried yet but is it possible to use your method and maybe use the BG blue channel for the z position?

Or do I have to somehow adjust the expressions (from the tut) for the positions to include the mass expression you provided?

At a high level I understand what you have done with the expression in mass field but it'll take some time to fully get it.

Thanks again
Aaron
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostFri Jun 14, 2024 12:54 pm

birdseye wrote:I'd like to find an answer to this myself, there doesn't appear to be much information on sets, it might be safe to assume they follow the same rules as Venn diagrams. There are only so many monkeys and typewriters in this problem, so it can't be that difficult.
Something weird I've noticed, when I copy the nodes into a new comp, all I get is a load of bunched up blobs emerging and yet the nodes I copied from produced a spiraling stream of particles. The problem seems related to the nodes generating the colour bar. The colours are generated in the nodes you posted but not when I copy the nodes to a new comp or when I post the nodes in this thread. I thought I had posted the wrong nodes above but it appears to be the same problem.
The problem is that when the nodes are copied the Background node colours are not animating in the copy, what are you using to drive the animation of the colours?

Found it, you had a Shape3D node way out of view that I didn't know was there, assuming thats positioning the particles then you'll probably need a separate emitter. Although the method is good for demonstrating a technique, it might not be the best option for what you are trying to achieve.


Sorry I didn't reply earlier. As Okke said, when you copy, import what ever, you need to run the comp through once, with the BG node in the viewer, to populate it with the data. I dont know if thats the right phrasing. This is also true with the trails node.
Aaron
Offline

birdseye

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

Re: pCustom Follow a path w/custom velocity

PostSat Jun 15, 2024 9:48 am

I had a feeling Okke would swoop in with a solution, unfortunately it is not working for me, all I get is a solid green from the Trails node and the particles sit in a clump and some fall..
I was reading your first post again and noticed you said,
I need to add some particles randomly falling from the path

and realised I accidently had the particles doing that by changing the Probability in the pCustom some of the particles seem to be affected by the force.. I have no idea why, I really need to spend some time playing with particles, maybe leaving the pCustom until the end as it seems to make and break rules on the fly, that I'm guessing the other particle nodes follow.
Code: Select all
{
   Tools = ordered() {
      Shape3D1 = Shape3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["Transform3DOp.Translate.X"] = Input {
               SourceOp = "Shape3D1XOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Y"] = Input {
               SourceOp = "Shape3D1YOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "Shape3D1ZOffset",
               Source = "Value",
            },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 34.6667, 199.667 } },
      },
      Shape3D1XOffset = BezierSpline {
         SplineColor = { Red = 250, Green = 59, Blue = 49 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { -10, LH = { 50.0025004148483, -10 }, RH = { 99.9974995851517, -10 } },
            [150] = { 0, LH = { 125.002500414848, -3.33299994468689 }, RH = { 174.997499585152, 3.33299994468689 } },
            [225] = { 10, LH = { 200.002500414848, 10 }, RH = { 249.997499585152, 10 } },
            [300] = { 0, LH = { 275, 0 } }
         }
      },
      Shape3D1YOffset = BezierSpline {
         SplineColor = { Red = 252, Green = 131, Blue = 47 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { 5, LH = { 50.0025004148483, 3.83345001935959 }, RH = { 99.9792012233657, 6.1656960570904 } },
            [150] = { 7, LH = { 125.007494864871, 6.16691649549571 }, RH = { 174.997499585152, 7.83324998617172 } },
            [225] = { 10, LH = { 200.002500414848, 9.16675001382828 }, RH = { 249.992505135129, 10.8330835045043 } },
            [300] = { 12, LH = { 275, 12 } }
         }
      },
      Shape3D1ZOffset = BezierSpline {
         SplineColor = { Red = 254, Green = 207, Blue = 46 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { -5, RH = { 25, -5 } },
            [75] = { 0, LH = { 50.0025004148483, 0 }, RH = { 99.9974995851517, 0 } },
            [150] = { -5, LH = { 125.002500414848, -5 }, RH = { 174.997499585152, -5 } },
            [225] = { 0, LH = { 200.002500414848, -1.66649997234344 }, RH = { 249.997499585152, 1.66649997234344 } },
            [300] = { 5, LH = { 275, 5 } }
         }
      },
      Rectangle2_2 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0.045, 0.5 },
               Expression = "Point((time/300)-1/200,0.5)",
            },
            Width = Input { Value = 0.01, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 161.333, 128.576 } },
      },
      Trails2_2 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background2_2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 161.333, 198.485 } },
      },
      Background2_2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle2_2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 300, },
            Height = Input { Value = 32, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.X",
            },
            TopLeftGreen = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Y",
            },
            TopLeftBlue = Input {
               SourceOp = "CoordTransform3D2_2",
               Source = "Position.Z",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 161.333, 161.576 } },
      },
      CoordTransform3D2_2 = CoordTransform3D {
         CtrlWZoom = false,
         Inputs = {
            TargetObject = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
      },
      pCustom1_1_3 = pCustom {
         ID = 37,
         CtrlWZoom = false,
         Inputs = {
            NumberIn2 = Input { Value = -0.478, },
            PositionXExpression = Input { Value = "getr1d(age+n1,id)+rands(-1,1,id)*n2", },
            PositionYExpression = Input { Value = "getg1d(age+n1,id)+rands(-1,1,id+1)*n2", },
            PositionZExpression = Input { Value = "getb1d(age+n1,id)+rands(-1,1,id+2)*n2", },
            VelocityYExpression = Input { Value = "if(age==0,if(id%5==0,n2,vy),vy)", },
            Input = Input {
               SourceOp = "pEmitter1_3",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails2_2",
               Source = "Output",
            },
            Probability = Input { Value = 0.339, },
            SetMode = Input { Value = FuID { "DontAffect" }, },
            Set1 = Input { Value = 0, },
         },
         ViewInfo = OperatorInfo { Pos = { 270, 198.485 } },
      },
      pEmitter1_3 = pEmitter {
         ID = 39,
         Inputs = {
            Number = Input { Value = 0.8, },
            Lifespan = Input { Value = 150, },
            VelocityControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Set1 = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1666, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1_3SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1_3BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 270, 163.727 } },
      },
      pEmitter1_3SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pEmitter1_3BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pSpawn1 = pSpawn {
         ID = 47,
         PassThrough = true,
         Inputs = {
            Number = Input { Value = 20, },
            NewSet2 = Input { Value = 1, },
            Input = Input {
               SourceOp = "pCustom1_1_3",
               Source = "Output",
            },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            RegionMode = Input { Value = FuID { "Leaving" }, },
            Region = Input { Value = FuID { "SphereRgn" }, },
            ["SphereRgn.Translate.X"] = Input { Value = -5.66285644978205, },
            ["SphereRgn.Translate.Y"] = Input { Value = 6.1855069238963, },
            ["SphereRgn.Translate.Z"] = Input { Value = -2.99946469059289, },
            SetMode = Input { Value = FuID { "DontAffect" }, },
            Set2 = Input { Value = 0, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pSpawn1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pSpawn1BlurOverLife2D",
               Source = "Value",
            },
            ["RectRgn.Width"] = Input { Value = 3, },
            ["RectRgn.Height"] = Input { Value = 3, },
            ["RectRgn.Translate.X"] = Input { Value = -6.55959506440902, },
            ["RectRgn.Translate.Y"] = Input { Value = 6.16361732673265, },
            ["RectRgn.Translate.Z"] = Input { Value = -2.21412566531286, },
            ["RectRgn.Rotate.Y"] = Input { Value = 91.3, },
         },
         ViewInfo = OperatorInfo { Pos = { 406.667, 197.606 } },
      },
      pSpawn1SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
         NameSet = true,
      },
      pSpawn1BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
         NameSet = true,
      },
      pDirectionalForce1 = pDirectionalForce {
         ID = 50,
         Inputs = {
            Strength = Input { Value = 10, },
            Input = Input {
               SourceOp = "pSpawn1",
               Source = "Output",
            },
            RegionMode = Input { Value = FuID { "Intersecting" }, },
            Region = Input { Value = FuID { "SphereRgn" }, },
            ["SphereRgn.Translate.X"] = Input { Value = 3.3363477440561, },
            ["SphereRgn.Translate.Y"] = Input { Value = 7.37434825264051, },
            ["SphereRgn.Translate.Z"] = Input { Value = -4.79656772428943, },
            SetMode = Input { Value = FuID { "DontAffect" }, },
            Set1 = Input { Value = 0, },
            ["RectRgn.Width"] = Input { Value = 3, },
            ["RectRgn.Height"] = Input { Value = 3, },
            ["RectRgn.Translate.X"] = Input { Value = 0.858134387428372, },
            ["RectRgn.Translate.Y"] = Input { Value = 7.21113759928897, },
            ["RectRgn.Translate.Z"] = Input { Value = -4.88705099049446, },
            ["RectRgn.Rotate.Y"] = Input { Value = 90, },
         },
         ViewInfo = OperatorInfo { Pos = { 538.667, 197.152 } },
      },
      pRender1_3 = pRender {
         CtrlWZoom = false,
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 500, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 3, },
            Input = Input {
               SourceOp = "pDirectionalForce1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 700, 196.546 } },
      }
   },
   ActiveTool = "pRender1_3"
}
Offline

amellon

  • Posts: 30
  • Joined: Fri Mar 08, 2019 11:57 am
  • Real Name: Aaron Mellon

Re: pCustom Follow a path w/custom velocity

PostSun Jun 16, 2024 9:35 am

all I get is a solid green from the Trails node and the particles sit in a clump

In the tuts that I followed there are a couple of steps that are important AND that don't seem to copy over. Can you confirm that you let the comp play through with BG node in the viewer and after that bring the trails node into the viewer, drag the playhead to the frame one, click restart in the trails node and let it play through too.

Other than that, following the tut, the BG resolution size, rectangle size and composition length are all relevant but I think that should copy over when importing a comp. I initially ran into problems because when adding the CoordPostionTrans modifier, seems like if you click to low near the color parameters, its selects the alpha channel instead of the red? If the color channels animate and change while playing through the comp its working right.

In my original comp nothing was falling, I didn't think about changing the probability in pCustom, that kinda works! Thanks!

maybe leaving the pCustom until the end as it seems to make and break rules on the fly, that I'm guessing the other particle nodes follow.


I dont think the node placement is relevant when using a pCustom. Like Okke said the positions are explicitly set and wont be affected by other forces. He provided some expressions that add some randomness (or something to that effect) so not all particles will have their positions explicitly set so they can be affected by other forces. The way he went about setting the path is not quite the same as the way I learned in the tut (nor have I totally understood yet) but I'm happy to say I am making progress in adapting what he provided.

comp attached but there is still some funny business going on I got to work out.
Code: Select all
{
   Tools = ordered() {
      Shape3D1 = Shape3D {
         Inputs = {
            ["SurfacePlaneInputs.ObjectID.ObjectID"] = Input { Value = 1, },
            ["Transform3DOp.Translate.X"] = Input {
               SourceOp = "Shape3D1XOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Y"] = Input {
               SourceOp = "Shape3D1YOffset",
               Source = "Value",
            },
            ["Transform3DOp.Translate.Z"] = Input {
               SourceOp = "Shape3D1ZOffset",
               Source = "Value",
            },
            Shape = Input { Value = FuID { "SurfaceSphereInputs" }, },
            ["MtlStdInputs.MaterialID"] = Input { Value = 1, },
            ["SurfaceSphereInputs.ObjectID.ObjectID"] = Input { Value = 2, }
         },
         ViewInfo = OperatorInfo { Pos = { 110, 181.5 } },
      },
      Shape3D1XOffset = BezierSpline {
         SplineColor = { Red = 250, Green = 59, Blue = 49 },
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { -10, LH = { 50.0025004148483, -10 }, RH = { 99.9974995851517, -10 } },
            [150] = { 0, LH = { 125.002500414848, -3.33299994468689 }, RH = { 174.997499585152, 3.33299994468689 } },
            [225] = { 10, LH = { 200.002500414848, 10 }, RH = { 249.997499585152, 10 } },
            [300] = { 0, LH = { 275, 0 } }
         }
      },
      Shape3D1YOffset = BezierSpline {
         SplineColor = { Red = 252, Green = 131, Blue = 47 },
         KeyFrames = {
            [0] = { 0, RH = { 25, 0 } },
            [75] = { 5, LH = { 50.0025004148483, 3.83345001935959 }, RH = { 99.9792012233657, 6.1656960570904 } },
            [150] = { 7, LH = { 125.007494864871, 6.16691649549571 }, RH = { 174.997499585152, 7.83324998617172 } },
            [225] = { 10, LH = { 200.002500414848, 9.16675001382828 }, RH = { 249.992505135129, 10.8330835045043 } },
            [300] = { 12, LH = { 275, 12 } }
         }
      },
      Shape3D1ZOffset = BezierSpline {
         SplineColor = { Red = 254, Green = 207, Blue = 46 },
         CtrlWZoom = false,
         KeyFrames = {
            [0] = { -5, RH = { 25, -5 } },
            [75] = { 0, LH = { 50.0025004148483, 0 }, RH = { 99.9974995851517, 0 } },
            [150] = { -5, LH = { 125.002500414848, -5 }, RH = { 174.997499585152, -5 } },
            [225] = { 0, LH = { 200.002500414848, -1.66649997234344 }, RH = { 249.997499585152, 1.66649997234344 } },
            [300] = { 5, LH = { 275, 5 } }
         }
      },
      Rectangle2 = RectangleMask {
         Inputs = {
            Filter = Input { Value = FuID { "Fast Gaussian" }, },
            MaskWidth = Input { Value = 1920, },
            MaskHeight = Input { Value = 1080, },
            PixelAspect = Input { Value = { 1, 1 }, },
            ClippingMode = Input { Value = FuID { "None" }, },
            Center = Input {
               Value = { 0.995, 0.5 },
               Expression = "Point((time/300)-1/200,0.5)",
            },
            Width = Input { Value = 0.01, },
            Height = Input { Value = 1, },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 247.5 } },
      },
      Background2 = Background {
         Inputs = {
            EffectMask = Input {
               SourceOp = "Rectangle2",
               Source = "Mask",
            },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 300, },
            Height = Input { Value = 32, },
            Depth = Input { Value = 4, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            TopLeftRed = Input {
               SourceOp = "CoordTransform3D1",
               Source = "Position.X",
            },
            TopLeftGreen = Input {
               SourceOp = "CoordTransform3D1",
               Source = "Position.Y",
            },
            TopLeftBlue = Input {
               SourceOp = "CoordTransform3D1",
               Source = "Position.Z",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 280.5 } },
      },
      CoordTransform3D1 = CoordTransform3D {
         CtrlWZoom = false,
         Inputs = {
            TargetObject = Input {
               SourceOp = "Shape3D1",
               Source = "Output",
            },
         },
      },
      pEmitter1 = pEmitter {
         ID = 11,
         Inputs = {
            Number = Input { Value = 0.8, },
            Lifespan = Input { Value = 300, },
            VelocityControls = Input { Value = 1, },
            SpinControls = Input { Value = 1, },
            Set1 = Input { Value = 1, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.1666, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 247.5 } },
      },
      pEmitter1SizeOverLife = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
      },
      pEmitter1BlurOverLife2D = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.333333333333333, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.666666666666667, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      Trails2 = Trails {
         Inputs = {
            Input = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, 346.5 } },
      },
      pCustom1_1 = pCustom {
         ID = 9,
         Inputs = {
            NumberIn1 = Input { Value = 0.073, },
            NumberIn2 = Input { Value = 0.005, },
            Intermediate1 = Input { Value = "getr1d(age+n1,mass)+rands(-1,1,id)*n2", },
            Intermediate2 = Input { Value = "getg1d(age+n1,mass)+rands(-1,1,id+1)*n2", },
            Intermediate3 = Input { Value = "getb1d(age+n1,mass)+rands(-1,1,id+2)*n2", },
            PositionXExpression = Input { Value = "if(mass==1,i1+rands(-n1,n1,id),px)", },
            PositionYExpression = Input { Value = "if(mass==1,i2+rands(-n1,n1,id*2),py)", },
            PositionZExpression = Input { Value = "if(mass==1,i3+rands(-n1,n1,id*3),pz)", },
            MassExpression = Input { Value = "if(mass==1 && rands(0,1,time+id)>0.99,2,mass)", },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            },
            Image1 = Input {
               SourceOp = "Trails2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 346.5 } },
      },
      pDirectionalForce1 = pDirectionalForce {
         ID = 18,
         Inputs = {
            Input = Input {
               SourceOp = "pCustom1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 379.5 } },
      },
      pTurbulence1 = pTurbulence {
         ID = 19,
         Inputs = {
            XStrength = Input { Value = 1, },
            YStrength = Input { Value = 1, },
            ZStrength = Input { Value = 1, },
            StrengthOverLifeLUT = Input {
               SourceOp = "pTurbulence1StrengthOverLifeLUT",
               Source = "Value",
            },
            Input = Input {
               SourceOp = "pDirectionalForce1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 412.5 } },
      },
      pTurbulence1StrengthOverLifeLUT = LUTBezier {
         KeyColorSplines = {
            [0] = {
               [0] = { 0.5, RH = { 0.3, 0.5 }, Flags = { Linear = true } },
               [1] = { 0.5, LH = { 0.7, 0.5 }, Flags = { Linear = true } }
            }
         },
         SplineColor = { Red = 192, Green = 128, Blue = 64 },
         CtrlWZoom = false,
      },
      pRender1 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            GlobalOut = Input { Value = 300, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["MaterialID.MaterialID"] = Input { Value = 2, },
            ["ObjectID.ObjectID"] = Input { Value = 1, },
            Input = Input {
               SourceOp = "pTurbulence1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 478.5 } },
      }
   }
}
Aaron
Offline

birdseye

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

Re: pCustom Follow a path w/custom velocity

PostSun Jun 16, 2024 12:15 pm

Well something different appears to be happening, is it the mass you tinkered with? Ignore region seems to make the force omnipresent. I'm not understanding why they fall off the end of the trail yet or how to adjust that.
What I meant by leaving the pCustom until last was in my playtime with particle nodes, not the arrangement in the node graph.. The pCustom appears to be a bit of a naughty one, while I expect the others to follow the general rules and should be relatively straight forward.
My problem with copying the comp you posted was when I tried to make a copy from my node graph to a new comp. I thought I had selected all the nodes but hadn't seen the Shape3D node because it was a good distance from the rest, so I missed it.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 27 guests