Setting up the Compiler for Quake 3 in Trenchbroom
Started by NocturnalCult
avatar
NocturnalCult Rep. 0
#1   05 Sep 2024
Okay, I figured it out.
Your compiler settings in TrenchBroom should look something like this (final compilation preset).

Run Tool
Tool Path: C:/GtkRadiant167/q3map2.exe
Parameters: -game quake3 -fs_basepath ${GAME_DIR_PATH} -meta -samplesize 4 ${MAP_BASE_NAME}

Run Tool
Tool Path: C:/GtkRadiant167/q3map2.exe
Parameters: -game quake3 -fs_basepath ${GAME_DIR_PATH} -vis -saveprt ${MAP_BASE_NAME}

Run Tool
Tool Path: C:/GtkRadiant167/q3map2.exe
Parameters: -game quake3 -fs_basepath ${GAME_DIR_PATH} -light -fast -patchshadows -samples 3 -samplesize 4 -bounce 8 -dirty -gamma 2 -compensate 4 ${MAP_BASE_NAME}

Copy Files
Source File Path: ${WORK_DIR_PATH}/${MAP_BASE_NAME}.bsp
Target Directiry Path: ${GAME_DIR_PATH}/baseq3/maps/

Run Tool:
Tool Path: C:/Quake3Arena/quake3e.x64.exe
Parameters:

i.ibb.co/Y79DTkZ/setting.png
i.ibb.co/XtG4w4d/sly.png
Edited 11.76 hours after the original posting.

avatar
Tig Rep. 2422
#2   05 Sep 2024
@NocturnalCult - I use Linux so the following will be different for Windows, but should be enough to give you the options needed.

Only parts of the compile script have been included.

buildBase () {
$Q3MAP2 -game quake3 -fs_basepath $GAMEPATH -v -meta ${MAPBASE}${MAP}
}
buildBaseSampleSize4 () {
$Q3MAP2 -game quake3 -fs_basepath $GAMEPATH -meta -samplesize 4 ${MAPBASE}${MAP}
}
buildVisFast () {
$Q3MAP2 -game quake3 -fs_basepath $GAMEPATH -v -vis -fast -saveprt ${MAPBASE}${MAP}
}
buildLightFast () {
$Q3MAP2 -game quake3 -fs_basepath $GAMEPATH -v -light -fast -patchshadows ${MAPBASE}${MAP}
}
buildLightFinal () {
$Q3MAP2 -game quake3 -fs_basepath $GAMEPATH -light -fast -patchshadows -samples 3 -samplesize 4 -bounce 8 -dirty -gamma 2 -compensate 4 ${MAPBASE}${MAP}
}
buildVis () {
$Q3MAP2 -game quake3 -fs_basepath $GAMEPATH -vis -saveprt ${MAPBASE}${MAP}
}
buildSunOnly () {
$Q3MAP2 -game quake3 -fs_basepath $GAMEPATH -light -sunonly -fast -patchshadows -samples 3 -bounce 8 -dirty -gamma 2 -compensate 4 ${MAPBASE}${MAP}
}
buildBots () {
$BSPC -optimize -forcesidesvisible -bsp2aas ${MAPBASE}${MAP}.bsp
}

To make a full, final build, the script would call:

buildBaseSampleSize4
buildVis
buildLightFinal
buildBots

A few links with a lot more details - en.wikibooks.org/w/index.php - and - openarena.fandom.c...g_and_packaging

avatar
leilei Rep. 443
#3   09 Sep 2024
A little note

Trenchbroom doesn't fully support the Q3 map format properly currently but does compensate with a Valve220 variant (which has more robust texture coordinates mainly). The NetRadiant Custom fork of Q3map2 should support this format

And regarding lighting, Your Mileage may vary. Experiment a lot with that, because Q3MAP2 enhances some and breaks some and doesn't reproduce Q3MAP's light rendering by default. Also the lighting may vary with engines and operating systems (i.e. linux breaking color ramps, sourceports breaking overbrights, lightmap normalization, etc.)
Edited 11.33 minutes after the original posting.

