Jump to content

Flocking Particles Orientation To Leader


RickWork

Recommended Posts

Hello,

I posted this on the mailing list but I thought I'd try here as well.

I'm working on a flocking particle sim using the follow pop. It works pretty good but it seems that all the "follower" particles orient themselves to the leader particle at the same time. The behaviour I'm looking for is more like a school of fish.

I'm wondering if there's a way to prevent all the "follower" particles to turn at the same time.

Just thinking out loud here, maybe I need each particle to follow the particle just infront of them? I looked at the proximity pop but that doesn't tell me what particles is infront of them just what's around them.

Any thoughts you could offer wouid be much appreciated.

Cheers,

/Rick

Link to comment
Share on other sites

I haven't played with pops much but it seems like you can specify multiple leaders in the right input, you could proably feed several leaders into a switch if you wanted and use an expression to assign differernt leaders to different particles. You could also run multiple, similar sims, simultaneously using different leaders in each sim. Another option is to take the sim into SOPs and use a point SOP to modify the normals on the particles a tad.

Link to comment
Share on other sites

Thanks Mike for your response and ideas.

After 74 views and no hits, I started thinking my question was either too dumb, too difficult or too vague ;)

As it turns out, I did find a way to do this but in maya and xsi. It's quite simple really, soo simple that I can't do it in houdini :unsure:

Basically what I did in maya/xsi was create an an object that moves along a path. I then made this a cloth object so that it deforms as it goes through turns and stuff.

Finallly I made this cloth object the goal for my particles, after a few quick adjustments, the particles will chase after this cloth object point for point. So if i have 300 pts in the cloth object, I'm birthing 300 particles to chase it. The nice thing is I can ajust the weight of the goal effect and can have the particles follow closer or further away...

Most importantly, since each particle is assigned 1 point to "chase", they all have slightly different movement and orientation as the cloth object deforms. This is something I could not get from the follow pop in houdini.

For the shot I'm working on, this method looks good.

The problem is, I can't this behavior in houdini.

I have attached a hip file where I tried to do the same thing with either an attractor pop or a follow pop. For me the problem with the attractor pop is that the particles become a jumbled mess trying to reach the attractor instead of chasing the attractor pts.

I have adjusted the attractor object's point sop forces endlessly resulting in more jumbled mess.. help!

For the folllow pop, it seems that no matter what I do, the folllowers will only follow 1 point, even if I create a leader group with 300 points!

If anyone has a spare moment to look at the attached hip and possibly offer suggestions, that would be great.

Finally, thanks to all who read this far.

Cheers,

/Rick

Chase_Mesh_Pts_with_some_lag.hip

Link to comment
Share on other sites

Looking at the follow POP in your file, you do actually have 300 leaders, but they all happen to be at the same position. This is because your position POP uses the point number of the particle to query the position. Unfortunately the order of operations imposed by the collect POP causes your leader particles to start at point number 300.

There are ways to avoid this problem. For example, you could reverse the order of the inputs to the collect POP. Or you could add the origin attribute in your leader source POP and use that instead of the point number in the position POP.

Hope that helps.

Link to comment
Share on other sites

There are ways to avoid this problem.  For example, you could reverse the order of the inputs to the collect POP.  Or you could add the origin attribute in your leader source POP and use that instead of the point number in the position POP.

I didn't know that the order of inputs mattered in the collect POP, I thought it was more like a merge. Interesting.

Cheers

Link to comment
Share on other sites

hi.. not much help but have you checked out the example files form Help Card?I remember playing with Flocking Particles scene file from OP example.

24822[/snapback]

Sadly, the help browser is not working properly on my system. I can't search or if I get the helpcard for the ops, I can't load any of the examples.

I think I have to either change distros or move to a different build of houdini. I haven't had a spare moment to do either. I'm using the old legacy pdfs.

for the long weekend, I'll probably try to get the online help working at home.

Cheers

Link to comment
Share on other sites

I didn't know that the order of inputs mattered in the collect POP, I thought it was more like a merge. Interesting.

24819[/snapback]

POPs, unlike SOPs, do not generally maintain any local state. Rather, POPs apply operations to the previous state of the simulation. In SOPs, a merge will combine distinct geometries and generally have no impact on the data feeding into those nodes. There is no parallel to this in POPs.

The geometry context, in the case of POPs, is associated with the simulation, not the individual operators. POPs that generate particles do so within this single context. This makes the order that POPs execute in very significant.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...