what is more efficient?

Blitz3D Forums/Blitz3D Programming/what is more efficient?

D4NM4N(Posted 2005) [#1]
For largeish mesh terrain say 128x128 is it better to:

1. have 1 surface

2. split it up into several surfaces? of say 32x32 blocks

3. split it into several 'tiled' separate meshes


Braincell(Posted 2005) [#2]
128x128 polys?

If its that much, then thats only 16384 polys (32768 tris), one 3d object is good enough. I dont see what you would gain by doing any of the other things. Depends how many textures you want to use and in which combination, and if you want them to blend and how, etc. Any gfx card can render 32k tris, if thats whats bothering you...


John J.(Posted 2005) [#3]
I once experimented with 128x128 mesh terrains, and found it much faster to split it up into 16x16 or 32x32 blocks. Even though old cards can handle 32 thousand triangles, it's better to split them up this way so blitz will automatically cull out each block when not visible (assuming each terrain "block" is seperated into it's own entity), which should increase frame rates considerably. It would even be possible to do block based mesh lod with occlusion for terrain blocks hidden behind mountains, although this wouldn't be much help for a water system.


fall_x(Posted 2005) [#4]
Splitting has the advantage that you can hide blocks that are non on-screen (or at least too far away from any player or enemy). For rendering, this will not increase the speed, but it will for collisions - hiding a mesh means that blitz won't do collision test on it's polygons, so this could make your game a bit faster.


Banshee(Posted 2005) [#5]
It all depends on how you want to texture the surface.

(128*2)x(128*2)=65536 btw guys ;). That's the polygon limit for an entity in Blitz if I recall correctly so any landscape detailing will have to be applied to a seperate entity which means if it's out of view would require it's own hide/show entity logic in your game.


D4NM4N(Posted 2005) [#6]
thanks, i think ill go for the block option


John J.(Posted 2005) [#7]
(128*2)x(128*2)=65536 btw guys ;)


A 128 by 128 mesh of triangles makes 16384 square tiles (128 x 128). Now it takes 2 polygons to make one square tile. So, I always thought the total triangles in a 128x128 grid mesh = exactly 32768. Am I wrong? Here's a diagram showing what a 3x3 grid would be (a total of 18 tris, which equals 3*3*2, not (3*2) * (3*2). Count them yourself if you'd like :) ).




*(Posted 2005) [#8]
is the poly limit on the entity or the surface?


big10p(Posted 2005) [#9]
There'a a tri/vert limit per surface of around 32000. I say "around" because the limit doesn't seem to be constant. 32000 should be safe. I don't think there's an overall entity limit, though.


Ross C(Posted 2005) [#10]
The surface i believe. It's a vertex limit anyway, isn't it?


big10p(Posted 2005) [#11]
Tri or vert, whichever reaches the limit first. :)