Quake3World.com Forums
     Level Editing & Modeling
        Importing a Quake 4 .map file into GtkRadiant 1.4 or 1.5


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Importing a Quake 4 .map file into GtkRadiant 1.4 or 1.5

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-08-2012 11:09 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hello,

I've made a map in Quake 4 Radiant which I want to use in Quake 3. It's only a alpha build. Meaning no entities, patches, lights, etc. Just brushwork with the caulk texture. GtkRadiant 1.4 gives a lot of line errors when loading and eventually comes up with a empty map. GtkRadiant 1.5 doesn't give any errors, it just shows me a empty map.

Google hasn't helped thus far so that's why I'm asking you guys. I've read I can export it to a model but that's not what I'm looking for. In the perfect situation I would just simply get my brushwork into GtkRadiant 1.4 and continue my brushwork. Any suggestions?

Thanks in advance!



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 363
PostPosted: 08-09-2012 12:59 AM           Profile Send private message  E-mail  Edit post Reply with quote


I've no idea whether there's a tool that automates such a conversion, but this is what works for me...

1. Get the latest version of QuArK.
2. Install, load it, and under 'Games', run it in Quake 4 mode. Open the map.
3. Save it as a .qrk file (QuArK map file for hand editing).
4. Open the file in a text editor and where the game tag says Quake 4, change it to Quake 3 and save.
5. Change the game in QuArK to Quake 3, open the map.
6. Save it as a .map file.

Now you'll have geometry you can load into GtkRadiant. The textures will use brush primitives so you may want to convert it to normal texture mapping. If you had done texturing then you'd have to realign everything again (after making the textures available to the editor of course).




Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-09-2012 01:28 AM           Profile Send private message  E-mail  Edit post Reply with quote


Quark gives a file corruption error when I try your method. If I choose to continue it says that the file extensions does not match the file contents.



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-09-2012 01:30 AM           Profile Send private message  E-mail  Edit post Reply with quote


Strange... I thought for AEdm7 I was able to swap between Q4 and Q3A without a problem. Hmmm... maybe I did it from Q3A and loaded that into Q4.




Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-09-2012 05:20 AM           Profile Send private message  E-mail  Edit post Reply with quote


I could send you a zip file with the map if your willing to give it a try?



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-09-2012 06:09 AM           Profile Send private message  E-mail  Edit post Reply with quote


I use the same tools as everyone... so I doubt it would help. But I can give it a try.




Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-09-2012 06:39 AM           Profile Send private message  E-mail  Edit post Reply with quote


I will do it as soon as I get home from work. Thanks!



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12404
PostPosted: 08-09-2012 07:04 AM           Profile Send private message  E-mail  Edit post Reply with quote


I believe the map file versions are different between the two games. Try opening up the map in Q4R, select all brushes, copy. Open GtkRadiant, paste. If that doesn't work, you'll have to open up the map file in a text editor (back up original first) and hack the version number. Create a basic map in GtkRadiant to compare differences in the headers.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-09-2012 08:54 AM           Profile Send private message  E-mail  Edit post Reply with quote


I will try that as well. Thanks for all the tips guys!



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-09-2012 03:07 PM           Profile Send private message  E-mail  Edit post Reply with quote


The only difference between files is that that the Quake 4 version header says Version 3. If I remove that and try to open it I still have the same result.



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-09-2012 10:33 PM           Profile Send private message  E-mail  Edit post Reply with quote


Try to the copy and paste approach, Obsidian suggested. I tried to look up here in the forums what I did working on my Q4 map AEtri and the in-parallel developed AEdm7 for Q3A. And I seem to recall, selecting all brushes in Q4radiant, copying them, and pasting them into the also opened GTKradiant (might have been v1.2.13 though not 1.4 back then) did work. But that was 6 years ago, so I just do no recall how I did things.




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-10-2012 12:04 AM           Profile Send private message  E-mail  Edit post Reply with quote


Reading up on my Quake 4 Mapping FAQ (sticky thread), I noted this:


But that is indeed the other way around.




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 580
PostPosted: 08-10-2012 12:39 AM           Profile Send private message  E-mail  Edit post Reply with quote


If irc, Q4 map is xmap format based on brush primitives. Also iirc you need to run gtk 1.5 with quake 4 game selected, open the map then you can save as q3 map.




Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-10-2012 01:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


