How to make particles flow along a spline? Old question.

   44971   33   4
User Avatar
Member
74 posts
Joined: July 2005
Offline
He he he!
I hope it will answer your problem but this can be achieve in a both simple and easily controllable way.
Create a splineSOP,
create a tube from it with a CircleSOP cross section and Sweep-Skin.

Create a unidirectional particle system, that is for example an emitter like a disk with velocity= constant.

Now use the Creep SOP with the particle network and the tube: to fit your particles to the tube ( to a volume, and not to a surface) (Think about the CreepSop like a deformation of the three dimensional space)
You may have to choose a good direction for the velocity ( x, y, z),
maybe swap U and V on the tube with a reverseSOP, but it finally works.

You can adjust the size of each instanced circle along the curve ( as in Maya) with a TransformSOP, the resut immediately updates.
Keyframing the motion of the particle is made upstream in the POPnet for example and is not difficult.
User Avatar
Member
412 posts
Joined: July 2005
Offline
Yours and Gene's efforts are the proof.

just because you probably didn't spend more than 5 min with either solution, doesn't mean they don't work..

i already said that mine wasn't the perfect particle simulation.. i don't have time to go and create that for you. i said it was an example of how particles can go along a path through the method that alex mentioned earlier.. we both even said that this method involves some time to get the right balance between forces and attractions and everything. it will take some finessing…

Becouse I do not see the particles flowing along a curve at all

Is the curve sop footprinted at all? try footprinting that while the popnet is visible. You will see the stream of particles going along that curve. they start to get confused around frame 800, but up until then they are moving around that curve. If you don't want them to be confused, then play around with some more options..if you want them to spread out more, then play around with some more options..

You are emitting points from a Circle_SOP but the stream is NOT circular.

like i said before…the circle sop is a primitive so it only contains one point to emit from.. change it to poly's if you want it to be circular.. have the particles source from anything for all i care..

But what is controlling the speed of the particle, since Inherit Velocity in Source1_POP shouild only give you 0 velocity. You are using the Attractor_POP to attract the particle, but I don't understand how its attracting and to what?

i dont need any initial velocity because each point is attracting the particles to it. each point along the curve is acting as a radial attractor because of the point sop and the attractor pop.. if you want to see those circular attractors, check ‘show attractor radius in guide’ in the attractor pop. this will show you the attractor radius set at each point…

What is the Drag_POP being used for, and how?

i used the drag pop to add drag to my particles. this way they won't shoot really far off around corners..

if you want to mess around with some more things then change the circle source to poly's or something.. add an interact pop.. mess with some noise in the attractor or in more appended forces.. crap, skin the curve they are supposed to follow and use that as a collision so that if they get too far off the curve, they will hit the surrounding tube… you can do a million things to this, just dont expect them handed to you…


and i got the script from gene and i think it's a wonderful solution..worked great for me..
Dave Quirus
User Avatar
Member
436 posts
Joined: July 2005
Offline
Well I dunno! Becouse I don't see this method working. There is no particle flow of any kind along the curve. All I see are few particle points flying around the scene with motion that has nothing to do with the shape of path curve. Its your example, so I don't understand how its working for you, becouse there is no curve flow motion.
I am not getting anywhere with this.
Is such a simple concept. Emit particle from a circle surface to form a particle stream with circular cross-section. Conform the stream to an arbitrary curve.
The POPnet should be Source -> PositionPOP (path option) with animated Position channell.
Why this does not work is beyond me!

DR
User Avatar
Member
436 posts
Joined: July 2005
Offline
He he he!
I hope it will answer your problem but this can be achieve in a both simple and easily controllable way.
Create a splineSOP,
create a tube from it with a CircleSOP cross section and Sweep-Skin.

Create a unidirectional particle system, that is for example an emitter like a disk with velocity= constant.

Now use the Creep SOP with the particle network and the tube: to fit your particles to the tube ( to a volume, and not to a surface) (Think about the CreepSop like a deformation of the three dimensional space)
You may have to choose a good direction for the velocity ( x, y, z),
maybe swap U and V on the tube with a reverseSOP, but it finally works.

You can adjust the size of each instanced circle along the curve ( as in Maya) with a TransformSOP, the resut immediately updates.
Keyframing the motion of the particle is made upstream in the POPnet for example and is not difficult.


OK I did that, but what script should I put into PrimNumber and PrimU/V channels. Also whether with Stick or Slide options, there is no apparent way to place particles inside the volume, only along the surface. So I am confused as to how to interpret your suggestion. I hate this proppellerhead stuff. I am always left with What now? and What the heck does he mean by this?
User Avatar
Staff
4438 posts
Joined: July 2005
Offline
This method does everything within POPs. It is quite similar to the sweep/creep method:

