Surfaces question

Blitz3D Forums/Blitz3D Programming/Surfaces question


unless the new mesh was appened to the old mesh



You can combine the meshes into one object like that. But it is true that each mesh has 1 or more surfaces otherwise. Still though you can have many entities which share the same mesh. If you use CopyMesh() it speeds things up dramatically by using one mesh for many entities.

I had a prototype of a RTS game which sped up many times with 100 entities (which used the same mesh) by copying the first mesh to all the other entites instead of loading a new mesh for each one. This way all 100 shared the same mesh and surfaces.

It is smart to strike a balance by grouping some meshes in larger groups to form one large mesh, copying meshes when you need them separate, and laying things out logically so things get culled properly.

It is a mistake to worry only about surface count and use one mesh which will not cull any polygons out of a scene. Just find that balance and you'll be fine. I'd imagine a 3D tiled landscape is doable by copying certain instances. Sswift made a landscape lib already and it's much quicker than Blitz terrains. I'm not sure exactly what method he used.