This project offers a usage example of the physim library. In particular, it provides several example simulations showing how to use the steering algorithms for agents, for the ultimate purpose of simulating a crowd.
These simulations can be found in the subproject anim. These simulations are:
- Simulation 100: example of seek steering. See this video.
- Simulation 101: example of flee steering. See this video.
- Simulation 102: example of arrival steering. See this video.
- Simulation 103: example of collision avoidance steering. See this video.
- Simulation 104: example (1) of unaligned collision avoidance steering. See this video.
- Simulation 105: example (2) of unaligned collision avoidance steering. See this video.
- Simulation 106: example (1) of walk with me steering. See this video.
- Simulation 107: example (2) of walk with me steering. See this video.
- Simulation 200: A single agent follows a path from a dynamically loaded map. 'Dyanmically loaded' means that the user can provide their own map to the simulation. The start and goal points of the path are also given by the user. See this video.
The details on how each steering behaviour is implemented can be found in the documentation. of the physim library. The full details can be found in the code.
The models used, found in the directory characters/, were copied 'as is' from the cally demo, which can be downloaded in the main page of the Cal3d library. They are not part of the charanim project. No license was added to the directory as none was found in the file downloaded via that link.
For the sake of debugging and of embellishing a scene (as much as a computer scientist can), some simple 3d models were designed for such purpose. These are found in the models/ directory and are part of the charanim project, so the license in file LICENSE also applies to them (or at least, it should).
This project depends on several libraries:
See this for instructions on how to compile the physim library. If the physics-simulator project is not put in the same directory, and at the same level, as this then the .pro file needs to be modified appropriately.
It is strongly suggested that this project be compiled in release mode. It contains one .pro file grouping all these subprojects, which can be opened using the IDE tool Qt Creator. These .pro files need to contain, if necessary:
- The path to include the physim library, and to link against it.
- The paths to include the glm lbrary. The .pro already include the include paths to these libraries assuming a Linux environment in which these are installed in the system.
- The path to include the GL, GLUT, GLEW libraries.
All the .pro already have the paths to include and link againts these libraries assuming they are installed in the system.
In order to successfully compile the project, one can follow these intructions:
-
Create the makefile
qmake -makefile charanim/charanim.pro -o charanim-release/Makefile
-
Compile:
cd charanim-release/ && make && make
The fact that the command make has to be issued twice is that the charanim project has subprojects depending on other subprojects, in which the latter may not be compiled before the former.
The simulations listed above can be executed, after compiling, by navigating to the appropriate directory
cd charanim-release/
and executing
./anim id
where id is one of {100,101,102,...,107,200}, all the simulations available. Each simulation admits different parameters. They can be checked with:
./anim id --help
This repository contains the second Computer Animation course project, carried out during the first semester of the academic year 2018-2019. The course is part of the Master in Innovation and Research in Informatics (MIRI) curriculum.