simple naive question


23-04-2009 17:39:45

Ok, from what I understand from the title, PG works by dividing the space in pages and only showing those trees which are necessary. So the camera is in a space with 100 trees, and I add like 1 million trees in some space not visible to the camera, shouldn't this have little impact on frame rate?

I am asking this because I am planning to build a big world hundrends of kilometers long which will surely have more than 200-300 thousands of trees. Since the world is large and there is a small amount of trees in a given close space, adding millions of trees should not affect performance. right?



17-05-2009 13:35:26

As long as you use Infinite mode (bounded allocates memory to fill the area of the world to some extent), and your view ranges, etc. are set up correctly, you should have no problem with 300 thousand or even a million trees. I've personally used PagedGeometry with a few hundred thousand trees and it runs fine.

One thing to keep in mind is that TreeLoader2D and TreeLoader3D store tree positions in RAM, and even though it "compresses" the data, if you store more than a few million trees you may need to implement a procedural or disk-paging solution as an alternate.