Help - Search - Members - Calendar
Full Version: Collision damage
Hash, Inc. Forums > Technical Direction and Development (Learning Animation:Master) > A:M Tutorials and Demonstrations > Newton Physics
heyvern
So I was intrigued by the concept of creating "realistic" collision damage to a bouncing or hit mesh. My first idea was to use ALL newton and somehow assign bones to points on a mesh. That seemed a lot of work and not very... flexible. So then I thought about using cloth. Portions of a mesh made of "stiff" cloth. It sort of worked but... dang... gravity and "inertia". It crushed nice on the first impact but then the "crushed" area would "reshape" when other collisions take place.

Still working on the technique but here's what I ended up as my first test:

Click to view attachment

I have the 8 corners as groups in a fairly dense box mesh. I assign the cloth material to one at a time and run the cloth sim in 8 separate chor actions (otherwise the sim "resets" the other corners each time it's run). After that I just hide all but one corner at a time and delete all the spline keys for each corner except when it hits the ground. This is a bit tedious but not that tedious. I should have included more patches in the corners or made the box more dense so the crush area isn't so "blocky".

This could be really cool using a dense larger surface and having it hit by something. It would deform the cloth pretty realistically maintaining the "shape" of the object that hits it, for example a car crash simulation or something like that. I would also like to simulate that fantastic "rippling metal" on the skin of the airplane in Superman Returns. When he catches the airplane in the ball field and the metal skin "ripples" down the surface? I know this could be done using hand animation and poses but I would love to "simulate" this using cloth and newton physics. It was such a cool little detail that blows your mind.

p.s. I think I could streamline the process by changing the "Use chor range" in the cloth sim. I could just figure out exactly where the collisions happen and only sim those frames. You have to do the newton sim first so I know where the hits are. Then it would only add keys in each chor action for that spot. The sim would run WAY faster (1 or 2 frames) and no need to delete the keys afterwards.

-vern
heyvern
Oh yeah baby! Using the chor time range for simcloth is MUCH faster and easier. In the time since the last post I redid the whole thing using that technique. I just scrub the time line, check the hit points and set the time range for simcloth a few frames before the hit (if I go after the hit the cloth loses it's crush shape).

After I do all the "hits" I just set the key on frame 0 and the last key for each spline crush spot to "hold". Then it even adds damage to the damage there if it hits again in the same spot. Works a treat! I love this! Wooohooo!

I won't post the render because it looks exactly the same.

-vern
heyvern
Stunt man Thom! Need to do a car crash next.

Click to view attachment



-vern
heyvern
I keep thinking if all of this "physics" could be combined somehow... cloth, newton etc. I would love a "cloth" setting that is "stiff". Right now cloth behaves like... well cloth. I would like a "version" of cloth that only deforms when hit by a deflector. That would create easy to do collision deformations.

-vern
nimblepix
WOW!
robcat2075
Very impressive Vern!

QUOTE(heyvern @ Apr 4 2009, 06:21 PM) *
I keep thinking if all of this "physics" could be combined somehow... cloth, newton etc. I would love a "cloth" setting that is "stiff". Right now cloth behaves like... well cloth. I would like a "version" of cloth that only deforms when hit by a deflector. That would create easy to do collision deformations.

-vern


Can cloth material settings be keyframed so they are stiff when you want them to be and not when you don't?
heyvern
QUOTE(robcat2075 @ Apr 4 2009, 07:32 PM) *
Can cloth material settings be keyframed so they are stiff when you want them to be and not when you don't?


I haven't tried that yet. That would be similar to my current technique but much easier. I could key frame the cloth settings at the "hits" and then run it in one pass. I'm not sure if it will work though because of how cloth works. A single cloth material "reacts" all the time. Rerunning the sim for the same cloth in the same chor action resets ALL the cloth splines even if you set the start and stop. It clears the splines that were already simulated. So even if you could key the cloth settings then the cloth will probably reset any CPs moved in previous key frames.

Another problem is that it's very difficult... very very difficult to isolate individual groups of points in the spline key frames after a cloth simulation to remove or change those keys just for small sections. You can't "group" select CP's in muscle mode and have them show as CP's in the time line. You have to select each CP by clicking on each one... yikes! That is why I had to do the cloth sim many times using individual cloth groups in separate chor actions. By doing it that way each chor action only has keys for one "spot" on the mesh.

In a perfect world the "stiff" cloth setting would be set for an ENTIRE cloth mesh. The WHOLE MODEL could be cloth and it would only deform when hitting a deflector. Considering how the current cloth works this should be... in my head... a relatively "easy" thing to do. It would simulate REALLY FAST since you only simulate single points of contact and gravity, inertia etc aren't required. This would be pure brute force.

I put this on AM Reports as a feature request. Another idea I had was instead of doing a huge rewrite of cloth or a new plugin, to just add an option to cloth and the deflector to have a HUGE GIGANTIC tolerence setting for "movement". So cloth is still cloth but it's so stiff it doesn't move. The deflector would have a huge "mass" setting so it would move the cloth when it hits. For example you can make cloth really really really stiff so it barely moves. But the deflector has no setting for that. If the deflector has to hit the cloth hard enough to move it then when the object bounces and changes direction the same force moves it the other way. Plus I have found those supper high settings cause cloth to go all wonky on me. wink.gif

I only just came up with this tonight... so... haven't really pushed it too far. wink.gif

-vern
heyvern
Haven't tested the keying of cloth yet. I just HAD to do a car crash. It was like... a compulsion. An obsession. Now that it's out of my system I can move on to more practical testing. wink.gif Anyway, I hope these guys have that insurance company run by the leader of "The Unit"... what ever it is. That always cracks me up. Are we suppose to think he is "under cover" as an insurance salesman? Are those commercials cover for his military job? So wasn't he president at one point? How did that work out? I never watched 24 after the first season. wink.gif

Sorry... got distracted... waiting for the render... la ti da... de dum... AH! It's ready...

Click to view attachment

So basically the same car twice in a chor. Front end is mostly cloth. Used a dynamic "box" shape as the "proxy" for the moving car. The stationary car is a static newton object. The proxy box shape is "offset" back so the moving car will "go in" far enough to crush the cloth and still bounce off. After simulating newton I then constrain the car to the proxy box object and then hide that object. Then I simulate the cloth. Since both cars have the same cloth group I don't need a deflector. Each car "crushes" uniquely based on the cloth. Since both hit at the same time I only need to simulate once based on the contact point from the newton simulation.

-vern
mtpeak2
Cool.
robcat2075
That's very a very promising technique! Smart thinking, Vern!
heyvern
I wanted to add some more detail to the crash.

This uses a breakable explode object linked to the car. I also added a cloth bumper. I used a very low patch count for the bumper. This seems to help. I had a bit of trouble with the head light. It is positioned relative to the car but obviously the front of the car crushes in which should move the headlight. I can fix that easily enough probably using a simple path constraint to one of the splines in the mesh of the car. There is way to much "bounce" or elasticity to the headlight. Pieces bounce really high. wink.gif

Click to view attachment

-vern
steve392
That would be great for anyone doing accident /insurance stuff.Nice one Vern
TheSpleen
great work! no doubt!
Paul Forwood
Keep banging the cloth together, Vern! You're really getting somewhere! smile.gif
Kamikaze
Now that is super cool !!!! I like the way you think this stuff out...
heyvern
Finally a new episode of Myth Busters was on last night. I watch that with my dad when I visit. It was a "demolition" special. I just had to try the car under the truck convertable trick with AM. I think it works pretty well.

Click to view attachment

I had to do the newton sim and cloth in a few different stages.

I am using the "Cuda Car" model from the first AM Extras disk. I modified quit a bit to work for this test. First I detatched the roof and put it in a separate model. This model is both a newton dynamic object and a cloth object. Next I modified my "newton car" to match the size and shape of the car model. I then constrained the wheel bones body bone of the car to the those parts of the newton car. This works really well. The car rolls along and the wheels and body move more realistically then just a straight translation. The wheels don't spin "perfectly" but that could be fixed.

Next I built a ramp for the car. I tried using a force but that was a pain to turn on and off all the time. Plus the force pushed on the wheels and made them act wacky. It was easier to just roll the whole thing down a very steep curved ramp to pick up speed. At the bottom of the ramp I placed the "truck" for the car to drive under. Instead of trying to use newton physics to simulate the slow down of the car hitting the truck I just put in a small force object under the truck pointing at the approaching car and turned it on just for about 5 frames. Just enough to slow it down a bit.

So after the car was "newton'ed" I set up the roof for simulation. First I constrained it to the car so it would follow along until it hit the truck. At that point in the time line I keyed the enforcement of the constraints to 0% with a hold key so the roof would "come off". I then turned off all the other newton objects and simulated from the truck hit to the end. So the car drives along... at the point of impact the roof pops off and bounces a bit on the ground. This is not the final newton sim for the car because the cloth damage will change its shape and have to be redone.

Next I set the cloth sim for about the same start frame as the newton sim. Just at the impact. I added a cloth deflector to the ground, car and truck. I set the cloth to sim about 7 or 8 frames as it passes it under the truck. In the roof model the whole mesh is not cloth. I discovered I had to leave a few splines on the back out of the cloth material so that it would "peel" back. Otherwise the whole roof just "froze" and fluttered in the "breeze".

So that's all set up. I sim the cloth and bingo! The car approaches the truck. At the point of impact the roof peels away and then the mesh "freezes" as the sim stops. Now the problem is that the newton sim done earlier doesn't match the shape of the roof anymore. I delete the keys for the roof after the impact. I reset the newton sim to start just at the point of the final key of the mesh cloth deformation. Redo the newton sim just for the roof and now it bounces based on the "new shape" of the dented and crumpled roof.

-vern
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.