New Map Exporter
by Vincent BILLET · in Artist Corner · 12/04/2006 (3:51 am) · 57 replies
If you want to export .map files from blender with textures, lights and portals support, check my map_export.py here :
www.dragonheadstudio.com/down/map_export.zip
This script add Valve 200 (.map) export to blender's export menu.

Naming convention for portals :
Portal meshes must start with Portal, eg. PortalA, PortalMain, and son On
Light issues : Only Omni lights are currently supported.
Enjoy.
Edit : Link change
www.dragonheadstudio.com/down/map_export.zip
This script add Valve 200 (.map) export to blender's export menu.

Naming convention for portals :
Portal meshes must start with Portal, eg. PortalA, PortalMain, and son On
Light issues : Only Omni lights are currently supported.
Enjoy.
Edit : Link change
#22
12/25/2006 (4:39 pm)
Well this is something, which saved my day. I have been thinking of a way to export my buildings from blender to TGE and now people like you jump out. I thank you from the bottom of my heart!
#23
excellent travail ;-) ( nice job )
question : why the 'map2dif torque program' is not integrated into the script python as for quark for instance ?
kind regards
Philippe C
12/30/2006 (1:51 pm)
@ Vicentexcellent travail ;-) ( nice job )
question : why the 'map2dif torque program' is not integrated into the script python as for quark for instance ?
kind regards
Philippe C
#24
01/20/2007 (8:31 pm)
Very cool! This will save a lot of pain and increase my productivity!
#25
BTW this will be very useful.
01/22/2007 (12:42 am)
How would you create LOD with this? Is it the same as with Quark?BTW this will be very useful.
#26
If I make a simple cube and attach a material with texture, I get 6 "None" values for face.image.
Could someone post a test map .blend? Thanks.
01/28/2007 (5:00 am)
I've played around with the script a bit, but must be doing something wrong. What settings do you need to get a texture applied to the faces? I've done the normal bit of assigning the material and getting it to work properly inside of Blender (renders correctly). The problem is, there's no "image" attached to the faces object.If I make a simple cube and attach a material with texture, I get 6 "None" values for face.image.
Could someone post a test map .blend? Thanks.
#27
You need to select the object, enter UV face select mode and load an image into the UV/Image Editor. Shouldn't there be an easier way? Can't we get the texture space from the materials? That'd be much easier for designing something.
Oh, well. I haven't tested it, but it'll be nice to keep working inside of Blender.
01/28/2007 (6:14 am)
Ok. I figured it out (isn't that the way it always goes?).You need to select the object, enter UV face select mode and load an image into the UV/Image Editor. Shouldn't there be an easier way? Can't we get the texture space from the materials? That'd be much easier for designing something.
Oh, well. I haven't tested it, but it'll be nice to keep working inside of Blender.
#28
There are two issues I've seen (note: I'm nowhere near a pro (or even a novice) with Quark). The texturing is really rough. You need to UV map every single object you place. That means setting the seams, unwrapping it and all. Ouch. Needless to say, my test castle looks like junk as far as texturing goes.
Second, some of the brushes show through others, even when they're not supposed to. I'm not sure if it has to do with the precision of Blender, or the exporter itself.
More fun to come...
01/30/2007 (10:38 am)
This script really is a nice one. In about an hour, I was able to make a 5100+ brush castle and test it out. I still need to work on the texturing and lights, but it's a nice start (sorry, no screenies right now).There are two issues I've seen (note: I'm nowhere near a pro (or even a novice) with Quark). The texturing is really rough. You need to UV map every single object you place. That means setting the seams, unwrapping it and all. Ouch. Needless to say, my test castle looks like junk as far as texturing goes.
Second, some of the brushes show through others, even when they're not supposed to. I'm not sure if it has to do with the precision of Blender, or the exporter itself.
More fun to come...
#29
It shouldn't be too hard to do that. There is a function in Python it's os.startfile(path, operation) should do the trick.
Docs on it in: http://www.python.org/doc/current/lib/os-process.html
I'm not good at python so I'm not sure.
Scott: Maybe something is rounding off?
01/30/2007 (3:04 pm)
Philippe:It shouldn't be too hard to do that. There is a function in Python it's os.startfile(path, operation) should do the trick.
Docs on it in: http://www.python.org/doc/current/lib/os-process.html
I'm not good at python so I'm not sure.
Scott: Maybe something is rounding off?
#30
01/30/2007 (4:54 pm)
@Frogger: That's what I thought. I haven't looked into the script, so I can't be sure.
#31
01/30/2007 (7:21 pm)
No, the rounding is not off. I added some round code to see if I could make thing work differently, but I'm still getting problems. Oh, well.
#32
I'm following the steps outlined here:
www.ogre3d.org/wiki/index.php/Bsp_making
According to Q3Radiant, the exported map file has a syntax problem?
The error that I see is:
I'm using Windows XP with Blender 2.42.
02/17/2007 (12:11 pm)
I'm using this Value 220 Map Export script to export a Cube. Unfortunately, I'm not able to import the exported map file into Q3Radiant .I'm following the steps outlined here:
www.ogre3d.org/wiki/index.php/Bsp_making
According to Q3Radiant, the exported map file has a syntax problem?
The error that I see is:
---------------------------
Error
---------------------------
ParseEntity: { not found
GetLastError: The operation completed successfully.
glGetError: 0
An unrecoverable error has occured. Would you like to edit Preferences before exiting Q3Radiant?
---------------------------
Yes No
---------------------------I'm using Windows XP with Blender 2.42.
#33
Unfortunately, something is wrong with this line:
Q3Radiant is choking on that line.
Here is a similar section from one of the sample maps that comes with the Quake 3 demo.
02/17/2007 (5:07 pm)
I tracked down the issue. The following is an export result after exporting a plane.// Originally exported by mapexport.py verion 1.0
// exported from blender v242 filename ravenous_nobones.blend
// Entity 0
// worldspawn
{
"classname" "worldspawn"
"detail_number" "0"
"min_pixels" "250"
"geometry_scale" "32.0"
"light_geometry_scale" "32.0"
"ambient_color" "0 0 0"
"emergency_ambient_color" "0 0 0"
"mapversion" "220"
// Brush based on blender object named Plane with 1 faces
{
( -217.184631 -187.905930 -7.211167 ) ( 277.241150 -876.829285 -468.725830 ) ( 284.486267 1171.061890 -488.564636 ) a [ 1.000000 0.000000 0.000000 0.000000 ] [ 1.000000 0.000000 0.000000 0.000000 ] 0 1.000000 1.000000
}
}Unfortunately, something is wrong with this line:
( -217.184631 -187.905930 -7.211167 ) ( 277.241150 -876.829285 -468.725830 ) ( 284.486267 1171.061890 -488.564636 ) a [ 1.000000 0.000000 0.000000 0.000000 ] [ 1.000000 0.000000 0.000000 0.000000 ] 0 1.000000 1.000000
Q3Radiant is choking on that line.
Here is a similar section from one of the sample maps that comes with the Quake 3 demo.
// brush 0
{
( 792 1628 0 ) ( 722 1628 0 ) ( 722 1602 0 ) common/donotenter 0 0 0 0.500000 0.500000 0 0 0
( 722 1602 420 ) ( 722 1628 420 ) ( 792 1628 420 ) common/donotenter 0 0 0 0.500000 0.500000 0 0 0
( 720 1612 420 ) ( 790 1612 420 ) ( 790 1612 0 ) common/donotenter 0 0 0 0.500000 0.500000 0 0 0
( 772 1602 420 ) ( 772 1628 420 ) ( 772 1628 0 ) common/donotenter 0 0 0 0.500000 0.500000 0 0 0
( 792 1628 420 ) ( 722 1628 420 ) ( 722 1628 0 ) common/donotenter 0 0 0 0.500000 0.500000 0 0 0
( 722 1628 420 ) ( 722 1602 420 ) ( 722 1602 0 ) common/donotenter 0 0 0 0.500000 0.500000 0 0 0
}
#34
Should appear as:
02/18/2007 (10:59 am)
It appears the brackets are an invalid character. The line instead of:( -217.184631 -187.905930 -7.211167 ) ( 277.241150 -876.829285 -468.725830 ) ( 284.486267 1171.061890 -488.564636 ) a [ 1 0 0 0 ] [ 1 0 0 0 ] 0 1 1
Should appear as:
( -217.184631 -187.905930 -7.211167 ) ( 277.241150 -876.829285 -468.725830 ) ( 284.486267 1171.061890 -488.564636 ) a 1 1 0 0 0 0 1 1
#35
Merc Map File Format:
collective.valve-erc.com/index.php?go=map_format
Quake Map File Format:
www.gamers.org/dEngine/quake/QDP/qmapspec.html
graphics.stanford.edu/~kekoa/q3/
02/18/2007 (11:07 am)
There are differences between the:Merc Map File Format:
collective.valve-erc.com/index.php?go=map_format
Quake Map File Format:
www.gamers.org/dEngine/quake/QDP/qmapspec.html
graphics.stanford.edu/~kekoa/q3/
#36
www.qeradiant.com
Unfortunately, it still can't open the exported map files...
02/18/2007 (11:26 am)
GTKRadiant which became GPL shows more logging debug info about the format. The MSI can be found here:www.qeradiant.com
Unfortunately, it still can't open the exported map files...
#37
02/18/2007 (11:33 am)
...
#38
02/18/2007 (11:36 am)
What's Valve 220? I had assumed this is a generic map exporter?
#39
02/18/2007 (11:38 am)
...
#40
02/18/2007 (11:41 am)
I'm just following the Ogre Wiki steps to make a BSP file. There isn't an Ogre Map exporter. I mis-labeled this exporter as an Ogre Map exporter when really I was looking for a Blender Quake Map Exporter.
Torque Owner Terence M.