Blender users : Standalone characters for Crowd Animation

Discuss anything you like on this forum.
Post Reply
User avatar
ROUBAL
Licensed Customer
Posts: 2199
Joined: Mon Jan 25, 2010 5:25 pm
Location: FRANCE
Contact:

Hello, a first preview of a project I plan to release in a not too far future :

[vimeo]http://www.vimeo.com/40218727[/vimeo]

Please read explanations on Vimeo.

Comments will be welcome.

Philippe.
French Blender user - CPU : intel Quad QX9650 at 3GHz - 8GB of RAM - Windows 7 Pro 64 bits. Display GPU : GeForce GTX 480 (2 Samsung 2443BW-1920x1600 monitors). External GPUs : two EVGA GTX 580 3GB in a Cubix GPU-Xpander Pro 2. NVidia Driver : 368.22.
User avatar
matej
Licensed Customer
Posts: 2083
Joined: Fri Jun 25, 2010 7:54 pm
Location: Slovenia

Hm, interesting.

Could they be used with boids physics, so they would avoid each other while trying to get to a destination? :)
SW: Octane 3.05 | Linux Mint 18.1 64bit | Blender 2.78 HW: EVGA GTX 1070 | i5 2500K | 16GB RAM Drivers: 375.26
cgmo.net
User avatar
pixelrush
Licensed Customer
Posts: 1618
Joined: Mon Jan 11, 2010 7:11 pm
Location: Nelson, New Zealand

Pretty good really but I think they might all work for the ministry of silly walks :)
http://youtu.be/LO2aZTN0U3M
I am greatly exaggerating of course :lol:
i7-3820 @4.3Ghz | 24gb | Win7pro-64
GTS 250 display + 2 x GTX 780 cuda| driver 331.65
Octane v1.55
User avatar
ROUBAL
Licensed Customer
Posts: 2199
Joined: Mon Jan 25, 2010 5:25 pm
Location: FRANCE
Contact:

Could they be used with boids physics, so they would avoid each other while trying to get to a destination?
@matej : Someone also asked that on Blenderartists. I fear that it would not be possible, as I see no way of synchronizing the walk pace (Walk cycle animation done with 8 Relative shape keys, and Cyclic with offset position keyframing by a LocX ipo on the character object itself) with the speed of each particle. The result would certainly be characters feet slipping or running on place...

Currently, the characters can walk in straight line from a starting point (a reference object or a vertex in a reference mesh with Duplivert/Vertex applied).

A character with its own individual reference object can turn at a street corner or enter/exit a shop,for example. It changes direction when walking over the reference object, as it is the reference object (Parent) that actually rotates !

I have tested the animation on curves for trajectories in Blender 2.49b, as I am not right now on my workstation and have only a file for 2.49b on this machine. It seems to work fine and if curves are not to narrow, the side slipping effect is almost not noticeable. The Reference object has to be a small mesh instead of an Empty, and the LocX ipo has to be applied to the Reference object instead of the character himself.

I will try tomorrow in 2.62.

The main strength of this Shape Key animation system for background or half distance characters is that you can put thousands of characters without requiring much computing ressources. I got 1.25 FPS in the 3D view with a clone army of 4000 characters ! and 25 FPS with 4 different characters.

On the opposite, with a more detailed character using an armature I am already around 1 FPS with only one character in the scene !

@pixelrush : Yes, very funny ! The walk cycle is made initially at a slow pace to allow some freedom when scaling down the time. The result is that at some time ratio, some keyframes are skipped, leading to a jerky step animation. As I have set up for each character a different time ratio (Scaled down by 0.3 to 0.45 by steps of 0.01) relatively to the initial time of a walk cycles, some character have a better walk than others.

EDIT :

Character driven by a curve.

Now, the moving along the walk cycle (LocX Loc Z ipos) is supported by the reference object instead of the character himself. This reference object moves along a curve allowing to create individual curved trajectories for the character.

This method shows that only 3 simple objects are necessary to make a walking character :

1-The character.
2-The reference object (a small triangular face).
3-The curve used as trajectory.

One curve can support as many character as you wish.

The characters can all follow the curve une after the other, or walk all in the same direction in straight line. In this case, they can be everywhere, not only on the curve.

[vimeo]http://www.vimeo.com/40286106[/vimeo]
French Blender user - CPU : intel Quad QX9650 at 3GHz - 8GB of RAM - Windows 7 Pro 64 bits. Display GPU : GeForce GTX 480 (2 Samsung 2443BW-1920x1600 monitors). External GPUs : two EVGA GTX 580 3GB in a Cubix GPU-Xpander Pro 2. NVidia Driver : 368.22.
User avatar
pixelrush
Licensed Customer
Posts: 1618
Joined: Mon Jan 11, 2010 7:11 pm
Location: Nelson, New Zealand

You should have added a new post, I only saw your edit by accident. :)
What you have definitely has promise. The characters move around a curve quite well. Can they lean/tilt a little while following a 3dcurve or is it a 2d curve only? How about the ability to go up/down stairs or an embankment??
Really I think the walk still needs to be more fluid or perhaps it would be less eye catching if the characters only took smaller steps based on their height? Can you vary them slightly somehow with some random mulitplier for dimensions or colours just so they don't seem like identical clones even if you had a fair number of different ones? I realise its not intended for close ups but the eye might be even more convinced if there is some small real variation to make finding a visual pattern difficult amongst the motion.
I am definitely looking forward to seeing the 'final solution'. A number of my past renders would have benefitted from having this type of animation available, not just crowds but people moving in ones, twos and small groups around a factory or industrial site for example.
Keep up the good work. 8-)
i7-3820 @4.3Ghz | 24gb | Win7pro-64
GTS 250 display + 2 x GTX 780 cuda| driver 331.65
Octane v1.55
User avatar
ROUBAL
Licensed Customer
Posts: 2199
Joined: Mon Jan 25, 2010 5:25 pm
Location: FRANCE
Contact:

