Continuous Terrain?

I wonder if it is possible to build a wrap around terrain with the current implementation so i never come to see the edges of my terrain?

(build a planet-like structure)



regards

Martin

Not easily with the current Terrain implementations, they are all based on discrete 2D heightmaps. It can be done, but it will require work on your end, jME doesn’t support it out of the box. However, if this is something you need and are willing to work on, this is how I’d go about implementing it:



http://www.gamedev.net/reference/articles/article2074.asp

Using the current JME implementation, is it possible to create a continious flat terrain then?



I have used a simple implementation of creating a quad and texturing it, but somehow didnt figure out how to wrap the texture, so my texture ended to be stretched across the surface which doesnt look good. Would have been better to extend the terrain as you get near the edge, but not sure if it can be done.

tomcat

nope, jME will not currently support that out of the box. It uses finite 2D heightmaps. Nothing more, nothing less.

The best I could suggest is to “trick” the user into thinking it’s continuous by creating 9 terrains.


0 - 1 - 2
3 - 4 - 5
6 - 7 - 8


Start the user at terrain 4, when they move to the right and hit terrain 5 change the local translation of terrains 0 3 and 6 to move them over to the right, turning it into

1 - 2 - 0
4 - 5 - 3
7 - 8 - 6


Just keep playing shuffle and they won't notice as long as the ends of one terrain match with the ends of the others.

Reminds me of a VR article Mojo sent my way a few days back:



see it here

The best I could suggest is to "trick" the user into thinking it's ....


Thx Cep21, its a neat little trick playing shuffles with the terrain tiles :) . I try to have a go and see what happens.
tomcat

Thanks for the quick respond all



@mojo: Thanks for the link but i think the discribed technique is a tad to advanced for my time and skill constraints right now. :?



Would it be possible to extend the existing clod - classes somehow to do something similiar the article describes ?

I am thinking of a distorted sphere for the terrain that collapses it’s triangles as they reach a certain distance from the camera with only very few triangles be left on the backside if not culled at all?



still cep’s approach seems the easy way to go and sufficing for what i want to get, so i’ll start to experiment with this as soon as i find the time.



regards

Martin