Jump to content

Kill RBD Point objects on collision


Valerio Di Napoli

Recommended Posts

Hi guys,

I was wondering if there is a method to delete all the RBD (created with RBD point node) when they collide on a specified object or they go too far away.

I have to do a huge rbd simulation with a lot of pieces, so I want to optimize it by killing all the objects that go away from the camera.

Thanks

Link to comment
Share on other sites

Possible wayis to create group of dynamic objects with something like:

distance(ch("/obj/cam1/tx"), ch("/obj/cam1/ty"), ch("/obj/cam1/tz"), dopoption($DOPNET, $OBJID, "Position", "tx"), dopoption($DOPNET, $OBJID, "Position", "ty"), dopoption($DOPNET, $OBJID, "Position", "tz")) > desired_distance

and then use Delete DOP to delete this group.

But expression might be quite slow for big amount of objects.

Link to comment
Share on other sites

One more solution is to use sopsolver to delete geo based on certain condition in dop.

Refer the attached file. I am using the group node in sopsolver with bounding box option. Use delete sop, select group name and set the option delete non selected. Set the required box size in group sop.

OR

Use UV texture sop in sop solver with Texture Type set to perspective from camera and delete geo based on uv values. This way you will be able to delete geo outside camera view. But I could not set up this in H12. It crashes as soon as I select the camera in uv texture node. This setup works fine in H11. I tried this setup with both the solvers RBD and BULLET in H12 but it didn't work.

Am I missing something? Or is it a bug?

test.hipnc

Edited by sadhu
Link to comment
Share on other sites

One more solution is to use sopsolver to delete geo based on certain condition in dop.

Refer the attached file. I am using the group node in sopsolver with bounding box option. Use delete sop, select group name and set the option delete non selected. Set the required box size in group sop.

OR

Use UV texture sop in sop solver with Texture Type set to perspective from camera and delete geo based on uv values. This way you will be able to delete geo outside camera view. But I could not set up this in H12. It crashes as soon as I select the camera in uv texture node. This setup works fine in H11. I tried this setup with both the solvers RBD and BULLET in H12 but it didn't work.

Am I missing something? Or is it a bug?

Maybe it's better not only delete the Geometry data but the whole dynamic objects? Something like in attached file.

3ak_killDOPsbydistance.hipnc

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