Conversion tool mainly for QuArK maps, but other maps can also be used ====================================================================== BACKGROUND QuArK can read integer map files produced by other editors. However, once you save the map in QuArK, it may insert more or less amount of floating point values in it, making exchange with other editors difficult. In later QuArK versions you can choose to save the map without floats but this will be done using a simple method of rounding to nearest integer, i.e. 34.6 will be saved as 35. This will in many cases cause a lot of brush alignment errors that are difficult to fix, especially in arches or other odd angled brushes. ConvMap is a map conversion tool that tries to do a better job than that. It attempts to make sure that the original brush faces are maintained as closely as possible, both in direction and in distance from origin (0 0 0). ConvMap can also perform some other face conversions, like reversing face order within each brush and various corrections of missing/mixed/scaling texture errors. In this case, the map doesn't have to be a QuArK map and the float conversion will not be made. ConvMap can also be used to convert Q2 map files into Q1 and this makes it possible to map for Q1 in a non-Q1 editor, e.g. GtkRadiant. ================================================================================================== QUICK START To convert a map named "mapfile.map", just enter the command "convmap mapfile", and press 'Y' to start processing. The output is written to a file named "mapfile.out", i.e. the original map file is NOT changed. ================================================================================================== COMMAND SYNTAX The full command syntax is : convmap [conversion options] [file selection options] mapfile [mapfile ...] Conversion options : -aN : set accuracy to N (default 32), lower values are faster -e : display error details -f : sets fixup level to N (default 0) Add level numbers below for combined effect 0 = no fixup 1 = replace all missing textures with 'notex' 2 = same as 1 but using neighbour textures instead of 'notex' 4 = fixup mixed solid/sky/liquid textures by replacing sky/liquid with 'mixtex' 8 = same as 4 but using neighbour textures instead of 'mixtex' 16 = enforce a minimum texture scaling (default 0.2) 32 = convert Q2 style face definitions into Q1 64 = replace all textures with 'unitex' -k : do not update date/time stamp in files -l : low precision; only round off to nearest integer. Append a '2' to just cut off fractional part -mN : set min scaling to N/10 (default 2 = 0.2) -q : inhibit progress information (to speed process) -r : reverse brush face order All options in each group should be kept together (no spaces), but the order is not relevant. E.g. to set accuracy to 64 and also enable error details, the command could be "convmap -a64e mapfile". If fixup or reverse options are used, no float conversion is made. Also, if nothing is done there is no output file. The standard map file extension ".map" is automatically added to the supplied filename(s) and you can enter multiple files and wildcards (e.g. abc*). ================================================================================================== NOTES ConvMap does NOT change anything in the original map file; the output is written to a file with the same name as the map file but with the extension ".out" instead. If there are no float values in the map file, the output file will not be generated (if float conversion is made at all). After processing, ConvMap will print out more or less information depending on the selected options. Default it will print a summary about # processed faces, # face distance errors, # face errors and a total sum of all distance errors. The latter three values should of course be as small as possible. Using a higher accuracy value may yield a better result, but at the cost of slower processing. ConvMap can always be aborted by hitting Ctrl-Break. Normally, ConvMap will delete the QuArK ETP (Enhanced Texture Positioning) indicators (e.g. "//TX1") on each brush face line. This is because the texture scaling would be invalid after conversion. It's recommended to use the possibility in QuArK to save the map using "Classic Quake" format instead of "Quark ETP" before converting it with ConvMap. This is set in QuArK's options. After converting a map, compilation sometimes aborts at an earlier stage than before. This is due to the compiler being very sensitive to small brush gaps or overlaps which are a result of the conversion. Using newer compiler versions with proper error information, fixing these problems shouldn't prove too difficult. ================================================================================================== FILE SELECTION OPTIONS There are a lot of file selection options, but maybe the most important one is "-i" that removes the need for the confirmation for each file. E.g. to set accuracy to 64, enable error details and disable confirmation, the command could be "convmap -a64e -i mapfile". More info can be obtained by running ConvMap without any parameters. ================================================================================================== CHANGES The changes are as follows : ConvMap 1.9 (Sep 16 2004) 1. Fixed minor printout issues. ConvMap 1.8 (Sep 9 2003) 1. Added a new variant to the low precision option "-l". By specifying "-l2" instead, float values will just have their fractional part cut off, e.g. 1.99 will be converted to 1. This simulates how a float map is interpreted by a compiler with no float support. ConvMap 1.7 (Sep 3 2003) 1. Added a fixup option to convert from Q2 style face definitions into Q1. This will remove the last three values from the line, remove the path part from the texture and replace initial '#' and '%' characters in texture names with '*'. This effectively converts a Q2 map file into Q1, at least brushwork-wise. Entities will have to be manually changed. This conversion can also be used when mapping for Q1 in a non-Q1 editor, e.g. GtkRadiant. 2. Added a fixup option to replace all textures with 'unitex' name. This can be useful when you haven't got the textures in the map file and you still want to compile and inspect the brushwork. A simple replace operation will then set the desired texture on all faces. 3. Improved map file parsing to avoid incorrect detection of '{' and '}' characters. ConvMap 1.6 (Jun 5 2003) 1. Added another fixup option to set a minimum texture scaling level (default 0.2). The minimum scaling level cam be set using another option "-m#". The value is entered in 0.1 increments, e.g. specifying 3 will set a minimum level of 0.3. 2. Improved information about changed faces. ConvMap 1.5 (Mar 5 2003) 1. Added a message and automatic removal of output file if nothing is done. ConvMap 1.4 (Feb 11 2003) 1. Extended fixup option to also include mixed liquid textures. Now brushes with mixed solid/sky/liquid textures will have the sky/liquid textures replaced by either 'mixtex' or neighbour solid texture. If no solid texture is available, sky will be replaced by neighbour liquid texture. ConvMap 1.3 (Nov 6 2002) 1. Added fixup option which attempts to correct certain texture errors. Missing textures can either be replaced by 'notex' name or a neighbour texture. Brushes with a mix of sky/solid textures can have the sky textures replaced by either 'mixtex' name or a neighbour texture. ConvMap 1.2 (Sep 16 2002) 1. Another significant speed improvement and therefore the default accuracy level is increased from 24 to 32. ConvMap 1.1 (Sep 10 2002) 1. Accuracy related calculations are now several times faster and therefore the default accuracy level is increased from 12 to 24. 2. Minor change so coordinates are not scaled if simple rounding maintains the same face. 3. Added face progress info and added a new option "-q" which inhibits this information. 4. Changed so option "-r" only reverses face order. Therefore option "-n" is removed. 5. Fixed a bug which made wildcard selection find files with extensions longer than ".map" (e.g. ".map_save"). 6. Added timing information. ConvMap 1.0 (Aug 29 2002) 1. First version ==================================================================================================