Jump to content
  • Advertisement
Ronan085

Help Finding Continuous Collision Detection Resources

Recommended Posts

Hello, I am looking for some help in finding some concrete resources on continuous collision detection, my preferred medium is published books but web pages are perfectly fine too. I am not too fond of academic papers as their real world application are sometimes a bit lacking, however publications from game studios are great and I would definitely appreciate those.

It appears to me that there is not actually much out there in terms of implementing CCD in a custom physics engine. I do not want to use an existing physics engine as I really enjoy the process of learning how everything is working behind the scenes. I have read/viewed the most obvious sources that I've come across from Googling and haven't quite gotten the information that I am looking for. Some of the sources I've used already are:

- Game Physics Engine Development by Ian Millington: This book while a fantastic resource on implementing a physics engine, completely ignores continuous collision detection and only acknowledges discrete collision detection.

- Real-Time Collision Detection by Christer Ericson: This only seems to glance over the topic in the section 2.4.3, it mentions swept volumes and indeed gives some hints on how to use swept volumes by providing further information on capsule collisions in 4.5 but it leaves quite a lot to the imagination on where to go from there.

- Physics for Game Programmers; Continuous Collision talk by Erin Catto at GDC 2013: Erin approaches the problem from a different perspective with his continuous advancement algorithm however I cant exactly make out how to integrate this solution into my physics engine.

- Various game engine/physics engine documentation & source code: They all seem to use either swept volumes or speculative contacts/continuous advancement or give the option of both so clearly these are the solutions to be using.

- Various Stackoverlfow / Gamedev.net posts but these all seem to loop back to the previous sources.

 

My need for CCD like others is to prevent tunneling on high velocity objects (bullets are my most prevalent case with velocity >500m/s). I would like to be able to have CCD work against other collders with CCD enabled, even though this will be a very costly process I still would like to have the option there for completeness.

 

My current collision detection setup works as follows:

1) Any game object with a collider component that has moved this frame is added to an update set with the physics engine.

2) Each collider in this update is tested against the scene octree to get a list of potential collisions.

3) These potential collision are investigated with the GJK algorithm and have their contact points calculated if necessary.

 

What I think could work:

1) Maintain a separate list at all times of colliders with CCD enabled.

2) If a collider with CCD enables is contained in the update set, then test its swept volume against the octree to get potential collisions.

3) Sort these potential collision by their distance along the swept volumes movement vector and choose the smallest distance as the collision.

4) Simply brute force (O(n^2)) against all other colliders with CCD enabled, as there wont be too many colliders with this special CCD property turned on I think brute force is an acceptable sacrifice.

5) Respond to this detected collision. (not entirely sure on how to do this response, how can I get the time of impact?)

 

I should mention that everything takes place in 3D and AABBs are the bounding volumes that I use on my colliders for broad phase collision detection.

Sorry for the wall of text and I look forward to hearing any answers or suggestions that anyone can provide.

Thanks

Share this post


Link to post
Share on other sites
Advertisement
17 minutes ago, Ronan085 said:

- Various game engine/physics engine documentation & source code: They all seem to use either swept volumes or speculative contacts/continuous advancement or give the option of both so clearly these are the solutions to be using.

Ok may be you can look into bullet physics source code, since i am using bullet for my game and i have faced the same tunneling problem .But it is handling it very well now with CCD. now i can shoot balls of 1m radius with 1000m/s without tunneling. May be it will give you a hint.

 

note: I really don't know about anything in terms of CCD  implementation or any physics rather than basics. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!