c-d-a / io_export_qmap

.map exporter for Blender
GNU General Public License v3.0
93 stars 21 forks source link

Making level with models and brushes - what's the best way to export .map ? #13

Open motorsep opened 1 year ago

motorsep commented 1 year ago

I have a bunch of architectural models, all already exported as ASE with materials, to be used in Doom 3 (or idTech4 in general). I would like to make my map with those model in Blender and then block out rooms with caulk, separated by visportals (brushes behind/inside the models). What would be the best way to export .map so that when I load it in Dark Radiant (or whatever editor of choice), models in the Editor are located/oriented where they were located/oriented in Blender (when add-on exports func_static entities, they should reference proper models and have proper origin/rotations)

c-d-a commented 1 year ago

I won't have the time to properly look at this for a couple days at least. Currently the exporter only gets custom properties from empties and lights (and exports them as key/value pairs). So if you modify the importer to create a root empty with the model's filepath as custom property, the exporter would already work as is. Back when I made the .ase importer for TDM, it had the root empty/multi-file functionality, but it seems like OrbWeaver removed it when porting the addon to 2.8. For mapping, root empties aren't very convenient (you first have to select children to duplicate objects around). I'll see if I can make this work with proxies somehow. The per-object mesh type needs an "ignore" option, at least. But exporting properties for brush models is also desirable, I just haven't gotten around to it.

motorsep commented 1 year ago

Yeah, for convenience it needs to be model alone, no model parented to empty. As for "ignore" option, maybe if there are no custom properties (or at least no custom property "func_static") found on the mesh/model - ignore it during export (or even when you prep stuff for export) ?