Yes, its a mouthful – Multibody Dynamic Simulation. It simply means that you add gravity and air properties to your Blender environment, add physical and aerodynamic properties to your collection of Blender Objects, and then watch how it all behaves by simulating physics, mechanics, kinematics, aerodynamics, aeroelastics, etc. Some really smart researchers in Milan, Italy have been working on the open source code for over a decade, and now their code which is called MBDyn is hooked into Blender. The Python script and a video tutorial are available. Even if multibody dynamics is not your thing, the approach to adding attributes to Blender objects using context sensitive menus may be useful for your next Python script. You can download the source from here, and/or view the 17.5 minute tutorial on the lower part of the home page at this website. The MBDyn code was developed at Politecnico de Milano, and is available here.
O.K., I’ve downloaded one of the windoze binaries, which seems to work. Just one question, how do you make mbDyn accessible from Blender, as it says in the script? Thanks again.
In Linux, you’d copy the executable into /usr/local/bin, or some such place. For windows, not sure of the answer to your question. If you must use a C:… prompt, you could edit the line in mbdyn_gui.py
Just noticed that Sourceforge presented only one of the two scripts at its main download page. Corrected to now show both mbdyn.py and mbdyn_gui.py. Both scripts are needed to run the application.
Setup on Linux requires compilation of MBDyn, a C program.
After that, just use the script like it was any other Python script.
As for Windows, it was reported above that the precompiled mbdyn binary works. Seems that as long as this binary is in your executables path (i.e. saved in a folder with other executables), it would be accessible to Blender. Then, use the two mbdyn scripts like any other Python script.
If you are more comfortable running Python from the Blender Text Window, copy the mbdyn.py file into a folder that is in the Blender scripts path, then copy the mbdyn_gui.py file into a Text Window and press Alt-P.
By works, I mean it didn’t throw up an error when I double clicked it. The binary I’m using is mbdyn-msys-2008-03-27.exe. The later one kept asking for cygltdl-3.dll, I d/l’ed Cygwin, but to no avail. Just for the record, when I try to run the script, the command window says it doesn’t recognise mbdyn, the script needs some modification to call the exe in Windows. I know it’s possible (Yaf(a)ray, Lux etc.) to call an executable from a python script, I just don’t know how to do it. Any help from someone who can write Python would be greatly appreciated. Thanks.
You could then change…
call([‘mbdyn’, ‘-s’, ‘-f’, mbdyn.filename])
to something like…
call([‘C:\Windows\Programs\mbdyn.exe’, ‘-s’, ‘-f’, mbdyn.filename])
The only feature lost by switching from 162 to 161 is the Progress Bar while mbdyn is executing. In that case, Blender will not respond until mbdyn has finished executing is simulation.
That’s the ticket! Thanks for that. I got it working and now I’m trying to work through your video tutorial, I’m getting some errors from mbdyn, but I’m not sure if I did everything correctly. At least that shows it’s working. Good show, thanks again.
Sweet! Order of object selection in the tutorial is important. Make sure you have the correct active object before adding the attribute. Look for which object is brighter in the tutorial, and then double check by looking at the names in the Pop Up Block.
As for checking mbdyn, try this. From a new Scene with one Cube, select the Cube and make it a Body. Then create a Gravity element. This should run ok. After pressing Display and then animating, the Cube will drop. (When you start the animation, make sure you are looking at a side view relative to you gravity vector.) If you have an error, check the Windows console and let me know what it says.
I don’t know if I totally got what happened in that tutorial video, or if I’ll need it in the near future, but it might very well be the most impressive thing I’ve seen so far in a GFX programme
One usage note: A simpler method for locating Bodies was implemented. Instead of typing in an offset vector, use a Rigid Element to position and orient a Body relative to any other Element.
The above tutorial, Swingin’ Suzanne, illustrates what in physics is called the double pendulum problem. An audio voice track has been added to explain the tutorial.
Also, a new 7 minute video tutorial is available showing how to quickly model a Glider Airplane, give it mass and aerodynamic features, and add gravity and air properties to the environment. Then, the glider is launched at an initial velocity and the simulation is run. This tutorial can be viewed at www.baldwintechnology.com/blender.html .
By the way, over 100 copies of the scripts have been downloaded from Sourceforge. I’d appreciate feedback either in this Forum or as PM from anyone who has attempted to use these scripts.
I am sure you know what you are talking about. But I got lost as soon as you started talking my EM BEE DYN. You need to explain this script and what it does in simple 3d artist non programmer and no physics student terms