Realtime Fractal Animation in Blender using Custom Render Engine | SDFEngine

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 outside

So 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.

Advertisement