Approaching a collision/destruction problem, need help calculating energy propagation through bodies

Started by
15 comments, last by d07RiV 8 years, 7 months ago

Yes, I just remove the joint as soon as its lambda exceeds a certain amount. Everything else is just the usual simulation, it all happens naturally.

I have no idea how you would do it with an existing engine, as I've never used one, can't help you here :(

Advertisement

Yes, I just remove the joint as soon as its lambda exceeds a certain amount. Everything else is just the usual simulation, it all happens naturally.

I have no idea how you would do it with an existing engine, as I've never used one, can't help you here sad.png

Ok, but, as far as I understand, in real nature, the momentum is conserved, and if I do as you say, I remove the joints immediately after the initial touch, but if I don't apply any additional forces, would it still be correct, wouldn't a significant part of impulse be lost on the way? Say, a ball hits a single brick in the wall, the brick is detached from all other bricks. In real nature, the detached piece would gain some velocity from the impact, and fly off the wall, otherwise it would've just stayed in place in the wall, right? Even if the ball bounced back off the wall, there could be some chips flying off the other side, right? So they definitely gain some momentum of impact in real world. But what we see in the demo is not actually a proper momentum simulation, but is a result of a heavy projectile just continuing to push broken pieces inwards into the wall during sequential stepping after initial hit. In the demo, a projectile hits the wall, the piece is broken off, but it stays in its initial position until the moving projectile shifts it in some direction. It does not gain any velocity upon impact in this demo, right?


it all happens naturally.


In other words, how would broken pieces behave in your wall, if you'd completely removed the projectile from the world right upon impact? The whole wall would be shattered, but would still hold its shape and bricks would still be together in their initial positions, with all broken joints now removed, right?

Oh, good point I guess. I suppose you can limit the impulse produced by the constraints so they can't compensate for the whole impact in the first place (I'm think Bullet constraints support that)

* I tried removing the ball upon impact, it still breaks the wall - I can't see much difference when I limit the impulses. I guess its because constraints can't fix the displacement immediately.


I tried removing the ball upon impact, it still breaks the wall - I can't see much difference when I limit the impulses. I guess its because constraints can't fix the displacement immediately.

Yep... I guess all physics engines have some built-in bias in their joint correction... Therefore it still looks like working naturally, though it really isn't %) I will still try multiple joints in Chipmunk, we'll see were it gets. My initial question was about propagating the impulse, that is 'forgotten' in your model, through various paths via different joint-to-body links according to actual distribution of impulse along a 2d normal to hit surface. I think I also need some stress color-coding for bricks, so, I'll be busy with that for a while ) Thank you for your answers!

two basic ways to go about it:

1. fake it, as buckeye says - perhaps using a physics engine of some sort, as d07RiV suggested. a "directed particle system" is another possibility. two takes on the same basic concept: your falling wall is a particle system of bricks.

2. build you own little physics model. impulse, momentum, mass, friction, and gravity ought to do it. start with ball vs single brick. get that working. then do ball vs stack of two bricks, where the ball hits the bottom brick to knock the stack over. once you get that working, you should have everything you need for ball vs wall of bricks, brick vs brick, ball vs ball, etc. tweak the friction values to represent the cement. as the brick breaks free, friction would go from "cemented in place" to "loose sliding". impulse of the ball striking the wall would reduce the strength of the cement until the bond failed and the brick started to move. you'd probably have to model "cement bond hit points" somehow.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

Friction can't prevent separation, so you need actual constraints/joints to lock bricks in place.

This topic is closed to new replies.

Advertisement