avatar
Hipshot Rep. 336
#4   25 Sep 2024
I promote the idea that people should stop using the built in compile options and just run a .bat file with the settings you want. Then you never really need to consider the level editor.
avatar
Hipshot Rep. 336
#5   25 Sep 2024
This is an example of the current one I use. These settings are the one I compiled Rustgrad with. What it does is that you specify a folder where the map is (like if it's inside "test" in the maps folder, just type test), then the map name and then the amount of bounces. It will output a log file where the compiler is located of it all.

@Echo off
Echo Map folder:
set /p Input3=
Echo Name of .map file:
set /p Input=
Echo Bounce these many times:
set /p Input2=
Echo Reticulating splines...

del "..\baseq3\maps\%Input3%\%Input%.bsp"
del "..\baseq3\maps\%Input3%\%Input%.srf"
del "..\baseq3\maps\%Input3%\%Input%.prt"
timeout /t 2 /NOBREAK > nul

Echo Compile began: >%Input%.log
date /t >>%Input%.log
time /t >>%Input%.log
Echo. >>%Input%.log
Echo ---- START BSP ---- >>%Input%.log
Echo. >>%Input%.log
"q3map2.exe" -bsp -meta -samplesize 16 -v "..\baseq3\maps\%Input3%\%Input%.map" >>%Input%.log
Echo. >>%Input%.log
Echo ---- END BSP ---- >>%Input%.log
Echo. >>%Input%.log
Echo. >>%Input%.log
Echo. >>%Input%.log
Echo ---- START VIS ---- >>%Input%.log
Echo. >>%Input%.log
"q3map2.exe" -vis -v -saveprt "..\baseq3\maps\%Input3%\%Input%" >>%Input%.log
Echo. >>%Input%.log
Echo ---- END VIS ---- >>%Input%.log
Echo. >>%Input%.log
Echo. >>%Input%.log
Echo. >>%Input%.log
Echo ---- START RAD ---- >>%Input%.log
Echo. >>%Input%.log
"q3map2.exe" -light -patchshadows -fast -samples 6 -gamma 2.5 -compensate 3 -v -bounce %Input2% "..\baseq3\maps\%Input3%\%Input%" >>%Input%.log
Echo. >>%Input%.log
Echo ---- END RAD ---- >>%Input%.log
Echo. >>%Input%.log
Echo Level compiled at: >>%Input%.log
date /t >>%Input%.log
time /t >>%Input%.log

Edited 11.39 days after the original posting.
avatar
Baker Rep. 0
#6   16 Oct 2024
@hipshot ...
Hehe ...
My Zircon Engine (a modified DarkPlaces) engine now has a .map preprocessor I use in J.A.C.K. as the "CSG tool" so it runs before the .bsp stage ...
I can and do merge 16 separate maps together into a single map for compile. I can paint roads using decal projection where the preprocessor takes A and B and inserts dirt decal projections patches/brushes in a series of intervals.
Example: media.moddb.com/im.../auto/poles.gif (ROAD)
Example: Materializing a map ... media.moddb.com/ca...materialize.gif
(that materializing a map is primitive shot from weeks ago from early testing, I materialize way more complex and fleshed out and detailed ones now)
I'm glad to see you guys helping the OP with map compile stuff. I've read numerous "hipshot" posts from the past while learning the Q3 map format.
avatar
Hipshot Rep. 336
#7   16 Oct 2024
@Baker :
@hipshot ... Hehe ... My Zircon Engine (a modified DarkPlaces) engine now has a .map preprocessor I use in J.A.C.K. as the "CSG tool" so it runs before the .bsp stage ......

That looks very cool, for what reason are you doing this. Are you developing a game? I will be doing some retro game dev starting next year. I would love to do it in an old engine like wrath, but it's difficult finding a team that can work that old tech. Right now I might go with zdoom, because it's a more modern engine script wise and there's so much information and examples made for it.
avatar
Baker Rep. 0
#8   18 Oct 2024
First, hipshot ... thank you for the reply.
You know hipshot, yes and no. I am pursuing very fuzzy goals that have general direction by not a concrete endpoint.
I am hoping to discover what I am doing as I go along.
The reason I'm doing it is mostly because my programming skills are the highest they have ever been and I want to use them for something I want to do and enjoy doing. I know. Kinda of vague.
And I found a renewed appreciation for the work and effort that LadyHavoc and the other developers who developed DarkPlaces. You might know, but as I modified the q3map2 compiler, I discovered LadyHavoc did a fair bit of working on that project. And there is something interesting about learning about the history of Q3 contributors like yourself, obsidian and interacting a bit with Garux and --- OpenArena's wiki has really helped preserve Q3 knowledge.
Yeah, vague. But I really feel an appreciation for what the Q3 community has done with the mapping and the Quake compiler and what Open Arena has done.

Only registered members can post a reply.
Already registered? Sign in.

map-thepit
Clear