Page 1 of 1

UE2 terrain exporter tool

Posted: Thu Oct 06, 2022 8:23 am
by .:..:
This is a simplistic tool to export a UE2 terrain (only tested with UT2004) geometry as OBJ file, which can be used in 227.

To configure it, you can tweak Config.ini (sections are named as <Mapname>_<TerrainInfo object name>) to adjust U/V map tiling scale.
After that you only need to either drag and drop an .ut2 map file to the UE2TerrainExp.exe file (or run UE2TerrainExp.exe ..\Steam\steamapps\common\Unreal Tournament 2004\maps\DM-DesertIsle.ut2 for example as shortcut or batch script).

It will create <Mapname>_<TerrainInfo object name>.obj files at your exe path, which can then be imported in 227 editor. If you wish to use exact position as in UE2 level, just copy over Location from the original level to the newly added terrain static mesh Location.
Too bad 227 doesn't support texture blending yet so can't have that same nice transition between multiple materials (you can use another software though to tweak the terrain obj file to make some nicer texture transitions). But this tool only exports the terrain as a single material yet.

Download from here: http://www.klankaos.com/downloads/UE2TerrainExporter.zip

Re: UE2 terrain exporter tool

Posted: Fri Oct 07, 2022 3:18 am
by Leo T_C_K
thanks dude, I'm sure this can come in handy, though in practice mostly usable indeed as static meshes as brushes would get too complex on the old engine to handle it all properly.

I remember you telling me of a more complex/alternative method. Btw someone I know already tried it with another game and it worked so it seems not to be limited to ut2kx.

Re: UE2 terrain exporter tool

Posted: Sat Oct 08, 2022 8:22 am
by .:..:
Updated to support Unreal 2 map format!

Re: UE2 terrain exporter tool

Posted: Sat Oct 08, 2022 9:41 am
by Leo T_C_K
wow, thanks a lot

Re: UE2 terrain exporter tool

Posted: Thu Jul 13, 2023 1:04 am
by BobIsUnreal
so this is cool,
but it seems that the obj that is exported by the tool is not strictly obj complaint, as in it canted be opened by any normal tool to view obj models, such as blender, 3d viewer, cuda etc
in blender , it shows as only unlinked vertex points. witch is not actually valid model..

but the scarier part is that somehow, unreal obj importer is able to take this invalid data and make it whole, by guessing how the vertex should be connected.
wonder if this is why some random models that i have imported over the last few years have giant random reverse bsp hole tumers added to them at import.

but i guess for this use its fine ?,because after teraaininf mesh is imported, and then exported again, it it's a normal model file, but the file size in then 2x the original.

Re: UE2 terrain exporter tool

Posted: Thu Jul 13, 2023 8:10 am
by .:..:
Just looked at it, looks like I made a mistake to vertex normal point to index 0 instead of 1. Since 227 calculates normals on load, I made it skip normal data when importing OBJ, which is why it works flawlessly. I also made this tool output only a single normal and have all verts point to that since its something most tools recalculate anyway.

But anyway I updated this tool to correctly write index 1 for normals now.