Exporting patch meshes (curved meshes) on -convert stage
Hi, I'm experimenting loading built maps in third-party tools in order to find a way to render lightmaps with a third-party and better renderer (real raytracer if possible and OpenCL based renderer if possible). This is only a dream, do not expect something today and do not expect something for tomorrow. By the way, I started to identify the blocking issues. See this thread at Unvanquished forum for more information: “Why we need a real raytracer for lightmaps rendering”. The final rendering process must not require manual intervention (just being another stage in your map compilation Makefile).
The first blocking issue I met is the fact that it seams q3map2 do not export the curved meshes (patch meshes), leaving holes. Q3map2 knows to export to .obj
or .ase
format and perhaps it's a limitations of these formats, I don't know. By the way, I'm looking for an interchange format that contains all the faces, of course. I don't know if it's easy to do or not, but getting q3map2 able to export a complete model from a .bsp
would be a big milestone on the road to an external lightmap renderer.
About interchange formats, q3map2 knows how to convert to .obj
, a format blender has a built-in importer for, and .ase
that can be converted to .3ds
with assimp
since blender also has a built-in importer for .3ds
and it works. By the way, all these importer are slow compared to the blender's collada importer (.dae
) so it could be good to also fix potential issues in a bsp to dae process, but the priority is to get a complete map model in blender, so if you want to test bsp to blender import, I recommend converting to obj or to ase then 3ds.
I don't think relying on a third-party blender importer for bsp is acceptable because the import process must be doable with default blender setup. The other issue with bsp import in blender is someone wrote an importer years ago but never licensed it so this code is not usable by free software game, and because this code already exists, no one wrote an alternative for it. The last issue with bsp import in blender is the crucial one, it's about shaders. Q3map2 knows to read shaders and convert them to an interchange format (like .mtl
) and even if this support must be extended to export other textures (currently only exporting diffuses) and light emission, q3map2 is the right place to implement a shader exporter to a standard interchange format, blender is not the right place to implement a shader importer from q3 specific shaders. If you use a blender's bsp importer, you must implement shader conversion in blender, if you use a q3map2 bsp exporter, you must implement shader conversion in q3map2, something we knows well better and have more chance to get merged one day. So, in a bsp to blender path, stuff must be implemented in q3map2 to export stuff in interchange formats blender grok, not implemented in blender. Also, blender is just an example of third-party renderer, getting complete export from q3map2 allows experimenters to try out other renderers. I just quoted blender because it's a software that already offer multiple renderer options.