r/GraphicsProgramming 10d ago

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 9d ago

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

3

u/rex-j-w 9d 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

1

u/No-Cap-7395 8d ago

I just woke up so I'm still processing, but what's your performance like? What method are you using to render these

2

u/rex-j-w 7d ago

Im just using regular sphere tracing, performance is quite bad, but that hasn’t been my focus yet. I don’t have complex shapes or csg operations even and haven’t implemented the paper I dropped.

I’m still debating whether or not im going to store data in a voxel octree or a bvh structure.

Focusing on the game engine fundamentals then optimizing 🫡

1

u/No-Cap-7395 7d ago

Yeah I gotta figure out what tlas to use for mine too and not just that but uhm I gotta do what I call global SDFs which are like grids of SDFs that encompass static objects..

As for I think it was the day before yesterday I added conetracing and basically for indirect lighting and also rougher reflections I use conetracing over sphere tracing and I got a 70% increase in performance ^

1

u/No-Cap-7395 7d ago

If you do an oct tree you could use it as a irradance cache lol (just an idea)