(Nonconvex rigid bodies with stacking) paper in 2d

Started by
17 comments, last by Structure 19 years, 1 month ago
Hi, I have a question about the paper "Nonconvex rigid bodies with stacking" : http://graphics.stanford.edu/papers/rigid_bodies-sig03/ As it predicts where the objects will be in the next step for collisions then resolves the collision where the object are at the moment, wouldn’t this cause an object that has an inelastic collision with the ground plane to stop just above the plane? [Edited by - Structure on March 2, 2005 1:52:53 PM]
[happy coding]
Advertisement
Yes.
Ok, just checking I got the implementation correct,

As im making 2d system, its quite noticeable and therefore unacceptable at the moment,

To alleviate this ive been detecting collisions where the body is at the moment , this of course leads to lots of interpenetrations.

Any suggestions?
[happy coding]
you apply impulses to prevent future penetrations.

this is what i got so far: http://home.planet.nl/~woute890/domino.zip

press s to start and r to reset.
Quote:Original post by Structure
As im making 2d system, its quite noticeable and therefore unacceptable at the moment,
...
Any suggestions?


In 3D you don't normally see collisions side-on, so you don't see this. I came to a similar conclusion with my water experiment where you could see the compressibility of the fluid in 2D, but I bet it's more hidden in 3D.

A suggestion... well how about in the part of the method that has you put the objects back to their starting positions after collision detection, for any object that only collides with a static object, just move it back by the penetrationDepth along its movement vector instead of restoring its original state. If you're using swept tests for collision you might even be able to do this for pairs of moving objects as well.
Mmm, yes that’s an interesting idea I’ll implement that tomorrow and see how it looks.

I did implement a swept test based on olliii’s work he posed a while back, but became dissatisfied with the fact that rotation is not included in the sweep, I looked at Stephane Redon’s work but decided it was a bit to much over head as im targeting the engine for pda use, then I kinda got lost in something else and haven’t thought about it.

Well thanks all, ill get back to you how it looks.
[happy coding]
Hi,

Ive been thinking about this paper some more,

I had to implement a separation impulse dependent on the collision depth to prevent objects from sinking in to each other, but doesn’t doing this defeat the object of the paper.

Lets say we have an object sitting still on a surface, the object's new position is predicted and collision detection run, because of gravity this will detect a collision with the floor, this is resolved with the objects old velocity (0) so nothing happens, then gravity acts on the new velocity and contacts are resolved this should give an inelastic bounce to 0 the velocity again, but the separation impulse will give a small upward velocity and the object will jiggle around…. I think… or am I missing something here,

Really we need a system that can distinguish between predicted overlaps and real ones and only apply separation on the real overlap, but I cant see a way of doing this without performing collision detection twice, something I don’t want to do.

Ideas?

[Edited by - Structure on February 18, 2005 5:58:16 PM]
[happy coding]
Actually , if anyone’s reading this thread in the future , I think ive come up with a solution,

Basically Oliii’s work allows you to detect collisions forward in time and overlaps, so instead of moving the object to the predicted position, im going to try doing a swept test with the new velocity from the old pos.

This way the separation impulse need only be applied if the objects actually overlap, otherwise we can move the object to the point of collision, then resolve with the old velocity as before.

Well ill se if this works over the next week.


MrRawl: if you do get to read this could you explain how your friction approximation works in your jiggle code, im having trouble implementing a solution for this.
[happy coding]
Brief description is on
http://www.rowlhouse.co.uk/jiglib

"Friction - At each collision point the normal impulse has been calculated. Applying friction at each point is treated like a collision - calculate the impulse required to prevent the two points on the two objects diverging. Now compare this tangential friction impulse to staticFriction*normalImpulse. If it's greater, then friction won't be able to stop the objects, so apply dynamicFriction*normalImpulse in the tangential direction. If it's less then apply the originally calculated tangential friction."

Does this make sense (especially after looking at the code in jiggle)? If not I can try to explain it better...
Thanks again for your demo, ive got it all working correctly now.


Right now on to that sweep problem I was going on about…..
[happy coding]

This topic is closed to new replies.

Advertisement