Controlling Force Field for Specific Geometry in Destruction Simulations in Houdini
Download Houdini File: Destruction_Force_Field_Apply_to_Specific_Geo.hiplc
On my previous video, covering Destruction for Force Fields where I demonstrate how to setup a very defined force field influencing the destruction simulation in the dopnet. There was a question that was left in the comments of the video (links below) asking how the force can be directed toward selected geometries and leave other geometries within the same dopnet unaffected.
Controlling when to Break Glue Constraints in Houdini
The above links to corresponding blog posts and the respective videos.
Sphere as the Other Geometry
I added a sphere to the existing destruction scene as an rbd packed object into the dopnet network. The objective is to have the force field continue to influence how the wall gets destroyed without affecting the sphere, which is also within the same dopnet.
Most of the changes are made inside the geometryvop node where this will trigger the force field and decide which geometry will get which force applied to it.
“target” Attribute Controls Which Geo gets Force Applied
I create a target attribute that gets attached to the sphere polygon, which is the key to controlling which geometry will get targeted to apply the force field to inside the geometryvop.
Inside the geometryvop node, I attached an extra if condition, which decides whether the force will be applied to the current point geometry or not applied, as there are two paths that the final force output can be computed.
VOP’s are Parallel Processing Nodes
Now remember VOP’s are parallel computing nodes, where it computes through ALL points at the same time utilizing all the cores in our PC’s. This is why Houdini is performs really well with multi-core systems. The more cores you have the better!
You also need to understand how if blocks work in Houdini. Please check out a previous post I did that explains if blocks in more detail:
Important Note
I think it’s important for me to mention here that I did try to create the sphere as a RBD Object without packing it and it didn’t seem to work the first time. I didn’t have time to debug that way and instead I just packed the sphere geometry and created the target attribute right. This seemed to work well with the dopnet and the RBD Solver and the rest of the existing setup I already had.
Not sure why mixing a RBD Object and RBD Packed Object would make a difference, but I didn’t have much time to debug it. It seems to work well with this setup if I use both matching RBD Packed Object for the fractured wall and sphere.