Skip to content

Tutorial ‐ Step 1

ptaillandier edited this page Jan 24, 2024 · 20 revisions

Step 1: generation of the GAMA VR model

Creation of the project

Create a new GAMA project, then copy inside in this project the folders "models" and "includes" from "Toy Models/Traffic" of the model library. In the "model" folder, delete all the models except "Traffic and Pollution.gaml".

Generation of the VR model

Open the "Traffic and Pollution.gaml" model in the editor, then, select in the "Unity VR" menu "Model to VR". A Wizard should open.

Page 1 - Define the general information to define the VR experiment

  • Minimum duration of a cycle (in s): keep default value at 0.05. This represents the minimum time between two simulation steps. As GAMA will be sending information to Unity at each simulation step, setting a minimum value for this variable ensures that the Unity client doesn't receive too much information too quickly.

  • Main experiment: name of the experiment, which will be extended to include a VR version. In the case of the model used in this tutorial, only one experiment is defined ("traffic"), which will be extended.

Page 2 - Define the information about the display

  • Main display: name of the display, which will be extended to include a VR version. In the case of the model used in this tutorial, only one display is defined ("carte"), which will be extended.

  • Display to hide: displays that will not be displayed in the experiment. In this tutorial, we don't want to have the "carte" display, so it must be checked.

Page 3 - Define the agents and geometries to send

  • Species to be sent to Unity: select the agent species to be sent to Unity at each simulation step. To be more precise, at each simulation step, the position of each agent of these species is sent to Unity. You can filter the list of agents to be sent, to ensure that only non-overlapping agents and those too far from the player are sent. In this tutorial, we will only send mobile "people" agents (only check this species).

Page 3 - Define the information background geometries (2/2)

Species to be sent to Unity as static geometries: select the agent species to be sent to Unity as static geometries (sent only once at the start of the game). For each species to be sent, it is possible to define whether these geometries will have a collider, will be 3D or not, will be selectable (i.e. the possibility of defining an interaction with them), the buffer around the geometry, the height of the geometry (only for 3D geometries) and finally a "Tag" to identify the current type of geometries in Unity. In this tutorial, we'll send as static geometries the building species (with no collider, in 3D, non-selectable, with a buffer of 0.0, a height of 10m and no tag). We'll also send the road species (with a collider, not in 3D, selectable, a buffer of 2.0 and for the tag "intractable").

Clone this wiki locally