View Full Version : MOTION DESIGNER: Rigid Body Dynamics Trick
07-03-2003, 10:37 PM
I had removed my initial text, but see my results below.
07-03-2003, 10:39 PM
07-03-2003, 10:40 PM
07-03-2003, 10:42 PM
07-03-2003, 11:16 PM
This is almost how I use MD now. The extra 2point poly string connectors however don't add much.
MD is not based on poly-poly or poly-edge collision. It is all point point. For a perfect example, make a big plane and drop any MD'd target object onto it. No collision.
MD_Scan with MD is basically what you have figured out. Also there is a lot of information how to use MD as a hard body dynamic collision tool on the old LW forum. I think you can search the new list for it though.
Still very nice idea.
Here is the link for the newtek forum with hard body use in MD:
07-03-2003, 11:30 PM
Well, the substructure setting gives quads diagonal springs automatically, but it's the internal springs from corner to corner that give the cube a lot of it's stability. Are you saying MD doesn't attach a spring to two point polys?
BTW, aren't MD collisions pt-poly based?
07-04-2003, 01:08 AM
Originally posted by Mike Pauza
Are you saying MD doesn't attach a spring to two point polys?
BTW, aren't MD collisions pt-poly based?
I can't speak for the code, although on the surface MD doesn't appear to use springs in the way most new soft body algos do. What you are trying to do would be leaps and bounds ahead of what is there now. Internal springs are what are needed (ala actual structural springs) not just outward point-normal springs.
It is definately only point-point based. Do that quick test to see what I mean. The objects will fall right through large poly faces when points don't collide with other points. Damn shame.
07-04-2003, 01:30 AM
Mike is correct. MD is point -> poly. The active element on the target objects (the soft- or hardbody) are the points, while the active element on the collision objects are the faces.
The reason an object might fall through another is probably a faulty setup (for example mixup of what is target and collison object).
Mike, I thought it was an interesting read aswell, but could you perhaps provide LWOs for those object (the lowpoly ones) as I'm not entirely sure I fully understood how they're made up?
07-04-2003, 01:33 AM
I have to ask, out of curiosity: how would a point ever collide exactly with another point? Except for very rarely by coincidence..
07-04-2003, 03:48 AM
that's great information Mike, thanks for sharing :)
07-06-2003, 07:38 PM
Well. I was not planning on exploring where and how MD fails, but that might be good for everybody. Let me set up some scenes this week and show everybody what I come up with.
07-07-2003, 09:53 PM
OK. After some more experimentation I came up with a fair example of how to approximate rigid bodys using MD. MD has some real problems however, so attempt something similiar at your own risk.
For this example I droped a coffee cup (see the reference object on the LightWave CD) on a table. I wanted to see if MD was capable of handeling both rigid and soft versions of such a simulation.
"Remeshing" the cup was the first thing I did. If you hope an object to behave like it's a real solid, then you need to give it a real structure...like your actually building something. Using a "poly or subpatch soup" simply won't cut it. To rebuild the cup I began by creating a cube primitive. My cube primitive is a simple cube that also has 2 point polygons connecting every possible point pair. This gives you a primitive with 6 faces, 12 edges, 12 face diagonals, and 4 inner diagonals. This cube arrangement is much more structurally stable than just a cube, and is a common primitive structural engineering packages use to simulate solids.
Anyway, once the cube primitive is made, you need to revisit your childhood block building days...just stack these suckers up to approximate your model...point pulling and copying/pasting along the way will speed you up and give you a better model though.
Once this structure was completed, I merged points and unified polygons so that the cup would be just one continuous object, not just a bunch of cubes...this makes all those cubes act as one in the simulation. I then deleted all the inner face geometry that would not be seen. Again, rebuilding your mesh is infinitely better than using just a "regular object".
I then imported the object into Layout and assigned it very stiff springs, low air resistance, and high viscosity values. For low gravity / low speeds, this arrangement worked very well (MD sure is flaky) and I achieved rigid body animation though soft body simulation and stiff springs. I ran the simulation again with lesser spring values to create a jello-like cup animation.
This simulation method has the potential to create both soft and rigid body animation..and can actually sometimes do a better job with rigids that most current rigid body simulators can, since few of them have the ability to produce rotational wobble (due to non symetric balancing) and spinning top / gyroscope type motions....but, the immediate value of this method of simulation/animation is currently limited because of MD's major accuracy problems. Hopefully in the future there will be something better than MD that will make this type of animation ndispensible.
07-07-2003, 10:40 PM
There is an extensive overview of using MD for hardbody colisions somewhere on the LW forum (help? anybody got a link?) I got this nice little bit from it:
put this line into a text file, then load that file into MD, also I had to increase the resolution to something like 2,000 or sometimes higher.
Xname="ball3" spring=10000 viscosity=10 subsp=1000 non_stl=0.03 cstress=150 friction=100
07-07-2003, 11:00 PM
There is one tutorial there but it's far from extensive. It works reasonably well for what it is though. The problem is that MD can only be expected to work in trivial and sporadic cases.
07-07-2003, 11:01 PM
Hi Mike! Is it possible you can share the scene files?
07-07-2003, 11:06 PM
Originally posted by amorano
Internal springs are what are needed (ala actual structural springs) not just outward point-normal springs.
If I need internal springs, I just model them into the mesh I use for calculation and play back the results on the mesh I use for playback. If the point order's the same -- great, I can use MD_Plug for playback. If the point order's different -- no problem, I'll just use MD_MetaPlug.
For example, the calculation model I used for these cables had internal rigid polygons that I deleted for the "playback" model:
The internal rigid polygons kept the cables from collapsing like windsocks. Because the only difference between the calculation and playback model was extra polygons and not extra points, point order was maintained for the playback model.
07-07-2003, 11:48 PM
Just sent you the scene dude.
Glad to see your using an internal structure. BTW, have you had much trouble with the MD_metaplug? I got it to work perfectly once, but on this example it make my model look like a shreded balloon.
07-07-2003, 11:49 PM
Got it! Thanks :)
07-08-2003, 08:46 AM
Wait,wait,what daz it mean-"internal rigid polygons",is it just like inner part of the object with different surface and hard body parameters applied on?
I tried much to get the similar result but it never succeded.
07-08-2003, 03:38 PM
An example of an internal structure for a cube would be to select two opposite corners of a cube and to make a polygon out of them. You then still have the cube, but with some internal structure.
Imagine your building a house. Unless you have wood trusses hidden underneath everything, it's not going to be very strong or stable is it? Can't build a house out of sheet rock and siding.
07-08-2003, 07:44 PM
For the few folks following this thread, here are some pics of cube arrays working together. These sims generated at about 10 fps without collision. They were stable with small deformations.
If you can view DivX and can stand a several meg download email me (firstname.lastname@example.org) and I'll send some vids.
07-09-2003, 08:23 AM
Oh,thanx a lot,Mike,I got it!But I've never thought that it works just as in real world,It seems to me that internal rigid polygon must be deformated in simulation in the same way as the rest of cube.
I'll try it soon!
Would be glad to see vids but I'm afraid several megs is too much,my box won't be able to get it.
07-09-2003, 11:18 AM
Mike,now I can get videos up to 15mg,I sent you mail
07-09-2003, 04:21 PM
I'm sending you some vids...about 11MB. Hopefully my AOL can handle it. :)
I'm hoping to get my site working so I can just let people download what they want at thier leisure. This whole remeshing idea is something that the community needs to be aware of and deserves a thread of it's own. It's the biggest reason MD has not lived up to peoples expectations. I'm still not thrilled with MD and I'm working on an MD replacement plug-in, but with remeshing properly I'm discovering that MD is starting to work a lot better. :)
BTW, I started working on some "truss" simulation last night with good results...more on that later.
07-09-2003, 05:37 PM
Great work Mike!
I am one of the many silent people watching this thread closely.
Celshader, care to share that scene with us or give us a bit of a tutorial? I too have tried many times to created hoses like that, only my results have been closer to a wet sock than a wind sock.
mike and celshader
i am watching this thread with great interest, perhaps in the future one of you could post a tutorial on your site(if you find the time);)
07-09-2003, 07:07 PM
Jockomo and m.d. :
Thanks guys! Dynamics is cool isn't it? Yeah, I'll be writing tutorials eventually, but I'm still very much in R&D mode. Attached is a pic of a "soft truss", although more computationally intensive than an "angular spring method" would be, it works very well for simple cases. This example was solved (using MD) at about 15 fps on my machine. If anybody wants the 6MB DivX video or the scene file just let me know. :)
BTW, by accident this screenshot looks a lot like PixelRanger's avatar...that guy's awesome. :)
mike, please send me the scene file:thumbsup:
i'm very interested in what you come up with for a plugin.
how long would something like that take for you to develop?
07-09-2003, 07:57 PM
What's your email address? A simple collisionless plug-in will hopefully be available in a month or two.
The above pic/animation was generated at about 200 fps on my laptop (not 15fps). Again, if anybody was to play around with the scene just email me at email@example.com or firstname.lastname@example.org
07-09-2003, 11:42 PM
I emailed you the files twice. Did you not get them?
07-10-2003, 01:07 PM
Great!Your vids in my box(more then15meg!)Hope to see it as soon as possible(I have internet access only at work,not always can download things quickly:shrug: )
07-10-2003, 03:52 PM
you have no where to post it mike?
i want to see please! but cant get large files in my email.
theres free server space these days isnt there?
07-10-2003, 03:53 PM
Mike,I saw your vids.Co-o-o-o-o-o-o-o-o-o-o-l!Great idea to build such internal structure but I have no idea how did you do this,how did u make all these inner polys,there is no any automatic way to create them,right?
07-10-2003, 04:21 PM
I have the web space, but having problems with my provider right now. I'll just email you the scene files later today if that's ok.
Glad you liked the vids. No, there is no painless way to build stuff like that, but it's not that difficult really. I'll hopefully get around to posting a "MD Mesh Building" thread in a week or two.
BTW, I built a monster of a suspension bridge last night, and I've got it simming under earthquake conditions (in the background while at work). Hopefully I'll have some cool stuff to show today.
07-10-2003, 07:48 PM
500 Meter Bridge during earthquake (see attachment). Email me if you want the 2MB DivX video. Check out NewTek's WIP forum for a couple of high res pics.
i got the files mike...thanks:drool:
01-15-2006, 02:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.