Copy SOP without intersecting geometry

   3869   6   2
User Avatar
Member
4 posts
Joined: March 2017
Offline
Hello!

I'm trying to sort this out. Basically I'm scattering points on to a torus and then using MOPS to offset/animate the points. I'm then using a “copytopoints” to copy cubes onto the points. The result is what I'm wanting, only problem is all of the geometry is intersecting. I've seen a lot of suggested solutions using RBD and what not, but seeing as I'm fairly new to Houdini I'm not too sure the best way to order the nodes to achieve that. I would love to know if there's a way to solve this with a simple VEX code maybe? Any help is appreciated!

Edited by slaybeast - July 15, 2020 12:52:21

Attachments:
MOPS_play.hiplc (453.4 KB)

User Avatar
Member
209 posts
Joined: March 2018
Offline
Hi there!
Unfortunately I don't have MOPs but You can use Point Relax for this.
Take a look at the HIP file below!

Attachments:
MOPS_play FIXED.hiplc (331.0 KB)

User Avatar
Member
359 posts
Joined: April 2017
Offline
If you wanted to handle the deintersection with Bullet, you can do so by setting the point attribute i@found_overlap to 1, and then putting your packed primitives through the RBD Bullet Solver with very high drag and no gravity. You'd need to make sure each of your packed primitives coming from the Copy SOP has a unique “name” string attribute… in the attached example I'm using MOPs Convert to do this, since you already have MOPs installed.

Attachments:
MOPS_play_bullet.hiplc (877.1 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
4 posts
Joined: March 2017
Offline
N-G
Hi there!
Unfortunately I don't have MOPs but You can use Point Relax for this.
Take a look at the HIP file below!
Thanks for the scene file! Unfortunately this approach still allows the geo to intersect each other as it animates
User Avatar
Member
4 posts
Joined: March 2017
Offline
toadstorm
If you wanted to handle the deintersection with Bullet, you can do so by setting the point attribute i@found_overlap to 1, and then putting your packed primitives through the RBD Bullet Solver with very high drag and no gravity. You'd need to make sure each of your packed primitives coming from the Copy SOP has a unique “name” string attribute… in the attached example I'm using MOPs Convert to do this, since you already have MOPs installed.
Thank you! That's definitely working, but I'm getting an error on the MOPs_Convert node for some reason. Also, is there a way to keep the animation of the points and still have the rbd bullet solver calculate the geo? Right now when previewing the rbd solver it works, but it's not animating (maybe that's due to the error on the MOPs Convert node?)
Edited by slaybeast - July 15, 2020 13:04:41
User Avatar
Member
359 posts
Joined: April 2017
Offline
You probably just have an older build of MOPs installed. Try installing the latest Experimental build.

If you want to animate the points AND have collisions, you're going to have to do a lot more work. You'll need to use a SOP Solver inside your simulation to push your packed objects into their goal positions / orientations / scales, based on what's happening in the SOP timeline. DOPs is a completely separate timeline from SOPs; all you're doing in the simulation is setting initial conditions unless you manually create new forces.

I'm attaching an example showing how you might force your packed objects to follow the goal positions of your animated geo in SOPs. Handling scale and orientation on top of that using forces is a much, much bigger problem, and unless you have some familiarity with linear algebra and some time on your hands, it will be pretty difficult to implement. You could try to directly pull the “transform” primitive intrinsic from your goal packed primitives and apply them to your primitives in the Geometry Wrangle inside your DOP network, though this could result in some jittering or other weirdness because it's not based on physical forces, and any changes to scale will require you to recompute the collision geometry each frame (this can be done using the roundabout method of setting your i@id attribute to -1 during the simulation).
Edited by toadstorm - July 15, 2020 14:30:28

Attachments:
MOPS_play_bullet_goalP.hiplc (661.9 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
4 posts
Joined: March 2017
Offline
@toadstorm - ok that makes sense. I'll look into getting the latest version then!

Thanks again for the scene file, I will see how far I can get based on the info you provided. I'm no math wizard, but we'll see how far can take it lol.

Thanks again!

-B
Edited by slaybeast - July 15, 2020 15:01:43
  • Quick Links