The current .map exporter (quake format, for GtkRadiant) works as intended, there is nothing wrong with it, however it's got a serious flaw in that the brushes it produces can break given a variety of circumstances.
I have been using gtkradiant for 8 years now, and I have discovered that there is a brush shape that can never be destroyed on grid alignments or radical movements of vertices, which a 6 sided brush can. Sometimes the 6 sided brush can even appear fine in the editor but break in-game, leading to long hunts for a broken brush.
This method would completely change the game in the Quake mapping world - huge possibilities of sculpted maps with the efficiency of a normal map creation process would be available.
The solution is instead of extruding all 3 vertices of a triangle (and btw, all quad export functions of the script can be removed) back along the negative normal by x units, we would go one step further and weld those vertices together, creating a 4 sided brush. This type of brush can not break unless that vertex at the back passes the normal of front face so it is ideal for reshaping in radiant, even for mass alterations of many vertices.
The current script is set up like so:
check the number of edges to a face, if 3 do a triangle brush function and if 4 do a quad brush function and if any more, split into triangles.
It also checks for cubes and has a special export for that.
We can ditch all those checks and replace it with a function to triangulate the mesh before making the brushes.
So as a final note, the current version of the script is not without it's uses. It is fine if you strictly stick to a certain pre-setup grid which is not hard to do, and if you are designing relatively simple forms. However if this is the case you may as well just use gtkradiant xD Anyway, what I mean is it should stay put. This could be a second version that reads 'Export .map (Unbreakable)' or 'Export .map (Organic Tris)'.
Scripting in Blender with Python, and working on the API
2 posts • Page 1 of 1