Quake .map exporter for Blender3D

Hey Kit89
just updated to work with gtkradient (needs different brush texture options for some reason)

Motorstep, sorry, you were right, lights wernt being scaled.

added user options on export

  • scale
  • face thickness
  • grid snap (after scale)
  • null face tex
  • invis face tex

at the moment gtkRadiant dosnt work with triangle faces well, (quark loads them fine)

Script is too big for forum posting now. :wink:
http://members.iinet.net.au/~cpbarton/export_map.py

Cambo,

Just tried the script with my scene (boxes and Suzanne). Got an error in console:

http://img97.imageshack.us/img97/9572/mapexperrorvb8.jpg

And even if I export without Suzanne, I get messed up .map file:

http://img138.imageshack.us/img138/8726/gtkraderrdi9.th.jpg

Where is the problem?

my bad, should be basename, updated for redownload.

how is the map file messed up, the best way to help debug is to show before/after or to provide a blend file.

By the way, you can just copy and paste text from the console in windows, saves an image upload. (see the top left hand menu)

omg!
Excellent work folks

This is a doc i found: http://www.gamers.org/dEngine/quake/QDP/ (I think is for quake1)

Some idsoftware stuff http://www.idsoftware.com/business/techdownloads/

i have more doc, but i canā€™t find them :s

only a thing I remember of QuarK, automatically detect a .map of quake 1 o quake 3ā€¦ and change the game options.

bad eng :stuck_out_tongue:

update, same loc as above.

  • tested work work will with gtkradiant and quark
  • fixed error in exporting matrix scale
  • support for detecting and exporting brushes that arnt cubes (5 sides - an extruded tri)
  • much improved mesh detection for seperate groups.
  • per face brush export (for non cube meshes) speedup, uses hq vertex normals so even if all sides are visible joins between faces wont look ugly.
  • snapped writing writes ints for location.
  • wait cursor and timer

wow :slight_smile: Iā€™ll check it after work!
How about patches? Have you figured that out yet?

not yet, but from the great example provided I have a pretty good idea how to do it :wink: just not sure weather to use nurbs or a mesh.

how about we get boxes stable first, then expandā€¦ eh?

Thanks Cambo for the changes! :smiley:

Cambo,
Sure, letā€™s do boxes first :slight_smile:
And as far as patches go, I think subdivided mesh would do it. And itā€™s probably easier for end user (just move vertices and apply subsurf to see patch in Blender).

Just finished testing itā€¦ Seems to be fine. I compiled my test map and checked it out in Quake 3 :smiley: (two different texture sets and lighting models):

http://img221.imageshack.us/img221/5817/blend2quakelk5.jpg

I had a trouble exporting Suzanne. First time brushes were too thick and they were intersecting alot. Second time I put thickness of a brush 0.01 on export. So I didnā€™t get suznne in .map file.
However it works :stuck_out_tongue: Congratulatin, Cambo! And thanks a bunch!
I wish we could have snap to grid option in Blender as in GTKRadiant. This way it would be easier to snap brushes to each other and textures would align better in GTKRadiant.

motorstep check it out, the yellow rectangle:

wow! this is great! :smiley:
Is there a quick guide to get a simple working room exported properly into .map?
I just tried one and nothing showed up in Gtkradiant.
This will surely grab the attention of more than one in the Irrlicht forums! :wink:

Motorstep, great to see some result from the exporter, (Iv mostly been looking at screwed up wireframes)

ā€¦or hold Ctrl as you transform.
ā€¦Shift+S Snap selection to grid also.
See the view panel for grid sizes.

About exporting suzanne, almost certain that its an issue with how gtkradient handels the brushes. quark seems to import it with less errors, Though

A part of the problem is that suzanne is made for subsurfing, and the quads are not all planer. I got fairly good results when Triangulating suzanne scaling up a bit, then setting the width to low. (1 tri went odd still but the rest was fine.)

  • Basicly, if you make your level out of planer quads you should be ok.

I could do tests to see if quads need to be split into 2x trisā€™ though Id rather people just donā€™t make strange shapes.

