Source Sdk Mapping

Discussions and feedback around the Open Projects such as Orange (Elephants Dream), Peach (Big Buck Bunny), Apricot (Yo Frankie!)...

Moderators: jesterKing, stiv

thorsummoner
Posts: 1
Joined: Tue Jul 13, 2010 1:29 am

Source Sdk Mapping

Postby thorsummoner » Tue Jul 13, 2010 1:46 am

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;

also the .VMF file is text based and is simplistic.\
A tutorial on the composition of the .VMF file can be found here:
http://www.interlopers.net/forum/viewtopic.php?f=11&t=2507&p=426213#p426213

I would appreciate any positive or helpful feedback.

stiv
Posts: 3646
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Postby stiv » Tue Jul 13, 2010 5:01 pm

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


Blender uses Python for it's scripting. You have all the I/O facilities from Python available for use.

davevanos
Posts: 2
Joined: Mon Jul 26, 2010 6:44 pm

Re: Source Sdk Mapping

Postby davevanos » Mon Jul 26, 2010 6:52 pm

old but:

http://forums.steampowered.com/forums/s ... p?t=654523


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]

davevanos
Posts: 2
Joined: Mon Jul 26, 2010 6:44 pm

Re: Source Sdk Mapping

Postby davevanos » Fri Oct 15, 2010 7:42 pm

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 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;

also the .VMF file is text based and is simplistic.\
A tutorial on the composition of the .VMF file can be found here:
http://www.interlopers.net/forum/viewtopic.php?f=11&t=2507&p=426213#p426213

I would appreciate any positive or helpful feedback.


Ok, I remembered how to do this.

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.

Skaruts
Posts: 39
Joined: Wed Sep 30, 2009 6:18 pm

Postby Skaruts » Wed Aug 17, 2011 10:07 am

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.


Return to “Blender Open Projects”

Who is online

Users browsing this forum: No registered users and 0 guests