Endless terrain
Blitz3D Forums/Blitz3D Programming/Endless terrain
| ||
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? |
| ||
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.. |
| ||
Yes, but the problem is the calculate the right position according with the position and rotation of the camera with something random effect. |
| ||
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. |
| ||
Thanx, I'm trying |
| ||
did u figure this out yet? wheres that old infinite terrain code i saw? |