Released source to MAPtoWAD — Quake/HL to GZDoom converter

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Released source to MAPtoWAD — Quake/HL to GZDoom converter

Postby printz » Mon Jun 25, 2012 6:17 pm

Since I wasn't advancing on it any more, I've decided to simply release the source code, in its current state, of MAPtoWAD.

MAPtoWAD is a command-line utility that can read Half-Life uncompiled .MAP files (built using something like Worldcraft v3 or Hammer, I think) and convert them to GZDoom TEXTMAP (UDMF) lumps.

It reads all brushes from the Half-Life uncompiled map (.MAP, not .BSP) and uses their coordinates to build equivalent 3d floors in a GZDoom setting, all inside a very large 16384x16384x16384 cube sector with sky and line_horizon background, which would be very useful for making void maps. The result is something unreadable unstable in Doom Builder, but fully playable in GZDoom.

I stopped working on it because of a serious limitation: no speed optimization on GZDoom 3d floors at all.

Here is the source code, compilable with Dev-C++ or whatever works for you.

HOW TO USE IT:

- download Worldcraft for Half-Life so you can make HL maps
- download Wally so you can collect the textures from Doom into a Quake/Half-Life WAD
- find a Wad browser that can extract textures into PNGs without resorting to patches
- use Wally to import those into a WAD
- setup Worldcraft to use that WAD
- start mapping!
- after saving, do NOT try to use BSP/VIS/LIGHT. Just go to the command prompt and launch maptowad <halflife .map input> <gzdoom textmap output>
- use your favourite Wad browser to import the textmap into a UDMF setup
- use your favourite node builder on that setup.
- play!

As an example of where I used it, it's this HPack WIP: http://forum.realm667.com/viewtopic.php ... 4&start=10 . I wish I had more updated screenshots. You may need to update the source code for your needs.
Last edited by printz on Tue Jun 26, 2012 2:19 am, edited 1 time in total.
User avatar
printz
Free SMIV!
 
Joined: 26 Oct 2006
Location: Bucharest, Romania

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Postby Nash » Mon Jun 25, 2012 8:39 pm

Holy freaking crap. This is amazing. I was just thinking the other day about asking whether anyone has attempted to write something that can convert brushes into UDMF.

I didn't ask because I thought it was just impossible to do. I mean, all the overlapping brushes... how in the heck would it be converted into 3-d floors for GZDoom.

But it looks like you figured it out. :O

What would it take to make the map readable in Doom Builder? Pretty sure you'd need to get it into DB2 to populate it and edit it further for Doom usage...
User avatar
Nash
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Postby Tormentor667 » Tue Jun 26, 2012 12:54 am

I was already impressed by the HPack map, but this is still fucking awesome as hell. Now I want someone to convert Quake 1 E1M1 to GZDoom with that converter :)
User avatar
Tormentor667
 
Joined: 16 Jul 2003
Location: Germany

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Postby printz » Tue Jun 26, 2012 2:19 am

Nash wrote:What would it take to make the map readable in Doom Builder? Pretty sure you'd need to get it into DB2 to populate it and edit it further for Doom usage...

Sorry, it can be opened, but it's unstable, due to so many linedefs and sectors in close proximity. If you move them a bit, when it comes to overlap them, DB2 will crash. Also, don't run Visual mode. Updated the wording in the OP.

Tormentor667: sadly it only converts raw MAP files (and currently only of Half-Life, which are slightly different from Quake's; someone'll need to update the code), not compiled BSP. So you'll have to find the "source map" of E1M1.

Then also, it's for void maps, not typical maps. For the latter, I'm highly thinking of trying something for Eternity, which does have BSP for complex 3D maps (which are nothing else than multi-layered 2D maps).
User avatar
printz
Free SMIV!
 
Joined: 26 Oct 2006
Location: Bucharest, Romania

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Postby Nash » Tue Jun 26, 2012 4:05 am

I remember Romero releasing all of the uncompiled source maps for the Quake shareware a few years back. Also, too bad maptowad's output can't be post-edited with in DB2.
User avatar
Nash
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Postby leileilol » Tue Jun 26, 2012 5:24 pm

Actually Romero released all the Quake maps including the ones that didn't make the cut (like the elusive DM7, the just-started DM8, the start of Dismal Oubliette, and the ARMOR brush item), but under the GNU GPL.

The difference between BSP29 (Quake) and BSP30 (Half-Life) are different clipping hull sizes, external textures and 24-bit lightmaps.
User avatar
leileilol
Netscape 3.0 Now!
 
Joined: 30 May 2004
Location: japanimation web ring's

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Postby Nash » Tue Aug 14, 2012 3:24 pm

How does your converter decide how and where to place the control sectors? I am especially amazed at how it's doing it for sloped 3-d floors too.
User avatar
Nash
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia

Re: Released source to MAPtoWAD — Quake/HL to GZDoom convert

Postby printz » Tue Aug 14, 2012 4:27 pm

It places them at the east of the square. It creates new control sectors when a new combination of 3d floors is found. For each new combination of N 3d floors, N control sectors are created. It's not the most efficient, but it was working for me.

Thanks for the interest :)

Also, the name needs changing. There's already a "maptowad" (not by me) which converts Wolfenstein 3D maps to AFADoomer TC wads.
User avatar
printz
Free SMIV!
 
Joined: 26 Oct 2006
Location: Bucharest, Romania


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests