In the Spring semester of 2004, I participated in a directed study with Michael Gleicher. This is a summary of what I learned and accomplished. I was asked to help with the visual representation of a crowd simulation project, and to work with Mankyu Sung to create a workflow between the crowd simulation system and a real-time graphics engine.
The engine we chose to work with was Epic's Unreal Runtime engine, since it supported a fast graphics system and robust scripting and environment creation tools. The first part of the project consisted of testing the limits of the engine with respect to polygon count and number of scripts running. What follows is a summary of the steps I took to get the simulations up and running in the Unreal engine:
Wrote a program to interpret Mankyu's simulation file, and convert it into an unreal script class. This presented some challenges at first, since .sim files at first represented each character at every frame of the simulation. Mankyu changed this so that each starting animation frame in the simulation was represented, along with the orientation and position at that frame. This is then read into my program, the orientation is fixed to work with the engine, and the converted animations are enumerated to playback at runtime.
Wrote several manager classes to handle the playback of the simulation and control the characters, such as restarting the simulation
Added support for user-defined cameras in the environment, so the user can switch between views easily. This could also be useful if we want to simulate surveillance cameras.
Created a more modular structure that would support separate environments that each had its own set of characters scripts. The simulation is now summarized in a list file, whose name represents the prefix for all the classes related to that simulation.
Created two simple environments, a field, and a street. The street demo had several 'situations' in it, and one of them required the use of a functioning traffic light. Added that, and created a simple structure for representing situations (This area still needs a lot of work)
Imported two more realistic models into the environment for use with simulations. This probably presented the biggest challenge, since they were in .Max format, were bound to a different skeleton, and had way too many polygons. After about a week of trying to find a converter from Max->Maya that worked, finally succeeded. I then reduced each character from around 5000 polygons to around 2000 (mostly by hand) and re-bound them to the Crowd simulation's skeleton. I then created a new skin set, which can be controlled by script and simulation files.
How to work with several development tools better: Maya, the Unreal editor, 3D studio Max, Python, and even C++.
How to communicate more clearly when working on a team, and how important that is!
How snap-together motion works, why it's better in some cases, and where some of its weaknesses are.
How the current crowd simulation system and workflow function, and where they needs improving. This is significant since I'll be working much more with them this summer.