3 ms·
The same author also has some great references for SDF primitives to learn from: https://iquilezles.org/articles/distfunctions/ https://iquilezles.org/articles/
by wildpeaks 3y ago
The same author also has some great references for SDF primitives to learn from:
https://iquilezles.org/articles/distfunctions/ https://iquilezles.org/articles/distfunctions/
An example of how different thinking in SDF is: in classic modeling, you define a 3D sphere mesh using a bunch of 3D coordinates (vertices), grouped into triangles for the surface. Therefore you need more vertices to make the sphere appear smoother.
On the other hand with SDF, you have a function that takes an arbitrary 3D coordinate and returns whether the coordinate is inside the sphere or not (easily done by comparing the distance from the center), meaning the smoothness of the sphere is already the maximum it can be.