Does CopyEntity create a new surface per instance?

Blitz3D Forums/Blitz3D Programming/Does CopyEntity create a new surface per instance?

"SSwift, I am dissapointed at the results that you have found, but would you not get a comparable performance hit from not having unseen meshes culled?"


Let me make a clarification.

For each surface of each entity, regardless of whether you use copyentity or copymesh, you get a speed hit.

However, you also get a speed hit for the number of polygons that are visible at once.

There is a sweet-spot where selectively combining entities together and keeping them seperate gives you the best performance.

I can't tell you where this sweet spot is, but I can tell you that it's likely to be vastly different from card to card.

What I suggest is combinig entities which are close to eachother.

The test that I did a while back was a test to see how many trees I could pack onto a terrain at once while still maintaining a framerate greater than 20fps.

With individual entities, the number of trees I could have at once was very low.

However, I discovered that I could make "clumps" of trees that were near eahtoher into a single mesh with a single surface, and in doing so I was able to get 100,000 trees onto my terrain at once.

I may have been able to put even more if I worked at it some more to tweak the number of trees in each mesh.

Of course I did not have 100,000 trees visible at once. I had a fraction of that visible at once. The point was that as you walked around this huge terrain lots of trees were always in view.

Btw, I used entityautofade in my demo. I tried to do an octree, but I found it was very slow. I'm not sure why. It shouldn't have been.

Oh and also, the groups of trees I used were like 50-100 trees in a group. That seemed to be the optimal number for a large fairly open terrain with trees that only went about a half mile into the distance. My trees were just two planes each though. WIth more detailed trees you'd have to use less obviously.