Jump to content
Sign in to follow this  
Andrei_S

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.

Mark

Share this post


Link to post
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.

Mark

Share this post


Link to post
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.

Glue_Strength_as_point_Color_v2.zip

Share this post


Link to post
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").

Mark

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
Sign in to follow this  

×