Quake 1 Vs Quake 2

From Quake Wiki

The Quake .map Format is a plain text file which contains definitions of brushes and entities to be used by QBSP and it's related compiling tools to create a .bsp file used by Quake as levels. They are generally created by level editing software.

  • 1A simple map

This is an example of a simple map. There is a Worldspawn entity, a special entity which contains all of a map's solid geometry as well as some map properties, which has a single brush defined, and an info_player_start entity.

Structure[edit]

The general structure of a .map file is to contain entity objects between { } brackets, and to nest brushes within these objects.

That is why most modern Quake compilers allow floating point coordinates for plane points. Valve variation of the format. On top of the original format and its non-integer variation, Quake tools (notably TrenchBroom and ericw-tools) support Valve 220 format. Major difference between both stems from how texture coordinates are represented. Quake 2 is a magnificent game, and relatively speaking, the visuals are better. Quake 2 is also largely responsible for getting me into modern PC gaming (at a time when all I played was Doom. With 1:52 left, Brees struck back with a 6-yard touchdown pass to Henderson, but the 2-point conversion failed, keeping the score at 41–36. Then Carlson sealed the victory by recovering Hartley's onside kick attempt, enabling Seattle to run out the clock. Brees finished with 39 of 60 completions for 404 yards and two touchdowns.

Entity definition[edit]

An entity is simply defined by it's classname, it's origin, and it's various keys. An entity may also contain a brush, if it's of a type which uses a brush. An example of this is the worldspawn entity seen in our simple map, which contains a brush.

Brush definition[edit]

A brush consists of several faces, each of which is defined by a plane and additional texture information. The actual geometry of the brush is only defined by the planes, of which there must be at least four. Each plane defines a half space, that is, an infinite set of points that is bounded by a plane. The intersection of these half spaces forms a convexpolyhedron. Note that the actual vertices of the brush are NOT stored in the map file. The vertices are determined by BSP (or a level editing program) by computing the intersections of the planes.

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 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 normal vector of the plane. Every point p for which (p - p1) * normal <= 0 (where * is the 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 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.

In the example used here, all plane points have integer coordinates. In the original Quake map format, only integer coordinates are allowed. This has some advantages and drawbacks. The major advantage is that integer numbers can be written to text files without loss of precision, which is not always true for floating point numbers. The major drawback is that not every plane can be accurately represented using integer coordinates for its points. This becomes problematic when brushes are rotated arbitrarily or when the vertices are edited directly. That is why most modern Quake compilers allow floating point coordinates for plane points.

Valve variation of the format[edit]

On top of the original format and its non-integer variation, Quake tools (notably TrenchBroom and ericw-tools) support Valve 220 format. Major difference between both stems from how texture coordinates are represented. Quake standard format for plane definition:

is thus replaced with:

Simple cubes would look like this in standard and Valve formats respectively:

Quake
Retrieved from 'http://quakewiki.org/w/index.php?title=Quake_Map_Format&oldid=3938'

Table of Contents

Differences between software rendered Quake and GLQuake

Showing some differences between the original software rendered Quake (quake.exe, winquake.exe and derivates) and hardware-accelerated GLQuake (glquake.exe and derivates). Use one of the Recommended Quake Engines!

Currently written in the viewpoint of Spirit and SiPlus who also currently are the sole authors of these. Be awesome, remove all the 'I's and contribute more differences!

Texture filtering

When you launch GLQuake the first time one of the most prominent difference are the filtered textures. Where software rendered Quake showed each and every pixel, the textures in GLQuake are all soft and smooth. Some will say 'hooray, no more pixels', others might be 'this looks washed out, I miss all the crisp details'. Let's look at some screenshots (I recommend using browser tabs to switch back and forth):

I myself was amazed by it when I got a 3Dfx card, I really loved it. Then last year I tried the original look again and wished I'd done so much earlier… Well, it is a personal thing and you have decide it for yourself. Thankfully you can configure most GL engines to disable the filtering using the gl_texturemode cvar.

The options available might vary based on your graphics hardware (and maybe the engine too?). This list is taken from the ezQuake documentation (remember, ezQuake is <em>not</em> a singleplayer engine):

  • GL_NEAREST → Point sampled. Lowest quality, highest performance.
  • GL_NEAREST_MIPMAP_NEAREST → GL_NEAREST but with a bit more quality for far objects (software-like).
  • GL_NEAREST_MIPMAP_LINEAR → GL_NEAREST but with even more quality for far objects.
  • GL_LINEAR_MIPMAP_NEAREST → Bilinear interpolation with a bit more quality for far objects.
  • GL_LINEAR_MIPMAP_LINEAR → Trilinear interpolation. Highest quality, lowest performance.

On modern hardware you can (and should) always use the *_MIPMAP_LINEAR modes for best quality. So for the original look you would use 'gl_texturemode GL_NEAREST_MIPMAP_LINEAR' and for the GLQuake look 'gl_texturemode GL_LINEAR_MIPMAP_LINEAR'.

You could use this alias in your autoexec.cfg to play with it:

Maybe you will convert to pixelquake too?

Overbright lighting

It is not widely known but overbright lighting can be crucial for a map's looks. What is overbright lighting? Quoting metlslime:

The original quake (software) engine used overbright lighting, which means the lightmap brightness can go up to 200%. So, light.exe creates BSP files with lightmaps that go up to 200%.

In glquake […] there is no overbright lighting, so every part of the lightmap that goes above 100% is flattened to equal 100%. This is why glquake looks just fine in darker rooms, but in bright areas the lighting looks very flat.

[Some engines] restore the overbright feature of the software renderer, so that lighting hot-spots will actually be as bright as intended.

Download Quake For Free

From left to right: Software, GLQuake, Overbright GLQuake

At least the following engines support overbright lighting: Fitzquake, Joequake, Qrack, QMB, Darkplaces, MHQuake, TomazQuake. In Fitzquake it is controlled by gl_overbright (default is on), I did not check what the others use (if they let you toggle it). aguirRe is a strong opponent to it, so his Enhanced GLQuake has no support for this, see below.

This was another feature I lived without for ages and did not know what I missed. It is very easy to overlook this when being blinded by GLQuake's freshness at first. For me it makes a huge difference in atmosphere, look at this example from the start map.

While the non-overbright screenshot looks good and innocent, once you see the one with overbright lighting enabled the blandness becomes obvious.

However, there is another view on this which aguirRe presented a while back at func. The screenshots below are made by me, I guess they show the correct subject. It is an extreme example, probably the most extreme one can find. Not only are the ikwhite textures quite sensitive to colour settings, this extreme brightness is only to be found at this one spot in the map and it's some kind of skylight.

It probably becomes even more of an issue if you play with idgamma and/or a brighter gamma setting. I don't and I have no problem with the drawbacks (one could even say that it is the 1996 way to make HDR bloom blingbling, heh). In this particular example (kjsp1) I like the look it creates, it is so bright that you cannot see it all anymore. It really is your decision but I suggest using overbright lighting.

Fullbrights

Quake 1 Or Quake 2

Fullbrights are parts of textures (that includes model skins) that are always displayed in full brightness regardless of the surrounding lighting situation. There are also engines that support making whole models fullbright (for example for better visibility in competitive dueling). Those are usually called 'fullbright skins'. That's not what this is about, it is about the parts of textures that should always be brightly lit.

Notable examples in stock Quake would be the slipgate teleporter sockets and of course all the blinking red buttons. Many light textures also have fullbright parts in them but those are not as noticeable as they usually have an actual light source nearby (normally textures do not emit light in Quake but mappers have to place light 'points' into the levels).

Fullbrights were part of Quake, good modern engines show them. GLQuake does not. Let's take a look, left is what GLQuake shows, right is what an engine with fullbright support shows:

Let's look at the technical background. Quake uses a palette file to assign colors to numeric values referenced in the texture files. The last 32 colors (two rows) in that palette are 'fullbright'. The upper 16 ones are obviously used for fire effects so let's ignore those. The lower (bottom) 16 are 'the fullbrights'. By the way if you ever had really funky colors in Quake while playing some mod, chances are that there was a palette mismatch.

Quake 1 Vs Quake 2 Torrent

So far so good, but why does GLQuake not display fullbrights? The answer lies in the colormap file. 'The colormap is a table used for lighting in software Quake engines. It contains a column of 64 values per each palette color. Each value is an index into the palette representing as closely as possible the original color brightened or darkened: shade 0 is double bright, shade 32 is the original color, and shade 63 is black.' The shades go top to bottom. If you remember the previous article about Overbright Lighting this might sound familiar. The shades 0-31 are where the overbrightness comes from.

Quake 1 Vs Quake 2 Gameplay

Now if you look at the right side of the colormap you will notice those 32 fullbright colors again. This time as solid unshaded bars unlike the other colors in this image. The right-most ones are the fullbrights again. And since software Quake takes the color values from there it will display them always like that. Easy!

Well, as you might have guess now GLQuake does lighting completely different and does not use the colormap. Instead it treats all colors equal. Engine coders have to explicitly hard-code the fullbrights into their engines if they strive to make Quake look good.

This occasionally leads to ugly texturing disasters when mappers use bad tools to make their textures and test with stock GLQuake. Then sometimes fullbright pixels sneak in. A recent example being toa.zip - Temple Of Anubis: Judgement Of The Dead and an older much worse example alk15.zip - Brumal Quest.

Thankfully most good 3d-accelerated engines do support fullbrights. aguirRe's glquakes being the notable exception at the time of writing.

References used:Quake Wiki on Quake_palette#ColormapMetlslime's Quake Texture FAQand czg's wisdom

Non-square pixels

Welcome to a rather short part of the Software vs GLQuake series. It came up at func so I quickly wrote it.

Lava_Croft once taught me about another quite nasty and overlooked regression in most GL engines. Textures that are not sized in a power of two (64, 128, 256 etc) are getting rescaled. And with that the pixels are not square anymore but a huge mess of distorted uglyness. This is most easily seen on a weapon skin so I used that in the image below. The Shambler's face also is a good place to spot it. On the left is software Quake (argh, Argh, ARGH! The high FOV is to blame for that, sorry.), in the middle a bad GL engine and on the right a good one. From what I know at least Fitzquake (of course!) and Darkplaces fixed this.

Dxo filmpack crack

Affine texture mapping

For higher performance, the software renderer doesn't perform perspective correction on alias model textures, causing noticeable artifacts on low-poly models.

While the effects of this can be barely seen on monsters, they are very easy to spot on weapon view models.

You can see screenshots of the issue in the 'Non-square pixels' section.

The 1st screenshot demonstrates affine texture mapping in software rendering mode. The texture looks skewed and is aligned differently on each pair of triangles. The pixels always have the same width and height, no matter how far they are from the player.

The 2nd and 3rd screenshots show perspective-correct texture mapping. The metal shine is now a straight line, and distant pixels appear smaller than the close ones.

Quake

On certain video cards, the effect can be re-enabled in GLQuake by setting the console variable 'gl_affinemodels' to non-zero.