Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Editing Quake Map Format

From Quake Wiki

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 56: Line 56:
 
In the example shown here, this brush is a 6 sided cuboid. The plane of its first face is defined by 3 points, ( 256 64 16 ) ( 256 64 0 ) ( 256 0 16 ). The other information supplied is the texture used by the face. "mmetal1_2" is the name of the texture, a single plane may only have a single texture. "0 0 0 1 1" are how the texture is display, and are respectively "X offset" "Y offset" "Rotation" "X scale" and "Y scale".
 
In the example shown here, this brush is a 6 sided cuboid. The plane of its first face is defined by 3 points, ( 256 64 16 ) ( 256 64 0 ) ( 256 0 16 ). The other information supplied is the texture used by the face. "mmetal1_2" is the name of the texture, a single plane may only have a single texture. "0 0 0 1 1" are how the texture is display, and are respectively "X offset" "Y offset" "Rotation" "X scale" and "Y scale".
  
The plane points ( p1 ) ( p2 ) ( p3 ) are interpreted as follows. The plane points must be arranged such that the [http://en.wikipedia.org/wiki/Cross_product cross product] of the vectors (p3 - p1) and (p2 - p1) is not null, that is, the three points must be linearly independent. Then, the normalized cross product represents the [http://en.wikipedia.org/wiki/Plane_(geometry) normal vector] of the plane. Every point p for which (p - p1) * normal <= 0 (where * is the [http://en.wikipedia.org/wiki/Dot_product dot product]) holds is considered to be in the half space defined by the plane. Every other point is considered not to be in the half space.
+
The plane points ( p1 ) ( p2 ) ( p3 ) are interpreted as follows. The plane points must be arranged such that the [http://en.wikipedia.org/wiki/Cross_product cross product] of the vectors (p3 - p1) and (p2 - p1) is not null, that is, the three points must be linearly independent. Then, the normalized cross product represents the [http://en.wikipedia.org/wiki/Plane_(geometry) normal vector] of the plane. Every point p for which (p - p1) * normal <= 0, where * is the [http://en.wikipedia.org/wiki/Dot_product dot product], holds is considered to be in the half space defined by the plane. Every other point is considered not to be in the half space.
  
 
The '''intersection of half spaces''' interpretation of brushes does not yield the vertices, however. While there are [http://www.sciencedirect.com/science/article/pii/0304397579900550 efficient methods] to compute them directly, the QBSP compiler uses a different approach. Starting with the edges and vertices of a huge cube (usually ranging from -4096 to 4096 in each dimension), the edges of the cube are intersected with the planes of the faces. Upon each intersection, new edges and vertices are generated that replace some of the old ones until all planes have been used. Note that due to floating point inaccuracies, there may be slight errors in the position of each vertex. This may lead to QBSP warnings when it '''heals''' degenerate vertices and edges.
 
The '''intersection of half spaces''' interpretation of brushes does not yield the vertices, however. While there are [http://www.sciencedirect.com/science/article/pii/0304397579900550 efficient methods] to compute them directly, the QBSP compiler uses a different approach. Starting with the edges and vertices of a huge cube (usually ranging from -4096 to 4096 in each dimension), the edges of the cube are intersected with the planes of the faces. Upon each intersection, new edges and vertices are generated that replace some of the old ones until all planes have been used. Note that due to floating point inaccuracies, there may be slight errors in the position of each vertex. This may lead to QBSP warnings when it '''heals''' degenerate vertices and edges.

Please note that all contributions to Quake Wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see Quake Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)