# Collision Frustums

This topic is 4973 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hey all, This is just another one of those posts that is probably a pointless post about something that has already been done, but in the interests of just making sure, I'll post anyway!! I just got to thinking about how to speed up collision detection in my engine, and it occurred to me that to check for collision between the player and terrain, I could just cull all geometry outside the frustum from the test. Now this doesn't take a genious to work out, and neither does my method I'm about to suggest, but I just wonder if it's something so simple that people have overlooked it, or if perhaps it wouldn't work as well as I had imagined, or finally it may be that people do use the method and I just haven't used the right keywords in my google searches. I figure that we could just use a standard view frustum, but position the view frustum at the position of the object we are checking collisions with. We then point the frustum in the same direction as the objects velocity vector points and place the near plane so that it fully encompasses the object and the far plane so it covers the distance that the object is going to move in the current frame. We can then cull all geometry outside of this frustum from the collision equations, reducing the amount of geometry that we need to check by a very significant amount. Well, as I say I figure it's so simple that someone must have done it, is this the case?!? Thanks, Steve

##### Share on other sites
I would say that a simple bouding box test is faster than culling every object against the frustum. A bounding box test would simply be a few if statements comparing values, which is faster than the math involved in doing a frustum test. Plus you could cull out more objects using this method than the frustum method.

Although perhaps you could store a list of all objects in the frustum during rendering, then after you render pull up that list and perform a bounding box collision test.

##### Share on other sites
yes and no. I don't think I;ve seen frustum used as collision culling. People tend to use sphere, capsules (cylinders with spherical ends), boxes... Frustums aren't exactly required. You don't need to 'fan out' the volume. So effectively, the frustum for collisions would be like an elongated box.

##### Share on other sites
Ahh yes, I guess I'm daft for not realising that it essentially is no different from a bounding box. I think the way I've been looking at it though is in testing for collision before an object is moved, rather than afterwards, so saw the frustum as being useful to extend out to represent the forward motion of an object. I was also thinking of it in terms of culling away geometry quickly from a scene (wheras I'm thinking of bounding boxes in terms of checking against everything) and forgot that essentially you still do have to check everything.

Hmm, never mind then, thought it was too good to be true ;)

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
12

• 14
• 22
• 9
• 31
• 18
• ### Forum Statistics

• Total Topics
632618
• Total Posts
3007477
• ### Who's Online (See full list)

There are no registered users currently online

×