tagosaku Posted August 21, 2020 Share Posted August 21, 2020 (edited) 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 Edited August 21, 2020 by tagosaku Quote Link to comment Share on other sites More sharing options...
bunker Posted August 21, 2020 Share Posted August 21, 2020 (edited) 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 August 21, 2020 by bunker 1 Quote Link to comment Share on other sites More sharing options...
ziconic Posted August 27, 2020 Share Posted August 27, 2020 (edited) 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 August 27, 2020 by ziconic 1 Quote Link to comment Share on other sites More sharing options...
tagosaku Posted August 28, 2020 Author Share Posted August 28, 2020 Thank you, Julien and Ziconic. I am going to test it!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.