Hah crazy right?
I don't think so, I've become rather disappointed by the Source SDK tools available for source engine development.
Essentially my goal is to make import and export scripts for .vmf files; And Export (Compile) scripts for .bsp files.
There are already custom compilers available and I'm fairly certain there is no are of blender that can't be comparable with .vmf files.

Essentially, .vmf maps contain:
World Geometry as defined by sets of 3 vertexes that define a plane in a solid; and their respective textures
Entities as defined by a single point and a set of variables

and that's basically it
there are a few more unique qualities, but these could be defined by an auxiliary script.

My major hangup right now is i have no idea how to get or send data from a file to blender;

I was able to do something similar a while back, from hammer to sketchup/blender but never attempted to get the modified file back into hammer. the vmf lost all its textures when it went to .obj and I lost interest. but it can be done.

If I remember right I exported the vmf from hammer into collada? then grabbed that with blender and exported it to .obj where i really planned on working on it and then using source sketchup tools to export it back to vmf. but like i said, the textures were all lost and retexturing it in sketchup was a headache, so i dropped the whole thing. For source mapping its just alot easier to stick with hammer. source modelling however is definately easier in blender.[/url]

thorsummoner wrote:Hah crazy right?I don't think so, I've become rather disappointed by the Source SDK tools available for source engine development.Essentially my goal is to make import and export scripts for .vmf files; And Export (Compile) scripts for .bsp files.There are already custom compilers available and I'm fairly certain there is no are of blender that can't be comparable with .vmf files.

Essentially, .vmf maps contain:World Geometry as defined by sets of 3 vertexes that define a plane in a solid; and their respective texturesEntities as defined by a single point and a set of variables

and that's basically itthere are a few more unique qualities, but these could be defined by an auxiliary script.

My major hangup right now is i have no idea how to get or send data from a file to blender;

You need the latest version of Crafty. This lets you open up bsp or vmf files. You can then export them into an obj file. When you import the obj into blender you will have all the textures brought in as well. It works great, just uncheck the rotate x-90 option in blenders obj import dialogue.

You should also scale the whole thing down once its in. I just tested it out with a tower of terror bsp I had in garrysmod, and it came through great. I did notice alot of extra junk, like the skybox cluttering it up. You can delete this portion of the map without any issue. Also, remove doubles, theres alot in every bsp/vmf.

even better, after cleaning it up I was able to move the map into unity3d without a hitch.

I've done this in the past when I built a watch tower in hammer and then wanted to turn it into a model for performance reasons. I've done this by simple hamer export. Blender 2.49b can import DXF files (2.5x DXF support is still in development, but might work for this).

To be honest, the only advantage I would see in using a script to directly import vmf files would be if it could eliminate tessellation in the process. Surely we can do it in blender pretty easily, but the automated process would be more than welcome. Otherwise I don't see a reason for it, since it wouldn't make much difference from working with DXF files (except if we could export vmfs).

On a related note, I don't know what your goals would be, but I prefer to create BSP geometry in hammer, it seems much easier to do, and you can always keep checking the map for invalid brushes (which can happen pretty easily if you're not careful). If you were thinking of this to turn the map's BSP geometry into a big model, remember that models don't affect vis.

Compiling maps is always better to do it with dedicated tools, imho, since they are made specifically for that. There's at least two external programs that do it. It's perfectly possible to make another one in blender, I think, but the ones that are already made are quite good and I don't see any advantages in doing it from blender.

Anyway, I think that anyone with enough python knowledge and knowledge of the vmf structure would be able to make this happen quite easily.