All these videos were created during practical tests on the interaction of HDA simshot and flip simulation.
Simshot is a Houdini SideFX digital asset that I created to accelerate the development and customization of scenes with emulation of shots from various types of weapons, accompanied by various effects when hit. This is a free asset, you can download it and use it in the production of your content.
In this project, I wanted to test and configure the operation of this asset with fluid simulation. The basic goal of the project was to create settings affecting the fluid through the v@velocity attribute that would have enough parameters for flexible adjustment of the magnitude and direction of the force.
This did not cause any problems, I collected similar settings earlier and quickly coped with the task. Then it became necessary to hold the fluid inside the fragmented geometry simulated in another DOP network. The fragmented geometry had to break down during the simulation, which meant that I also need to adjust the effect of fragments on the fluid as objects for collisions. This also meant that in order to achieve a realistic effect, I needed the fluid not only to collide with the fragments, but also to influence them.
I have not found any useful solutions or ideas for the interaction of particle simulation and packed geometry simulation on the internet. As it happened with the asset and happened in many other cases, I came up with it completely myself.
The impact of particles on fragments of geometry, in addition to obvious problems with recursion, caused a number of difficulties with pieces having high or impulse values of the force vector attribute. For example, when an object with a high velocity and a small mass moves towards the flow of particles. In a collision, the object must move some distance inside the particle stream before it stops and starts moving along with the stream. Another example is when an object located among the particles is sharply affected by some kind of force. The initial momentum of this force should be reduced by the friction force inside the liquid medium, depending on its density and viscosity.
I managed to implement all this through controlled force vector attribute interpolation, which takes into account the number of particles, the speed and direction of movement of the particles and mass of the object. I did a lot of testing in this project and created several presets to flexibly control the transfer of forces between simulations. This is not a real recursion, but it allows you to combine several simulations at the same time and it looks quite realistic. This effect can be further mitigated by increasing the number of simulation substeps. The HDA simshot is based on VEX code placed in the SOP solver, in which I made my adjustments so that the logic of the simulation substeps coincides with other simulations, and does not made 4 iterations in one step.
I have achieved my goal. The presets and settings created as a result of working on the project allow me to create similar scenes procedurally with the possibility of flexible control of various parameters to achieve the desired effects.
I used the Karma render with the denoise enabled, so the picture has some flickering. I tried to make the picture beautiful, but my main goal was to set up controlled interaction between simulations, so the quality of the render was less important.
Tools: Houdini, Karma.
In this video, different layers have different viscosities.