Men-man

In this example, we want to simulate a big group of dynamic agents stick with and move along with the humanoid giant.


Samples Download

https://drive.google.com/drive/folders/0B2PLEY5qC5zkV3JfUFBDTGpqSFk?usp=sharing


Workflow

  • Prepare a humanoid giant model, simple bind skin and animate it. Notice the scale ratio between the giant and the crowd character.


  • Give it the average UV, this is the preparation for the follicle creation.
  • Create the hair on the giant, by selecting the faces of the object and then click create hair, like below method:

Select the faces > modify the option (At selected points/faces) > select the hair > delete hair and leave the follicles



  • Get the number of follicle, and create a default place node and make the agent number the same as follicle (get the follicles number by a simple python script)

  • Parent all of these agents separately into the follicles by python script


  • This script parents all agents into each of the follicle, and sets each agent translate/rotate to 0, it means clear the local transformation. This can bring each agent to the origin of each follicle.


  • But in above picture, you can see the agents are all standing there and no interesting. We need them lay down and randomize their orientations.
  • You can deplace all agents and re-place them again, and run the script some times again by modifying some of the randomize translate


  • Now the result can be more randomly instead of standing man.

  • Repeat above steps, we can even make each follicle contain more than 1 agent, and the result can be higher density.
  • In our test, 3 agents in each follicle can be get the best result and performance.
  • Important Note: please modify the code and make sure there is a distance between each agent, so that the won't collide each other

  • Return back to the 1st frame, and then select all agents, run inverse placement (Miarmy > Placement > Inverse Placement). We will get a new place node from agent positions and orientations.

  • Turn off auto avoid option (which it is enabled by default) 

  • Go to 1st frame and place agents, you can see below result

  • Create a logic which make our gents enable dynamics after 5th frame:
    1. scene Info > current frame
    2. dynamics > enable body dynamics (Or enable dynamics from leg and arm)
  • Important Notice: we need to setup the agent dynamics body very good before running the dynamics 5 Steps to Build Perfect Physical Character

  • Find a pose and render it as you with.

  • Please let us know if there is any questions.