Rope

Grom

11-03-2007 06:54:05

I understand the basic principle of rope is that it's a string of shapes connected with joints. To render such a thing, what would you do? Would you create a segmented cylinder with bones and basically skin the thing in realtime? Or would you destroy/generate the mesh each frame dynamically?

Also what bodies would you use? I'm leaning toward spheres actually, as they're the least costly one to calculate, but it means that the rope will be a string of beads so parts of the rendered mesh could potentially intersect other meshes. If you do it with capsule shapes, however, it won't ever really do that but I think it will look more jagged.

Furthermore, and this is a side question, but what is really the best method for "deactiviting" a body. By that I mean, if I need to hide a body from the rest of the physics simulation, but want to keep it handy (so i can "turn it back on" instantly at any time), how do I do so? Until now the best I've come up with is to move the thing to a distant location, and then put it back in place when needed. There must be a better way than that!

betajaen

11-03-2007 10:11:56

There was a topic on the Ageia forums about using cloth as rope. It would be certainty way more accurate for it, but all the cloth demo's I've seen using NxActors and Joints are using capsules.

To render, you just initially create the mesh, and each frame or two, just update the vertices.

As for hiding a body, you can: Hide the scene node, turn it kinetic, send it to sleep and put it in a non-colliding group.

Grom

11-03-2007 12:43:32

put it in a non-colliding group.

what does that mean?

wouldn't cloth be a bit computationally expensive? Or would it be about equivalent to the 20 or so bodies strung together.

betajaen

11-03-2007 12:48:13

Group: Make a group, that does not allow collisions with another groups. So if the two bodies meet, they would pass through each other.

Cloth: I don't know, the only way is to test. However I would say cloth may be slighty faster.

Grom

11-03-2007 22:25:19

I read the topic on the ageia forums, it seems like there are some collision issues with using cloth as rope. Plus in order to give it that little bit of volume you have to basically make it a soft body. I think that's a bit of overkill, I'll probably go with a string of shapes for now

danharibo

16-03-2007 13:48:41

Use a billboard? It's what source Does

betajaen

16-03-2007 13:55:49

Wut?

PhysX practically gives you the vertices and faces for you. Why use a billboard when you can use the mesh?

danharibo

17-03-2007 20:04:30

Wut?

PhysX practically gives you the vertices and faces for you. Why use a billboard when you can use the mesh?
well, i didn't know that. but if it only gave you the End of each segment, i guess a billboard would be a viable option.