Nick da Silva Posted May 23, 2015 Share Posted May 23, 2015 Hi all! I'm trying to do a PBD sim of a character who's body turns into sand over time. My problem is that I'd like the sand as it falls to collide with the moving body but obviously the parts of his body that have turned into sand should no longer be collided with as they are no longer there. This poses a big problem that I have not found a solution for. How do you have a collision object that's topology is changing over time? Houdini cannot interpolate between frames where the point count/order changes which makes complete sense but what is the alternative? Can anyone offer a solution or alternative approach for me? In the attached file you can see the spread (in red) where the character is turning into sand. The parts that are not red need to remain as collisions. Thanks so much! Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 23, 2015 Share Posted May 23, 2015 Have you even tried colliding with a mesh that has changing topology or are you just jumping to that conclusion? Just make sure you have sub-frame data and it shouldn't be a problem with the the Dop substeps. Quote Link to comment Share on other sites More sharing options...
Nick da Silva Posted May 23, 2015 Author Share Posted May 23, 2015 Hi David Yes, I've done plenty of tests and none of them work. The sub frame interpolation freaks out because the point order is completely different from frame to frame. Then when it gets to the next integer frame it jumps back to the correct collision geo and there is plenty of penetration and the particles go crazy. Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 23, 2015 Share Posted May 23, 2015 Not sure what you are doing, but it works fine for me. Threw together a real quick example, nothing fancy. Heres a gif of it as well (click it!): collisionChangeTopo_dv.hipnc Quote Link to comment Share on other sites More sharing options...
Nick da Silva Posted May 23, 2015 Author Share Posted May 23, 2015 (edited) Thanks so much! That's interesting. I've been using the collision source node to create my collision geo. Yours seems to work just fine with the primitive count changing even on sub frames. Edited May 23, 2015 by Nick da Silva Quote Link to comment Share on other sites More sharing options...
johner Posted May 23, 2015 Share Posted May 23, 2015 (edited) You might try assigning the point number to an id attribute on each point of your collision geometry before any simulation. Then unlock the Collision Source SOP ("Allow Editing of Contents") and look for the compute_velocity node and turn on Match by Attribute. It's possible that parameter should be promoted to the top-level of Collision Source. Edited May 23, 2015 by johner Quote Link to comment Share on other sites More sharing options...
Nick da Silva Posted May 23, 2015 Author Share Posted May 23, 2015 Ok, so I publically confess my stupidity. Thanks David and John for taking the time to help me I was writing out my geo after modifying the topology but before converting it to VDB for collision. So I was being forced to use the timeblend to try to create the sub frames for me which is what was not working. So if I go back and remove the writing out of the geo and let it calculate the vdb all the way from the original geometry (which has consistent topology so the sub frames interpolate correctly). It's a silly mistake but I was trying to speed things up by writing out the data. Anyway, it seems to be working now. Hopefully this can help someone else from making the same mistake. John. Thanks for the reply. I'll definitely look into that as another solution if I run into more problems. Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 23, 2015 Share Posted May 23, 2015 If you need to write out the geo like that, it is also possible to write out sub-frames, and not only integer frames. I don't have time to explain that right now though, so it's something you could research if someone else doesn't pitch in Quote Link to comment Share on other sites More sharing options...
Nick da Silva Posted May 23, 2015 Author Share Posted May 23, 2015 (edited) Thanks David. Using the hou.frame() python expression I was able to write out the sub frames as well and it works great! Really appreciate your help! Edited May 23, 2015 by Nick da Silva Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.