Jump to content

Learning Crowds


haggi

Recommended Posts

Hi,

I try to learn how Houdinis crowd simulation tools work. Before I start with a rigged character, I'd like to understand how all the basics work with a very simple setup. Thanks to Atoms nice tutorial (

), I did a setup for a simple box. The boxes are wandering over a hilly ground. All I want at the moment is that the boxes should be oriented along the normal of the ground, how can I do it? 

The simple file is attached.

crowd.hiplc

Link to comment
Share on other sites

Dive into your crowd_sim and select the crowdsolver1 node.

Activate the Terrain tab and type /obj/ground/mountain1 into the SOP path.

If you have a different named terrain simply use the Browse button to select the terrain mesh directly.

Either way you will get a path.

 

You could also just delselect all while at the OBJ level and use the Crowd Terrain shelf tool.

Click that and it will invite you to select the terrain object and press ENTER.

 

The tool just populates the Terrain SOP path for you.

Edited by Atom
Link to comment
Share on other sites

Thanks Atom,

my problem is not to use a terrain object, but the orientation of the agents. They follow the profile, but they do not follow the slope of the ground, they are always horizontally oriented. I'd prefer if they bank if they climb a hill.

Link to comment
Share on other sites

The terrain adaptation was designed for characters in mind which don't have such a simple way of following terrain. For something simple like this, the easiest way is as a post process. Append an Attribute Wrangler after the crowd_sim_import SOP and do: (ensure you have Terrain Projection enabled in the Crowd Solver DOP, but Terrain Adaptation DISABLED)

p@orient = qmultiply(normalize(dihedral({0,0,1},normalize(v@heading))),
                     normalize(dihedral({0,1,0},normalize(v@terrainnormal))));
Link to comment
Share on other sites

I tried setting up the HIP and Feet on bretik's original file and it does not work. I believe the crowd system has issues with non biped agents. That is why I mentioned the particle approach in the other thread.

It is still possible if someone can figure out the math. Basically we need an orientation formula based upon the normal of the terrain. A VEX math wizard.

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