Is there such a thing as a negative mesh?

Godot Version

4.2.1

Question

I’ll start off by addressing the topic name, because I don’t know the real terminology, or if it even exists.

I want to have two independent meshes, where one is externally facing normals, like a rock, and the other internally facing normals , like a cave. (This is what I mean by a “negative” mesh ). And when I combine a positive mesh with a the negative mesh, the negative mesh will remove the part of the positive mesh that it intersects (The clip space?), forming a cavity.

This way I could make landscapes, or generic objects, and make reusable interior spaces independently, then just mix and match assets that can encapsulate the interior mesh.

Is this a thing? what is the correct terminology? and can Godot do it?

Since I don’t know if it has a real name, or if it’s an actually thing, it’s been hard to Google it.

I have seen a mesh creator tool in Godot that can subtract two primitive shapes, but I will want to use a better external mesh tool.

A follow up question would be on collisions for such a combination of assets, but I’ll save that for later.

Unless you are talking about something done in real time in Godot, either in the editor or in the game at runtime, what you want is a Boolean operation and in this case, subtraction. Most modeling applications will do this like Blender.

If you are wanting in real time, there are probably something you can import into godot to do that, looking around with that term Boolean.

Prototyping levels with CSG — Godot Engine (stable) documentation in English check this out.

Thanks! CSG was the thing I was referring to but haven’t looked at the documentation for it in a long time.

I do intend this to be static and related to level design. I was hoping I could take two completely finished assets and glue them together with a Boolean operation in the editor, slapping assets together quickly and be able to make fine adjustments, but it seems like that isn’t the traditionally the case?

It seems like CSG I could use a “cave” meshcsg3d but I would need to invert the interior faces to meet the criteria of the CSG operation. And this will all need to be exported as a giant custom mesh in the end. :unamused:

I guess I could play around with it.

Does the CSG Mesh node not have a invert faces param?
image

1 Like