Advertisement

You're blocking ads, which pay for BlenderNation. Read about other ways to support us.

Realtime Fractal Animation in Blender using Custom Render Engine | SDFEngine

8

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.

8 Comments

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

Leave A Reply

To add a profile picture to your message, register your email address with Gravatar.com. To protect your email address, create an account on BlenderNation and log in when posting a message.

Advertisement

×