Jump to content


Photo

Conical Particle Spray

Tips Particles Gringo

  • Please log in to reply
18 replies to this topic

#1 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 10 June 2013 - 11:42 AM

Have you ever tried to simulate a spray, stream of steam or a fountain in Fusion?
Then you will be interested in further reading!

The most obvious way to create a spray is to set the Angle Variance and Angle Z Variance in the pEmitter >0.
But because those two parameters don't take each other into any consideration, you will end up with a spray shaped as a pyramid instead of a cone:
Posted Image

Quite unexpected, yet physically straight-forward solution to this issue is to shoot all the particles from a spherical emitter in parallel direction... against a spherical deflector :)))
i.e. a pBounce with the Region set to Sphere:
Posted Image

You can even go further and apply a high-frequency Shake to the pEmitter > Region > Size.
Then you get a conical spray which softly decreases its density with deviation from the main direction axis:
Posted Image

Surprisingly, this solution doesn't really make the particle simulation slower... Quite the opposite!
Considering that you need to dramatically increase the pRender's Sub-frame Calculation Accuracy to avoid steppy emission in the normal case.

#2 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 10 June 2013 - 11:54 AM

Nice and elegant, I like it! :)

Put it in a little macro? ;)

Thanks Gringo.

#3 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 10 June 2013 - 12:02 PM

You're welcome ;)

I came to a conclusion, that making macros for particle systems is not too handy in Fusion.
First, you get an annoying message "Particle tools can not be branched" every time you open a comp with such a macro, and second, particles get doubled with a higher probability.

So, better just bare particle tools with "user controls" and "simple expressions".

ConicalSpray_Example.comp

#4 Dunn

Dunn

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 303 posts

Posted 10 June 2013 - 01:30 PM

Awesome Gringo!
Thanx for sharing the comp! :)

#5 Attila Sziklai

Attila Sziklai

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 178 posts

Posted 20 June 2013 - 09:56 AM

I'd go with a pPointFforce next to the emitter. This way it's not necessary to use that large Sub-frame Calculation Accuracy.

cheers

{
Tools = ordered() {
  pRender1_1_1 = pRender {
   CtrlWZoom = false,
   Inputs = {
    Motionblur = Input { Value = 1, },
    ["_MotionblurWarning"] = Input { Disabled = true, },
    Quality = Input { Value = 5, },
    GlobalIn = Input { Value = 1, },
    GlobalOut = Input { Value = 500, },
    Width = Input { Value = 2048, },
    Height = Input { Value = 1556, },
    ["MaterialID.MaterialID"] = Input { Value = 1, },
    ["ObjectID.ObjectID"] = Input { Value = 1, },
    Input = Input {
	 SourceOp = "pPointForce1",
	 Source = "Output",
    },
   },
   ViewInfo = OperatorInfo { Pos = { 495, 379.5, }, },
  },
  pPointForce1 = pPointForce {
   ID = 166,
   Inputs = {
    Strength = Input { Value = -5, },
    Power = Input { Value = 1, },
    ["Translate.Z"] = Input { Value = -0.02, },
    Input = Input {
	 SourceOp = "pEmitter1_3",
	 Source = "Output",
    },
   },
   ViewInfo = OperatorInfo { Pos = { 385, 379.5, }, },
  },
  pEmitter1_3 = pEmitter {
   ID = 173,
   Inputs = {
    ["ParticleStyleNGon.NGonType"] = Input { Value = 6, },
    Number = Input {
	 SourceOp = "pEmitter1_3Number",
	 Source = "Value",
    },
    Lifespan = Input { Value = 150, },
    TemporalDistribution = Input { Value = 1, },
    VelocityControls = Input { Value = 1, },
    AngleZ = Input { Value = -90, },
    RotationControls = Input { Value = 1, },
    RotationMode = Input { Value = 1, },
    AlwaysFaceCamera = Input { Value = 0, },
    Rotation = Input { Value = 1, },
    RotationY = Input { Value = 90, },
    ["ParticleStyle.ColorControls"] = Input { Value = 1, },
    ["ParticleStyle.Green"] = Input { Value = 0.5, },
    ["ParticleStyle.Blue"] = Input { Value = 0.2, },
    ["ParticleStyle.Alpha"] = Input { Value = 0.5, },
    ["ParticleStyle.ColorOverLifeControls"] = Input { Value = 1, },
    ["ParticleStyle.ColorOverLife"] = Input {
	 Value = Gradient {
	  Colors = {
	   [0] = { 1, 1, 1, 1, },
	  },
	 },
    },
    ["ParticleStyle.SizeControls"] = Input { Value = 1, },
    ["ParticleStyle.Size"] = Input { Value = 0.05, },
    ["ParticleStyle.SizeOverLife"] = Input {
	 SourceOp = "pEmitter1_3SizeoverLife",
	 Source = "Value",
    },
    ["ParticleStyle.FadeControls"] = Input { Value = 1, },
    ["ParticleStyle.BlurOverLife"] = Input {
	 SourceOp = "pEmitter1_3BluroverLife2D",
	 Source = "Value",
    },
    ["ParticleStylePoint.SubPixelRendered"] = Input { Value = 1, },
    ["SphereRgn.Size"] = Input { Value = 0.02, },
   },
   ViewInfo = OperatorInfo { Pos = { 275, 379.5, }, },
  },
  pEmitter1_3Number = BezierSpline {
   SplineColor = { Red = 233, Green = 206, Blue = 78, },
   NameSet = true,
   KeyFrames = {
    [2] = { 0, RH = { 2.33327950536695, 0, }, },
    [3] = { 10000, LH = { 2.66666561193079, 10000, }, RH = { 3.66666666666667, 10000, }, },
    [5] = { 10000, LH = { 4.33333333333333, 10000, }, RH = { 5.33333333333333, 6666.66666666667, }, Flags = { Linear = true, }, },
    [6] = { 0, LH = { 5.66666666666667, 3333.33333333333, }, RH = { 12, 0, }, Flags = { Linear = true, }, },
    [24] = { 0, LH = { 18, 0, }, RH = { 24.333327799295, 0, }, Flags = { Linear = true, }, },
    [25] = { 10000, LH = { 24.6667139058589, 10000, }, RH = { 25.6666666666667, 10000, }, },
    [27] = { 10000, LH = { 26.3333333333333, 10000, }, RH = { 27.3333333333333, 6666.66666666667, }, Flags = { Linear = true, }, },
    [28] = { 0, LH = { 27.6666666666667, 3333.33333333333, }, RH = { 41.3333333333333, 0, }, Flags = { Linear = true, }, },
    [68] = { 0, LH = { 54.6666666666667, 0, }, RH = { 68.3333333333333, 666.666666666667, }, Flags = { Linear = true, }, },
    [69] = { 2000, LH = { 68.6666666666667, 1333.33333333333, }, Flags = { Linear = true, }, },
   },
  },
  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, },
   NameSet = true,
  },
  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, },
   NameSet = true,
  },
},
}


