Loading video...

Video Failed to Load

Go Home

Got SDF collision mesh generation (via marching cubes) working with Jolt Physics! The collision mesh is regenerated when the SDF scene changes. Individual SDF primitives can be made "dynamic", which adds them as physics objects. 1/

10,942 views • 1 year ago •via X (Twitter)

11 Comments

Mike Turitzin's profile picture
Mike Turitzin1 year ago

You can see the collision mesh later in the video. It's much lower res than the resolution used for rendering (and rendering is done via ray-marching a 3D texture rather than triangle meshing). 2/

Mike Turitzin's profile picture
Mike Turitzin1 year ago

The video covers it up pretty well, but I'm actually just generating a single collision mesh "chunk" right now - so the obvious next step is to chunkify the whole world and add/remove chunks as the camera moves around. It's cool to see things more interactive! /end

Elise Oyin's profile picture
Elise Oyin1 year ago

All in Christ Jesus for all ages, every efs each using sap on eaic decree with their living spirits, souls, faiths, wills, efs plead the Blood of Jesus Christ of Nazareth pbz to destroy all stopping the true form of Elise Oyinkromeineifa's pregnancy from being in Yahweh's name

Makan Ansari's profile picture
Makan Ansari1 year ago

This is so impressive! Editing SDF with Physics in real time!

Yeltan's profile picture
Yeltan1 year ago

that's so cool, but how do you have sdf objects use this collision mesh while maintaining good performance? if i were to wanna make something with sdf physics, are there resources you'd recommend?

Mike Turitzin's profile picture
Mike Turitzin1 year ago

The main cost is regenerating the collision mesh when the (static) SDF scene changes. I think I can get that fast enough, though, as the collision mesh resolution doesn't need to be very high. I'm using Jolt physics and feeding it triangle meshes:

Breakaway's profile picture
Breakaway1 year ago

Nice mesh construction. I'm curious though, isn't it more performant and less hassle to use the SDF as the collision object directly?

Mike Turitzin's profile picture
Mike Turitzin1 year ago

Maybe, but I'm not aware of straightforward ways to do this for arbitrary SDFs. A big complicating factor is that smooth blends (as well as subtractions) make the distance field a bound rather than exact, which means it becomes a lot harder to compute overlaps.

Leo Benaducci's profile picture
Leo Benaducci1 year ago

Did you try Surface Nets? I believe they are faster to generate but also have lower quality

alxo's profile picture
alxo1 year ago

what is the compute cost? nice job!

Scott Richmond's profile picture
Scott Richmond1 year ago

Very cool stuff mate! I wish this kind of work was more readily available to developers to create more interactive worlds. Is this something you're planning to release in some form or another?

Related Videos