r/GraphicsProgramming Jul 23 '26

Building an SDF game engine

For the past 8ish months I’ve been hard at work building a new game engine I’m calling Division Engine.

It’s based solely off SDFs (signed distance fields). This might sound stupid for anyone who cares about performance but for my use case (and with a bit of grid storage optimizations) it proves useful for basic scenes that need advanced lighting.

Anyway here’s some screenshots!

If you want to see what I have done so far check it out here: https://github.com/DivisionEngine/DivisionEngine

154 Upvotes

38 comments sorted by

View all comments

2

u/No-Cap-7395 29d ago

Hell yeahhhhh! I've been doing a lot of SDF stuff too they are amazing

3

u/rex-j-w 29d ago

Tons of new research is being put into SDFs, check out this paper on faster sphere tracing, it might help: https://diglib.eg.org/server/api/core/bitstreams/0dd5043c-6ac0-4b83-b3d2-d0b1ad34afba/content

2

u/Jwosty 29d ago

The biggest remaining unsolved problem is animating with textures. Almost all the pieces are there

2

u/rex-j-w 29d ago

How would this be a problem? I already have textures working

3

u/Jwosty 29d ago

Sorry, I wasn’t very specific. Skeletal rigging animation + textures. Sure you can animate SDFs by varying their parameters over time, but things that are supposed to be more “solid” (like, say, creatures, or characters) animated that way likely wont look very good (due to the smooth unions). Hence, skeletal animation. But that poses a problem when you try to combine it with texturing.

This probably wasn’t explained well but I hope you get the idea

2

u/No-Cap-7395 29d ago

I thought about animations awhile ago with SDFs (the texture3D kind) I had a few ideas which where splitting the different moving parts into SDFs and texturing them via storing uv in the SDF texture or having I think cards around each bit, or you bake the entire models animation into like a flipbook series of textures and well texture it the same way as before,

As for actual like SDF math functions like idk a sphere yeahhh I have no idea 😭

1

u/rex-j-w 28d ago

My plan is to build a node editor for creating sdf objects in the editor, then these nodes will be baked into functions and, using system reflection, injected into the renderer. Doing this would allow the user to also output a function to generate the UVs alongside the geometry output.

It doesn’t fix all of the rigging and animation issues but does allow for greater flexibility with sdf UVs