Trenchbroom: Quake3 support

Created on 18 May 2013  路  25Comments  路  Source: TrenchBroom/TrenchBroom

Some resources:

Map Format

MD3 Format

Shaders

PK3 Files

Todos

  • [ ] Add support for pk3 files
  • [ ] Add support for Q3 map files (skip patches and brush primitives)
  • [ ] Add support for Q3 shaders
  • [ ] Add support for brush primitives (brushDef)
  • [ ] Add support for patches (patchDef)
  • [ ] Add support for md3 models
Game Support 1 Enhancement

Most helpful comment

@motorsep We split the 2.1.0 milestone into two because it was too big, feature wise. We already have finished a bunch of changes for 2.1.0 (scale tool, performance improvements), but Q3 support is not yet started. We don't want to delay the release of the finished features any further and that's why we decided to split the milestone. 2.1.0 should be out soon, and then we'll move on to 2.2.0, and I'll finally add Q3. I know it's taking long, but our time is limited, and in this case, we had already started working on the features of 2.1.0 a long time ago and had to finish these up first before adding new features.

All 25 comments

What's needed for this? What are the main differences between a Quake 1 and Quake 3 *.map file?

I am not quite sure, but I think the main differences are the patches. But apart from that, the following things are necessary:

  • Loading and writing Quake 3 map files
  • Loading Quake 3 models
  • Loading Quake 3 textures / shaders
  • Rendering Quake 3 textures and shaders
  • Rendering patches
  • Editing support for creating and editing patches
  • Editing support for additional face attributes?

However, the current source of TB is not easily extended for multiple games. I am in the process of creating a version that will support adding games much more easily.

Are you interested in helping out? If so, I will happily let you know once I get to a point where support for additional games can be added to the editor.

Yes, please let me know. Is there a repo yet for the version you're working on? I'm guessing NewArchitecture branch?

Yes. It's a complete rewrite because the source code of the current version is too hard to maintain and refactor (bad structure, no unit tests, too many dependencies). I will report here as soon as there is something usable.

I don't think having bezier patches is critical. They are nice to have, but not critical at all.

Note that how brushes are defines in q3map format is different from q1map format. Same goes for textures and brush flags.

Also q3map2 compiles ASE/MD3 models into BSP tree, so levels can be made of models essentially (or rather mix of brushes and models, since models don't block visibility during VIS stage)

How are brushes defined differently? I thought they were still a list of faces which are made up of planes defined by three points. I realize that the texture and surface attributes are different, though.

Yeah, I mixed it up with Doom 3 brushes, which are defined a plane and a normalized normal vector.

Here is comparison map files of Quake 1 and Quake 3 (structural and detailed brushes, both have alternative texture projection, e.g. brush "faces" order is different from standard texture projection)

http://pastebin.com/dCGEF2N5

Thanks, I think it's similar to Valve 220 map format where the texture axes are stored in the face definitions as opposed to being dependent on the face normal as in standard Quake.

This is how same cube looks like in Doom 3 .map format: http://pastebin.com/TpKQRMjP

I can open a separate issue for Doom 3 map design if you wish. One thing about Doom 3, is that all the entities are read directly from /base/def/ (DoomRadiant and DarkRadiant do that). This way as we add stuff to the game, it automatically pops up in the level editor when we run it.

Same goes for other decls.

Yes, please open a separate issue for Doom3.

:+1: Would still love Quake 3 support!

I just remembered issue that plagues Radiants editors - precision loss. As designer works on a map, and keeps saving/loading it, without snapping brushes to grid (Ctrl G), eventually planes coordinates go out of whack and gaps between brushes begin to show when playing the level.

NetRadiant has an option that allows automatic snapping to integer values of the grid on every brush operation, on save and load. This ensures that coordinates for brush planes are always integer and never get to be floats, accumulating rounding off error with every save/load cycle.

DarkRadiant doesn't have this, making it difficult to keep track of snapping and that adds additional level of complexity to the workflow.

Is there anything like that in TrenchBroom ?

Yes, TB can keep all plane points on integer coordinates. It will usually find "better" plane points than radiant will if by rounding, too. But TB should store floats with enough precision that there should be no loss going on during save / load, anyway.

Cool stuff! I can't wait for this new version to arrive :+1:

Any progress on this? It would be really great to use it with the likes of Quake 3, OpenArena and Xonotic.
Because Radiants suck.

Noooooo wayy. Is the wait really over?! O.o

If so, thanks a bunch!

may require #2055

Just wondering how far we are from TrenchBroom 2.1.0

Hi there,

Any progress with this?

I am guessing TB is not really getting any closer to supporting Quake 3 since now it's in 2.2.0 milestone ? :(

@motorsep We split the 2.1.0 milestone into two because it was too big, feature wise. We already have finished a bunch of changes for 2.1.0 (scale tool, performance improvements), but Q3 support is not yet started. We don't want to delay the release of the finished features any further and that's why we decided to split the milestone. 2.1.0 should be out soon, and then we'll move on to 2.2.0, and I'll finally add Q3. I know it's taking long, but our time is limited, and in this case, we had already started working on the features of 2.1.0 a long time ago and had to finish these up first before adding new features.

EightMegs/ToyotaFanKK here, that's great news!

This umbrella ticket has been broken down into smaller tickets which can be tracked from here: https://github.com/kduske/TrenchBroom/projects/16

Just a quick FYI on the OpenArena specific things regarding Q3 support as it's not exactly 1:1:

  • Default texture scale is half of Q3's as the textures are 2X larger

  • PNG texture loading is expected (I'm still pondering about DDS)

  • More shader command cruft to mind, mainly of the glsl and tcmod/gen variety

  • "Team Arena" entities are integrated

That should just about cover it.

Was this page helpful?
0 / 5 - 0 ratings