In this one I have changed to adding up all of the impacts rather than the mixing that was going on with the attribute transfer in the last one. It is just a vopsop which loops through the impact points and adds up the deformation.
One problem I was having was when I deformed the object, the centre of mass was in the wrong spot. I couldn't figure out a good way to modify that in DOPs... so i ended up moving it in the sop solver, to get it centred again. Another problem was that the object wouldn't be in contact with the ground after it was deformed, so it would end up in mid air with no velocity.. so I added a move attribute in the sop solver, then in DOPs I used a modify data node to move the rbds. The problem with this is that for one step of the sim it would be hanging out in mid air, and then snap to the ground. I ended up just adding the move to P in SOPs after the simulation.... not great because the object isn't solved at that position. At least it doesn't snap into position... To make this less obvious I have done a few substeps on the dopnet.
Also added some displacements to add detail to the deformation. I had no idea how to do that for a while but I found a way which is pretty good. In the sop solver i have recorded the impact direction and impact amount, this gets accumulated. After the simulation I also added a compression attribute by comparing the rest edge length to the current edge length. In the shader I am getting P for the noise by doing ( rest + (impactDir * impactAmount)) so the noise compresses radially around the impact point, this is multed by the compression attribute. This worked better than I expected!
anyway, here is the video:
and the .hip file is here!
I should leave a comment as I am thankfully downloading your hipfile!
ReplyDeleteGraet job and thank you for sharing your file!
-Jangwhoan Choi-
For the geometry after an impact occurs, do you rebuild the SDF? I have to say your displacements look fantastic. The blue cylinder that lands near the beginning is my favorite.
ReplyDeleteFantastic work!
If the geometry changes, houdini recalculates the SDF :)
ReplyDeleteI am confused as to why you have to move the objects post solve then.
ReplyDeleteIf an object has downward velocity, and hits the ground, it stops. On that same frame I am deforming the object away from impact point. So the object ends up with a lot less velocity and not contacting the object it collided with. For objects falling onto the ground it was a bit wierd since they would hit and then not be contacting the ground.
ReplyDeleteI tried to move the object in DOPs to compensate but that was always a frame delayed. I still move the object in DOPs but also move it in SOPs on just the contact frame... hope that makes sense :S
Also if you check out the .hip file and bypass the modify data stuff in DOPs and the stuff in sops it should be more obvious.
ReplyDeleteAh, now I see! I haven't actually had time to open the .hip file, sadly. That makes perfect sense, for whatever reason I was imagining the objects just hanging out in the air indefinitely, which in hindsight makes even less sense!
ReplyDeleteAgain, wonderful system!
absolutely love this! Hopefully you see this comment- but how would you go about deforming a larger, more complete piece of geometry (say, a car)? I'm having some issues working it out, even with the new soft constraint node
ReplyDelete