Map conversion tool and conversion process

Topics concerning mapping with the unreal 4 engine
Post Reply
User avatar
KroniK
Posts: 169
Joined: Tue Dec 06, 2011 9:44 pm
Location: Fairbanks, Alaska, USA

Map conversion tool and conversion process

Post by KroniK »

Hello fellow UrT mappers!!

I'm here with a brand new way to get started mapping in UE4! With a converter tool I found, as well as a scaling tool I made myself, it now takes less than 10 minutes to export any UrT 4.x map and import it into UE4 and see how it looks. For a proper conversion, there is still lots of work that is required to make the map load quickly and get decent FPS, however the conversion will provide an excellent basis for importing the map into whatever editor you decide to use for the cleanup.


Prerequisites
This process has a few system requirements and dependencies that will need to be installed first.

-Windows 64 bit
-Python 3

The conversion tool only runs on 64 bit windows, and you will need Python 3 installed to run my scaling tool.

Step 1 - Unzip your map files

The first step in this process is to remove all the map files from the pk3. First you need to rename the .pk3 to a .zip to be able to extract the map files. Then you must extract all the folders inside the .zip file to your q3ut4 directory.

Once that is done, open up the 'map' folder inside the q3ut4 folder and get the name of the .bsp file. This may not be the same as the name of the .pk3 so you need to make sure you know the correct file name.

Step 2 - Download and run the q3converter tool

Go ahead and download the converter tool here: https://goo.gl/h7tDT1

Once you have the .zip file downloaded, extract the converter tool. Then open up a command prompt (or Power Shell) window in the same folder as the q3converter_x64.exe. Then run the following command:

Code: Select all

q3converter_x64.exe -gamepath "C:/Path/To/UrbanTerror/" q3ut4 -outdir "C:/Path/to/store/converted/mapfiles/" -file "maps/mapname.bsp" -bsp_nosky

The -bsp_nosky flag removes the skybox which is not usable in UE4.

Now you should have some folders in "C:/Path/to/store/converted/mapfiles/". One of them is the 'maps' folder which should now contain 'mapname.fbx'. FBX files are vary versatile and can be imported into just about any 3D editor. Now, do take note that it creates an ascii .fbx file. FBX files can either be ascii or they can be binary files. Blender, can only import binary files, so once you scale the map to UrT scale, then you will have to convert the fbx to a binary to import it into blender. The UE4 editor doesn't care though and can import the ascii .fbx files just fine.

Step 3 - Scale your new .fbx file

The .fbx file that the q3converter outputs is already scaled to the correct size for Quake 3 maps, however UrT maps are not the same scale as Quake 3 maps. In Quake 3 the player is 56 inches tall, however in UrT the player is 72 inches tall. So 56/72 gives us a scaling factor of 1.2857

So to scale the entire map up by 1.2857 I created a tool using python that can scale ascii .fbx files by a given scale factor. You can download my python tool here: https://github.com/KroniK907/ScaleFBX

Once you download the ScaleFBX.py, go ahead and run the following in command line or power shell:

Code: Select all

python ScaleFBX.py "C:/Path/to/mapname.fbx" "C:/Path/to/output/mapname_scaled.fbx" --scale 1.2857

Step 4 - The last one

Now that you have a properly scaled .fbx, you can do whatever you want with it. You can import it directly into UE4 and walk around in it and see how bad old textures look even in a new engine, you can import it into your favorite 3D modeling software and work on the rebuild process, or you could even open it in UE4 and use it as the basis for rebuilding it using UE4 brushes.

Now, if you are going to use Blender as your map modeling tool of choice, then you will need to convert the .fbx into a binary format. Autodesk (the creators of the FBX format) have a neat little tool that you can use to convert the ascii fbx file to a binary fbx file. You can download that tool here: http://usa.autodesk.com/adsk/servlet/pc ... d=22694909

Hope this helps streamline the conversion process for everyone!!
"I still miss my ex girlfriend, but my aim is improving."

Post Reply