PDA

View Full Version : Crowd sim logistics



aniboy2000
08-13-2004, 04:56 PM
I'm planning a really difficult crowd sim scene. Here goes:

<=10000 people
organized in square army formations, but not in perfect matrices (offset a little left, right, back, forward randomly)
6-10 different textures
4-6 different sets of similar motions (waving hands, cheering, etc.) (baked as consecutive morphs, as per the 123d.com tutorial)
tons of time-offsets
3+ LOD models

So, how would I go about doing this?
1. How do I place the people initially (they are standing still, so I'm not parenting them to particles)?
2. How do I jitter the matrices of people?
3. How do I randomly assign textures, morph sequences, and time offsets without redundant scene data?
4. How would I even apply different textures if there is only one model copied a few thousand times?
5. How do I create different morphs sequences? The object properties seem to only allow one morph target?
6. How would LOD models fit in - that is, how do I maintain textures, morphs, time offsets, at different detail levels?
7. What is the greatest number of pts. or polygons that I can expect to be able to use in the highest-level models if I'm doing this on a PC with 512MB of RAM and 64 or 128 MB on the AGP card?
8. Is there any way to convert the people into particle-attached objects and animate them in the middle of a scene? (And giving them a new set of motion (running)?

:eek:

Hoopti
08-13-2004, 10:21 PM
This is the only thing I've been able to find about crowds. Hope it helps.

Hoop

http://www.the123d.com/tutorial/lightwave2/crowd.html

Mylenium
08-14-2004, 03:44 AM
I'd say "Forget it!" if you are really intending to do it in LW, you will fail (or mange to finish your project around thtis time next year). It's not so much that it is impossible to do crowds in LW, but the combo you are trying to use is dangerous.

I doubt that especially the LOD part will ever work satisfactory. If nothing else, that will crash LW since it cannot handle it properly, especially with morph sequences. It will also not unload unneeded textures from RAM.

Next you should really take a look at the manual or the tutorial once more - of course you can have more than one morph target - if you don't even have that figured out yet, why then do you even think of doing a mass scene?

The same goes for that texturing part - if you had thought it over, you should have come to the conclusion that in order to vary your textures, you need different objects. This is a paradigm LW has always used and there is no way to overcome this. If you follow that logic to the end, you will clearly see that this also is valid for morphs, so you need a complete morph chain for each LOD level to maintain texturing and vertex correlations.

At this point you probably have realised that with just 512 Meg of RAM it is not very likely that you will get anything going beyond 300 people and about 10 different textures (sans LOD!).

As for the rest - The arranging and moving of your troops wouldn't be that much of a problem. You simply attach them to a particle emitter from the start and then just manipulate that emitters properties and forces. The problem (once again), would simply be that you have little chance of getting it to work due to lack of RAM. It would also take very long to calculate, since you needed to turn on self interaction for your particles.

Mylenium