The curve animation shows only duplications of unique character on one curve, but any combination of various characters on the same curve or on several curves will be possible.

I am trying to make the characters as polyvalent and easy to use as possible.

Characters can be separated from the curve and walk in straight line. In fact, the same steps forward animation (not the walk cycle) is applied to the character and its reference object, and one of the two can be enabled/disabled at will.

This allows the character to follow the curve using the ipo of the reference object, or walk in straight line, with eventually one turning at a street corner, by using the ipo of the character himself.

Currently, I am spending much time changing all naming rules (actions, keys, materials...) on 9 different characters and simplifying the animation system at the maximum.

As I used initially a slow pace when keying the interpolation when speeding up the animation gives some weird results. I am changing the frame number in order to allow various paces while keeping an integer number of frames between keys. So far I uses No Auto Snap to get a smoother interpolation after scaling, but it seems to give some weird variations sometimes.

All characters share currently the same walkcycle, with some speed and transversal variations in the walk (parallel feet or feet half in line).

When everything will be "standardized" in my file, I will create individual walk style variations in the Shape Keys.

With the addition of only 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.

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.

To use a 3D curve, the character requires only One additional object : An Empty.

This Empty supports 3 constraint to copy the location of the character and limit its own rotation. It is used as a Hook for all vertices of the character except the feet. This allows the character to keep a Z reference in slopes, and applies a verticality correction.

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.

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 !

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.

[vimeo]http://www.vimeo.com/40360347[/vimeo]

Characters walking upstairs or downstairs are not in my project. The goal is to polupate cities with a large variety of characters. Stairs are not very common (Subway stairs, or inside large stores) and are not my priority. They would not require much more work than simply walking characters, but the problems are that some must go upward, some must go downward, and only on a short distance : This means that it is not possible to make a character animation purely cyclic, and will require a specific animation for each character, according to the height of the steps, the length of the stairs, the whole path before and after the stairs, the number of floors... so it is quite the domain of regular animation with armatures !

Added to that, my priority when the system will be ready to release, is to build a second pack of women characters.

I am totally hopeless at programming, but I spoke with a friend of mine, and he said that he would probably be able to create a script to create random variation on the cloth materials, allowing more diversity in the look of the crowd, even with few different characters.

I have to establish specific naming rules and a color palette with some conditions, to avoid getting people wearing cloth with mismatched colors.

However, my current priority is to finish and release a first complete pack of characters ready for use. Improvements could come later in an update.
French Blender user - CPU : intel Quad QX9650 at 3GHz - 8GB of RAM - Windows 7 Pro 64 bits. Display GPU : GeForce GTX 480 (2 Samsung 2443BW-1920x1600 monitors). External GPUs : two EVGA GTX 580 3GB in a Cubix GPU-Xpander Pro 2. NVidia Driver : 368.22.
User avatar
ROUBAL
Licensed Customer
Posts: 2199
Joined: Mon Jan 25, 2010 5:25 pm
Location: FRANCE
Contact:

You can download here a first Blender file if you want to test it yourself, and play with :

http://3d-synthesis.com/BlenderTests/Pe ... t_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 just intended for tests in the 3D view.

The full pack will be released later when everything will be completed.
French Blender user - CPU : intel Quad QX9650 at 3GHz - 8GB of RAM - Windows 7 Pro 64 bits. Display GPU : GeForce GTX 480 (2 Samsung 2443BW-1920x1600 monitors). External GPUs : two EVGA GTX 580 3GB in a Cubix GPU-Xpander Pro 2. NVidia Driver : 368.22.
User avatar
pixelrush
Licensed Customer
Posts: 1618
Joined: Mon Jan 11, 2010 7:11 pm
Location: Nelson, New Zealand

Thanks for the .blend I'll take a look at it tomorrow after work.
Nice addition to have walking on 3d curves :)
i7-3820 @4.3Ghz | 24gb | Win7pro-64
GTS 250 display + 2 x GTX 780 cuda| driver 331.65
Octane v1.55
User avatar
ROUBAL
Licensed Customer
Posts: 2199
Joined: Mon Jan 25, 2010 5:25 pm
Location: FRANCE
Contact:

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 brows 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 !
French Blender user - CPU : intel Quad QX9650 at 3GHz - 8GB of RAM - Windows 7 Pro 64 bits. Display GPU : GeForce GTX 480 (2 Samsung 2443BW-1920x1600 monitors). External GPUs : two EVGA GTX 580 3GB in a Cubix GPU-Xpander Pro 2. NVidia Driver : 368.22.
User avatar
ROUBAL
Licensed Customer
Posts: 2199
Joined: Mon Jan 25, 2010 5:25 pm
Location: FRANCE
Contact:

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 buimpy terrains. This Empty can also be moved and scaled in various directions, and allows to change easily and quickly the proportions (morphology) 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 (I am 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 peed of Boid particles. This also leads them to not be oriented in the direction of the leader and the whole thing doesn't work.

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 !

Testing the system on a moving ground :

[vimeo]http://www.vimeo.com/40672257[/vimeo]

Stay tuned !
French Blender user - CPU : intel Quad QX9650 at 3GHz - 8GB of RAM - Windows 7 Pro 64 bits. Display GPU : GeForce GTX 480 (2 Samsung 2443BW-1920x1600 monitors). External GPUs : two EVGA GTX 580 3GB in a Cubix GPU-Xpander Pro 2. NVidia Driver : 368.22.
Post Reply

Return to “Off Topic Forum”