Easy Crowd Animation in Blender : Standalone characters

Hello, I am working on a pack of totally boneless standalone walking characters, intended to populate cities made with Blender. I plan to release the pack unde CC BY license in a unpredictable but I hope not too far future.

Here is the reason of the delay :

I had already made some things similar with Blender 2.49, but as the animation is no more compatible since Blender 2.5x, I restarted from scratch recently. But again, some things evolved in Blender about Shape Keys these past weeks !

Currently, the animation is made with Relative Shape Keys, as Absolute Keys were broken for a while. Very recent releases of Blender have Absolute keys again, but their use is not obvious. Maybe the release of the characters pack will be postponed, because I’d like to experiment with Absolute keys, as they could simplify the animation process. this said, relative keys allow some things that Absolute Keys do not…

More infos and a very first video test here :

Comments are welcome.

Best regards,

Philippe.

Nice work. They move a little robotic and pass through each other, but a nice start.

As they are just duplicated on separate grids, and walk at different pace, they can pass through each other. There is no collision system. This can be solved by carefully placing them on separate rows, or by setting all speed equal, but this would give less life.

In the test, I have just quicly put 81 characters randomly to test the performance and aspect.

For the robotic walk, it is due to several factors : the fact that I had to use Relative keys that give a less good blending, and the fact that The original animation has been set up at a lower pace to give some freedom in speed adjustment. Changing the pace reduces the number of frames per step and gives a jerky animation. This could be reduced by using vector blur, maybe.

I will experiment with absolute keys. They just have been included again in recent revisions of Blender.

When a character is parented to a flat mesh enabled for Duplivert/Vertex, you just have to add vertices wherever you want a character to start walking. So populating a city is very easy.
By using separate reference meshes allow an easy distribution of all characters to avoid collisions.

I think that characters walking on curves could be achieved, but each character would require his own trajectory curve. So it would be usable for some characters for specific behaviours, but not easy to implement on many characters. I’ll experiment in that way too.

I wonder if you could you populate the characters using a particle system (boids) and set up collisions that way.

I did this once a time ago… here: https://vimeo.com/26740611
Basically I rigged the rabbits and I made a lot of walk and jump cycles variations…
Exported the animations as MDD (mesh shape keys);
Imported back the MDD in the box model only to get the animation frames as shape keys;
I used the particle system to emit a group with all animations as boids particles;
In blender 2.49 we were able to set a “ground object” that boids walk on following the surface variations… but actually I didn’t find this option… I can’t reproduce that rabbits in actual blender particle system… :frowning:
The problem was the velocity of the boids not synchronized with the animations like walk, run… some of the rabbits was sliding and others are running stopped…
But at that case it worked nicely.

@ROUBAL - I think you’re panning something more advanced than simply use particle system, I’m I right?

@Paint Guy : It would be great, but imho individual particles couldn’t be synchronized with the step pace… and the well known ugly feet slipping effect avoided with the current system would occur.

@ROUBAL - I think you’re panning something more advanced than simply use particle system, I’m I right?

It is not more advanced, just different. As each pedestrian model has its own pace, it requires as parent a reference object for all characters of the same type. This reference can be an Empty or an ordinary object. The most interesting object is a mesh supporting Duplivert/Vertex, allowing to place the starting point of all characters of same type by just adding vertices.

The way steps are keyframed, I hardly see how Boid particles could do the trick without encountering the flow you describe with your rabbits. Currently only straight line walk is allowed, as well as one unique Angle variation on the trajectory (to turn at a street corner or enter/exit a shop). Pedestrian allowed to change direction must have an individual reference object placed at the rotation point, that turns when the character walks over it.

Remind that the system is intended to populate cities. It is powerful and involves few objects and no armature, but it has its limits.

I love your rabbits animation ! Very dynamical and funny. With such bouncing characters, with a very short contact time with the ground, there is no visible slipping effect, so it is fine. With slowly walking characters, I fear that there are less possibilities.

EDIT :

Now, curved trajectories work fine !

The animation below is made using only one curve for all characters.
Obviously, the user will have to take care of the collisions by hand.
there are some collisions in the present example.
It is just intended to test the behaviour on the curve.

One curve can support as many characters as required, of the same type or of different types.

Using several curves allows infinite possibilities.

One unique curve is sufficient for a crows walking in straight direction, like in the previous video.

With the addition of One Empty, the characters can walk on 3D curves.

I have done with success some tests on bumpy terrains with holes, bridges and hills without difficulties.

Here is a first Blender file if you want to test it yourself, and play with :

http://3d-synthesis.com/BlenderTests/Pedestrians-On3DCurve-Test_14.blend

As the original file contains 9 characters with textures for a total weight of 350MB, I have left in the file only things necessary to show the system at work. So, it weights only around 6MB and doesn’t include textures. It is intended for tests in the 3D view. The full pack will be released later when everything will be completed.

