-
Notifications
You must be signed in to change notification settings - Fork 2
Tutorial ‐ Step 1
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".
Open the "Traffic and Pollution.gaml" model in the editor, then, select in the "Unity VR" menu "Model to VR". A Wizard should open.
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.
In this tutorial, we will set the value to 0.1.
Name of the experiment, which will be extended to include a VR version.
In this tutorial, we will extend the only experiment defined: traffic.
Name of the display, which will be extended to include a VR version.
In this tutorial, only we will extend the only display defined: carte.
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.
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).
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), a "Tag" to identify the current type of geometries in Unity, and finally a color used to display them in Unity.
In this tutorial, we'll send two static geometries:
- the building species, with no collider, in 3D, non-selectable, with a buffer of 0.0, a height of 10m, no tag, and #black color.
- the **road **species with a collider, in 3D, selectable, a buffer of 2.0, a height of 1m, for the tag "intractable", and #gray color.
How many players are required to run the simulation.
In this tutorial, we'll set this to 1.
Does an unlimited number of players can connect to the game?
In this tutorial, we'll check this option.
If the model/game has a maximum number of players, what is this maximum number (it must be greater than 0).
In this tutorial, we'll set it to 1 to limit the number of players to one.
Sets the initial location of the players.
In this example, we'll set it to {1000,1000}.
If this option is greater than 0.0, it filters the agents to be sent to Unity, sending only those agents that are at a distance less than or equal to the perception radius.
In this tutorial, we'll leave the default value (0.0) as we don't wish to filter the agents sent to Unity.
If greater than 0.0, this option filters the agents to be sent to Unity, so as to send only those agents that are too close (distance greater than this minimum distance).
In this tutorial, we'll leave the default value (0.0) as we don't wish to filter the agents sent to Unity.
Player display size in GAMA.
In this tutorial, we'll set it to 20.0.
Player display color in GAMA.
In this tutorial, we'll set it to #red.
You can then click on finish to generate a new file: "traffic_model_VR.gaml", which will be used to launch the VR version of the model (experiment vr_xp). If the experiment does not appear, simply close the file and reopen it for GAMA to validate the file.