Copy SOP without intersecting geometry
3869 6 2- slaybeast
- 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!
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
- N-G
- Member
- 209 posts
- Joined: March 2018
- Offline
- toadstorm
- 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.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
- slaybeast
- Member
- 4 posts
- Joined: March 2017
- Offline
- slaybeast
- Member
- 4 posts
- Joined: March 2017
- Offline
toadstormThank 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?)
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.
Edited by slaybeast - July 15, 2020 13:04:41
- toadstorm
- 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).
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
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
- slaybeast
- Member
- 4 posts
- Joined: March 2017
- Offline
-
- Quick Links