Jump to content
Darric

"Stamping" RBD Glue Objects

Recommended Posts

Let's say (hypothetically) I have a hundred pieces of unique geometry, each of which has been pre-shattered, each numbered neatly as SOPs named "thing_00" through "thing_99". Is there a quick and easy way to bring these objects into DOPs as individual RBD Glue objects, without resorting to a 100 RBD Glue Object nodes? Tricks such as using the creation frame parameter on a single RBD Glue Object node seem to still only create a single Glue object, with the result being that each of objects comes into DOPs glued to each other. INSUFFICIENT.

I looked briefly at the Copy Object and Copy Data DOPs, and the description of the Copy Data DOP sounds exactly like the sort of thing I want to do (Copy stamping in DOPs, oh my!) but naturally, isn't really applicable. It seems a pity that the Copy Object doesn't seem to offer similar functionality. Mind you, the description leads me to believe that it might be the way to go - is there any way I can modify the source geometry for each object after I've used Copy Object, as I would be able to for, say, position, etc. using RBD State?

What's the best way to do this?

Thanks in advance.

Share this post


Link to post
Share on other sites

Let's say (hypothetically) I have a hundred pieces of unique geometry, each of which has been pre-shattered, each numbered neatly as SOPs named "thing_00" through "thing_99". Is there a quick and easy way to bring these objects into DOPs as individual RBD Glue objects, without resorting to a 100 RBD Glue Object nodes? Tricks such as using the creation frame parameter on a single RBD Glue Object node seem to still only create a single Glue object, with the result being that each of objects comes into DOPs glued to each other. INSUFFICIENT.

I looked briefly at the Copy Object and Copy Data DOPs, and the description of the Copy Data DOP sounds exactly like the sort of thing I want to do (Copy stamping in DOPs, oh my!) but naturally, isn't really applicable. It seems a pity that the Copy Object doesn't seem to offer similar functionality. Mind you, the description leads me to believe that it might be the way to go - is there any way I can modify the source geometry for each object after I've used Copy Object, as I would be able to for, say, position, etc. using RBD State?

There's a couple of ways to do this. For a one-time situation, I would use your first idea: use the creation frame to loop through the different SOPs and create the objects, then either save the DOP state out, or do that creation within a set of runup frames. As long as you give the top-level RBD Glue object a unique name it should work. If you look inside the RBDGlueObject, you'll see it's just an empty object and and RBD FracturedObject, where each piece from the Fractured object has it's "glue object" set to the name of the empty object. So that first name needs to be unique. See the attached .hip for a really basic example.

If you're trying to set up a system where you can do this a lot, then maybe it's worth messing with CopyObjects and CopyData, but their use is a bit, um, opaque. The CopyObjects DOP, as you've noticed, really just creates the raw objects; I think the intent is you then use the Copy Data SOP to stamp unique data on them as needed, as it's really the data that defines the object behavior anyway. You can override the geometry after copying the objects with a SOPGeometry DOP, and the glueobject with an RBDState DOP, and you could do both of those attached to a CopyData DOP to use stamping.

Or get tricky with your naming conventions, which is what I did in the "dynamic fracturing" part of the Voronoi Fracture stuff. If you download the latest release of that from about page 6 or from that thread, look inside the "FracturedPieces" DOP, which copies the object that was just fractured, then overrides the geometry and RBDState on a per-piece level. The exp​ressions in the CopyObjects DOP there are pretty complicated, but the basic workflow is similar.

Good luck. Let me know if you have more questions, though I'm about to leave town for a week or so and may not be online.

multiple_glue_obj.hip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×