Jump to content
wildon

suppress object from RBD sim

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

Share this post


Link to post
Share on other sites

you can either delete the DOP object using Delete DOP with activation set to some expression like $FF>100

 

or if it's part of packed fragments, just delete it inside of the SOP Solver

Share this post


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

Share this post


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

Share this post


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

Share this post


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

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

×