Jump to content

Gradients and inflection points


Macha

Recommended Posts

By gradient did you mean SDF? If so, I think you are looking for the Laplacian which is the divergence of the gradient. That will give you the edge voxels. You can use an exponential function to constrain the voxels to the edge. I did this quickly with the volume calculate node.

Not sure if that is what you're looking for!

Link to comment
Share on other sites

No, unfortunately not because the gradient does not flip at the edges, it merely reduces in magnitude. I am after the center of objects. Not the center of mass, or the geometric center, but those areas where opposing gradient vectors would meet. And if that makes you think of shrinking an isosurface; no that would not give those areas.

Somebody suggested it's just the divergence but I havent tested it yet fully. In a sense its the place of maximum divergence. I think it's very close though. Perhaps it is the first derivative of the divergence. I should try that if I figure out how to get it.

Or maybe, if I was to normalize the gradients, and then take the divergence... But then that would still get me edges I think...

I've kind of solved this problem in a rubbish way already (blurring a gradient, then dot it with original, and test if density is at least a certain value) but it seems to me there should be a much more immediate and clearer way to do it, analogous to finding inflection points in simple functions.

Edited by Macha
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...