Adding agentsΒΆ

After you have configured your models and variables you are ready to add agents to the scene. Agents are like actors - placeholders. They connect the model and its behavior.

Adding agents

There are several ways to add agents to your scene:

  • You can add one agent.
  • You can add several agents using a plane.
  • You can add several agents using a circle.
  • You can add several agents using a triangle.
  • You can add several agents in a grid formation.
  • You can add several agents using a mesh.

You can have several of these distributions in your scene. Each distribution is identified by an Agent Factory object.

Where

You can add agents by pressing SHIFT + A, select Crowd Sim from the menu and then select a distribution.

../../_images/crowdsim-menu.png

Just an agent

When selecting this option an agent will be added to your scene.

../../_images/1-agent.png

Several agents using a Plane

With this option the agents will be added in a plane. You can scale the plane to fit the area you want the agents to be placed in.

../../_images/agents-plane-500x492.png

Several agents using a Circle

With this option the agents will be added in a circle. Scale the circle to fit the area you want the agents to be placed in.

../../_images/agents-circle-500x500.png

Several agents using a triangle

With this option the agents will be added in a triangle. Scale the triangle to fit the area you want the agents to be placed in.

../../_images/agents-triangle-500x500.png

Several agents using a grid

With this option the agents will be added in a grid formation. You can set the number of columns, rows and distance between the agents.

../../_images/agents-grid.png

Several agents using a mesh

With this option the agents will be added using an mesh. You can attach you own mesh to the factory.

../../_images/agents-mesh.png

Setting the number of agents

In the Object menu you will find a CrowdSim section.

Here you can set the number of agents for your scene.

../../_images/crowdsim-num-agents600x67.png

Select a distribution pattern

../../_images/num-agents-dist-pattern600x127.png

In the CrowdSim panel you can also select how you want your agents to be placed within the distribution:

  • Random: This pattern will randomly place agents on a plane, circle or triangle.
  • Grid: This pattern will place agents randomly using a grid.
  • Quincunx: This pattern will place agents randomly using a quincunx.
../../_images/dist-pattern-menu.png

Grid distance

With this option you can set the distance between the agents.

../../_images/crowdsim-num-dist-grid600x160.png

Lock Location and Rotation

If you have already set up your scene with agents and you want to add more agents, with this feature you can configure that the distribution settings are only applied to the newly added agents.

Locking the location and/or rotation will not change the location or rotation of the agents already in your scene.

../../_images/crowdsim-num-dist-random-lock600x240.png

Random Location

If you want to scatter the agents around their location you can use the Random Location feature. The location of every agent will be offsetted with these values.

Facing Direction

This field sets the direction that the agents should face. This field contains two lines:

  • With the 1st row you set the facing direction of all agents.
  • With the 2nd row you set the random factor within the facing direction.
../../_images/crowdsim-num-dist-random-lock-facing600x320.png

Random location

In the case of a Grid or a Quincunx distribution pattern you can also set the randomness in one of the axis.

../../_images/crowdsim-num-dist-grid-lock600x373.png

Instantiate agents

If you set one of the above fields the set of agents is automatically updated. However if you are not satisfied with how the agent distribution is rendered you can render another distribution by pressing this button.

../../_images/crowdsim-num-dist-random-lock-facing-instantiate600x360.png