Gravity and Rigid Body Simulation

Hello everyone. I’m currently workign on an ODE module for animation and i’ve got soem working so i thought i’d give out doem DIVX 5.03 anims to show ppl

Http://www.angelfire.com/anime4/nuvares/Blender/ODE_test_1.avi
Http://www.angelfire.com/anime4/nuvares/Blender/ODE_test_2.avi
Http://www.angelfire.com/anime4/nuvares/Blender/ODE_test_3.avi

all are between 56 and 92 K so it shouldn’t take long to dl :slight_smile:

I’ll see about giving the module and some scripts out soon but Documentation might take a bit.

MacBlender

Update:

Got working on it and just about have the script and module ready.

just throwing up some more test avi’s that show multiple object interaction.

http://www.angelfire.com/anime4/nuvares/Blender/ODE_ballcube_1.avi
http://www.angelfire.com/anime4/nuvares/Blender/ODE_ballcube_2.avi
http://www.angelfire.com/anime4/nuvares/Blender/ODE_ballcube_3.avi

i’m lookign into getting complex objects to work but so far its limited to spheres cubes cylenders and planes. but i’m always working on it

MacBlender

Now tell me, can ODE handle polygon-define bounding boxes?

in the ode game engine stuff (built from cvs) there are only rectangluar prisms (fancy word for a scaled cube) and spheres. Even for static geometry.

It can also get very slow if you have a lot of objects that are touching each other. (think 2 minutes per frame with over 100 objects)

I’m lookign into that now and seeign what i can do.

in the ode game engine stuff (built from cvs) there are only rectangluar prisms (fancy word for a scaled cube) and spheres. Even for static geometry.

this ODE supports Cubes, Spheres, Closed Cylenders, and Planes but as i said i might be able to get more boundbox shapes as tiem goes on

It can also get very slow if you have a lot of objects that are touching each other. (think 2 minutes per frame with over 100 objects)

because of the way i script this, everythign is baked intot he object’s IPO curves which makes all the calculations doen before hand leaving render time good.

on another note this is the fastest script i’ve ever used that did so much, it took under 4 seconds to bake the animation into the cube and sphere and that included the gravity and rigid body calculation time.

till next time

MacBlender

Looks really interesting.

I’ll be looking forward to the rest.

Martin

This is very cool.

this looks very interesting. :o

It’s great! And it works with animations? This mean that if it create IPOs I can use a cube or a sphere to calculate the movement and then apply the IPO to a poly mesh, isn’t it?

Env

Hey:

Beautiful stuff! Game engine aside this has some GREAT applications for modeling & animation. PLEASE tell me this is intended for bf-blender not just tuhophuu?

Also: nit picking to be sure, but the ball does not “roll” but rather slides. Is this correctable?

-Bischofftep

Actually its a seperate DLL module so its only avalable in Windows for anyone else. sorry bout that. but it does work with Blender 2.28a which is what i used to make those avi’s

Also: nit picking to be sure, but the ball does not “roll” but rather slides. Is this correctable?

yeah it is, i’m working on the rotation implimentation now but the main problem is that Blender doesn’t export Quaternions which is what the ODE uses to prevent Gimble Lock.

if anyoen knows a good Euler to Quaternion script i’d be much obliged.

yes you can, but the bounds that are used in it must be specified before hand

the box is specified as havign an X length of 4, Y length of 2, and Z Length of 2
the ODE works the calculations alone the blender module only allows for the calculations to be processed into useable data

here’s an update for those watchign this thread.

the rotation ability is in, but with some problems. the problem is that because sin() is used in the formula the animation oscilates which doesn’t look good in animation.

if anyone would like a crack at the ODE early and is willign to help with soem problems then e-mail me at [email protected] and hopefully we can work this out.

windows only because thats the only one i use.

MacBlender

UPDATE! Yes its here, Rotation has been implimented.

check out these avi’s to see the rotation matrix at work.

www.angelfire.com/anime4/nuvares/Blender/Rotation1.avi
www.angelfire.com/anime4/nuvares/Blender/Rotation2.avi
www.angelfire.com/anime4/nuvares/Blender/Rotation3.avi

there you go, rotational rigid bodies in animation.

thanks for all of your questions and support. and thanks to all who e-mailed me to try and help… all zero of you :stuck_out_tongue:
got it done anyway and i’ll be doign some documenting of how it works and then i’ll put out the first version.

MacBlender

No one seems to be making a big deal out of this, but this is superb. This means non-game-engine physics. Wow. Thank you so much.

I join you Harkyman to say : This is TOTALLY INCREDIBLE !!!
Thanks a lot for this. I’ve waited this for a very very long time !!!
GRATS AGAIN !!!

Argh, don’t know why I didn’t mention this sooner, but I have a vectorial and matricial math module (mostly done by eeshlo, some little work by me) online here: http://www.clubinfo.bdeb.qc.ca/~theeth/vecf.py

hope that helps you a bit.

Martin

Well, I’d love to make a big deal out of it…

But I don’t yet quite understand what “it” is.

As I understand, there are two parts:

  1. A python Script, which presumably exports data to part 2…
  2. A windows program that actually does the math?

I’m fuzzy on how this all works. Can you elaborate?

I hate to sound selfish (heh) but making this something that works cross-platform would be very much appreciated by the Linux, Irix, BSD, and OS X communities within Blender. 8)

I’m impressed by what I see, I just can’t get excited about something I can’t use.

-Bischofftep

What ‘it’ is is a dynamics engine that simulates gravity and rigid body collision outside of the game engine where it was previously only accessable…

As I understand, there are two parts:

  1. A python Script, which presumably exports data to part 2…
  2. A windows program that actually does the math?

I’m fuzzy on how this all works. Can you elaborate?

actually its a python script that accesses a windows DLL that is in the blender directory. its an expandable module that will work with any version of blender but the blender module script will have to be modified with versions other than 2.28a…

I hate to sound selfish (heh) but making this something that works cross-platform would be very much appreciated by the Linux, Irix, BSD, and OS X communities within Blender. 8)

I’m workign on finding ways to port this module over to other systems but the main problem is that i’m workign with onyl one other person who uses MacOS which means that it’ll become available to that community but without other OS users helpign me i have no way of testing it on other systems…

I’m impressed by what I see, I just can’t get excited about something I can’t use.

Well i’m glad to see that its impressing you even just a little bit. :smiley:

MacBlender

well I am on OSX. Do you have a download file to play with ? I was testing out your first script in another post that only had gravity, and I asked you to create a demo file, but you never did, ( no hard feelings )

So I can beta test for ya if you would like . ^v^

no, no OSX file yet sorry, the other guy’s working on that but when its done you’ll be able to use my python scripts

And Here it is in all its glory the ODE DLL and python script.

the script only works for one cube and one sphere like in the the demo file.

the plane in the demo file is for show only the ODE sets the floor at 0.0 Z which means all objects need to be higher than that in their boundbox/sphere

www.angelfire.com/anime4/nuvares/Blender/BlenderODE.zip

Have Fun! :smiley:

MacBlender