Hacker News new | ask | show | jobs
by skye-adaire 1964 days ago
>SDF is still just a surface/boundary representation

Meshes and Bezier patches are parametric representations (defined over R^2, evaluated with vec2, output vec3). Implicit functions are volumetric representations of surfaces (defined over R^3, evaluated with vec3, output float). This is a key difference between parametric modelers like AutoCad and implicit modelers like nTopology.

>density grid instead of a SDF if you're dealing with anything volumetric, such as clouds or smoke.

These functions of time change every frame. In the implicit paradigm, it's not necessary to evaluate the smoke ahead of time since sphere tracing can reduce to marching adaptively when we are within smoke. Image quality will not be bound to any resource resolution other than the screen (a low res smoke grid would appear blocky).

I agree with you that the current triangle-based RT implementations have faster alternatives that accomplish similar things on the surface.

Thanks for the links!

1 comments

Thanks again for the insights here and in the other thread!

> In the implicit paradigm, it's not necessary to evaluate the smoke ahead of time since sphere tracing can reduce to marching adaptively when we are within smoke.

Makes sense. The SDF is separate from the density grid for the cloud/smoke. We need both, one to detect the boundary (SDF) and another to actually render the volume (density grid).

In offline rendering we usually just have some primitive (sphere, cube etc) that acts as the boundary but that obviously isn't as adaptive and doesn't let you easily reveal arbitrary slices of a volume.

>In offline rendering we usually just have some primitive (sphere, cube etc) that acts as the boundary

Right, using a SDF as a boundary condition is to discretely check it as an indicator function (if negative do x else do y). You can use basically any SDF to bound your procedural medium, including a procedural boundary (via domain distortion).

You can also apply a continuous blend instead of the discrete check (smooth step the level curve). This is preferred since discrete checks will often result in popping.