Blitz terrain

Blitz3D Forums/Blitz3D Programming/Blitz terrain

D4NM4N(Posted 2005) [#1]
Im trying to use load terrain on a heightmap 32x32 but for some reason the terrain seems to 'tile' itself. Ie the west side becomes the same as the east side.
Is this the case ?? if so how do i stop it?


Rob Farley(Posted 2005) [#2]
The quick answer is you can't.

For a 32x32 terrain you actually need a 33x33 heightmap, however blitz doesn't support this. The usual solution is to make everything an island (0 heights round the edges) so it wraps, or indeed make sure the terrain wraps perfectly itself.


D4NM4N(Posted 2005) [#3]
ok thanks
Whats the best way of making an infinite terrain then as copyentity doesnt seem to work on it


Andy(Posted 2005) [#4]
>Whats the best way of making an infinite terrain then as
>copyentity doesnt seem to work on it

Forget about terrains alltogether.

How infinite do you need it?

City size? Global size?

Generally you can do a 3x3 or 5x5 matrix of mesh-tiles.

EDIT: The 3x3 or 5x5 matrix is only what you can see. Then you have to do some work in the background to create new tiles and to erase old tiles as you go. This means that the tiles can be very small individually.

To begin with you place the central tile centered to 0,0,0 and as you move around you center the world coords to the tile you are on regularly(EDIT: you basically move the world around you). Then you kill off the tiles which are no longer in the matrix and create new tiles which have just moved into the matrix.

Generally you can cover a very large playing area by keeping the data in a bank or using more memory, as an image. If memory is a concern or you need a truely massive world, then dynamic loading of tiles is a very good way to achieve this.

If you are creating a planetary landscape then you need to approach this very differently so I'll leave it at that.


Andy


D4NM4N(Posted 2005) [#5]
Its ok now, ive figured a plan. Thanks :)


Andy(Posted 2005) [#6]
>Its ok now, ive figured a plan. Thanks :)

Good, so why not share it with everyone?


Andy


D4NM4N(Posted 2005) [#7]
Sure...

I was simply looking for a way of allowing my terrain program to export a kit for multiterrains. I do share my work with people (when i have something to show). I can try but i dont think it will mean much yet:

If i have set 'vertex' height data, exported from ted, for a matrix of terrain tiles. Im going to attempt to do a seam average on every other tile based on difference in height so every tile matches the egde of all the others.Then feed this back in to some AI which will determine the best 'all edge' for X&Z lines of tile data, where the landscape is mostly flat. In this case i will just flatten it as rob suggested.

Please dont think by my comment im ungrateful for your response as im not. It actually gave me some ideas, but i cannot share something i A) dont have to show b)dont quite know how it will respond and C)not sure how to write in a few sentences what is buzzing around in my head. My original question was answered and i am grateful.

Cool quote BTW - That movie is an oldschool classik (none of the people i know have seen it!)


Andy(Posted 2005) [#8]
>Please dont think by my comment im ungrateful for your
>response as im not.

I didn't think so. I just think that the topic of worldbuilding is very interesting and a great topic for community interaction.

As for your idea, You really should consider not using terrains at all as meshes are much faster. They don't have LOD, but if you put 9 terrains together you will get 9 times the LOD processing but without the benefit of the terrains being glued together, so the individual tiles will always show.

>Cool quote BTW - That movie is an oldschool classik (none
>of the people i know have seen it!)

I agree!


Andy


D4NM4N(Posted 2005) [#9]
I agree on that point about using meshes, it was just that one of my customers is using some kind of terrain dynamics(shootable terrain or some such thing) in his game, and wanted to be able to use T.Ed to create the terrain. Luckilly he just wanted a 64x64 heightmap with supertexture export (which the program now does) but i thought it would just be nice if i could get it working for a tiled landscape.
I didnt realize that LOD processing was so consuming.. oh well :(

Thanks