Announcement

Collapse
No announcement yet.

GtkRadiant 1.5 build menu problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GtkRadiant 1.5 build menu problem

    I just learned to make maps for Quake with GtkRadiant. I want to compile my map, but none of the build menu options work. When I try to compile, the compile screen shows for half a second. I had to take a screenshot to see what it says: "C:\Program Files\GtkRadiant 1.5.0\hqbsp" is not recognized as an internal or external command, operable program, or batch file. If you have any solution, please tell me. Also, if you can help me, tell me which option to choose anyway.

  • #2
    You'll need a map compiler to build a map for Quake. The process has three steps, each of those three steps is done by a small program.

    1. QBSP (creates a .bsp file from a .map file)

    2. Vis (calculates which area in the map can be seen from which other area, this speeds up rendering since non-visible areas get "culled" or removed)

    3. Light (basically creates the lightmaps, if you don't do this your map will appear fullbright)

    All three of those are usually called a map compiler suite, or simply "the tools". id Software originally released those programs, and their source code, to the public; afterwards, talented people improved them, and so there are several compiler suites now.

    The main ones are:

    1. AguirRe's tools:

    The Homepage of Bengt Jardrup

    2. Tyrann's tools:

    Utils - Disenchant.net

    3. Lord Havoc's hmap2:

    LordHavoc's DarkPlaces Quake Modification

    You will need to download one or several of those, and unpack them into their own folder. It's not so important which ones you use in the beginning, but most mappers develop a taste for one or the other eventually. You can mix and match them.

    Make sure you end up with a QBSP program, a Vis program, and a Light program (except if you use hmap2, which contains all three in one executable - read the hmap2 documentation if you wish to use that). For QBSP, there are some variants like TreeQBSP or TXQBSP, but usage is the same across the board. It's not so important which one you use for now. Same for the other two, but again, they all do the same thing.

    If you want to use Radiant's build menu, you would need to make sure Radiant finds them; I think you would have to enter the paths to the compiling tools in Radiant somewhere. This is maybe under Preferences, but I'm not sure. I haven't tried to do that myself. I use the command line (qbsp, vis and light are pretty simple command line tools).

    In case you have access to a command line, like a DOS prompt or Linux terminal, or similar, you compile a map like this, in the following order:

    "qbsp.exe mymap.map" (this creates a .bsp file in the same directory, unless your map leaks)

    "vis.exe mymap.bsp" (Vis expects a .bsp file, not .map)

    "light.exe mymap.bsp" (Light also works on a bsp file)

    After the three finish, you should have a vised and lit .bsp file, which you then put into the id1/maps folder, so the engine can find it.

    A Quake 1 .bsp file includes the textures; this is pretty unique, newer games of course keep the textures / materials separately. You must set the "wad" key in your map's worldspawn to the location of your texture wad, so QBSP can find the textures when compiling!!!

    To do so, in Radiant select a wall brush (ie a world brush) and press N for the entity window. It should have the worldspawn entity in it. Now give the worldspawn entity an additional key "wad" with the value "C:\path\to\my\texture.wad" - of course substitute that with the actual path. Then save.

    If the .map file (more precisely, the worldspawn) contains no path to the wad file, QBSP will not find the textures.

    All right. From the command lines above, you could of course assemble a batch file so you don't have to do all steps manually every time. At this point, I have to say, I'm sorry I use Linux - someone else will have to help you there.

    If you manage to hook these three tools up to Radiant's build menu, I would be interested in how you did it. Personally, I have gotten used to the command prompt, so I never attempted to use the build menu.

    Pretty sure you have to enter the path to the qbsp / vis / light executables and also their command lines in the Radiant configuration somewhere. Sorry I can't be of more help, but I hope you understand the basic process better now.

    In your example, Radiant tries to call "hqbsp", which doesn't exist on your system (you should know what a qbsp is if you read what I wrote), since you didn't install any map compiler yet.

    Download one of the compiler suites I linked to your hard disk, and either use the command line (DOS prompt) as in my example, or point Radiant to the qbsp executable you downloaded (and to the vis and light as well) by finding where you can set the path to the map compilers in Radiant, doing so, and telling Radiant exactly which commands to call during the compile.

    If you managed to make a map in Radiant, you will likely be able to compile it as well. Congrats for getting so far, good job. Ask if you need more info.
    Scout's Journey
    Rune of Earth Magic

    Comment


    • #3
      Thanks, now I am able to successfully compile maps. I downloaded the files from "Disenchant.net", and put 'qbsp.exe', 'vis.exe', and 'light.exe' in "C:\Program Files\GtkRadiant 1.5.0\q1.game\compile"(a folder I made). I edited the "default_build_menu.xml" file within 'q1.game' to:
      <?xml version="1.0"?>
      <!--
      build commands
      [RadiantPath]: path to Radiant .. C:\Program Files\Gtkradiant
      [EnginePath]: path to the engine .. C:\quake3\ C:\Program Files\Quake III Arena\ /usr/local/games/quake3/
      -->
      <project version="2.0">
      <var name="bsp">"[RadiantPath]q1.game/compile/qbsp.exe"</var>
      <var name="vis">"[RadiantPath]q1.game/compile/vis.exe"</var>
      <var name="light">"[RadiantPath]q1.game/compile/light.exe"</var>
      <build name="compile">
      <command>[bsp] "[MapFile]"</command>
      <command>[vis] "[MapFile]"</command>
      <command>[light] "[MapFile]"</command>
      </build>
      </project>

      I did take out all those other build menu options because really, I don't really need all those.

      The textures didn't show at first, because I didn't tell where they were in the worldspawn entity. Also, what would I have to do if I used textures from multiple .wad's? Would I have to take all the textures into a different .wad file?
      Last edited by Allister; 06-21-2010, 08:05 PM.

      Comment


      • #4
        Nice!

        I might start using the build menu after all

        The textures didn't show at first, because I didn't tell where they were in the worldspawn entity.
        An alternative method is to open the .map file in a text editor (like Notepad) and insert the "wad" line manually, like this:

        {
        "classname" "worldspawn"
        "message" "Termination: Cerebral"
        "sounds" "6"
        "worldtype" "2"
        "light" "15"
        "_sunlight" "100"
        "_sunlight3" "80"
        "_sunmangle" "330 -30"
        "sky" "elbrus256"
        "classname" "worldspawn"
        "keyitem1" "the fuse\n"
        "keyitem2" "the fuse\n"
        "mapversion" "220"
        "wad" "\program files\worldcraft\textures\city.hlwad;\program files\worldcraft\textures\htic2.hlwad;\program files\worldcraft\t
        extures\e3m4rq.hlwad;\program files\worldcraft\textures\metal.hlwad;\program files\worldcraft\textures\e3m2rq.hlwad;\program fi
        les\worldcraft\textures\id.hlwad;\program files\worldcraft\textures\e3m1rq.hlwad"
        {
        ( 2048 -1088 0 ) ( 2112 -1088 0 ) ( 2112 -1088 256 ) TECH08_3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
        ( 2112 -1088 256 ) ( 2112 -1088 0 ) ( 2112 -1120 0 ) TECH08_2 [ 0 1 0 -64 ] [ 0 0 -1 0 ] 0 1 1
        ( 2112 -1120 256 ) ( 2112 -1120 0 ) ( 2048 -1120 0 ) TECH08_2 [ 1 0 0 64 ] [ 0 0 -1 0 ] 0 1 1
        ( 2048 -1088 256 ) ( 2112 -1088 256 ) ( 2112 -1120 256 ) TECH08_2 [ 1 0 0 64 ] [ 0 -1 0 0 ] 0 1 1
        ( 2112 -1088 0 ) ( 2048 -1088 0 ) ( 2048 -1120 0 ) TECH08_2 [ 1 0 0 64 ] [ 0 -1 0 0 ] 0 1 1
        ( 2048 -1120 256 ) ( 2048 -1120 0 ) ( 2048 -1088 0 ) TECH08_2 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
        }
        {
        That's an example from one of our maps; as you see, there is lots of additional stuff in the worldspawn, like light values (used by Jardrup's tools), a skybox is being called, a CD track is set, RMQ's custom keys are used, and lots of wad files are loaded (again with Jardrup's compiler). Mapversion 220 (Valve) is set and half-life wad format is used, since the editor was not Radiant but either Worldcraft or Hammer, I can't remember. You'll notice that the format of the brush declarations is even different. Anyway, this is just an example how a .map file looks in a text editor, and you can use that to edit the worldspawn as well (or to replace textures etc). I find that since I use Radiant, I usually don't do this anymore, though.

        Note: You could also set a "fog" key in worldspawn, which only works in certain engines though (Fitzquake, DP). For Fitzquake, the format is

        "fog" "intensity R G B"

        like,

        "fog" "0.025 0.025 0.025 0"

        For use of a skybox, the skybox images (6 files) must be located in id1\gfx\(skyboxname). Then you call it in worldspawn as follows:

        "sky" "skyboxname"

        Here are some skyboxes:

        Signs Of Koth

        Also, what would I have to do if I used textures from multiple .wad's? Would I have to take all the textures into a different .wad file?
        I think this depends on the map compiler you use, IIRC some of them can take multiple wad file entries like

        "wad" "C:\blah\wad1.wad;C:\blah\wad2.wad"

        ie. several paths in the "wad" key in worldspawn, separated by a semicolon.

        I don't know if you can use multiple "wad" keys in worldspawn as well. I guess you'd have to look at the individual compiler's documentation.

        I know that at least Bengt Jardrup's tools can deal with semicolon-separated paths as in the example above, since a friend of mine uses that functionality.

        By the way, TyrLite and hmap2 allow you to use colored lighting, IIRC, while Jardrup's Light can't do that (but has a very nice sunlight feature). And for any Linux users reading this, all three toolsets are available on Linux, and I *think* for Mac as well. Quaddicted and quaketastic would be the places to look.

        If your map gets very big, there is a version of the Vis tool that can do multithreading (on multicore CPUs), made by Willem I think, which should speed up the vis process.

        The results of using hmap2 for lighting a map are a bit different from the other tools in my experience. You must try it out and see what you like best.

        For transparent water, you must give an argument to QBSP, something like

        "qbsp.exe -transwater mapfile.map"

        Of course you'll have to use "r_wateralpha 0.5" in a supporting engine to see it. By the way, you can "fastvis" your maps to save time during testing like this:

        "vis.exe -fast mapfile.map"

        and you can pass certain parameters to Light as well, to smooth the shadows etc (this will also mostly remove problems with "stairstep" shadows)

        "light.exe -extra mapfile.map"

        Some tools also support -extra 4 to make the lighting even smoother. Jardrup's light.exe allows for parameters to be set in worldspawn, as in the above example map, so you can set them per-map. It's pretty well documented.

        Maybe this thread should be stickied and renamed "compiling maps".
        Scout's Journey
        Rune of Earth Magic

        Comment

        Working...
        X