Terrain mesh

Blitz3D Forums/Blitz3D Programming/Terrain mesh

Nexus6(Posted 2007) [#1]
Plerase see Topic http://www.blitzbasic.com/codearcs/codearcs.php?code=1609

I really like this funtion, but the poly count is way too high (for my machine anyway), does anyone know how to amend the code so that it produces less poly's. I was also unable to trace the UV bug (not that I expected to be able to find/fix it anyway), but its not that big a problem but it does reduce the overall effect.


H&K(Posted 2007) [#2]
does anyone know how to amend the code so that it produces less poly's
Use a smaller Hightmap.

The point of the code is to produce exactly the amount of Polys needed, and not to have LOD "Poly Popup", if its useing too many polies, then you either need to make the map smaller, or.. use a LOD terrain, with then uses the amount of polies its told to.
For Obvious reasons you could just put a step 2 into the lx and lY loops, but this is either making the map less defined, or making it 1/4 of the size depending on how you look at it.

You really are left with two options. 1) Make the map samller, 2) Use the normal terrain commands but with a higher Poly count, (Sort of less than the full mesh version, but more than normal)
And 3) (I suppose) up the min specs of your game.
When all said and done, the way to get less polies on any specific map, is not to use this function, but the original terrain

(Edit: Had another think, you could I suppose not make vertcies of a point, if all the points arround it where the same height.

That is if you had an island, all the surounding seabed level could be one polygon, rather than each square being one polygon.

Dont know if it would make it lots faster without a poly reducer, as at its simplest, you would still have the same number of polygons. And it would probably slowdown any terrain Physics engines, cos it would need to extrapolate the missing verticies for collitions

I would see if you can get the effect/look that you wanted by useing TerrainDetail terrain,detail_level, and upping detail_level before I started messing with solid Mesh terrains)

(If you are going to try, I would look for all the points at a certain height, And make meshes of each group that is distinct. Of the top of my head I couldnt say the simplest way to do this)


Nexus6(Posted 2007) [#3]
Thanks for the reply H, im all for making life simple so will probably go with the Blitz terrains, the only reason I was looking at the mesh alternative was because I had read somewhere that there were problems with Blitz terrains and collisions, although I'm unsure what those problems are.


H&K(Posted 2007) [#4]
Well the solution to the colition problem is exactly what you guessed, you have make an exact mesh of the terrain, but dont display it.
That is, its just a mesh for collitions.

You'll have to post again on how to not disply a mesh, as I only know that this is the solution, because its what Felex does for easyTok, (And even in that you are stuck with terrains of no bigger than 16K tris)