|  | Re: making cable faling - how to avoid the cable intersect it self? by Steve Sayer on Sep 23, 2005 at 6:24:24 am |
Hi, r303. This is a tricky one you've got.
First of all, I believe that you've made the creation of the cable a little too complicated. If I were attempting this scene, I would have started out with a softbody curve for the cable path; no need for clusters or a series of rigid cubes. With a softbody curve, you can apply a spring object automatically, instead of creating spring constraints one at a time. Also, overall, the processing necessary to achieve the motion should be greatly reduced because the softbody is a much simpler setup.
All that being said... I'm not sure if there's an easy solution to your problem.
The trouble is the way collisions are detected--in fact, the way collisions are defined. A collision (someone please correct me if I'm wrong?) is the intersection of a point's path with a face of a collision object. Got that? A *point* intersecting a *face*. Other intersections--for example, between edges--are not detected.
This makes collision detection and self-penetration for any kind of tube or cable problematic. In general, we want to define these objects using a few control points, with a smooth interpolation between them. That's how NURBS work, and when you created your series of cubes along the length of your curve, that's how your setup worked too. But the problem is that, since we're only detecting collisions every so often along our curves--where the control points are--the spans between our control points will be free to penetrate geometry and each other.
I honestly don't know if there's a quick and easy solution for this. In my softbody method, I think there's no possible way to fix it. In your method, you could use a 'brute force' method, and keep adding cubes until the gaps between them were very narrow. But this would be computationally expensive, and I'm not sure if the results would be good.
If there are just a couple of places where your curve self-intersects, you could fudge things by creating a small, invisible passive body and keyframe it to block the sections of the curve before they go too far and cause self-intersection. But this is an ugly, labour-intensive solution and the results, again, might not look good.
Hmmm. Maybe if you used a plane instead of a curve--a 'ribbon'--you could prevent THAT from self-intersecting, then extrude along one of the ribbon's isoparms, instead of a curve?
I'm sorry I don't have more to suggest; if I think of anything else, I'll be sure to post.
-Steve
| |