Working packages on crowd simulation
Bibliography on Crowd animation (WP2)
The goal of this work package is to find how to simulate large crowds in a rather realistic manner. After a few researches we have noticed that the crowds can be divided into two types: moving crowds and motionless crowd. We have decided focus on moving crowds.
There are two major difficulties in the simulation of moving crowds. Firstly we have to generate the path that each person will follow. Then we have to coordinate the motions of the moving characters (its foots, arms, …) according to their speed, as well as the calculated path and the slope.
Generation of the path
The strategy used for the crowd simulation is the leasteffort approach given in PLE.\ In this algorithm each individual has an objective. The trajectory is optimised by computing the minimum energy cost in between the starting point and the arrival point (the objective). To find this minimum we use Euler’s method: at each time step we compute the minimum cost path on a small distance. The “far” trajectory is needed for this computation, and so we approximate it using a graph containing the allowed positions on the environment, the “far” trajectory is just a mincost path on the graph. By iterating, this method provides us a set of points that describe the path followed by each character.
This algorithm takes into account of the velocity of each character. And the velocities are chosen so that there is no collision between two characters, and between a character and the environment.
The reachable points on the environment are described by a level map, and by a set of polygons excluding some zones. A graph is used, as we said before, to approximate the remaining distances. Its edges are weighted by the distances between two points. Each character can go to different vertices.
In order to have an easy way to move large crowds (and not have to set individual objectives to hundreds of people) we decided to allocate to each set of characters a set of points of interest with a given probability to go to one of them. For the sake of simplicity, we will start with only one goal per character.
We also thought about how to take into account the altitude of the world. For example, if there is a mountain, it is sometime more efficient to bypass it. The idea we had for that is to modify the weight of the edges in function of the height of the point.
Motions of the characters
Simulating the motion of characters seems to be really difficult in Blender, and we did not really anticipate that this would be so difficult. As a result, Victor and Pijus have been finalising the bibliographical part for some time, even if the rest of the work package moved to the implementation part.
The first goal of this group was to find out what was already done in Blender concerning automatic walking. All Blenderrelated resources on walking animation are gathered on a webpageblwikiwalking. Walkomatic and stride addons were used in previous versions of Blender to “help to interactively design rough passes of a walk” and “quickly create cycles for background or extra characters”, however both are broken on Blender 2.7 (we are using Blender 2.76). Walkomatic was still working on 2.67 and parts of its script might be reused.
A more theoretical survey of Computer animation of Human walking can be found in th_walking, Victor did more research on this topic. However during the discussions we have decided that realistic motion itself is not our highest priority and we should start with a very basic motion that would not depend on some sophisticated properties of blender as this might make it incompatible with further versions.
Thus we have shifted our attention to the basic animations of walk cycles. To begin with, we have analysed lots of tutorials for blender character animation. The best detailed one is available on YouTube tuto_walk.
Now, after learning to create basic animations by hand, we are in the position to start coding: given the set of points we have to interpolate a path passing through them and make our character follow this path while adapting its speed between the points. During the last meeting we found out how to create a path we want.
There is a manual for Moving Objects on a Path available on Blender’s website manual_moving. There are at least three ways to move objects around, we will probably choose “The Follow Path Constraint” as it is the most conventional one, however “The Clamp To Constraint” is not yet ruled out.
Crowd plugin development (WP4)
Generation of the path
The algorithm of leasteffort approach is divided in many points.

Computing an approxiamation graph to give an indication of the distance remaning to travel to the goal of the individual. We englobe the whole ground zone with a grid of a given mesh to reprensent this graph.

Finding the exclusion zones that cannot be crossed by the individuals of the crowd. They will be given by a set of polygon that will be projet on the surface where the individual travel.

Computation of the authorised velocity field that will be collinsion proof. This will be done by an approximation algorithm that will represent the field by an intersection of halfplanes.

Computation of the best velocity to choose by doing minimum on a graph with the $A*$ algorithm to approximate the remaning distance after traveling during dt at this velocity.

Update of the graph with the attribution of a new weight on the edges: each character affect the weight of its neighbour edges to represent conjection. The way we will do this is still not fixed and will be decided by trying impericactly some ways.
We also started coding the classes that we will use (summarised on Figure [crowd_classes]):
 Graph

This class describes the graph that was set up, with a set of nodes and a dictionary of dictionaries of edges.
 Individual

