---Best viewed from NotePad--- # Information on special textures # # and Face Attributes for Quake2 # Rather than write this document specific to one editor, I have oriented it from the .map files point of view. This saves confusion for those with differing editors, and cuts out a lot of laborious typing :) A brush is stored in a map as a series of plane defenitions. That's planes, not faces. Planes are more versatile because we can define a brush with five faces the size of A4 paper, and the sixth face might be as big as a football pitch. Anyway we are only concerned with the area these planes contain. In editors the planes are shrink wrapped onto the edges of the area they enclose, so they can be used faster and error free from editors. 'Why?' You might ask. This is because of the way the the maps are stored. We only ever need to store three coordinates (or three vectors) even if we wish to establish a brush such as a cylinder with a hexagonal bottom and top. The shrink wrapping takes care of the rest. Using this technique it isn't necessary to write every plane with a number of corners dictated by the shape of the plane. We wouldn't need to make a hexagon with six coordinates, just the three. Without taking this to any greater lengths, we will leave it that the map theory on defining planes is complex, and that John Carmack is a clever man indeed. The Quake2 surface attributes are stored in a map as an optional, extra, three attributes on the end of a plane definition. A regular plane might look as follows; These are the Vectors; The Texture; Offsets; Scale; | | | | ______________________________ ____________ ___ ___ ( 0 64 64 ) ( 0 0 64 ) ( 0 0 0 ) e1u1/doorbot 0 0 0 1 1 The first three sets of brackets are vectors. A group of three coordinates that designate a point in three dimensional space. They take the from X, Y, Z. In Quake2 it is important to remember that 'Z' is height, rather than the traditional 'Y' coordinate. After these three vectors we have the texture location, and texture name. This is really self explanatory. After that we have the X offset of the texture. The Y offset of the texture. The angle by which the texture is rotated, then finally the scale in the x, and the y dimensions respectively. A '1' in both cases. A plane containing the additional three surface attributes might look a little different. It should contain three further parameters at the end of the line. These three parameters hold information about quake2's new surface attributes. Here is an example; ( 128 144 80 ) ( 128 80 80 ) ( 128 80 144 ) e1u1/doorbot 0 0 0 1 1 0 1 666 It looks normal, apart from the very end of the line. Those attributes are spawnflags for the type of surface attribute we want the face to have. The first of these parameters is 'Contents' and is used primarily for telling the Quake2 engine that this brush is a liquid of one type or another. The second parameter is also a spawnflag which can determine some of the more diverse effects on a plane. Light radiance in this case. Though other possibilities are ladders, and those new sky textures. The last parameter is 'value'. because I have this plane emitting radiant light (that's what the '1' does), I need a way to tell the map utils how much light the brush should give off. In the example the light's power is 666. That's how it works in maps, the problem for you now, is to find out how these can be set from your editor of choice. The help/documentation might be a good place to start. Failing that, there are some good discussion groups such as those dedicated to Qoole users. (#qoole efnet) If your editor does not fully support Quake2, I recommend that you wait for it before you try to use any of the face attributes, as they're quite complicated to use. - - - - - - - - - - For the record the possible 'Contents' (that's the first of the three new surface attributes) flags are listed below. Window: This face is a transparent window Lava: This face is a transparent lava pool Slime: Slime Water: Water Mist: This brush has a misty appearance like the force fields in the jails Playerclip: Playerclip attribute acts only on the player (it acts as if a solid brush is in that location) and allows monsters to pass through Monsterclip: Monsterclip attribute acts only the monsters and allows players to pass through Detail: This is a detailed brush. I'm not absolutely sure about this one, though I think it is supposed to be used with textues which have been scaled down, so they don't look too squashed (?). Ladder: This face has an effect on a players clipping. When the player touches against this face, he might climb up it as though it were a water area. Commonly used for ladders. So if you wanted to set the face of a brush to be a window, rather than a light, the previous example would be transformed to something like this: ( 128 144 80 ) ( 128 80 80 ) ( 128 80 144 ) e1u1/doorbot 0 0 0 1 1 2 0 0 See the two? That's where these 'Contents' flags should be. Also note how the 'Flags' attribute (one from the end) has been set to zero again. That's because we don't want the face to be a light anymore. Notice too how the 'Value' has been reduced to zero. Again, because the face is no longer emmiting a light. - - - - - - - - - - The possible values for the 'Flags' parameter (The second attribute) are as follows. Light: The plane is emmiting a light. The third parameter (value) should be set to the power of the light Slick: Slick, Apply it to a surface and go ice skating Sky: Sky. The picture you see in the distance such as the big gun This will appear in the map as whatever your worldspawn "Sky" texture is set to. "Unit1_" is a nice backdrop to test this attribute with Warping: Warping, distorts the water. Anyway the flag will only work on 64x64 textures Trans33: The face is 33 percent translucent. every third pixel isn't drawn when the texture is in the players view. In software mode it will be replaced by chicken wire :) Trans66: The face is 66 percent translucent Flow: The texture will flow towards 'angle' (default 0) degrees That's east in Quake2. Nodraw: If you assign nodraw to a brush (only an entire brush), that brush does not appear (visually) in the game or count toward visible polygons. It is still there and it's content is still active. It is usually used for clip brushes, triggers (and other entities), origin brushes, and ladder brushes Hint: Labelled as 'Hint' the face will be a primary BSP splitter. Whatever that means! Skip: A face that gets completely ignored in Quake2. What use that might prove to be is anybody's guess! On setting the 'flags' parameter, the above example might become a sky for example. The face definition would then look like this: ( 128 144 80 ) ( 128 80 80 ) ( 128 80 144 ) e1u1/doorbot 0 0 0 1 1 0 4 0 That would however create a sky which doesn't emit any light. To correct the problem we would add the 'light' surface attribute to that of the sky. So the face now has the attributes 'sky' and 'light'. To do this we simply add the two flags together. Sky 4 + light 1 - - - - - - 5 so the face definition now becomes: ( 128 144 80 ) ( 128 80 80 ) ( 128 80 144 ) e1u1/doorbot 0 0 0 1 1 0 5 0 Problem solved? Not quite. The light/sky isn't actually giving off any light yet, because the 'value' parameter (at the very end) is still zero. Meaning that we are trying to give off 0 light. It can be fixed by simply changing the value to something more appropriate. Say 700. ( 128 144 80 ) ( 128 80 80 ) ( 128 80 144 ) e1u1/doorbot 0 0 0 1 1 0 5 700 And that's it! It is also possible to combine the two ('contents' and 'flags') with one another -In theory! I must stress I haven't gotten around to testing this out yet. It should however, be possible to assemble a translucent ladder, or any other wierd and wonderfull combination. Take caution though. The effect of a 'contents' 24 would cause problems. It tells Quake2 that the face is both Lava, and slime. Because of this I would advise an element of caution when using these flags (especially from a text editor). There are all kinds of anomilies you might run into. Take care! Textures: Hint - Appears to be usless, but I have never seen it used so who knows! Any body know what a Primary BSP spiltter is? Trigger - Everyone knows this, apply in to trigger_once, trigger_multiple.., that sort of thing, it makes the triggers easier to see in the map too. Clip - Clip is the texture that already has both the 'playerclip' and 'monsterclip' Face Attributes already assigned to it Origin - You'll need to apply this to the center-(origin) for all your rotating brushes otherwise the object will rotate around the the origin of the world (O O O). Mon - I'm assuming that this is for Monsterclip brushes, put a brush down and apply the monsterclip texture, monsters cannot pass through it! sky - It looks messy in a .wal format, but that picture isn't what you will see in the map under Quake2. it will be replaced by a corresponding texture set in the worldspawn attributes of the level. That's the same area the map name, and gravity appear. You simply need to add a "sky", and a value. A value of 'Unit1_' works fine. It will give the effect of those distant worldscape textures that you can see from the outside areas. - Akuma Akuma@BTinternet.com http://www.btinternet.com/~akuma/ NB: Thanks to: Paul Jaquays (id software) for some handy tips! Much of this document was aided by the handy hints QuArk provides. http://www.planetquake.com/quark/