Do we need CCD in Blender?

I looked through some Bullet documentation on Continuous Collision Detection, and I think it’s fairly easy to enable. However, I wanted to set up a base test case that had tunneling so that I could see if I could fix it. While doing this I couldn’t actually get tunneling behavior that couldn’t easily be fixed with options already in Blender. So this brings up the question:

Do we actually need CCD options in the BGE? If so, please provide a .blend (made with 2.5!) that demonstrates the need for CCD.

Thank you,

I think with the increased number of physics steps per frame, and the option to change that number, we might not need it- but I feel like it might be a bit more efficient to only do one physics step per frame and use CCD? I haven’t done any benchmarks or anything though, so I can’t really say anything for sure.

Increasing the physics steps would end up very slow with a lot of physics objects and tends to make you change values for force and torque to get the same result as with the timesteps at 1, which keeping the substeps at 1 and having CCD would likely be a bit faster.

CCD would be very useful for objects that need to collide with static geometry at high speeds, it should allow high speed collisions with geometry using the triangle mesh and convex hull bounds without needing invisible objects with say, box bounds as a collision buffer and you wouldn’t spend time creating the buffers.

Also, if you do implement this, would be nice to have a simple option to turn CCD on/off per-object based on the global setting, because not all objects may need it.

I would think that if you needed CCD for something, it would mean you’re depending on physics for something. I’ve found the physics to be much more deterministic at 5 substeps without a whole lot of decrease in performance. However, I haven’t used it with a lot of physics objects.

If I were to implement it, you’d get a number to adjust for each object in the physics panel. This would be the CCD threshold. A value of 0 disables CCD.

Attached is a .blend that shows what CCD could be useful for. (Done in Blender 2.5 SVN)
collision.blend (82.5 KB)

I think the physics timesteps setting messes with how much force an object needs to move at a high speed, last I’ve checked you need to increase the force the higher the timestep number. I don’t think CCD should change how much force is needed to make’X’ object move at ‘Y’ speed like the timestep value does.

At least that’s my experience with timesteps.

Changing the substeps does not appear to change the speed of the little balls. However, even at 5 physics substeps (which brings this demo up to 5~ms physics) the balls are still poking through quite a bit, but there is no tunneling.

I haven’t dismissed the idea of adding it, but I would like to see a more clear cut example of when CCD would be needed. Although, the though of not having to increase the physics substeps because one object is going too fast might be reason enough.

Is it possible to increase the physics steps on a per object basis? That way you can mark which objects are high speed.

The substeps are a global setting for determining how often the physics engine should run. So, it can’t be done on a per object basis.

To me, that would be more useful than CCD.

I would think that we can have both the CCD and additional collision management options like the bitwise masks and collision layers.

CCD for objects going too fast to collide properly otherwise, and the others so we can control if object A should be able to collide with object B, but not object C.