Importing Trenchbroom Maps

Hello,

For those that don’t know, Trenchbroom is a Quake-style map editor. The Godot engine has a plugin for importing Trenchbroom maps, and that made me curious if it’s possible to do the same thing in Panda3D? I’m new to Panda3D and am learning Python, so I’m not sure what the exact process would be to attempt this yet. I think Trenchbroom maps can be exported as .obj files, but I’m not 100% sure.

Here is a video that explains it a bit better.

First of all, welcome to the forums! I hope that you enjoy your time here! :slight_smile:

As to your question, without knowing much about either Trenchbroom or Godot, I would imagine that it’s possible.

From the video, there’s a script or set of scripts that Trenchbroom uses to export something that Godot understands. I imagine, then, that a similar set of scripts might perhaps be written to export something that Panda understands–much as with the plugins that already exist for Blender.

Of course, this presumes that (A) whatever Qodot outputs isn’t already something that Panda understands, or conversely that (B) it wouldn’t be easier to take whatever output Qodot produces and create a tool or script that converts that to something that Panda understands.

But one way or another, you would likely thus be able to produce the relevant elements in Panda3D.

Now, as I said, I’m not familiar with either Trenchbroom or Godot, and indeed let alone Qodot, so it may be that there’s some aspect unknown to me that might prevent this. It seems unlikely to me, however.

I second the welcome. :slight_smile:

What format does Trenchbroom export as? It may be something that our Assimp plug-in can load.

Hey, thank you and Thaumaturge for the welcome. I just checked, and Trenchbroom exports to either a .obj file or a .map file. And I checked the Panda3D docs, and I see that OBJ files are supported through the Assimp plug-in that you mentioned. So that’s great news. I’ve only made 2D games in the past, so most of this is new to me. I’m just learning as I go. I’ll attempt importing a map to Panda3D pretty soon.

1 Like

Hi there, this looks interesting, did you make any progress on getting the .obj file to load?

I was able to do this through a complicated toolchain: trenchbroom → qodot → blender (just to flip the z, im sure this is unnecessary once i learn more about gltf) → panda

I am going to figure out how to port or package qodot as well as make connections to entity data. I suspect it will takes weeks but this level editor is killer and I need it =)

Following up on this. I have it all working natively!

1 Like