Custom POP bounce directions?

   1083   1   0
User Avatar
Member
4 posts
Joined: Nov. 2016
Offline
Hi all, I wanted to go about being able to control particles bounces off a collider geo based on an applied normal map. I figured something out myself that works ok but I'm sure there are better ways! I wound up creating my own bounce system essentially by using a POP collision detector and a POPVOP which matches hittime from the detector to the current frame and then assigns any particles that match a new velocity based on hituv. It works surprisingly well (given one conceit) even though I'm sure this is a very bad way of doing it. The main issue being in order to get 100% hit reactions I have to add 1 frame to the particle's hittime for it to ever get matched with the scene's current time, so in effect the particles react to collisions one frame too late. And of course using subdivisions at all breaks everything.

So my question is what the better and more "correct" way to do this would have been, ideally being independent of frame and based instead on actual hit time, or at least substeps if activated. I'm sure VEX is an (the?) answer but as a Houdini newbie who's decent at scripting already, I'm kind of trying to learn the tools/nodes available first before resorting to just programming my way through stuff. I thought about trying to see if there was a way to extend houdini's built in bouncing, but I can't for the life of me find where bounce behaviors actually get calculated by houdini: I tried diving into both the Static Object and popsolver, but all the dynamics and gas operators in those are way over my head. I see a lot of stuff labelled sliding and sticking and killing...but no bouncing!
User Avatar
Member
4 posts
Joined: Nov. 2016
Offline
To add, I just figured out that switching to hitnum to trigger my pop vop solves the timing/frame issue, I didn't realize before that attribute was exactly the kind of momentary hit flag that I was looking for rather than a hit counter! This removes the 1 frame delay and works with substeps now, I guess that was my main issue I wasn't understanding.

It doesn't look like it's possible to access houdini's internal bounce operations (I've narrowed it down to the gas integrator I think?) so just modifying the velocity on hit, in proper simulation time now rather than scene frame time, whether through VOPs or VEX or whatever else seems as low-level as I'm going to get?
  • Quick Links