Infinite Terrain

Blitz3D Forums/Blitz3D Programming/Infinite Terrain

EmerGki(Posted 2006) [#1]
Have some way to do this?


b32(Posted 2006) [#2]
When I need that, I make a repetitive heightmap and limit the camera's position to the middle area.
So if I need a 256x256 terrain, I make a 512x512 heightmap, with the 'original' heightmap in the middle.
Then I wrap the camera's position to the area (128,128)-(384,384) (xz coords)
I don't know if there is any better way. I also tried making a mesh terrain and virtually 'move' it using VertexCoords, but it was too slow.


H&K(Posted 2006) [#3]
You dont need the terrain to be just one "Terrain". If you mess with B3d you will find that you can load lots ot terrains and stick them next to each other.

So... imagine you want "Infinte Terrain" al la IGI, you have the real terrain as (say) the middle of a group. As the player leaves the middle terrain you are already showing the comp generated/standard terrain, but you the generate the one that the player is walking towards as well (Well the three they are walking towards, but lets not complicate it). Then as they reach the edge of the next terrain you .... etc.

Obviously you can do it differantly/better by (say) having a low res terrain "Under" the ones you are on so that Mountains and the like can be shown in the distance, and then loaded in as the high poly terrain as you get close.

You could as b32 said, just loop these terrains so that when you leave the centere one going north (say), you draw the southern one as further north than the northen one. (But this makes the world a torus). It really depends on what you need.


Naughty Alien(Posted 2006) [#4]
..here is exactly what you are looking for..source & media included..enjoy...

http://media7.filewind.com/g.php?filepath=987


EmerGki(Posted 2006) [#5]
Thanks!!!
But, Can I use this with the ODE physics?
And, I need to do Roads in the terrain, I will edit the terrain with the Blitz terrain commands?


Naughty Alien(Posted 2006) [#6]
I am not sure about ODE, but with Tokamak, you can do for sure..


Andy(Posted 2006) [#7]
When you say infinite terrain, do you mean repeating the same terrain or just extremely large terrain?

Andy


H&K(Posted 2006) [#8]
but with Tokamak, you can do for sure..


Tokamak has a maximum terrain size of (If I recall correctly) 64 by 64. This doesnt mean that you cannot use it on larger terrains, just that you have to make sure that each seperate map terrain "segment" is less than this.

Obviously Tokamak will accept larger terrains, its just that to correctly know where the surface is, you need to make the terrain have the same hightpoints as tokamak.


EmerGki(Posted 2006) [#9]
Infinite or very great terrain, repeteadly causes some problems to my game, because I need to do long roads. But, now, I'm thinking that the terrains isn't solution for me, maybe I'll need to do all the roads with a mesh.

Thank you!!!