Sreeraj writes:
SDF Engine is an ultra minimal rendering engine I wrote, which enables to write custom GLSL shaders.
Using the idea of signed distance fields we are able to create implicit surfaces, no vertices or polygons. We can create all sorts of shapes using signed distance fields. Signed distance functions, or SDFs for short, when passed the coordinates of a point in space, return the shortest distance between that point and some surface. The sign of the return value indicates whether the point is inside that surface or outsideSo we are doing raymarching (Don't confuse with raycasting or raytracing). Since we don't have any geometry, we will proceed in small steps along the camera ray and check how close you are to the object you are rendering. When you are closer than a certain threshold, you stop. That's what she said. In order to do this, you must have a function that tells you how close you are to the object: a Distance Estimator, in this case, our SDF. The value of the distance estimator tells you how large a step you are allowed to march along the ray, since you are guaranteed not to hit anything within this radius.
We'll see how flexible and fast is this approach as opposed to using nodes and volumetrics for creating random visualisations or procedural animations. Another advantage of using it as an internal engine in Blender would be, the post processing stack of Blender. And with a single Z Combine node, we can actually mix the results with our EEVEE and Cycles scene too.
8 Comments
Would it be possible to combine the SDF generated graphics with meshes? I've seen examples of engines that allow this. If not possible it's a feature request :)
Not sure how it would work though. Maybe by rendering two scenes with depth maps and then combining them?
Yes, it is possible. Using Z Combine node you can combine any scenes rendered in both eevee and cycles. Although i did mention it in the video, didn't give any details. The engine supports depth maps and even custom depth maps, since there are no real meshes involved.
Please, dear sreeraj, place some false product placement in your videos.
it ll be perfect
You read my mind ;)
it seems that we share a certain point of view
Ohh this is crazy. Great job :D
Always wanted something like this for Blender and never had the time to learn how to really even begin. This is phenomenal.
I'd like to see a 3d plot of Riemann zeta function ... ;)