does anyone know where can i find info to make a clipping function, so in my terrain program i can remove everything that isnt in the 3d pyramid clipping frustum or something?
well i know im rendering in the program things that are behind me and by my sides and even ahead of me that i dont see, i guess with that 3d Pyramid clipping i can remove it all… its something like Frustum clipping… anyone know about it or any better way to clip terrain stuff that isnt in sight?
Well the easiest way (but it’s not the best way) is to lay a bounding box or sphere around your frustum and check wheter your objects are in it or not
A bounding sphere test would be the fastest way but normally not as accurate as using a bounding box for the frustum. Lay Bounding spheres over all your objects.
Now check all spheres agains the frustums sphere. Is the distance greater than the sum of the radius from the frustum and the object bounding sphere the object can’t be in the frustum.
To get more accurate results you can check the bounding sphere against the frustums planes or even the triangles of your object against the frustum.
But to do only this check probably would be very slow.