Moving particles along a path?

   35818   26   3
User Avatar
Member
112 posts
Joined: June 2008
Offline
Don't know if I'm approaching this right, but I'm trying to setup an everlasting stream of bullets entering a chamber. The bullets are on a belt, so I thought if I could create a steady flow of particles along a path I could copy the bullet to the particles. But I can't find a way to make a single stream of particles move along a curve.

Anyone got any ideas?
User Avatar
Member
7717 posts
Joined: July 2005
Offline
Creep POP.
User Avatar
Member
112 posts
Joined: June 2008
Offline
Thanks Edward.

I had tried the creep POP, but the particles were just appearing at the end of the path and not sliding along it. (I used the slide option btw) Seemed a bit uncontrolled.

I used a simple setup to test… particle location, changed the velocity to 1 and removed the spread by zeroing out the controls below it. Attached a creep node and changed to slide. Selected my re-sample sop from the drop down menu. Shoud I have added or changed something else?
User Avatar
Member
7717 posts
Joined: July 2005
Offline
Take a look at the example files in the help.
User Avatar
Member
112 posts
Joined: June 2008
Offline
Thanks… I forget that the help file is stocked full of examples!
User Avatar
Member
112 posts
Joined: June 2008
Offline
I took a look at the examples, but unfortunately the one I wanted to look at doesn't work - I just get an error message.

I've tried again using forces and creep, but again it fails to travel along the path correctly. Maybe a bug?

I've attached the scene file - its most probably pilot error, but maybe you could take a look and point out where I've gone wrong?

Thanks

Attachments:
ParticlesAlongSpline.hipnc (54.1 KB)

User Avatar
Member
7717 posts
Joined: July 2005
Offline
I think you're misunderstanding what the Creep POP does. It allows you to set the position of the particle explicitly, every frame. So the Drag and Force POPs have no effect. Secondly, you need to tell the Creep POP what u (or v in the case of surfaces) position you want to place the particle every frame. In the attached file, I just modified the $POSUVU expression to ($FF-1)/120 so that it varies linearly from 0 to 1.

Attachments:
particlesalongspline_207_fix.hipnc (56.0 KB)

User Avatar
Member
112 posts
Joined: June 2008
Offline
Thanks Edward!

Yep I did misunderstand. ops:

Thanks for the file - I'll be able to try it later on
User Avatar
Member
112 posts
Joined: June 2008
Offline
I had a play with your fixed scene and its pretty much what I need. However i need to modify the expression so that every new particle is born from position 0 and then travel up the spline. So think I would need an expression that says:

“If the particle age is 0 then its position on the U is 0 otherwise its position is equal to the frame no/total frames”

I'm still learning the expression functions, so I'm a bit lost on how to write this in the channel box.

Do you think my approach will create the desired effect?
User Avatar
Member
7717 posts
Joined: July 2005
Offline
Oops, I forgot you had more than one particle. Try $AGE/5
User Avatar
Member
112 posts
Joined: June 2008
Offline
hehe…yeah thats the one!

I definitely need help thinking through expressions though, as I was making it far more complex than it needed to be! :?

Thanks for that Edward
User Avatar
Member
112 posts
Joined: June 2008
Offline
I nearly got everything working thanks to all your help - Cheers!

One last question if I'm allowed

It seems the sweep sop doesn't work with a popnet so I need to use a copy sop to attach geometry to the particles. How do I orient the geometry to align with the motion of the particle normal direction?
User Avatar
Member
1145 posts
Joined: July 2005
Offline
stevecullum
I nearly got everything working thanks to all your help - Cheers!

One last question if I'm allowed

It seems the sweep sop doesn't work with a popnet so I need to use a copy sop to attach geometry to the particles. How do I orient the geometry to align with the motion of the particle normal direction?

Orient your original geometry primitive along its Z axis, should do the trick.
“gravity is not a force, it is a boundary layer”
“everything is coincident”
“Love; the state of suspended anticipation.”
User Avatar
Member
112 posts
Joined: June 2008
Offline
Thanks! - but its not quite working. I probably messed something up :roll:

I've attached a test of what's happening right now. I just need the tubes to align to the rotation of the particles as they move down the wire.

Attachments:
test.jpg (66.6 KB)
Bullets_Test.zip (1.2 MB)

User Avatar
Member
606 posts
Joined: May 2007
Offline
This has been most helpful for me regarding alignment issues: http://www.sidefx.com/components/com_forum/files/instancing_273.jpg [sidefx.com]

eetu.
User Avatar
Member
7717 posts
Joined: July 2005
Offline
You need to override velocity as well using the curve's tangents.

Attachments:
bullet_curve.hipnc (58.0 KB)

User Avatar
Member
112 posts
Joined: June 2008
Offline
Thanks for the link eetu!

So should I be copying the original curves tangent values or be using the particles tangents?

I have to confess to being a bit dim with all this. I'm used to clicking a button - ‘follow path’ - I guess with Houdini you actually have to understand whats going on! ops:

Do I need the attribute tansfer SOP to copy the normal data to the instances?

EDIT: Doh! - only just saw the attachement Edward - thanks!
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
I posted a simple example of having particles following a curve inside POPs here:

http://forums.odforce.net/index.php?showtopic=7394&view=findpost&p=49434 [forums.odforce.net]


-jeff
There's at least one school like the old school!
User Avatar
Member
112 posts
Joined: June 2008
Offline
I've looked at the bullet_curve example file and its doing exactly what i wanted to happen - so thanks for your help again here.

I looked up in the help what primduv does and sadly I dont understand the explanation. I need to somehow wrap my head around this kind of stuff, so in the future when another issue presents itself I know what I'm supposed to be typing into these channels!

Is there anywhere I can get an idiots guide to Houdini expressions?!!
User Avatar
Member
78 posts
Joined: April 2008
Offline
I've been following this as well, interesting problem. If you're basing it on age how could you start and stop the flow based on the firing of the machine gun?
http://www.elementvfx.com [elementvfx.com]
  • Quick Links