Theory - 3D Crowd Simulation

Started by
11 comments, last by StratBoy61 18 years, 1 month ago
Hello all, This is a very general question, and I thought that this forum was the best place to ask it... So here I go : I was wondering what was the typical limitation for displaying 3D characters on the screen in a game like Quake for example, or any MMORPGs. I have an idea about a game that would require the displaying of a crowd of a thousand of NPCs in the same shot, and I was wondering if : 1) That was technically possible ? Is there already one/several game(s) doing so ? 2) It existed tricks to simulate a big number of characters on the screen --I mean moving 3D characters, not just billboards. Regarding the second bullet, I was thinking of creating a special object that would simulate a dynamic crowd by getting rid of polygons that cannot be visible in a crowd --like mainly the legs... My two cents indeed ;) Please let me know of your experience and/or ideas. Thank you in advance StratBoy61
Advertisement
I did something similar a while ago using keyframed animation md2 models, and around one hundred of them, immediate mode, and I still got descent framerates :)

So, yes - it's possible.

But then I didn't do polygon-to-polyon collision checks or AI or something, but if you stick to using simple flocking or wandering modes you'd be fine.
Try doing it simple first, getting simple quads to move around... once you got that, the rest is just cosmetics. :)
using a shader to blend animation and a VBO, and your all set. ;D
"Game Maker For Life, probably never professional thou." =)
First I have to say that my old geforce 3 was able to run Age of empires 3 where some dozens of 3d characters were involved at the same time, so I can imagine that todays hw should not have problems with, let's say, 200 meshes. Of course, I suppose that the high amount of characters will lead to very small creatures in the background, so those can be rendered as billiboard (when a character is 10x10 pixels, I suppose it wont be a great difference), or as a very low-poly low-textured mesh, avoiding shadows and other subtle effects.
Ati made a demo for the x800 using some hundred of characters, all soft shadowed and textured, if you're interested.
Thank you Rasmadrak and cignox1 for your answers.

Well, first of all, I do not want to display a hundred of characters, but more like a thousand, or more... Let's say a maximum of 3 thousands.
I would obviously disable a polygon-to-polygon collision detection, but still leave a simple bounding sphere check, so that characters do not get inside others. As for AI, one or two thousands extra entities should not give a dramatic performance loss.

Regarding billboarding, I thought that it did not really make sense when you want your characters to be animated. Also, I do not know whether it is possible/feasible to render a 3D character on a billboard, as many times as you want different animations...

Regarding the ATI demo, sure, I would like to know where to find it. I will search for it on Google anyways.
Cheers
StratBoy61
rendering 3 000 animated modells should be quite hard. How many polys per modell are you thinking of? if you'd go for 300 polys(a grunt/footman of warcraft 3) average(LOD) you still have 900 000 poyls. Are all the modells the same? If they are, maybe you could do software skinning and use instancing to render all modells which are standing in a similare position(i think that would occur quite often with 3000 characters). I agree with the other posters that billboarding could definitely help to reduce the polycount extremly. No one will notices if a character standing 200metres away is a 5x5 pixel character or a 5x5pixel billboard. Also the billboards that are further away can be static and the billboard that are nearerer to you could be rerenderd every 10,30 or 50 frames(depending on the distance to the viewer).

I don't know if it's possible to render thousands of characters with that, but it's the best system i can think of.

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."
Thank you m4gnus for your answer, it does make sense.
I understand the billboarding thing. I guess I could dynamically create billboards of some characters in certain positions and display them for the farthest characters, instead of the real 3D model. And true, you do not need to see the details if the character is very far away.

I think I have a good idea of what can be done now.

However, if one knows what is the limitation in a game like warcraft or quake, it would help. For instance, have you ever seen over a hundrer players in a quake arena, without FPS loss ? And what about the dead players that stay on the floor. Are they the original models, or have they been "lightened" in terms of poly count ? Could the quake engine display, say, over 200 dead models piled up in the same view (if the engine does not get rid of them)?

Cheers
StratBoy61
Look at the crowd demo at ATI's site to get some inspiration.

On a more techinal note, I'd suggest that you forget about skinning when trying to do that many characters.
Use heavily packed vertex buffers containing your frames and just interpolate for animation.
This way it's almost as fast to render an animated object as a static one.
Also make sure to LOD properly.

Edit: Another game that handles alot of animated characters is Dead Rising on the X-box 360 (look under movies or screenshots).

hehe, if you don't mind me asking - but why on earth do you have to display 3000 characters simultaniously? would they even fit on the screen?

Anyway, LOD is the way to go, like several above me already suggested :)
"Game Maker For Life, probably never professional thou." =)
It's quite possible to display a crowd of 1000 people, animated and all.

Here's a screenshot of one of my early tests with hardware skinning.

I only had 900 characters on screen, but 1000 should be no problem...



All the skinning is done in vertex shaders. I got 60+ FPS @ 1280x1024. The models are 1100 triangles each, with a 512x512 texture. No LOD was used in that test.

I have a video of this around here somewhere...it's pretty funny [grin]

In my game 'Gang War' there can be 100s of civilians/gangsters/characters on screen at once.

- Dan
I think that the Quake (I) engine is heavily limited about the polygons count. Don't know about the Quake (III) engine. You may try to download some free 3d engine and use a simple model.
@dgreen02: wich graphic card do you use? 1000 polys per mesh, 1000 meshes and 60fps means 60.000.000 polys/sec. The product copmparison utility on the ati site shows 325M for the 9800 and 712.5M for the x800 pro, so you are way under the limits of the hw. I suppose that a highly optimized engine one should obtain at least 200M on a decently new card.

BY THE WAY: someone knows why the products comparison tool says: "*Not applicable for Radeon® X1000 series and higher."? For me, that's because the x1000 didn't improve the geometric side too much, but only the v.s. and p.s. :-)

This topic is closed to new replies.

Advertisement