# How to calculate curvature of a volume in VOPs?

## Recommended Posts

Hi,

I know VDB Analysis does this but is there a way to calculate this manually in VOPs?

Merry Christmas

##### Share on other sites

Merry Xmas! The way I'd do this right now would be to put a point per voxel, and then check the dot product of local points sdf vector vs its own and reproject back that onto a new field... But that seems pretty inefficient, betting there's a much better way!

• 1

##### Share on other sites

Thanks but I am trying to figure out how to implement the math way in VOPs practice

##### Share on other sites

what kind of volume?  if it's a fog volume, you can get the density gradient and then compute a dot product against a neighboring position.

##### Share on other sites

Any scalar field, because that's what Analysis SOPs support. I will try your suggestion. Is this the appropriate way to calculate curvature?

##### Share on other sites

Is this the appropriate way to calculate curvature?

no idea at all.

##### Share on other sites

Any math gurus who can show this in VOPs?

##### Share on other sites

curvature computation on grid data like volumes is fairly easy. just compute the hessian and extract the curvature information you need.

hth.

petz

Just want to say thanks for that petz, exactly the information I was looking for, clear and elegantly demonstrated :-)

##### Share on other sites

I recently checked file "vol_curv.hipnc" and that's great, and I wonder if we can always output a normalized value. It would be a range mostly -1 to 1,  probably using voxel size info . I know it could be depends on polygon object and value could not reach max1 ot min-1 value.

Right now, for instance, it sets  vdbfrompolygons1>voxel 0.2, and curvature range -1 to 10. When it sets voxel size to 0.1, curvature range become -3 to 14, etc. I know, after calculating curvature, we can normalize it by fit node. But it would be great to output normalized curvature approximatly -1 to 1 in all the time, regardless voxel size.

Thanks

## Create an account

Register a new account