About Brushes- are 4 plane brushes? - (3 triangles) or 5 as a square based pyramid? - Id like to support as many primitive shapes as possible

Ok. blender can match quakes patches exactky!
so nice patch support is possible :wink:

not supported yet but heres how to make a quake compatible patchā€¦ - Do in this exact order.

  • Add in a nurbs surface.
  • in the edit buttons Change the order U and V to 3
  • Press the Bezier U and V buttons
  • Now select the points at the edge that are not a part of the rendered surface. on 1 SIDE ONLY - deleate them
  • do the same for the other side now.
    Now you have a 3x3 patch that should work just like a 3x3 patch in gtkradient.

you can subdivide it by selecting all, wkey subdivide to get more controle points.

Cambo,
Why not to use subdivided plane as a patch?

Btw, after work, I will provide .map file with primitives that are supported by .map and .bsp formats. They are sphere, cylinder and cone. Those shapes can be exported as solid brush without necessity to convert each face of it to a box. There are of cause some limitations on how many faces each of those primitives can have.

Its not so simple.
using a mesh as a patch requires the exporter to know how to interperate a face groups as a patch.

It needs to order the quads and work out U and V dimensions. aside from that - a mesh grid is a poor reprisentation.

Id prefer a WYSIWYG solutuion and I think a bezier surf is the best repristantation. its also very obvious what its intention is- is a user wants a grid- theyll get a grid of brushes- if they want a patch, they add a nurbs surf.

That saied you can get a fairly accurate representation if you use subsurf and edge creases properly to simulate the bezier interpolation.

If a mesh is used, it would need to follow some rules - like
ā€œAny subsurfed grid of quadsā€

mmm i have the v 6.5 a of QuarK, but i try to open the .map file and the program change to Quake 1 options, how make it motorstep to build for quake 3?

http://img140.imageshack.us/img140/1091/instantnea13vv7.th.jpg

madman,
I donā€™t use QuArKā€¦ I use GTKRadiantā€¦ You can get one (latest build that also allow to export you map to .obj file) from here:

http://zerowing.idsoftware.com/files/radiant/nightly/1.5/GtkRadiant-1.5.0-2006-10-01.msi

already have, but i think work with gtkradiant is a bad experience XD
I love Quark, I make many maps for quake 1 y 2.

I try to import in gtkradiant and open in quark later, let me seeā€¦

Iā€™ve just downloaded the latest version of the export_map.py script and it seems to not be working.

The script runs fine but when loading the map file in GtkRadiant it throws up alot of errors.

Like so:
Loading map from Soldier of Fortune II - Double Helix GOLD/base/maps/Tester.map
Warning: Line 5 is incomplete [02]
Warning: Line 6 is incomplete [02]
Warning: Line 7 is incomplete [02]
Warning: Line 8 is incomplete [02]
Warning: Line 9 is incomplete [02]
Warning: Line 10 is incomplete [02]
Warning: Line 11 is incomplete [02]
Warning: Line 12 is incomplete [02]
Warning: Line 13 is incomplete [02]
Warning: Line 14 is incomplete [02]
Warning: Line 15 is incomplete [02]
Warning: Line 16 is incomplete [02]
Warning: Line 17 is incomplete [02]
Warning: Line 18 is incomplete [02]
Warning: Line 19 is incomplete [02]
Warning: Line 20 is incomplete [01]
Warning: Line 20 is incomplete [01]
Warning: Line 20 is incomplete [01]
Warning: Line 20 is incomplete [01]
texture not found for shader: textures/_color
LOADED: textures/radiant/shadernotex.tga
texture not found for shader: textures/-100.00003815
texture not found for shader: textures/100.00000000
texture not found for shader: textures/(
texture not found for shader: textures/0
texture not found for shader: textures/NULL
WARNING: brush plane with no normal
WARNING: brush plane with no normal
ā€” LoadMapFile ā€”
/Soldier of Fortune II - Double Helix GOLD/base/maps/Tester.map

And thats just a standard cube.

About your Brushes, A standard brush has 4 faces, but you can get cyclindracil brushes as well.