Jump to: Board index » General » Fusion

Particles and Collision

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

jsghost777

  • Posts: 82
  • Joined: Tue Apr 09, 2024 7:42 am
  • Real Name: Jake Coetzee

Particles and Collision

PostWed May 22, 2024 12:17 pm

Hi,

I was wondering, is there a way to set the particle emitter so that no particle will ever collide with another particle and so that they will keep a certain distance from each other?
Offline
User avatar

Bryan Ray

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

Re: Particles and Collision

PostWed May 22, 2024 6:14 pm

The emitter? No. But pFlock can do it. Turn up the Repel Strength a little and set Space Maximum to a high number. Maybe also increase Space Minimum. The particles will try to avoid one another (not always successfully), although sometimes they'll get a lot of momentum. There's a pSpeedLimit node in Reactor that will clamp their max velocity if they move too fast.

Code: Select all
{
   Tools = ordered() {
      pRender1 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            OutputMode = Input { Value = FuID { "TwoD" }, },
            ["MaterialID.MaterialID"] = Input { Value = 1, },
            ["ObjectID.ObjectID"] = Input { Value = 1, },
            Input = Input {
               SourceOp = "pFlock1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1009.33, 57.6667 } },
      },
      pEmitter1 = pEmitter {
         ID = 3,
         CtrlWZoom = false,
         Inputs = {
            Number = Input { Value = 1, },
            VelocityControls = Input { Value = 1, },
            Velocity = Input { Value = 0.016, },
            AngleVariance = Input { Value = 360, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["SphereRgn.Size"] = Input { Value = 0.558983283105153, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.5, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 763.333, 57.0606 } },
      },
      pEmitter1SizeOverLife = 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 },
      },
      pEmitter1BlurOverLife2D = 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,
      },
      pFlock1 = pFlock {
         ID = 2,
         Inputs = {
            FlockNumber = Input { Value = 4, },
            RepelStrength = Input { Value = 0.047, },
            MinimumSpace = Input { Value = 0.267, },
            MaximumSpace = Input { Value = 1, },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 902, 58.2727 } },
      }
   }
}


edit: Or pFriction can slow them down, too. That's kinda fun to play with!
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

jsghost777

  • Posts: 82
  • Joined: Tue Apr 09, 2024 7:42 am
  • Real Name: Jake Coetzee

Re: Particles and Collision

PostFri May 24, 2024 6:56 am

Bryan Ray wrote:The emitter? No. But pFlock can do it. Turn up the Repel Strength a little and set Space Maximum to a high number. Maybe also increase Space Minimum. The particles will try to avoid one another (not always successfully), although sometimes they'll get a lot of momentum. There's a pSpeedLimit node in Reactor that will clamp their max velocity if they move too fast.

Code: Select all
{
   Tools = ordered() {
      pRender1 = pRender {
         Inputs = {
            _MotionBlurWarning = Input { Disabled = true, },
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            OutputMode = Input { Value = FuID { "TwoD" }, },
            ["MaterialID.MaterialID"] = Input { Value = 1, },
            ["ObjectID.ObjectID"] = Input { Value = 1, },
            Input = Input {
               SourceOp = "pFlock1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1009.33, 57.6667 } },
      },
      pEmitter1 = pEmitter {
         ID = 3,
         CtrlWZoom = false,
         Inputs = {
            Number = Input { Value = 1, },
            VelocityControls = Input { Value = 1, },
            Velocity = Input { Value = 0.016, },
            AngleVariance = Input { Value = 360, },
            Style = Input { Value = FuID { "ParticleStyleBlob" }, },
            ["SphereRgn.Size"] = Input { Value = 0.558983283105153, },
            ["ParticleStyle.SizeControls"] = Input { Value = 1, },
            ["ParticleStyle.Size"] = Input { Value = 0.5, },
            ["ParticleStyle.SizeOverLife"] = Input {
               SourceOp = "pEmitter1SizeOverLife",
               Source = "Value",
            },
            ["ParticleStyle.BlurOverLife"] = Input {
               SourceOp = "pEmitter1BlurOverLife2D",
               Source = "Value",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 763.333, 57.0606 } },
      },
      pEmitter1SizeOverLife = 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 },
      },
      pEmitter1BlurOverLife2D = 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,
      },
      pFlock1 = pFlock {
         ID = 2,
         Inputs = {
            FlockNumber = Input { Value = 4, },
            RepelStrength = Input { Value = 0.047, },
            MinimumSpace = Input { Value = 0.267, },
            MaximumSpace = Input { Value = 1, },
            Input = Input {
               SourceOp = "pEmitter1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 902, 58.2727 } },
      }
   }
}


edit: Or pFriction can slow them down, too. That's kinda fun to play with!



This is perfect, exactly what I was looking for! Thank you.

Return to Fusion

Who is online

Users browsing this forum: No registered users and 27 guests