This class describe an individual within the crowd. It includes the position, maximal speed, optimal speed, trajectory and some variables to compute the energy of the individual.
 Crowd

contains a set of individuals and the graph.
 Environment

gives the set of forbidden regions.
 Blend

These are the classes using Blender. They take the corresponding “nonblend” class and convert it into a Blender object, usable in Blender.
We also try to keep as much code as possible independent from Blender. It will lead to easier tests and a more portable code from Blender to another 3D software.
Motions of the characters
As stated in the paragraph [WP2_motion], the bibliographical work on the animation of characters was longer than expected and is currently being finalised: the implementation part has yet not begun.
References le jeu
Artist, Blender. n.d. “Blender Artist – Blender Wish List.” http://blenderartists.org/forum/showthread.php?382832Blenderwishlist.
Blend’it, WP0. n.d. “Blendit Website.” http://blendit.github.io/.
———. n.d. “Meeting Notes.” https://github.com/blendit/pib/wiki/Comptesrendus.
Chen, Guoning, Gregory Esch, Peter Wonka, Pascal Müller, and Eugene Zhang. 2008. “Interactive Procedural Street Modeling.” ACM Trans. Graph. 27 (3). New York, NY, USA: ACM: 103:1–103:10. doi:10.1145/1360612.1360702.
Crowd, Golaem. n.d. “Golaem Crowd Simulation for Maya.” http://golaem.com.
Foundation, Blender. n.d. “Blender Wiki – Animation of Objects.” https://www.blender.org/manual/animation/object_path.html.
———. n.d. “Blender Wiki – Ressources on Animated Walks.” http://wiki.blender.org/index.php/Dev:Ref/Requests/Animation2.6.
Génevaux, JeanDavid, Eric Galin, Adrien Peytavie, Eric Guérin, Cyril Briquet, François Grosbellet, and Bedrich Benes. 2015. “Terrain Modelling from Feature Primitives.” Computer Graphics Forum 34 (6): 211–27. doi:10.1111/cgf.12530.
Guy, Stephen J., Jatin Chhugani, Sean Curtis, Pradeep Dubey, Ming Lin, and Dinesh Manocha. 2010. “PLEdestrians: A LeastEffort Approach to Crowd Simulation.” In Proceedings of the 2010 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 119–28. SCA ’10. AirelaVille, Switzerland, Switzerland: Eurographics Association. http://dl.acm.org/citation.cfm?id=1921427.1921446.
Lague, Sebastian. n.d. “Video Tutorial: Blender Character Animation: Walk Cycle.” https://www.youtube.com/watch?v=DuUWxUitJos.
Marvie, JeanEudes, Julien Perret, and Kadi Bouatouch. 2005. “FLsystem : A Functional Lsystem for procedural geometric modeling.” Visual Computer, The visual computer, 21 (5). Springer Verlag: 329–39. https://hal.inria.fr/inria00461514.
Multon, Franck, Laure France, MariePaule Cani, and Gilles Debunne. 1999. “Computer Animation of Human Walking: a Survey.” Journal of Visualization and Computer Animation 10. John Wiley & Sons: 39–54. https://hal.inria.fr/inria00527534.
Rossum, Guido van, Barry Warsaw, and Nick Coghlan. n.d. “PEP8 Coding Conventions for Python.” https://www.python.org/dev/peps/pep0008/.
Smelik, R. M., T. Tutenel, K. J. De Kraker, and R. Bidarra. 2011. “A Declarative Approach to Procedural Modeling of Virtual Worlds.” Comput. Graph. 35 (2). Elmsford, NY, USA: Pergamon Press, Inc.: 352–63. doi:10.1016/j.cag.2010.11.011.
Software, Autodesk. n.d. “3DS Max Autodesk Software.” http://www.autodesk.fr/products/3dsmax/overview.
Software, Massive. n.d. “Massive Software.” http://www.massivesoftware.com/.
Vanegas, Carlos A., Tom Kelly, Basil Weber, Jan Halatsch, Daniel G. Aliaga, and Pascal Müller. 2012. “Procedural Generation of Parcels in Urban Modeling.” Comput. Graph. Forum 31 (2pt3). Chichester, UK: The Eurographs Association & John Wiley & Sons, Ltd.: 681–90. doi:10.1111/j.14678659.2012.03047.x.