GoomiiV2 / UE4-Quake-Map-Importer

A UE4 plugin to import Quake style .map files (Quake 1, HL 1 and Q3) and convert them into UE4 brush geometry.
19 stars 2 forks source link

Generating UE4 Geometry Brushes #1

Closed bberak closed 4 years ago

bberak commented 5 years ago

Hi there,

Just a quick question about your tool. Are you saying that your tool has the ability to take a Quake map, and generate UE4 geometry brushes from the Quake map data?

If so, I'd love to pick your brain (and take a closer look at your source code). I'm looking for a tool that can take a .obj or .fbx or another format and generate UE4 geometry brushes. This will be a huge help with level building and the like.

GoomiiV2 commented 4 years ago

Hey

Sorry for the late reply. This project is pretty much dead at this point, but yea that was the plan, parse the .map and transform it into native Unreal brush geo, it was semi working. But if I was to do it again i'd skip trying to make it in to brush geo and just make it with static meshes as aperantly the BSP path results in less performance (for no good reason imo).

(I'm still mulling over the idea of another approach, pretty much a new .map compiler that would output a bunch of static meshes and then assemble those in the editor, best result if the brushes are grouped logically. I'd love something built into UE4 but I doubt I could make something to compete with the ease of TrenchBroom)

Anyway apart from my rambling if you want some code to create brushes still I had this Gist that should work to create a simple cube that may be of help https://gist.github.com/GoomiChan/96b49840a49ca448234e other wise Hammuer looks like a nice ready to go option (I think it supports Quake maps as well as Valves VMFs)

Hopefully that was atleast of some help.

bberak commented 4 years ago

Thanks for the response @GoomiChan!

I was also going to go down the static mesh route, but I find the BSPs way more useful and easier to use because they can be edited from the main level editor whereas the static meshes are bit more cumbersome (I've also heard about the performance hit - but I figured the BSPs can be converted to static meshes if required).

I've currently built a simple converter that outputs geo brushes into a .t3d file (which can be copy + pasted into the UE4 level editor). Ideally, I'd like to output a .umap file directly, but I wasn't able to find any documentation on the format of the .umap file. Given that .umap is a binary format, how did you manage to reverse engineer the structure? Is there some UE4 .umap documentation lying about - I struggled to find anything relevant on this topic (I suppose reading UE4 source code might be an option)..

Thanks again for open-sourcing your work and replying, cheers!

GoomiiV2 commented 4 years ago

Fair point on having them be editable in the editor.

I'm not sure on the format of the .umap files (and its a format I'd like to avoid having to output directly). The way i was going about it was to create the brush actors from a plugin running inside the UE4 editor by adding them to the editor world and having it save the world.

I haven't looked at it, but Ue4 now has Python scripting for editor automation, so if you want to avoid making a c++ plugin that might be an option worth exploring. Hopefully it has the ability to create bsp brushes. And seeing as your project is for importing voxels you might be able to get away with just editing the property's on the default bsp cube and not have to go any deeper.

Nice looking project btw :>

bberak commented 4 years ago

Ahhh interesting!

I never thought about reversing the process and using a UE4 plugin to read the voxel file and perform the required editor automation - that makes a lot of sense.. I'll definitely explore this more - especially the Python scripting (definitely hope to avoid creating a c++ plugin if possible).

Thanks for pointing this out - really appreciate your thoughts and time!

All the best.