1. Start Houdini, and delete all objects.
2. Create three geometry objects, “source”, “path”, and “particles”. Delete all the default File SOPs.
3. In source, create a circle, in the ZX plane.
4. In path, create a nurbs curve which starts near the centre of the circle and goes wherever.
5. In particles, create a POP Network and dive in.
6. Create a source POP, feeding into an attribute POP, feeding into a Position POP.
7. In the Source POP, set the SOP parameter to “/obj/source/circle1”. Set the Emission Type to “Surfaces (random)”. Set the Birth Group to “newparticles”.
8. In the attribute POP, set the Source Group to “newparticles”, the Name to “startpos”, the Size to “3”, and the Value to “$TX”, “$TY + rand($ID)”, and “$TZ”.
9. Here's the slightly ugly part. In the Position POP, enter the following expressions for Position (note we are on the “Position” page, not the “Path” page:
$STARTPOS1 + primuv(“/obj/path/curve1”, 0, “P”, 0, $AGE/10, 0)
$STARTPOS2 + primuv(“/obj/path/curve1”, 0, “P”, 1, $AGE/10, 0)
$STARTPOS3 + primuv(“/obj/path/curve1”, 0, “P”, 2, $AGE/10, 0)

Tada! Particles following a path. Play with the “$AGE/10” value to specify the rate at which the particles move. You may also want to resample your curve if necessary (so the particles travel at a roughly constant speed). You can also introduce some noise into the the “$AGE/10” (something like “$AGE/(10+rand($ID)”) to have each particle move at a slightly different rate.

Also this method does not currently calculate velocity. You can do this either using a Cache SOP at the SOP level or by adding a Velocity POP which sets the velocity to something like:
primuv(“/obj/path/curve1”, 0, “P”, 0, $AGE/10, 0) -
primuv(“/obj/path/curve1”, 0, “P”, 0, ($AGE - 1/$FPS)/10, 0)
But if you do that you may also want to add a state POP to set the particles to be “Stopped” so that the POP system won't move the particles according to this velocity (because your Position POP puts them exactly where you want them already).

Mark
User Avatar
Member
27 posts
Joined: July 2005
Offline
just thought I'd throw my solution into the ring…

The basic method relies on just a spline, a Source POP, a Force POP, and a Speedlimit POP. Since this requires large force coeffiecients to accurately follow the spline around corners, I've also provided a Sweep SOP/Collision POP slide that you can activate in the POPnet.

let me know if it doesn't work for you guys. Last time I posted a hipnc file the intended recipient couldn't open it. It was made in 6.1.114 NC under win2k.

Mike

http://www.odysseus.anderson.name/mikela/Houdini/StrawParticles2.hipnc [odysseus.anderson.name]
User Avatar
Member
74 posts
Joined: July 2005
Offline
Ok, i give you the file ( i wanted to make a tutorial from it, that explains the name).

Just Download it here : http://davidgary.free.fr/tutoriel.hipnc [davidgary.free.fr]

I used that and a little bit of VEX to flow along l-system.
User Avatar
Member
1192 posts
Joined: July 2005
Offline
There is a step by step tutorial on this site, in the Community section

http://www.sidefx.com/community/learn/effects/index.html [sidefx.com]

Look for pops_followpath.pdf. It's for an older version of Houdini, but I don't think this would be a problem.

Dragos
Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
436 posts
Joined: July 2005
Offline
OK! Got it working.
Thanx all.

DR
User Avatar
Member
948 posts
Joined: April 2008
Offline
I am looking for this “pops_followpath.pdf” and I couldn't find.

Could someone give me some directions to find it

thanks.
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
1631 posts
Joined: July 2005
Offline
Hi,

You can search with “particle path” as the keywords and check “Search for all terms”. You should get plenty of hits.

Cheers!
steven
User Avatar
Member
948 posts
Joined: April 2008
Offline
I am using position pop to make my particles flow along curve and also added a position pop to offset the particles from the curve, this is working fine but since this does not calculate velocity I need some help to make velocity work inside the pop net because I am trying to use instances to rotate according to it.
I can make it work with trails but I just work outside the popnet, any tips on how I can make velocity work inside popnet?

Sorry the bad english.
Edited by - May 29, 2009 11:37:52
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
948 posts
Joined: April 2008
Offline
Anyone? :roll:
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
948 posts
Joined: April 2008
Offline
I figure it out.

Thanks.
https://vimeo.com/user2163076 [vimeo.com]
  • Quick Links