Jump to content

Constraints, custom velocity and active attribute


logix1390

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

Link to comment
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

Link to comment
Share on other sites

Hi, thank you guys for the responses.

@tamagochy

 

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

@Graeme & @vicvvsh

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?? 

Link to comment
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

Link to comment
Share on other sites

@Graeme

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 ! 

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

Link to comment
Share on other sites

  • 5 weeks later...

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.

Guest
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...