My original post on this work has more examples and a screenshot if you didn’t see it.
I updated my version of the topix cloth python interface and uploaded a new example video.
If someone compiles the module for windoze or OSX or other blender platform, let me know and I’ll get them into the .zip file.
EDIT: removed temporary links while stephern2002’s server was down.
Example4.avi - shows a cloth dropped onto a stairs and blowing down it. This is a complete hack now, but a reasonably effective one and reproducible. 1.5M download.
Cloth2.zip is smaller now at about 1/2 a meg. I removed the vks from it as I couldn’t include all of them with the file at 15M and my web space is limited to 5M. Looking for more web space now, :-). The source code and Makefile are in the .blend file within the .zip. Compiled modules for linux i386, p4 and athlon are included. READMEs, HOWTOs, Changelogs, etc are both in the .blend and in the .zip.
EDIT: The initial cloth2.zip file had a pentium4 compiled topixmodule.so in it, it now contains an i386 compiled topixmodule.so and should work for all linux intel and amd based blenderheads. Sorry for the inconvenience.
The original file is still available, but has NOT been updated. Its only interesting if you can’t run the simulator and just want to see the animations on your screen or render them. Its likely to disappear sometime in the not too distant future.
The most significant user visible changes to this release are:
- removed 100 frame limitation by using RVKs and guiding user to convert those to absolute VKs as it can’t be done with python yet.
- faces are now supported by generating vitual spheres, this is just a temporary hack to test viability of some other internal changes.
- memory leaks are less, but still there. eventually, they will be eliminated.
- added a few more options for controlling the simulation and exposed them in the UI.
- Initialize is gone and Run Simulator does everything.
Other changes are from the changelog:
First round of C code cleanup, both readability and some
refactoring of some handling of the python references.
Hopefully, there’ll be fewer memory leaks now, although I
expect many remain as of yet. Its hard to tell with the
memory though because of garbage collection. I’m trying
to force some now in the python code to see if that stops
the heap size of the blender process from growing ad
infinitum.Changed from adding absolute vertex keys to adding relative
vertex keys in the python code to get by the 100 frame limit.
this works pretty well, although it means the user must
hand edit the IPO themselves as python can’t do that yet
for vertex speed IPOs.Eliminated the Initialize button as the only thing to
do after that is to run the simulator, all other actions
require you to re-initialize.Started laying the structure down to allow for more types
of collision detection.Exposed the collision object radius size multiplier as
a new setting in both the module and UI.Added the ability to control the first frame vertex keys
are inserted. This allows you to pre-roll the cloth
simulation so the cloth reaches the desired state before
vertex keys are inserted.Added support for generating spheres from faces and performing
the collisions against those.
Things that have to happen:
- Memory leaks must be eliminated. The code is now much cleaner, hopefully a final cleanup of the code and some reworking of the internals will take care of this issue.
- Look at the long term affects of doing the animation via the VKs, its likely that other methods of storing the result or allowing for a render time simulation may be much better methods. VKs do have some interesting benefits though, like being able to loop and abuse the other IPO/blender animation features.
- Find someone to compile the module for non-linux x86 platforms.
Things that are under consideration:
- Examine building a general frame work for effects/simulations of this type to work within.
- Provide better collision support, actually using faces would be best, although there are issues of how to triangulate the quads in a way that is consistant with how blender does it.
- deal with the animation system better. deformations, object ipos, etc. should be handled much better than they are.
- add support to blender’s python API for speed IPOs and flipping the Relative/Absolute Key switch (only needed if simulation results continue to be stored via VKs)
- add support to animate the parameters, possibly use Emptys and their scale, i.e. have a Wind Empty’s x, y and z scales affect the wind velocities of the simulator.
- provide a means of storing and retrieving settings.
- lots of other stuff I’m forgetting right now.