Jump to content

Agents walking on a moving terrain?


Recommended Posts

Hi,

In a crowd simulation, I have agents "walking" on a moving terrain, the terrain is translating and rotating. In the crowdsolver I check "Enable Terrain Projection" and point to the terrain, but this does not work - to be more specific, this only projects agents on the terrain so they don't fly, but any terrain horizontal motion won't affect the agents and they would slide/penetrate the terrain if it moves or rotates. 

Is there any built-in feature in Houdini that handles this situation? If not, then I guess I could project the agents on the terrain the first time they are spawned, and then on each iteration I adjust the agents motion to accommodate for the terrain motion (e.g. compute terrain delta v or delta p and apply them on agents...)

Thanks,

Link to comment
Share on other sites

There isn't currently anything built into the crowd solver for this, but you're thinking along the right lines. I would use a pair of SOP solvers - at the end of the timestep, use a Ray SOP in minimum distance mode and record the primitive number and uv coordinates, and then at the start of the next timestep use the Attribute Interpolate SOP to move the agents to their new position.

  • Like 1
Link to comment
Share on other sites

Thanks cwhite :)  As per using Ray/Interpolate SOPs, where in the dop network I have access to per-solve or post-solve events? I could not find any similar stubs for these events in the "crowd solver" and "multi-solver" nodes? 

Thanks alot...

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