Endless terrain

Blitz3D Forums/Blitz3D Programming/Endless terrain

Mike0101(Posted 2009) [#1]
I'm findig a good sample or code for the unlimited terrain grass.
I have a plane (createplane() and I would like to create a grass field where the bushes (150 - 200 bushes) repeat themselves according with the camera movement. When a bush is too far behind of camera the system puts front of the camera.
Do you have any idea?


Naughty Alien(Posted 2009) [#2]
well..in basics just show your grass entities within distance range from camera and once they are outside of range reposition them to new location within 'fade in' range of the camera..


Mike0101(Posted 2009) [#3]
Yes, but the problem is the calculate the right position according with the position and rotation of the camera with something random effect.


Andy(Posted 2009) [#4]
a)place all the bushes randomly within a square of 2000x2000 units
b)place camera in the middle of the square.
c)move camera
d1)Whenever a bush is further away than 1000 units away from the camera it is moved 2000 units in the opposite direction. do this in both directions. This will give you the sense of flying through the same landscape again and again.

d2)Whenever a bush is further away than 1000 units away from the camera it is moved 2000 units in the opposite direction, BUT create a new random coordinat on the perpendicular axis. do this in both directions. This will give you the sense of flying through an endless landscape without repetition.


Mike0101(Posted 2009) [#5]
Thanx, I'm trying


Guy Fawkes(Posted 2009) [#6]
did u figure this out yet? wheres that old infinite terrain code i saw?