Jump to content

suppress object from RBD sim


wildon

Recommended Posts

hello guys,

i try to mix two kinde of effect. 

a disintagration effect and the collapsing effect. 

i want when an object dissappear, the surrounded objects fall. 

i know how achieve the desintagration, i know how 

make a collapsing.but i have a issue. 

my idea is achieve my rbd sim at the frist time and use the result and apply the my desintagration setup. 

does anyone know how to make an object collide with none of the others during a smimulation ? 

i means at the begining i need everybody react as a regular RBD but at the certain time, certain object vanishing. 

i hope i'm clear

thx

Link to comment
Share on other sites

Ok i'm stupid! 

just use a multisolver everything work almost fine...

i animate my disparition like that 

https://vimeo.com/99555694

but when a run everthing (sop solver and rbd Solver) more piece disapearing.

https://vimeo.com/99555808

no body have a clue? 

 

thanx. 

 

 

delete_from_bullet.hip

Edited by wildon
Link to comment
Share on other sites

When you delete a piece, all other pieces after it will shift their order, so their point id will be different from the original. Thats why only first piece is correctly deleted.

Instead you have to store each piece id as attribute and use it to get attributes from driver geometry.

 

Simplest way is to use name attribute with wrangle node instead of point:

inside sop solver in dops remove point and delete nodes. connect dop_geometry to first, and object_merge1 to second input.

create attribWrangle and set it to run over points.

 

add this code:

int drpt = findattribval(@OpInput2, "point", "name", s@name, 0);
i@disapear = point(@OpInput2,"disapear",drpt);
if(i@disapear==0){
    removepoint(0,@ptnum);
}
Edited by rayman
Link to comment
Share on other sites

thank you Rayman.

it working but i confess i don't understand why... 

For me the wrangler attribute do exactly the samething that my point node with the "attribute to match" and the delete. 

I compare my delete node wich your wrangler attribute and they sort the points 

exactly the sameway. 

It working is the most important now but i'm a little bit frustrated to don't understand...

Link to comment
Share on other sites

It`s not the same thing. You are thinking in SOP context instead of DOP. I`ll give you simple example.

 

Let`s say you have 5 points with numbers from 0 to 4.

In SOP:

On first frame you just want to delete pt2 so you set disapear attribute to 0.

 

In DOP:

On the first frame all points will take correct attributes from SOPs.

DOP pt0 from SOP pt0

DOP pt1 from SOP pt1

DOP pt2 from SOP pt2

DOP pt3 from SOP pt3

DOP pt4 from SOP pt4

 

Then delete node will delete DOP pt2, and then all the poins after pt2 will shift their ids:

original DOP pt3 will became DOP pt4

original DOP pt4 will became DOP pt5

 

On the second frame attributes won`t be transferred corectly:

DOP pt0 from SOP pt0

DOP pt1 from SOP pt1

DOP pt2 from SOP pt2

DOP pt3 from SOP pt3

 

which is actually equal to:

original DOP pt0 from SOP pt0

original DOP pt1 from SOP pt1

original DOP pt3 from SOP pt2

original DOP pt4 from SOP pt3

 

so the point node will copy disapear attribute from original pt2 to original pt3 and delete node will delete it.

  • Like 4
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.

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