top | item 46417361

(no title)

sebastianmestre | 2 months ago

To add some more detail, the max of two SDFs is a correct SDF of the intersection of the two volumes represented by the two SDFs, but only on the inside and at the boundary. On the outside it's actually a lower bound.

This is good enough for rendering via sphere tracing, where you want the sphere radius to never intersect the geometry, and converge to zero at the boundary.

A particular class of fields that have this property is fields with gradient not greater than one.

For example, linear blends of SDFs. So given SDFs f and g you can actually do (f(pos)+g(pos))/2 and get something you can render out the other side. Not sure what it will look like, or if it has some geometrical interpretation though.

Note that speed of convergence suffers if you do too many shenanigans.

discuss

order

jesse__|2 months ago

Thanks for those!