vector product;vector sum;float volumevalue;volumevalue = volumesample(1, 0, @P);product = @N * volumevalue;@P = @P + product;
Example how to push out points from VDB which is used as a collision primitive.
float volsample = volumesample(1, 0, @P);vector volumegrad = volumegradient(1, 0, @P);vector push_out = volumegrad * -volsample;@P += push_out;