@aswaab dumb ass idea here but what if you splat your velocity from the particles into a volume, hit it with vdb project non divergent, have that node output the pressure field, take the gradient of that pressure field and use that as your velocity? :0
Cuz in theory gravitational fields are equivalent to the gradient of the pressure field (the irrotational component of a velocity field). I’m just curious if that would give you a less streaky result when trying to make the velocity field from your particles…
It probably won’t but it’s at least an idea <:ICANT:1079254533609357433>
But like I guess the intuition here is that because youd be getting the pressure field, that field would be relatively smooth over the full volume, where as just splatting the particle velocities will be relatively discontinuous
image 0 is the velocity field just splatted into a volume and then advecting by that volume. image 1 is doing the same only we’re advecting by the gradient of the pressure. It changes the result though so it’s probably not what you want… but it does create the clumpys!
the scaling of the pressure field is something you might have to futz with. I found my notes on it…
“`c //if staggered volume @vel_pressure *= length(v@dPdx) * length(v@dPdx) * 4;
//if non-staggered volume @vel_pressure *= length(v@dPdx) * length(v@dPdx) * 1; “`
So in the case of my examples you’d want to use the top version which is multiplied by 4. That would give you the field whos gradient can be subtracted from the velocity field in order to make it divergent free. But like your mileage may very, that will definitely change the look of the advected volume…
Attachments in this post:
http://fx-td.com/houdiniandchill/wp-content/uploads/discord/20254505/25/25/image.png