Jump to content

how to access collision data of DOP network for a geometry Wrangle node and sopSolver


tagosaku

Recommended Posts

hi, I am looking for how to access collision data of DOP network for a geometry Wrangle node and sopSolver.

This example is that I try to delete fluidParticle if it's inside of collision. I know I can delete it in SOP level in advance, but this point is I want to know how to access collision data in DOP network, and delete particles in dop network.

I attached an example file. It would be great to show me how to write wrangle and how to create sopSolver network.

Thanks in advance! 

 

deleteInsideOfCollision.hiplc

2020-08-20 18_41_37-.jpg

2020-08-20 18_41_38-.jpg2020-08-20 18_41_40-.jpg2020-08-20 18_41_39-.jpg

Edited by tagosaku
Link to comment
Share on other sites

you can sample the proxy volume instead of trying to grab DOPs data: /obj/animed_collsion/VDB
if(volumesample(0,0,@P)<0)removepoint(0,@ptnum);

also you can sample this input as SOP: /obj/AutoDopNetwork:flipfluidobject/collision
that's the DOP data imported in SOP level, not sure that's very efficient though
 

Edited by bunker
  • Like 1
Link to comment
Share on other sites

In the Geometry Wrangle case, you can set up a Field Binding to access the value of the collision volume in the wrangle. Go to the "Data Bindings" tab, add a Field Binding for the "collision" field and set the VEX parameter to "sdf". In your wrangle code, remove the f@sdf = volumesample(...) line (since @sdf is now already bound for you). Also, change @sdf>0 to @sdf<=0 because, well, DOPs uses a different convention for designating where the "inside" of a collision volume is.

As for the sop solver case, you can duplicate the existing dop_geometry node and change its Geometry Data Path to "collision" to read the collision field as a volume. You'll still need to add a wrangle to check if a point is inside or outside of the collision volume though.

Edited by ziconic
  • Like 1
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...