Blender Fracture Modifier - Compound Fracture Support

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
Post Reply
scorpion81
Posts: 11
Joined: Sun Apr 08, 2012 10:01 am

Blender Fracture Modifier - Compound Fracture Support

Post by scorpion81 »

Hello,

i am the developer of the Fracture Modifier in Blender. For some time it has been using rigidbodies and fixed constraints to simulate connections between shards inside a fractured object.
But as this method becomes very slow with say, 5000+ rigidbodies and a lot of constraints, i was looking to add compound fracture support to the modifier.
For this purpose i took and modified the "FractureDemo" of bullet and added it into a branch of blender, and the basic principle works already.
But i have some kind of problems to control the fracture simulation as accurate as with simulating real constraints.

In my modification i use a new dummy "btCompoundConstraint" type, a "btFractureDynamicsWorld" subclass and a "btFractureBody" subclass. I calculate / build the connections inside the compound based on those
dummy constraints, which are not added to the world base class and thus are not really simulated by a solver (so this performs faster than using say, fixed constraints). I had to replace the "recomputeConnectivity"
function which operates on N^2 of the collision object count by this method, because it slowed down simulation of larger amounts of shards massively.

The construction of the compounds as well as the weakening of connections / breaking off shards happens manifold-based. (with gluecallback called once at sim start, and fracturecallback from solveConstraints())

I see that this connection calculation atm cant replace a full blown constraint solver.... but now my question (especially to Erwin)

Is there a way to let compounds be destroyed nearly as controllable as with constraints, but without losing the performance gain and the bomb-proof glueing between compound children ?
I was experimenting with weaker thresholds at constraints with smaller masses (both partner masses added), but i cant let small shards break off before bigger shards (the bigger ones create bigger forces due to higher (volume dependent) fractions of the total object mass).

So again (especially Erwin), do you maybe have some suggestions about how to improve the control ?
And.. everyone is invited to test the build (or compile it first, the provided builds are outdated) and give some feedback either here or in the according BlenderArtists Thread.

http://blenderartists.org/forum/showthr ... e-Modifier



A build of the Fracture Modifier can be downloaded here:
http://df-vfx.de/fracturemodifier/ (older version, still without compound support)
https://drive.google.com/folderview?id= ... aring#list (only the ubuntu version has an outdated version of the compound code inside)

Source code is here:
http://git.blender.org (branch: fracture_modifier)
https://git.blender.org/gitweb/gitweb.c ... e_modifier

the main modifications of bullet are here:
https://developer.blender.org/diffusion ... /Dynamics/ (btFractureBody, btFractureDynamicsWorld)
https://developer.blender.org/diffusion ... aintSolver (btCompoundConstraint)
https://developer.blender.org/diffusion ... rigidbody/ (changes in rb_bullet_api.cpp, RBI_api.h)

Furthermore, there is a MOD_fracture.c here:
https://developer.blender.org/diffusion ... rs/intern/

and a fracture.c and a modified rigidbody.c here:
https://developer.blender.org/diffusion ... el/intern/

Hope to hear some feedback :)
hyyou
Posts: 96
Joined: Wed Mar 16, 2016 10:11 am

Re: Blender Fracture Modifier - Compound Fracture Support

Post by hyyou »

Hello, scorpion81

I have played the plugin. It is great and thank for your help in the forum!

Now, I am interested in your code and still digging it.

Besides the code itself, do you have some document / more description about your modification of Bullet?
It will really help my digging process.

If you don't reply, I will stalk you in Blender's forum instead. :wink:
Post Reply