Houdini Crowds Differentiation between agent states

   1767   3   1
User Avatar
Member
3 posts
Joined: July 2018
Offline
Hi, I'm working on a multi-agent crowd setup and am wondering if anyone has any insight into how to properly alter clip settings when multiple agents have the same clip name?

for example, I have

AgentA --> walk

AgentB --> walk

Right now, if I add a crowd state called 'walk' to my crowd simulation both of the agent types work correctly with it. My issues is if I want to speed up the cycle for AgentA, and slow down the cycle for AgentB each in their own crowd state node how would I go about doing that? Currently I can only seem to change their properties together in the 'walk' agent state node.

I've been reading through the docs, and it seems like houdini understands that they are different cycles by pairing them with their agentname attribute?



On a previous project I worked on I noticed that one of my agents was importing it's cycle name using the full name of the bclip on disk - this would separate the cycles enough for me to modify their speeds independently, however with this new project I'm not sure how to get them to pick up the full bclip name at the agent load step - anyone have any ideas how you could trigger this?

eg:

'AgentB_clip.walk.bclip' instead of 'walk'



any help / insights much appreciated. Thanks!
User Avatar
Staff
727 posts
Joined: Oct. 2012
Offline
There are various approaches:
- If you want to change the names of the imported clips, there should be a filename pattern like `${CACHEDIR}/${AGENT}_clip.${CLIP}.bclip.sc` on the Agent SOP / Agent Clip SOP. Changing that to e.g. `${CACHEDIR}/${CLIP}.bclip.sc` should give you the clip naming style that you mentioned

- The clip name and state name don't need to be the same. You could create two different states (walk_a and walk_b) but set their Clip Name parm to just 'walk' rather than the default of $OS (the node name). You then just need to assign the initial state for each agent type.

- If you want to keep everything in one state, then you need to vary the clip speed multiplier per-agent. This could be done by turning on the Use VEXpressions parameter, or you could edit the speed multiplier attributes (`clipretimes` and possibly `locomotion_clipretimes`) in a POP wrangle below the state node.
Also note that some clip parameters could be set up with the Agent Clip Properties workflow (e.g. the gait speed, loop range, etc) but the clip speed multiplier isn't one of those options since it's more of a per-agent control than a per-clip control
User Avatar
Member
3 posts
Joined: July 2018
Offline
Awesome, thanks cwhite - this helps alot
Think I'll continue by setting the agent states in the crowd source to what I want them to be named, and then create the states in the dop with the state and clip names as you described
User Avatar
Member
28 posts
Joined: March 2016
Offline
Cwhite always droppin a knowledge bomb at you whenever there's a crowds question. Gotta love it!
FX reel https://vimeo.com/523174378 [vimeo.com]
  • Quick Links