3D map creation workflow in Godot

Hey everyone :slight_smile:

I want my game to feature maps with multiple rooms—essentially similar to Quake 3 maps.

So far, I’ve been working with the built-in CSG nodes and converting them into CSGBakedMeshInstance3D and CSGBakedCollisionShape3D. Doors are separate scenes that I place accordingly (I create the opening for them beforehand using a CSG shape).

Is this the "intended workflow? I just want to make sure I’m not overlooking anything here.

Do you use a different approach or have recommendations for making this easier? Can anyone recommend other tools or additional CSG shapes? :slight_smile:

TrenchBroom and func_godot is another option.

2 Likes

The intended workflow is no different from any other 3D asset. You design it in a 3D modeling program like Blender.

These old games used to have dedicated tools like map editors primarily as a matter of optimization. Level geometry needed to be “compiled” into layouts like binary spacial partitions to rigorously optimize what is computed, what is sent to the GPU, and what is ultimately drawn on the screen. With the obsolete fixed-function pipeline, this needed to happen every frame. Nowadays, millions of triangles can just sit in GPU memory and all the game needs to do is adjust the transform, so the need for specialized formats has diminished.

At the same time, as personal computers grew more powerful, the 3D modeling software for games and animation has essentially converged. The same tooling and techniques are used in both disciplines, and the creation of custom level editors can only achieve a lower quality version of those tools.

3 Likes

First of all, thanks for the quick replies! :slight_smile:

It’s not really relevant here, but I’ve built maps for various games in the past (Duke3D, Quake, etc.).

I hadn’t heard of TrenchBroom before, but it looks really good. The downside for me is that Godot doesn’t natively support its .map files, so you have to RELY on plugins like func_godot to be able to use Trenchbroom (tbloader and Qodot appear to have been discontinued).

I’ve used Blender to create simple models before, but as a map-building tool, it seems unsuitable or too cumbersome to me.

That is the reason why I have primarily used the CSG nodes in Godot so far.

1 Like

Godot is fairly agnostic as far as level design is concerned. There are several supported methods, none of which are really great from a UX perspective. You can use GridMaps. You can place the bits and pieces of the level directly into the scene as individual sub-scenes. You can model the whole level as one big mesh in Blender. You can use other external level editors. And yes, you can use CSG if you want. Each method has its own advantages and drawbacks.

2 Likes

Hi, yes, that is the intended workflow as per the documentation, but it still requires an additional step of exporting them to a model, retouching them or building on on a 3D editing software like blender, and then reimporting as a model.
This last part of the workflow is slow as a solo dev and makes it difficult to makes changes to the level after the polish step.


I worked on a PR to improve the CSG nodes earlier this year, but it hasn’t been reviewed again and it’s stuck in the 4x category since.
It is however working and can be used as a level editor with CSG nodes.

It adds the ability to alter CSG brushes, setting different materials per face, and changing the UVs. A script is provided to do this, and there’s also 4 new buttons on the bar to set cube map and cylinder map UVs.

You can download the binaries from the GHA and use it as a level editor, then convert to mesh and import into your project (save the mesh as resource or export to gltf).

1 - click on the checks tab
2 - click on GHA
3 - Scroll down and download the version for you OS.
4 - Create a new project. The PR is made on an older version of 4.7 so it would be a good idea to use it only to create maps, like a level editor, as it will not allow you to export your game and the changes will be lost if opened in another version of godot.
5 - create your map with all the rooms. You can use this script to change faces of a CSG brush and shift or rotate UVs. Or just use the automatic UV buttons from the bar.
6 - when you are done, convert to MeshInstance3D.
7 - on the MeshInstance3D, click on the mesh and save as a file.
8 - Copy the mesh file you saved to your main project.
9 - Alternatively, you can copy an entire scene into your main project complete with placeholder nodes, and then replace them with your scenes.

This workflow is faster than having to edit it in blender for low poly levels like Quake 3 or Half-life 2.

2 Likes

That looks fantastic! So, the tool will become an integrated part of the regular Godot version soon?

Is the review process simply taking that long, or does a “committee” still have to approve it ?

1 Like

If it gets merged.

The PR was put in the 4x milestone which means it is not a priority, they will get to it eventually.
It needs to be tested by other people first and then get approved.
What happened when they tested it is that there were differences with how CSG scenes looked, and I was asked to fix it. Now I have to wait for them to look at it again.

It’s also a somewhat big PR which don’t usually get merged, and CSGs don’t seem to be a priority at the moment/don’t have many people asking for them. (most recent changes to the editor have been on UX, performance and bug fixes).