Jump to content

Mass Object As His Color?


Recommended Posts

There are two ways you could do this. One is to do it as an expression on the RBD Fractured Object DOP. To do that, you would need some way of relating the DOP object name or id to a point in the source geometry. In your example, this is pretty easy because each piece has the same number of points. So you could put the expression:

point("/obj/Sphere_with_point_color/null1", $OBJ*42, "Cd", 0)

in the Mass parameter of the RBD Fractured Object DOPs.

A more general solution (which requires no information about the source geometry) is to set the mass of the objects after the objects are created using a Modify Data DOP between the merge1 and rbdsolver1 nodes. At that point in the network, each RBD object has its own geometry attached already, so you can reference the Cd attribute on the DOP object's geometry rather than referring to the original SOP geometry. In the Modify Data DOP, just set the "VALUE 0 Name" to "mass", and the "Value 0 Float" to:

point(".:$OBJID/Geometry", 0, "Cd", 0)

I hope this helps.


Link to comment
Share on other sites

A couple things about this hip file. First, the ModifyData node is not set up to change the mass of the boxes, which explains why it isn't setting the mass. I added the expression above to set the mass avlue on the boxes, and the mass value got set corectly. However this resulted in some of the boxes having a mass of zero, which seemed to confuse the RBD solver. So I added "+0.1" to the point expression for setting the mass, and eveything worked as expected.

Second, I noticed the Modify Data was setting a value called internal_gluethreshold. I understand why you did this, but it will have no effect on the simulation. The value you want to set is actually gluethreshold. The internal_gluethreshold parameter on the Glue Object DOP is referenced by an RBD State DOP inside to set the gluethreshold value on the boxes.


Link to comment
Share on other sites

Thanks Mark

I suspect that internal glue = gluethreshold :)

But i have another question.

In that scene black box have glue =0 and they must move down and white box stay glue together.

But this not working, why?

Where I can see mass of each object for example? Something like Spreadsheet for DOP?

Can i use sop group in dop level?

Sorry for my question but DOP documentation is soo small.


Link to comment
Share on other sites

Glue can only be broken by a collision, so until the black boxes hit something, they will remain glued to the other objects.

If you change one of your panes to "Details View" while looking at a DOP Network, you'll get a tree view which shows you pretty much everything there is to know about what's going on inside your simulation. There are a couple of topics on the Side Effects forum (www.sidefx.com/forum) talking about that tree view and what it shows (search for "simulation tree view" or "details view").


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...