I tried the copy and paste approach. It gives a XML version error. How do I save it as a Quake 3 map in Radiant 1.5? It only has the option to save as, but nothing regarding for what game.



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 580
PostPosted: 08-10-2012 02:10 AM           Profile Send private message  E-mail  Edit post Reply with quote


Maybe that option was in q4edit....damn its been so long since I did this




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-10-2012 03:23 AM           Profile Send private message  E-mail  Edit post Reply with quote


Tested v1.4 and v1.6.2... via Open, and then even via Import... did not work. Reason, as was mentioned, Q4 saves "objects" not as brushes but as primitives... whatever that means. The problem is, I compared a q3a map with the q4 one Infernis sent me, the source is completely different. No wonder a normal load under q3a will not yield anything.

It might be possible to write clever UltraEdit Regular Expressions that would convert the lines of the q4 file into the format used in q3a... but I am not even sure that is possible (in theory). The format looks similar but is not the same... info on texture offsets also seem to be missing... very strange.

It could very well be that back then I converted the q3a map to q4... and never the other way around.




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-10-2012 03:30 AM           Profile Send private message  E-mail  Edit post Reply with quote


OK... I will try and give it a shot... what I need to get this somehow working, the manual conversion from q4 to q3a are two map files.

Create a caulk brush at the center of a new map in q4 128u (X) x 64u (Y) x 32u (Z)... the bottom of the brush is at z=0, and the brush itself center on XY (0,0). And save that, then create the very same brush in Radiant v1.4... again save the map file. Send those files to me. I can then use a diff tool to compare the files and find out what the format is... at least approximately.

Update: We had a thread on the topic here as well: viewtopic.php?f=10&t=986&view=previous

Take a look if the tool (last post) can be found on the net... the link to it alas is broken.




Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-10-2012 04:01 AM           Profile Send private message  E-mail  Edit post Reply with quote


I'll do that as soon as I get home tonight. If I'm not mistaken I should have the tool mentioned in that thread somewhere. Thanks for all the help so far.



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-10-2012 12:57 PM           Profile Send private message  E-mail  Edit post Reply with quote


Did a quick compare... now if the brushes were exactly the same, then there is nothing I can do... the q3 128 coordinate is suddenly -128 in q4... and the other numbers are all over the place.

OK... double-checked...

    Q3: ( 128 8 0 ) ( 0 8 0 ) ( 0 0 0 ) common/caulk 32 0 0 0.500000 0.500000 0 4 0
    Q4: ( 1 0 0 -128 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/caulk"

I never looked into how geometry is actually saved by the editor, but the older ones seem to be using coordinate triplets to save (what I am guessing one "vertex-face"), whereas those get replaced by a group of four numbers in Q4. The Q4 format seems to be a lot more efficient as I read it. There is no trivial way to convert a Q4 map to Q3A. It would take someone with geometry expertise to write something up.

The tool you found, is actually for q1 and q2 maps to be converted to q3a... so that does not help either.

I am a bit surprised that the format was changed this much, I had expected to remove a few {} here and there, maybe rearrange the order of the coordinates, reformatting them basically. But this is a paradigm change ("how pompous can you get" meaning myself ;)).

Maybe TTimo can help with this...




Top
                 

Insane Quaker
Insane Quaker
Joined: 30 Jan 2006
Posts: 362
PostPosted: 08-10-2012 06:10 PM           Profile Send private message  E-mail  Edit post Reply with quote


Yeah, I tried this a few years ago and never found a successful way to port a map from Q4 to Q3. You can do the opposite, which is kind of strange.




Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 363
PostPosted: 08-11-2012 03:29 AM           Profile Send private message  E-mail  Edit post Reply with quote


double post... whoops




Last edited by themuffinman on 08-11-2012 03:37 AM, edited 1 time in total.

Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 363
PostPosted: 08-11-2012 03:30 AM           Profile Send private message  E-mail  Edit post Reply with quote


Infernis wrote:
Quark gives a file corruption error when I try your method. If I choose to continue it says that the file extensions does not match the file contents.


I've never had that error before. I've only got errors about floating point operations before, and that had to do with a glitch in the 3D camera view which can be disabled beforehand to prevent the error. I can't guarantee that it always works, but I'm yet to be unable to convert any map so far.

