TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
590 stars 156 forks source link

export .map to FBX format #620

Open KroniK907 opened 6 years ago

KroniK907 commented 6 years ago

Some map makers including myself would like to be able to export our maps, including textures to a 3D editor like 3ds Max or Blender. FBX has become the universal method for transporting 3D objects from one software to another. Having the ability to export textured brushes (No need to export entities) and maybe have a few options surrounding the export (such as with or without textures, or only exporting textured faces (non caulk) rather than entire brushes, or preferences surrounding the object naming structure etc.)

This would be very useful for users who want to either move their existing projects to a different engine or platform, or allow them to use radiant as a basic layout tool which can then export the basic layout to a software that is better suited to finalizing the details of a map.

The FBX ASCII format is not hugely complex however it has been obscured over the years. No need to try and export to FBX binary as AutoDesk refuses to licence that to any open source project due to licensing conflicts, but since the FBX ASCII format is human readable it has been allowed for plugins into projects like blender.

Thank you!

KroniK907 commented 6 years ago

So I just spent several hours looking into creating a converter myself to help create a starting point for a plugin. Holy cow the .map format is stupid. Does GTK Radiant store the vertices of brushes in memory, or does it work with the raw plane data on the fly? The fact that there is no vertex data makes exporting to another format trickier than I expected, and there is much more math involved than I initially expected.

I'm going to keep plugging away at this, but if you have any tips of a better starting point than the raw .map file please let me know.

ensiform commented 6 years ago

This sounds like something Noesis might be able to do from bsp.

KroniK907 commented 6 years ago

I already have a converter from .bsp, but I am specifically wanting to convert the .map brushes to 3d objects. This is much more friendly to edit in a 3D software than converting the bsp which gives you a tri-soup style faces rather than 3D brush objects.

Garux commented 6 years ago

This exports from .map: https://github.com/Garux/netradiant-custom/tree/master/contrib/brushexport exp Apparently requires a few more options for your purposes

KroniK907 commented 6 years ago

Well that is certainly something close to what I want. Its too bad that its for netradiant and uses netradiants source do do most of the math so I cant attempt to adapt it to zero radiant.

Garux commented 6 years ago

May use NetRadiant instead ¯_(ツ)_/¯
It does not export curves and models tho, i'd like to have this too
Textures are easy to grab with auto pk3 creator

thunderpwn commented 5 years ago

@KroniK907 , with gtkradiant 1.5 you can export as .obj

KroniK907 commented 5 years ago

@thunderpwn .obj can work, and is what I've used in the past, but there is a whole series of steps to make that .obj useful in blender or 3dsmax, whereas an .fbx format is almost plug and play simple.

Garux commented 5 years ago

@KroniK907 what are those steps? I'm getting model right out of the box with textures in max and blender after these changes: https://github.com/Garux/netradiant-custom/commit/034f06f18d4dc3615f4211ab0351ebf81f44e7f5 Visible improvements are option to scale model and to weld vertices (face = polygon atm)

KroniK907 commented 5 years ago

@Garux Wow! Didn't realize this had been added to the .obj export. Thanks for the heads up!

madsami commented 4 years ago

If it is any help, you can import .ase into blender (jka import plugin on jkhub), then from blender to obj or fbx. Would be nice to have either obj or fbx export natively, though. Maybe the python code for the blender plugin could be translated to C in order to work with radiant?

osen commented 3 years ago

You might also be interested in our fork here: http://thamessoftware.co.uk/openradiant/

OpenRadiant is a heavily modified fork of GtkRadiant that strips out all the Quake stuff and acts like a standard generic model editor reading textures directly from a project folder and exporting to .obj (which can be loaded in Blender, Maya, Max, etc and further processed as part of your workflow). It also provides lightmap baking for the .obj format.

madsami commented 3 years ago

@osen Thanks for the tip. This looks really interesting, I'll be sure to use it.