XaiJu
animatrix
animatrix

patreon


Divergence VOP

Computes the divergence of a vector field.

In vector calculus, divergence is a vector operator that operates on a vector field, producing a scalar field giving the quantity of the vector field's source at each point. More technically, the divergence represents the volume density of the outward flux of a vector field from an infinitesimal volume around a given point.

Technically you can just use the VDB Analysis SOP but it's still beneficial to know how to compute this manually from scratch in VEX.

This way you could combine it as part of your VOP network or VEX Wrangle nodes homogenously, without the need to break it up to be able to use VDB Analysis SOP, which might even force you to convert regular volumes into VDBs if you had regular Houdini volumes.

In practice most likely I would still use the VDB Analysis SOP approach though regardless of node count, and break up of the network, etc, due to performance concerns. Volume Wrangle nodes have always been quite slower than alternatives.

So while I can inform about the pure VEX approach from a purist POV (point of view), I will still recommend the faster approaches from a pragmatic POV.

https://www.dropbox.com/s/b6rk507cf8lcc8c/Divergence_VOP_Animatrix.otl?dl=1

Divergence VOP

More Creators