How about some proof that my method works? Since phantazm11 is here it may be most appropriate to use a Q4 map of his (don't worry, just using it as an example, nothing more). Here's phantq4dm8 loaded in QuArK in its Q4 format, in Radiant converted to Q3 format and in-game:





The only geometry I can't convert yet are models such as used for terrain - they're stored in proc files so I know where to find them, just not how to convert them yet.
You can PM the map to me if you like so I can see if I can convert it for ya.




Last edited by themuffinman on 08-11-2012 03:38 AM, edited 1 time in total.

Top
                 

Insane Quaker
Insane Quaker
Joined: 05 Mar 2010
Posts: 363
PostPosted: 08-11-2012 03:36 AM           Profile Send private message  E-mail  Edit post Reply with quote


AEon wrote:
    Q3: ( 128 8 0 ) ( 0 8 0 ) ( 0 0 0 ) common/caulk 32 0 0 0.500000 0.500000 0 4 0
    Q4: ( 1 0 0 -128 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/caulk"


You're probably better off comparing with Q3's brush primitive format, but the planes are still dealt with the same as with normal texture mapping. And according to this article, the brushDef3 plane equation refers to Euclidean distances, which I have no knowledge about.




Top
                 

Insane Quaker
Insane Quaker
Joined: 30 Jan 2006
Posts: 362
PostPosted: 08-11-2012 09:27 AM           Profile Send private message  E-mail  Edit post Reply with quote


That is truly impressive themuffinman. I tried to convert phantq4dm7 to Q3 back in the day...might have to give it a go now that you have come up with a way to achieve it!




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 08-11-2012 09:34 AM           Profile Send private message  E-mail  Edit post Reply with quote


Interestingly it has been a really long time since I last used Quark... was way back in the day when I built Half-Life MP maps, back then I hated Worldcraft, and Quark was the first editor where 90° rotation of brushes would not kill the map (Qoole also had its issues with that), plus the editor actually had real named grouping of objects. And I registered the editor back then too... :)... good times...




Top
                 

The Afflicted
The Afflicted
Joined: 17 Feb 2005
Posts: 566
PostPosted: 08-12-2012 01:23 PM           Profile Send private message  E-mail  Edit post Reply with quote


Themuffinman saved the day. I'm looking at the map right now in Quake 3. Some things don't fit but that's just minor. His method works. I must have done something wrong. Respect!



_________________
Inf - Leaving in it's torturous wake nothing but vicious, cannabalistic, mutated, radiated and horribly disfigured hordes of satanic killers!


Top
                 

Señor Shambler
Señor Shambler
Joined: 07 Mar 2006
Posts: 849
PostPosted: 08-13-2012 12:26 PM           Profile Send private message  E-mail  Edit post Reply with quote


@MuffinMan: Euclidean distance is just standard straight-line distance




Top
                 

Grunt
Grunt
Joined: 22 Dec 2014
Posts: 58
PostPosted: 05-28-2015 11:12 PM           Profile Send private message  E-mail  Edit post Reply with quote


I successfully converted a Q4 map into Q3 format. I edited it in QERadiant and at the beginning there was a notification that as the map had primitives the map should be converted into the standard format and, thus, textures could be shifted. I agreed and then I had to fix a lot of textures.
Later I worked at another map and opened it (after conversion) in GTKRadiant (v.1.6.4) which suggested converting into the standard format or changing project settings (surprise!). After changing project settings there was no need to fix textures (they looked to be properly applied).
I returned to my first converted Q4 map, opened it in GTKRadiant, changed project settings (I had to do it, otherwise it was impossible to edit the map), fixed some tiny bugs, compiled a *.bsp and *.aas and everything seemed to be OK.
But then I met other problems:
1. When I open the map in QERadiant, it suggest converting into the standard format and, thus, I have to re-fix all shifted textures.
2. When I open the map in GTKRadiant, it changes project settings and the map looks good. But when I try to move or rotate any brush (except curves and patches), its textures shift and I have to fix them again.

So. is there any way to lock textures, to prevent them from shifting when I move or rotate brushes?




Top
                 

Grunt
Grunt
Joined: 22 Dec 2014
Posts: 58
PostPosted: 05-31-2015 09:22 PM           Profile Send private message  E-mail  Edit post Reply with quote


In fact there is a way - it's built in GTKRadiant, but there is a bug in its functioning: to lock textures one should not turn ON this feature, but be sure that it's turned OFF.

In general, GTKRadiant has many new features in comparison to an old good QERadiant, but it seems to have a bug for each feature, too.

P.S. In GTKRadiant 1.6.3 this feature should be ON, in GTKRadiant 1.6.4 it should be OFF.




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group