www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: davec64 on December 20, 2013, 12:47:15 pm

Title: wrapping a ground plane.
Post by: davec64 on December 20, 2013, 12:47:15 pm
Is it possible to make a ground plane wrap back on itself. My plane is large but not large enough to hold all of my  map at once. So I have to re build my vertex map when I move over 700 m  to display the current modified plane.
It would be ideal if the right edge connected to the left edge like a cylinder and the bottom connected to the top.
So I would only need to update areas beyond the clipping range in the direction I am traveling. This is an old method to reduce the amount of processing needed to update a map/plane.
Eg if I am moving up the map I would update y max line then y max -1 then -2
Where the map is x*y .
If going right update xmin then xmin+1
For num vertical lines
if y goes thru 0 y =ymax
If x >xmax x=0
So we just update the Poly's in the direction of travel.
Other techniques???
Title: Re: wrapping a ground plane.
Post by: EgonOlsen on December 20, 2013, 08:46:47 pm
I'm not 100% sure what you mean...there's some plane with the world's entities placed on it and you want the plane to be infinite but update the entities as you go?
Title: Re: wrapping a ground plane.
Post by: davec64 on December 20, 2013, 10:20:25 pm
Yes that's about it. To appear infinite. It is currently 174*174 which translates to 1740 meters and my ship path could cover over 100 sq km.
Dave
Title: Re: wrapping a ground plane.
Post by: EgonOlsen on December 20, 2013, 10:21:55 pm
There's no way to solve this with only one plane. You have to one or more copies (depends on your scene and your freedom of movement) and attach the copies at the end of the current plane once they come into view. I did something similar in Alien Runner to create an endless road.
Title: Re: wrapping a ground plane.
Post by: davec64 on December 20, 2013, 10:26:22 pm
Ok that will probably work.  I will give it a go when I get back from holidays