Mixing Entities


05-10-2008 02:34:05

I'm just wondering what is the best way to handle the following situation.

I have three different entities (i.e. a tree, a bush and a rock) that I'm using with PagedGeometry. In my example, I have 100 trees, 50 bushes and 20 rocks.

Is it OK to add all of these entity instances to a single PagedGeometry set? This is what I'm currently doing, but I'm just wondering if this is the best performance wise?

Should I instead create three PagedGeometry sets, one for each type of instance, or doesn't it matter?


05-10-2008 05:46:56

Usually keeping everything in a single PagedGeometry object is the most efficient way to go, unless you need different viewing ranges for different objects. For example, if you want to display trees out to 1000 feet, and bushes / rocks out to 300 feet, you'll need to create one PagedGeometry instance for your trees and another for your bushes/rocks.

Jules Robichaud Gagnon

07-10-2008 23:16:52

If you can have the trees, bushes and rocks use the same material with the same texture it is the best . The batching will be optimal.

Just fuse all tree textures and select the good one in the entities at tweaking the UV.