Constraints, custom velocity and active attribute

Recommended Posts

Hello,

I have a bit of an interesting problem with my simple bullet simulation.

I added custom velocity to my fractured pieces which basically explodes them outwards in dops. I got it to work perfectly , even with a glue constraint.

Now when I make half of my pieces active and the other half non-active, then NOTHING explodes in dops. It just stays still.  I figured out that if I disable my glue constraint , then it works.

Why is the glue constraint interfering with the active attribute? This is driving me up the wall.

My goal is to explode half of the wall with the custom velocity and constraints I created.

I will attach my scene for anyone that wants to take a look.

Thank you

constraint_network_active_attribute.hipnc

Share on other sites

glue constraint doesn't work with forces and velocities, U can use hard or cone twist for it or manually delete glue bonds.

Share on other sites

you could sidestep the problem by adding this code to a wrangle before your constraint output

```int pt = findattribval(1, "point", "name", s@name);
int a = point(1, "active", pt);

if(a == 1){
removepoint(0, @ptnum);
}```

Feed the output of make_half_active into the second input

Share on other sites

If one half of wall is not active it is not necessary make constraints for this. You could achieve your goal by making constraints only for the active part.

Edited by vicvvsh

Share on other sites

Hi, thank you guys for the responses.

Don't glue constraints work with forces and velocities? What are the glue constraint looking for in order for it to break ?

Thank you . This worked perfectly. However, even though I understand that physically removing the constraints will work, I don't understand why I have to do that....

When everything is 100% active , it will explode the way it should with the constraints....but if only 50% is active the constraints will not explode.... Why do the glue constraints not respect the velocity when given a certain area to be active??

Share on other sites

It explodes when they are 100% active because within the first frame or timestep your object is colliding with the ground and breaking the constraints. Turn off visibility on the rbd packed obj and you should see what your constraints are doing.

Then look at the geo spreadsheet for the constraint geo (prims) you will see some usefull info

Share on other sites

Thank you for the response

Ok so from what I understand is that the constraints break on impact with the floor even if it is very very slight. It creates an impact attribute which is also multiplied by the velocity set on the packed pieces (which i am not sure why it would do that but ok..)

Is there a way to set a custom impact attribute in sops so that it will override the impact attribute automatically created in dops ?

Thank you for the help !

Share on other sites

There are a lot of way of working with glue. First one it use impact object and its basic way. Second one its delete glue manually in dop using some attributes or distance to another obj or something else. I never heard about adding custom impact attribute because its internal bullet attribute and easy to use different approaches.