Game Development Community

FxFoliageReplicator issues with zero or large numbers of items

by Tim Holt · in Torque Game Engine Advanced · 05/03/2006 (10:01 pm) · 3 replies

There seems to be an upper limit on how many items one can place in a fxFoliageReplicator. I've been experimenting with large plant numbers over a large area, and discovered a few things. Wondering if anyone else has run into these limits and has any comments.

First, with zero objects, TSE crashes. Seems like this would be an easy fix to code in - I'll probably do this in my own version.

Second, with a large number of objects (over 30000?) the game locks up. Is there perhaps a memory allocation issue that causes problems when more than 32767 entries are allocated?

#1
05/04/2006 (9:12 am)
It seems 16384 is the max. But it also seems to be directly dependent of Graphic card. (Don't know which issue).
#2
05/08/2006 (11:01 am)
I hadn't really thought of this when implementing the fxFoliageReplicator. It would be limited by the size of the max vertex buffer you can allocate on the graphics card. It would be interesting to give each sub-division of the replicator it's own buffer to get around these types of issues.

I guess the workaround would be to just use multiple replicators which would have the same effect (of using multiple vertex buffers).
#3
05/10/2006 (1:13 pm)
Here's a picture of how I had to quad-down the foliagereplicator coverage. Each zone on the map has < 16000 objects in it.

www.fsl.orst.edu/lemma/gnnviz/images/tillamook_10meter_1024_conoverlay.jpg