Groups and dynamic fracturing.

   6197   5   1
User Avatar
Member
140 posts
Joined: July 2005
Offline
Has anyone found a magic bullet for dynamic fracturing of some objects but not others?

If you have an RBD glue object or a RBD point object, how do you set it up so that only obj_0 and obj_5 fracture? Right now, the fractureparms DOP processes everything it can see, which is why the shelf tool inserts it below the creator node of the object you choose at the prompt.

Currently, the only way I can do this without opening up the fractureparms asset and putting in a huge, there's-no-way-this-will-ever-look-slick-in-a-demo expression is to create my RBD point object, then make copies of the objects I want to fracture in a separate chain, delete the originals, and fracture the copies.

There's a better way than that, isn't there? Isn't there?
User Avatar
Member
140 posts
Joined: July 2005
Offline
OK, sort of answering my own question here, but a better way to do it is to put a delete SOP after the fractureparms SOP, turn off the Delete Objects x flag and delete the *Fracture* data.

Still, it would be better to add fracture data only to what's specified in a group field than to have to delete data off a subset of incoming objects. Although, I suppose you could append the delete DOP to the guts of the fractureparms DOP and set its object group field to be something like
User Avatar
Staff
809 posts
Joined: July 2006
Offline
Howdy,

The VoronoiFractureConfigureObject DOP is set up like the other *ConfigureObject DOPs. They all attach data to objects and set their parameters at a fairly coarse level, then the idea is you can use the different data DOPs below that in the network to tweak these values.

So, for example, if you created a bunch of objects via the RBD Point object but wanted a few to have a very high friction, you'd set the typical values at the RBD Point object level, then use a PhysicalParms DOP to change the friction (by affecting the attached PhysicalParms data) to change the friction on selected pieces.

Similarly, the VoronoiFractureConfigureObject DOP sets the fracture parameters for all the objects, then you can tweak the values on a per-piece basis by using a VoronoiFractureParms DOP.

You could also turn the Default Operation on the VoronoiFractureConfigureObject to “Set Always” then set the Maximum Fractures parameter to something like:


if(dopgrouphasobject(“.”, $OBJJID, “to_fracture_group”), 1, 0)


Dynamic fracturing is a bit special in that it has its own solver that runs after the RBD Solver, and you can turn that off entrirely by setting the “Enable Fracturing” parameter to 0. That sets a value for a SwitchSolver that will completely bypass fracturing. You can then use a SwitchValue DOP to turn it back on for just those objects you want. This will be the fastest approach for lots of Point/Glue objects, where you only want to fracture a few of them.

I'm attaching an example that shows a few different ways of conditionally fracturing pieces from an RBD Glue Object. Note the VoronoiFractureParms DOP has a bug in its parameter layout. All the data is correct, but the layout looks a little wonky past the first tab.

Below is a quote from the sticky in the .hip:

There are four possible DOP network paths shown here. In the first the glued objects are always allowed to dynamically fracture, so the initial impact will fracture the middle piece while the others stay intact until they hit the groundplane.

In the second, the Voronoi Fracture Configure Object has its Default Operation set to “Set Always”, and has an expression in the Maximum Fractures parameter that only allows dynamic fracturing once the objects have dropped below the initial point of impact with the stationary tube.

In the third, all objects start out with maxfractures set to 0, then a VoronoiFractureParms DOP is used to set it higher on a piece-by-piece basis.

In the fourth, dynamic fracturing is disabled completely, then
enabled using a SwitchValue DOP. This will be the fastest for larger numbers of objects, since the fracture solver won't run at all for those objects with fractured disabled.

Hope that helps

Attachments:
dynamic_fracture_conditional.hip (342.1 KB)

User Avatar
Staff
809 posts
Joined: July 2006
Offline
Er, turns out the “Enable Fracturing” parameter is internally set to “Set Always” within the VoronoiFractureConfigureObject, so actually the easiest way to do what you want is probably:

Group DOP to create a group “tofracture” with whatever objects
“Enable Fracturing” parameter set to:

dopgrouphasobject(“.”, $OBJID, “tofracture”)
User Avatar
Member
140 posts
Joined: July 2005
Offline
johner,

What I wound up doing was making a copy of the Voronoi Fracture Configure Object asset and exposing the ‘group’ parameter of the asset's internal voronoi fracture configure DOP. This was the solution that presented the least complexity to the user, but yours is way better if that's not an option, and better than deleting data piecemeal.

Just to carry it through, I modified the makeBreakable shelf tool and the makeObjectBreakable function to accommodate this. The grouping is a little sloppy; right now, the groupstring is every rbdobject from the selection set, no matter where the fractureparms asset is wired in, but it works, in that it behaves like you'd expect this tool to behave pick some dopobjects to make breakable and it makes those objects breakable, rather than everything coming from the nodes that created them. Some refinements would include basic python parsing stuff like comparing the selection set against the set of objects created by a source node and setting the group parm to be only the objects in both, or setting group to * if the selection set includes all the rbd objects from a source node.

As soon as I can get to my other computer, I'll post the tool and asset.
User Avatar
Member
140 posts
Joined: July 2005
Offline
Here's the tool and the asset.

Attachments:
vorFracConfig2.otl (29.0 KB)
fracture.shelf (5.0 KB)

  • Quick Links