Showing posts with label sop solver. Show all posts
Showing posts with label sop solver. Show all posts

Friday 12 April 2019

solver sop and moving geometry

So, the Solver SOP doesn't behave as "I" expected with animated (ie. moving) points/geo.

You need to manually update the position if you want your geo to still move!
SOOOOOOOOOO. Inside the solver, copy the P (for position) attribute from Input 1 to Prev Frame...

Weird stuff. But hey.

removing RBD from a sim

Sometimes you need to remove an RBD from a sim completely. Eg, you're using a block to push something and then need it to get out of the way...

Make sure you have a group for it on SOP level. It will probably be a point group, as you're most likely using packed geo.

Now use a SOP solver in your DOP network. Attach it to a multisolver, alongside your Bullet/RBD solver..
Inside the SOP solver, blast the group that you created earlier. Use a switch node or some other timing device (you could use a point wrangle with removepoint I think)  to trigger the group's deletion.
Eg. Switch node  could use $F>1000. Here it will switch from "all the geo" to "all the geo minus the group" input.

Tuesday 15 August 2017

Shattering an animated object. Eg. flying saucer smashing into something

Say you want to make a moving object smash into bits. Eg. A flying saucer that's been hand animated, which then needs to break apart dynamically.
As usual this isn't going to be straightforward :)

Shatter and pack geometry as usual, only what we need to do is ensure the points are not active. You can be double sure by laying down a point wrangle and setting i@active=0;

In your DOP network, make sure the RBD is not an active rbd as initial state. Set it to deforming static object. This should be done in the drop down menu. Now if you hit play, the object should not simulate at all & only follow it's given animation. "Overwrite Attributes" is NOT ticked.

We will use a sop solver & a point wrangle within to set the active value to 1. I've found using an activating shape like a box to set points into a group (using the bounding option) works best for this. eg. the saucer rbd points don't become active until they pass through said box. The attribute "deforming" (an integer) must be set to 0 once the "active" value switches to 1. This is so it no longer animates, or as Houdini refers to it, "deforms".
We use a sop solver so that the active value stays at 1 and doesn't reset to 0 once it passes through the activating shape. What we also need to do is use this sop solver in conjunction with the Bullet solver. This is done with a multi-solver.

Things I've found that are a bit problematic are glue constraints... Will look into this.
Update on glue - 

Houdini 16.0.504.2 has a weird thing... The Constraint Network's "Overwrite with SOP" attribute's default value is supposed to only import the SOP on the first frame...but it seems to behave as if it's always importing it. As a result, set it to 0 (zero), so that the animation of the object is ignored. This seems to make the glue constraints work properly.

https://drive.google.com/file/d/0B2eKYZ42BvalZnFaY0NZMkhwb3M/view?usp=sharing