Follow

Huh. If I try to calculate the surface gradient w/ the common central diff or tetrahedron methods, I get a NaN gradient for a sphere radius=1 at point (sqrt(.5), 0, sqrt(.5)) 🙃

@aeva Maybe it doesn't realize that the point is on the surface of the sphere due to rounding errors?

If it couldn't handle that, it would make the method pretty useless though, given that floats have rounding errors in all but very special cases.

@wijnen @aeva@mastodon.gamedev.place the zero crossing should still have a valid gradient. To calculate it I'm using the central differences method, so, evaluating the sdf at adjacent positions. It shouldn't be a precision problem. I think it's an odd case of equilibrium on all axes. I'll need to look more closely later to be sure.

Sign in to participate in the conversation
Gamedev Mastodon

Mastodon server focused on game development and related topics.