virtual humans, AI, 3D stuffs…
CASA 2010 report (part 1)
Jun 22nd
Well It’s been a long time since I posted here… I’ve been pretty busy since the beginning of 2010. Anyway, here’s a report of the part of this year CASA I attended to.
CASA, the yearly conference on Computer Animation and Social Agents, was held in St Malo, France, from 31/05/10 to 03/06/10 (further information here). As its name implies, the conference focuses are :
- Animation techniques (motion capture, motion control, physics-based animation…)
- Social agents (emotions, facial animation, crowd simulation…)
During the conference, I only attended to Craig W. Reynolds keynote and to the collocated crowd simulation workshop.
Craig W. Reynolds Keynote
Craig Reynolds is to autonomous agents navigation what Louis Pasteur is to vaccination, he virtually invented the field. His seminal work of 1987 introduced steering behavior, simple rules to models the way autonomous agents navigate in groups. When I worked on the bibliography of my master’s thesis, I was amazed to see that almost every paper I read was citing this 1987 paper or its 1999 little brother ; Google scholar count more than 3000 citations ! One other thing that is quite interesting about Reynolds work is its rarity, I personally know only those two articles (and google scholar tends to agree). Needless to say I was really eager to attend to the legend’s talk.
Well, I was quite disappointed.
The talk he gave was titled “Crowds and emergent teamwork”, it presented Reynolds observation on emergent constructions in nature, done mostly by insects (ants, termites, bees…), and his attempts to design autonomous agents able to do the same. The final model gave agents simple rules to add bricks to the construction. The same king of emergent construction was observed. The rest of the keynote was filled by what seems to be the entire flickr account of the host : insects construction (no global plan but a functional emergent structure), human constructions (everything is designed globally)…
Some aspects of the keynote were interesting but nothing really new, controversial or brilliant… I do think my expectation were too high though…
The crowd simulation workshop report will follow shortly…
std::vector<bool> is NOT a std::vector containing bools
Feb 14th
Everything in the title, but let me explain…
Lately I’ve spent a lot of time trying to make a serialization/deserialization work with the huge piece of software I’m working on at Golaem. Anyway I came across a strange compiler error when trying to deserialize a std::vector<bool>. Here’s what our serialization engine is like :
template<T>
void read(std::vector<T> & myVector, Bitstream myStream)
{
unsigned int size;
read(size,myStream);
vector.resize(size);
for (unsigned int i = 0 ; i < size ; i++)
{
read(vector[i],stream);
}
}
void read(bool & myBool, Bitstream stream)
{
...
}
template<T>
void write(const std::vector<T> & myVector, Bitstream myStream)
{
unsigned int size;
write((unsigned int)myVector.size(),myStream);
for (unsigned int i = 0 ; i < myVector.size() ; i++)
{
write(vector[i],stream);
}
}
void write(const bool & myBool, Bitstream stream)
{
...
}
The serialization worked ok, but when trying the deserialization I got a cryptic compiler error :
impossible to convert from ’std::_Vb_reference<_Sizet,_Difft,_MycontTy>’ to ‘bool &’
WTF ? This code worked perfectly for doubles, ints and other basic types bools should be fine no ? After a quick google and follow links session I stopped on the cplusplus.com reference page of the std::vector. You should go and read this page completly, yep now ! I give you a few seconds…
OK you should’ve finished now, and yeah, you read well, std::vector<bool> is a template specialization of std::vector<T> and it does not have the the same properties : std::vector<bool>::operator[] doesn’t returns a reference to a bool but a specially defined type. I love C++ and especially the STL…
Yes, in most cases it’s transparent because this type defines a transtyping operator to bool. Yes, it is designed to save space as each element of a std::vector<bool> takes only 1 bit. But, it is inconsistent (std::deque<bool> is a std::deque of bools), opposed to the basic principles of c++ templates, and, apparently not normalized (see this open letter wrote by Herb Sutter the day i turned 15).
Another good joke from our pals at C++ ISO committee…
Crowds control has moved
Nov 28th
I just finished moving the site to a brand new wordpress hosting of mine, less tinkering and more posting I hope.
Also gotten a dedicated domain name www.crowdscontrol.net. sweet !
Report : Autodesk virtual entertainment conference
Sep 30th
Tonight, Autodesk gave a “virtual conference” featuring talks about their products, live-broadcasted, for free on their site. I virtually attended to the portion I was interested in : Ubisoft talking about AI and animation in Prince of Persia.
After an epic struggle with RealPlayer (who still uses this piece of *** by the way ?) I managed to get the live feed a few minutes after the start.
The prince was not alone, Elika was here
The focus of the talk was the character “Elika” from the Ubisoft’s 2008 version of Prince of Persia. This character is non playable but follows the player’s character, the prince, throughout the game. She is designed to help the player but never get into his way.
But their relationship was completely artificial

After a few character design considerations, the first topic was the AI used to tell Elika how to move around the prince. Its main objectives on this are :
- Elika must not harm the 3 Cs (character, control, camera) that is provoking collisions with the prince, occluding the camera…
- The AI has to make sure Elika appears on the screen as much as possible as naturally as possible (no teleporting, avoid getting stuck…) ;
- As the social relation between the two characters evolve during the game (from strangers to friends), the behavior of Elika must reflect this.
Basically, what is used is a set of rules taking the state of the prince as input and outputting goals for the placement (for example distances, materialized by the circles in the first screenshot). Very few details are given on this.
To give the player a feel on what’s the relation between the character, a set of rules are added ; the more friendly they are, the more Elika will look at the prince and be near him.

All they needed was good animations
OK, so here comes Autodesk and their realtime inverse kinematic solver, HumanIK, which is already integrated with Ubi’s home brewed engine used for Assassin’s Creed. They use this middleware for two things :
- Ground the characters, that is apply kinematic constraints for each foot to be layed on the ground without colliding with it. It seemed this IK wasn’t applied during movements as the feet where colliding with the ground when the prince was running on a slope.
- Retarget the hands during acrobatics, for example putting the hands in the holds while climbing.
The IK solver is used on the prince and Elika, it is pretty efficient as it doesn’t has any impact on the framerate. The speaker concluded on Human IK praising its easy configuration despite the huge amount of tweakable parameters.

Before concluding the talk, one last problematic was addressed: how are handled the situation were one characters prevent the moving of the other. But as the rest of the talk, this topic was treated too quickly. I did not had the time to wonder in which cases the AI couldn’t prevent this that the talk was finished.
To conclude on this virtual conference, it was interesting (both the concept and the subject) but it was too much rushed and dense…