The character can keep an almost vertical direction in slopes with not too much deformations. As the system is intended to be as much simple as possible for the user, I don’t want to add too much complexity. The Empty allows the character to keep a vertical reference and is used as a hook for verticality correction.

When duplicating the character to put several on one same curve, the Empty is selected as part of the character assets, but when you move it on the curve, it is important to deselect the Empty. As it has locations constraints, it will follow naturally. If you force it to move, it will add an offset streatching the character body and breaking the animation !

The curve can be deformed by a ShrinkWrap modifier to match the terrain surface at best. A curve with many close points works best with the ShrinkWrap modifier.

This system can for example be used to animate a crowd of tourists on Venice bridges.

Thansversal slope is not allowed, otherwise one foot of the character will pass through the ground level, as shown on the little bump at 00:20.

Very good ROUBAL. Useful for golf course crowds and marching armies getting ready on the battlefield too I suppose. Even the across the slope walk is not too bad. If you were watching some action with a number of characters you probably wouldn’t notice the occasional foot intersecting with the grass clump or rabbit hole :slight_smile:

Than you Big Fan. I had forgotten to edit my previous post. In fact, only one Empty is required for the slope correction of the character. So, don’t search the second one in the blend file ! Sorry !o)

I have finally been able to understand how works the new Absolyte Keys feature, and the process is very simple ! It allows much smoother blending between frames, and avoids the “robotic effect”.
In fact, there is no need of keying intermediary keys ! The system automatically browses from Shape Key Start to Shape Key End !

I have lost much time, because of something that looks like a bug in Absolute Shape keys : using an evaluation time value inferior to 10 breaks the animation cycle.

I have to rebuild the animation for all characters. Maybe I will keep with Relative keys some characters with specific actions at some spaced intervals (like the character turning pages of the newspaper), because Absolute keys don’t allow some things…
I think that I could blend actions in the NLA Editor, but I am not yet at my ease with it in 2.6x and I don’t know if I could make the resulting whole animation cyclic…
To be followed !

For boids particles to work, can’t you time your animation to a certain walking speed and just set the min/max speed for the boids to be the walking speed in your animation? This would make for a really simple to make, but complex looking crowd simulation.

Obviously this will make all characters walk at the same speed. I don’t know if its possible to script the animation speed according to particle speed.

Wow! I love what you’re doing, and think that you’ll succeed in this. I’m an animator (working with mocap) but I enjoy the jerky motion in the walks, cause it could be used as a style element. Although you’re probably aiming for fluid motion eventually, I already like what you have! The path animation is my favourite! Laughed out loud when I saw it. Keep going, bravo!

I spent some time on the feature allowing easy rescaling of the characters. They can be rescaled at will by scaling the curve, and their trajectory can be edited by simply editing the curve. There is an optionnal Empty used for verticality correction when walking on bumpy terrains. This Empty can also be moved and scaled in various directions, and allows to change easily and quickly the proportions of the character : tall, slim, fat, small… for more diversity.

The trajectory curve can match the terrain by using a Shrinkwrap Modifier.
If you dont need the curves, you can keep only the character and parent it on a duplivert mesh and you get a crowd or an army of characters all working in the same direction. You just have to enable the ipo of the character instead of the ipo of the curve follower object used as reference.

The pace of the character walk cycle can be modified easily by rescaling (G+X) the time scale with all keyframes selected in the Dope Sheet editor.

I am thinking about a system to allow diversity in clothes colors automatically. Not yet sure that it will be doable without a script (Iam hopeless at scripting).

I have done experiments with Boid particles, but the results so far are not usable, for several reasons. In general use, the speed of Boid particles is different for each particle and there are accelerations. As the characters have their own speed and because the speed along steps is not constant (walk cycle accurately keyframed), it is necessary to set to zero the speed of Boid particles. This also leads them to not be oriented in the direction of the leader and the whole thing doesn’t work. I also tested very small speed values with same result.

As I am not used to Boid particles, maybe I haven’t yet found the good features or settings, but after around 6 hours of experiments, I still don’t find an usable solution with Boids.

More news coming soon and maybe a first release of a pack of 10 characters (Many more can be easily done by just replacing the provided textures, editing or replacing the heads, and moving/scaling the Empty(Hook) used for verticality and morphology !

Stay tuned !

Testing the system on a moving ground :

heheh, that must be the area around the labrea tar pits or something. I don’t see what the application is, in an urban setting, but it’s very cool anyway.

Very good. Nice to see they cling to the ground undulations so well.
Modron I think perhaps you could animate swimmers bobbing in the waves…

thats nice

Thanks !
@Big Fan : Swimers is a good idea ! I hadn’t thought about that application. It was just to test the accuracy of the trajectory system.

Very impressive. Well done.