I've been doing some thinking about this topic (or very close to it) and stumbled across your video. First off very well done and very well articulated. Generating the clauses/equations that implicitly define the objects are somewhat challenging. For instance if you had three spheres, each defined by their 3D function of f(x,y,z)=(x-a)^2 + (y-b)^2 + (z-c)^2 - r^2, I had the idea of multiplying their functions together to get an equation for inside/outside. However, when only two of them are overlapping, it becomes positive and when all three overlap back to negative. That led me to believe that this could only be done properly by the OR operation (or rather a short circuit OR) that if it is negative on one of the spheres then it is inside the combined spheres (much like the unite boolean command in a CAD software). The drawback of this method is the actual numerical value loses the meaning verses a SDF representation, but it gains the advantage of potential computational efficiency through the short circuit evaluation. I am a bit fearful that computing each function would expensive if the object got complex enough, though it looks like your computation of clauses saw pretty good efficiency. Do you have any recommendations or ideas about how to make these implicitly modeled solid objects dynamic? I'd like to be able to stretch and squeeze portions of an object. My idea was that maybe if I made the model out of rudimentary enough building blocks that their combined implicit equation could be manipulated at the basic building block level instead of having to regenerate an entire implicit equation. Anyways, excellent video, all the best.
I'm doing a paper on sphere tracing for my masters and although this technique is very different from sphere tracing a lot of what you discussed here will be very useful and has already given me ideas.
Very elegant! A thought I had while watching is: Instead of evaluating the expression over voxels, why not transform the SDF using the projection to 2D? Well, projecting is just arithmetic but still leaves you with a 3D space; to get 2D you'd need to compute min({z∈(near..far) : projected_sdf(x, y, z)}) for each pixel, which turns into a root-finding problem instead of operations for which interval arithmetic and automatic differentiation are simple. Still, I wonder if there might be some algorithm that can solve that problem more efficiently than voxelization, so that the whole rendering algorithm scales purely with local scene complexity and not desired Z resolution.
You make a good point, this is also called occlusion problem or occlusion culling in graphics: you don't really need information (depending on the type of rendering of course!) about objects past the first viewable (they're occluded), which makes rendering much more efficient. I believe the original DOOM addresses this using Binary Space Partitioning (BSP) trees. I think indeed in this case trying to find only the first negative value along a line using interval arithmetic for z (ray path) could improve rendering significantly! (also maybe some subdivision scheme to find the closest segment which contains a root, and then the closest root)
I don't know if you'll get this comment, but I've been hoping someone would come up with something better adapted to modern computing than traditional geometric kernels as used in CAD. I'm no developer or mathematician, so I could have never done so myself, but you've at least shown me it's possible. Thank you :) You've hinted that libfive is being used already in CAD software, are you at liberty to say which?
"mans got to have a hobby" - deep respect, admiration, and inspiration. well done sir. well done.
I've been doing some thinking about this topic (or very close to it) and stumbled across your video. First off very well done and very well articulated.
Generating the clauses/equations that implicitly define the objects are somewhat challenging. For instance if you had three spheres, each defined by their 3D function of f(x,y,z)=(x-a)^2 + (y-b)^2 + (z-c)^2 - r^2, I had the idea of multiplying their functions together to get an equation for inside/outside. However, when only two of them are overlapping, it becomes positive and when all three overlap back to negative. That led me to believe that this could only be done properly by the OR operation (or rather a short circuit OR) that if it is negative on one of the spheres then it is inside the combined spheres (much like the unite boolean command in a CAD software). The drawback of this method is the actual numerical value loses the meaning verses a SDF representation, but it gains the advantage of potential computational efficiency through the short circuit evaluation. I am a bit fearful that computing each function would expensive if the object got complex enough, though it looks like your computation of clauses saw pretty good efficiency.
Do you have any recommendations or ideas about how to make these implicitly modeled solid objects dynamic? I'd like to be able to stretch and squeeze portions of an object. My idea was that maybe if I made the model out of rudimentary enough building blocks that their combined implicit equation could be manipulated at the basic building block level instead of having to regenerate an entire implicit equation.
Anyways, excellent video, all the best.
I'm doing a paper on sphere tracing for my masters and although this technique is very different from sphere tracing a lot of what you discussed here will be very useful and has already given me ideas.
Awesome, feel free to email if you have any questions!
@@mkeeter that's great, thank you!
I'll probably never implement this stuff myself, but the explanation already feels philosophically satisfying :)
Amazing work as always, Matt!
Very elegant! A thought I had while watching is: Instead of evaluating the expression over voxels, why not transform the SDF using the projection to 2D? Well, projecting is just arithmetic but still leaves you with a 3D space; to get 2D you'd need to compute min({z∈(near..far) : projected_sdf(x, y, z)}) for each pixel, which turns into a root-finding problem instead of operations for which interval arithmetic and automatic differentiation are simple. Still, I wonder if there might be some algorithm that can solve that problem more efficiently than voxelization, so that the whole rendering algorithm scales purely with local scene complexity and not desired Z resolution.
You make a good point, this is also called occlusion problem or occlusion culling in graphics: you don't really need information (depending on the type of rendering of course!) about objects past the first viewable (they're occluded), which makes rendering much more efficient. I believe the original DOOM addresses this using Binary Space Partitioning (BSP) trees. I think indeed in this case trying to find only the first negative value along a line using interval arithmetic for z (ray path) could improve rendering significantly! (also maybe some subdivision scheme to find the closest segment which contains a root, and then the closest root)
So wait, you made this by yourself in your living room? That's how things ought to be done ::}
I don't know if you'll get this comment, but I've been hoping someone would come up with something better adapted to modern computing than traditional geometric kernels as used in CAD. I'm no developer or mathematician, so I could have never done so myself, but you've at least shown me it's possible. Thank you :)
You've hinted that libfive is being used already in CAD software, are you at liberty to say which?
It was used by nTopology starting around 2018; they're now using a fully in-house kernel.