Sprites for crowd

Blitz3D Forums/Blitz3D Programming/Sprites for crowd

Lilprog(Posted 2004) [#1]
Alot of people I see now are using animated sprites for a crowd, but using literally thousands of them. What is a realistic amount of sprites that can be used, and do sprites work the same way as models that if they are out of sight they dont slow down the engine?

Rob


jhocking(Posted 2004) [#2]
People using really large numbers of sprites are probably doing a single surface system, since using a separate entity/surface for each sprite would slow things down a lot. This is the point behind single surface particle systems. Note however that Blitz does frustrum culling per entity and not per polygon, so sprites out of the camera view in a single surface system would still be rendered.


Lilprog(Posted 2004) [#3]
What would you suggest as the best way to go about rendering a crowd then?


jhocking(Posted 2004) [#4]
Well, it depends. If you need every person in the crowd to be individually controlled, then you should write a single surface system for the crowd of sprites. Handle frustrum culling yourself, or do the crowd as batches of people, with each batch a separate entity which Blitz will cull.

For a baseball videogame however (I saw your "Perspective" thread) you probably don't need that level of control since people in the crowd are sitting in rows. Furthermore, if the camera doesn't get too close to the people you don't need much resolution for each; even if the camera does get close occasionally, you could do a trick like cutting to a small section of high res sprites or even models. In that case I would do the crowd as a series of flats/sprites (make sure to set SpriteViewMode to 2,) with a texture of a whole row of people on each sprite. Thus you represent a huge crowd in the stands with a small number of sprite entities.


Warren(Posted 2004) [#5]
UT2003 did this in the intro sequence. We had static meshes that were made up of 6-7 quads, each quad containing a person doing an animation. Those were sprinkled around the arena floor. If the camera got too close to a set of these quads, it was swapped out for a set of animating skeletal meshes.