Selectively active rbd instances based on proximity to other active instances

   2709   5   0
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Hi,
to cut simulation time I want to have only a small part of my rbd packed objects set to @active = 1.

This is the scenario shown in the picture: a collider sphere is scaling up from 0 to 1 in an area filled with tubes.
The red tubes start with @active = 1, once a non active tube collides, it needs to wake up and be @active=1.
After a tube doesn't move for 1" it needs to be deactivated.

I'm using a Pop wrangle to set the @active attrib during sim time, but I don't know how to get the collision data..
Edited by Andr - 2019年8月1日 12:46:37

Attachments:
Q_rbdpacked_activation.hiplc (391.7 KB)
popwrangle.JPG (38.4 KB)
activerbd.JPG (131.8 KB)

User Avatar
Member
900 posts
Joined: 2月 2016
Offline
ah, I guess I should use the sop solver instead of the pop wrangle to get the data impacts..
Edited by Andr - 2019年8月1日 19:46:53
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
I have a new issue now.

I need to access impacts data in a wrangle inside a SOP Solver, but if I connect ‘impacts’ node to wrangle's input1 my array operations and group setting are reset on each frame.

However it would works just fine when ‘impacts’ node is not connected to the wrangle.
I have produced an hip file

My end goal is to use the i@otherobjprimnum to group the rbd packed objects as soon as they collide.

Attachments:
Q_SOP_solver_reset.hiplc (270.8 KB)
sopsolverreset.JPG (89.6 KB)

User Avatar
Member
8525 posts
Joined: 7月 2007
Online
it seems to work as expected, however don't inspect it inside of the solver
if you look at the spreadsheet of the boxes/Geometry data, you will see it correctly
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8525 posts
Joined: 7月 2007
Online
however for what you want can't you just use sleeping?

in SOPs before your OUT_boxes, put point wrangle
i@bullet_sleeping = 1;

then your RBDs start asleep and will be woken up by collisions
Edited by tamte - 2019年8月2日 21:42:25
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Hey, thanks for checking the file. Now it seems to work, don't know what was that, I was sure that I was checking the geo spreadsheet while the viewport was displaying the parent dopnet with ‘not following selection’ toggle.


In case of a simple domino effect: is this the right way to permanently put to sleep an object once it reaches a stationary condition?
if(i@isdead==1) 
{   
    i@bullet_sleeping = 1;
    f@deactivation_time = 0;
}
else if(f@deactivation_time > .2) 
{
    i@bullet_sleeping = 1;
    f@deactivation_time = 0;
    i@isdead=1;
}

It seems to work, but I'm wondering if it's really efficient, because I'm noticing that when guide geometry is displayed, the red (deactivated) objects seem to flicker, like it's still computing the simulation for that object. However no flickering occurs with the real geometry.

Attachments:
domino.hiplc (341.2 KB)
inactive domino.JPG (75.6 KB)

  • Quick Links