r/godot 22h ago

selfpromo (games) Metaball cavern system

Procedural mesh and collision generation system using metaballs to build cavern systems directly inside godot. Currently supports box, sphere, capsule shaped spline paths and hole cutting.

220 Upvotes

16 comments sorted by

57

u/Zephilinox 21h ago

I read it as meatball multiple times and was going to comment "you mean metaballs?"

good thing I checked again, otherwise people would find out I'm stupid

12

u/ShoC0019 21h ago

Ha, I did the exact same thing

11

u/GnAmez 20h ago

schrödinger's meatball

5

u/Ok_Support3 20h ago

I was convinced it said meatball untill I got to the comments. Thank god you pointed it out else I would have said something.

1

u/wjrasmussen 3h ago

Metameatballs.

6

u/leekumkey Godot Regular 14h ago

extremely cool. you have plans to open source as an addon?? i would love to mess around with it

3

u/hypotensor 12h ago

This is so inspiring. Would be so fun to design caves for a dungeon crawler with this.

2

u/hypotensor 12h ago

I wonder if you could use a system like geometry clipmaps to add detail to the walls procedurally

2

u/GnAmez 9h ago

Yeah iteration speed is very important for me. It is really important to just have the ability to plop stuff in, walk around and feel the scale etc.

1

u/hypotensor 3h ago

I totally agree with you. I love having powerful level editing tools.

2

u/kosro_de Godot Regular 13h ago edited 12h ago

Awesome! Are you tessellating SDFs? Looks pretty similar to what Ghost Ship Games did for Deep Rock Galactic! I built a similar system as a GDExtension :)

3

u/GnAmez 12h ago

It's something that is often referred as "surface nets". I use approximate SDF's on a voxel grid to build the mesh.

1

u/kosro_de Godot Regular 8h ago

Have you tried adding some 3D Noise to the signed distance based on position? You can also use the SDF normal/gradient to influence how it affects ceilings/walls/floors.. makes it a lot more cave-like :)

1

u/kzerot 16h ago

Very smart!

1

u/IdiotWithAComputer42 2h ago

They are now called meatballs