Skip to content

Open VDB

Calculate collision with VDB

Calculate collision with VDB

Point.wrangle
vector product;
vector sum;
float volumevalue;
volumevalue = volumesample(1, 0, @P);
product = @N * volumevalue;
@P = @P + product;

Push out from VDB

Example how to push out points from VDB which is used as a collision primitive.

Calculate collision with VDB

Point.wrangle
float volsample = volumesample(1, 0, @P);
vector volumegrad = volumegradient(1, 0, @P);
vector push_out = volumegrad * -volsample;
@P += push_out;