#6 lewin

lewin

    Member Pig

  • Adv Members
  • PipPip
  • 18 posts

Posted 20 June 2013 - 07:51 PM

I'd go with a pPointFforce next to the emitter. This way it's not necessary to use that large Sub-frame Calculation Accuracy.


cool !

#7 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 23 June 2013 - 01:00 PM

I'd go with a pPointFforce next to the emitter. This way it's not necessary to use that large Sub-frame Calculation Accuracy.

Nice idea!
I would limit the pForce with a region to avoid it's influence throughout particles' life.
You will need to increase the Accuracy anyway though (see the simulation from the side).

#8 Attila Sziklai

Attila Sziklai

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 178 posts

Posted 26 June 2013 - 06:57 AM

You will need to increase the Accuracy anyway though (see the simulation from the side).

I agree with that. But 3-4 samples is enough.
With the collision it's up to 10 samples because it calculates the bounces exactly on the surface (per samples) while with the force you still have the initial volume of the emitter as a spread.
And yes you have to limit the force indeed.

#9 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 26 June 2013 - 08:58 AM

Well, actually, if a particle is not directly on the surface of a pBounce region, it doesn't mean it won't be deflected.
I'm not sure how exactly Fusion calculates collisions, but it must have something to do with predictions based on the current velocity (if a particle is rushing towards a region at 3 units per sample and the distance to the region's surface is 2 units, then it's gonna hit the surface).
Strictly speaking, regardless the sampling rate, a particle will rarely be directly on the surface of a region, apart from any specifically designed case.

#10 Attila Sziklai

Attila Sziklai

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 178 posts

Posted 26 June 2013 - 03:57 PM

Yes you are right. It was a fallacy on my side. I thought that the huge subframe accuracy was needed because of the pBounce. Now I see that's not the case, Actually pBounce calculation is very accurate it seems.

#11 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 26 June 2013 - 04:58 PM

Threadjacking, but I wanted to talk to catch attention of some particle users....

Anyone experience particle "popping" in production shots? It looks as though the seed has been incremented or something. Just did a >48 hour render with more than 2 million particles and just discovered that there's a jump at frame 356 (out of 400). I'm trying to narrow it down, but I thought I'd ask around to see if other people had advice.

#12 Gringo

Gringo

    Associate Administrator

  • Adv Members
  • PipPipPipPipPip
  • 1,455 posts

Posted 26 June 2013 - 05:05 PM

I've had such bug rendering on a farm a couple of times, but never with local renders...
I would use particle caching to be on the safe side.

#13 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 26 June 2013 - 06:13 PM

I was using disk cache on the pRenders. The sizes of the .part files were all over the place though. Sometimes small, sometimes huge. Not sure why.

#14 SecondMan

SecondMan

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,797 posts

Posted 26 June 2013 - 06:20 PM

Same here, have seen it happen on farm renders but never locally and have never been able to isolate it...

#15 ChadCapeland

ChadCapeland

    Flying Pig

  • Adv Members
  • PipPipPipPipPip
  • 1,975 posts

Posted 27 June 2013 - 11:26 AM

Turns out the cache wasn't updating when the upstream tools were invalidated. So for any frame where the .part file existed rendered with one setting, and any frame where there was no existing .part file, the new settings were used. I didn't have the files locked or anything, it just didn't want to resave them. So the disk cache was actually the culprit here, not the solution.





Also tagged with one or more of these keywords: Tips, Particles, Gringo

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users