animation for virtual characters; or explore new user inter-
action techniques, such as sketching, augmented reality, and
natural language. Differing from them, WebCrowds provides
information on the constructed environment and the simulation
run, allowing users to evaluate trajectories and densities of
virtual agents and make any adjustments desired.
III. PROPOSED MODEL
In this section, we present WebCrowds, an authoring tool
for crowd simulation which can be used by anyone to build
environments and simulate the movement of virtual agents.
Next, we present the main elements of our model.
A. System Architecture
Figure 1 presents an overview of our proposed model, which
is available online and can be accessed through a Browser2.
Inside WebCrowds, the users can create an environment by
adding, positioning, and editing objects. In the bottom right
of Figure 2(a), highlighted in purple, it is possible to see the
Objects that can be used, namely: Agents, Goals, Obstacles,
and Presets. More details about these objects are going to be
provided in Section III-B.
Following the pipeline presented in Figure 1, when the user
opens WebCrowds in their Browser, they have access to the
Editor, where the Scene can be edited to be then simulated.
Once the agents, goals, and obstacles are included, the user
can run the simulation. When the user runs the simulation,
the Request Controller gathers information about the Objects
in the Scene (e.g. their positions and properties) and sends
a request to the Server (Send Request). In its turn, when the
Server receives a new simulation, it triggers its own Routine. In
short, the Server executes the simulation with the parameters
sent from the Browser and, once it is finished, generates
the results. More details about the Server are provided in
Section III-C.
The results are generated and sent back to the Request
Controller (Receive Response), which will display them in
the browser (Simulation Results). These results are comprised
of three metrics: a Density Map (which shows the density of
agents during the simulation), the Agent’s Trajectories (which
shows the trajectories of each agent), and the Simulation Time.
Finally, In Figure 1, it is possible to see that the Server (on the
right) also connects with a Database. It was done to overcome
request timeout issues, which would prevent the simulation
from finishing.
B. Editor
In this section, we describe the three main elements of We-
bCrowds: Objects, Object Actions, and General Actions. All
three can be seen in Figure 2(a), highlighted in purple (bottom
right), yellow (bottom left), and blue (top), respectively.
2WebCrowds is available at: https://vhlab.com.br/projects/webcrowds/.
1) Objects: In WebCrowds, the users can deal with four
types of Objects: Agents, Goals, Obstacles, and Presets. All
of them can be seen in the bottom right of Figure 2(a),
highlighted in purple. These objects can be positioned within
the scene’s environment and are detailed next:
•Agents: Allows the creation of agents spawn areas, repre-
sented as blue squares in the central region of Figure 2(a);
•Goals: Allows the creation of goals for the agents to
achieve, represented as green circles in Figure 2(a);
•Obstacles: Allows the creation of obstacles in the envi-
ronment that should be avoided by the agents, represented
as red squares in Figure 2(a); and
•Presets: Allows the user to load built-in scenarios into
the environment. Presets behave as a set of Obstacles
that can’t be modified. We modeled five possible presets,
as presented in Figure 2(b).
2) Object Actions: In WebCrowds Object Actions are sim-
ply the actions that users can perform with Objects. The users
can control four types of Objects Actions: Create, Remove,
Move and Edit. All of them can be seen in the bottom left of
Figure 2(a), highlighted in yellow, and are detailed as follows:
•Create: Allows the creation of any type of Object (i.e.
Agent, Obstacle, Goal, or Preset);
•Remove: Allows the removal of Objects present in the
environment;
•Move: Allows the user to move any Object present in the
environment, positioning it where he/she sees fit; and
•Edit: Allows the user to edit any Object present in the
environment. The editable options depend on the type of
Object. When editing an Agents object, users can change
the number of virtual agents to be spawned in that area,
as well as the Goal that these agents want to reach. When
editing an Obstacle, the user can change its size and
rotation. Goals and Presets have no editing options.
3) General Actions: In WebCrowds we have five General
Actions: Save Scene, Load Scene, Run Scene, Camera Control
and Reset Scene, as next detailed. All of them can be seen at
the top of Figure 2, highlighted in blue, where the Recycle
Bin icon represents the Reset action.
•Save Scene: Allows the user to save the current envi-
ronment into her/his computer/device. All the Objects
present in the environment are saved into a JSON file
and can be used in later simulations;
•Load Scene: Allows the loading of a JSON file from the
user’s computer/device. Ideally, this JSON file is the same
one that was generated with the Save Scene action, but
any JSON file can be used as long as it follows the same
information pattern;
•Run Scene: Sends a request to the Server to run a
simulation with the environment built;
•Camera Control: Allows the user to perform some actions
concerning the camera, such as Movement (with WASD
keyboard keys), changing the Camera Speed (as shown
in Figure 2(a)) and Zoom in/Zoom out (using the mouse
wheel); and