Jump to content

Crowd simulation Velocity


Recommended Posts

Hi,

I've been trying a couple different methods of introducing a start/stop dynamic to a crowd simulation.

In the case of a simple walk cycle I want to be able to make the agent come to a full stop (Freezing at its current cycle time), and then after a certain amount of time return to its cycle.  I was hoping to avoid using a transition network and zones in favor of a more procedural and random start/stop time by directly controlling the velocity.

I'm currently setting my clip to use 'in place' as I believe this gives you more control over the velocity instead of 'locomotive'?

I was checking out a couple tutorials that set the velocity to 0 in a popwrangle, but have been running into issues getting it to actually work - it seems like the crowd simulation ignores when I override the velocities to 0?

v@v = (0,0,0);

Will this method or something similar to it work?

Link to comment
Share on other sites

I think you have to turn off Limit Particle Speed to Gait Speed Range as well, if you want to manually manage velocity. That is located on the Crowd State node.

Edited by Atom
Link to comment
Share on other sites

Thanks Atom, I ended up messing around with and without that setting

seems like if I disable 'Limit Particle Speed to Gait Speed Range'  the agents all will start at their initial velocity from the crowd source, and then slowly reduce to zero.  Was also finding that if I added in obstacles and wanders that the agents would suddenly go to warp speed because there was nothing constraining their velocity.

so for my best results have come from re-enabling the limit particle speed checkbox, and setting the allowed variance on the gait speed to 110%.  Then I'm running some really rough vex in a popwrangle to try and freeze/unfreeze over time which is getting some ok results.  

f@freeze = abs( sin(0.5 * @Frame * rand(@ptnum) ) );

if(@freeze < 0.5){
	v@v = v@v * @freeze;
    i@froze += 1; 
}

 

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...