]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - docs/manual/quake3/Terrain_Manual/pages/mapping_the_textures.html
transfer from internal tree r5311 branches/1.4-gpl
[xonotic/netradiant.git] / docs / manual / quake3 / Terrain_Manual / pages / mapping_the_textures.html
1 <html>\r
2 \r
3 <head>\r
4 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">\r
5 <meta name="GENERATOR" content="Microsoft FrontPage 4.0">\r
6 <meta name="ProgId" content="FrontPage.Editor.Document">\r
7 <title>Mapping the Textures</title>\r
8 </head>\r
9 \r
10 <body background="../pics/background.jpg" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">\r
11 \r
12 <b><font SIZE="5">\r
13 <p align="center">Mapping the Textures</p>\r
14 <div align="right">\r
15   <table border="1" cellspacing="1" width="100%" bordercolor="#808080" bgcolor="#000000" cellpadding="10">\r
16     <tr>\r
17       <td width="100%"><font FACE="Times New Roman">\r
18 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The key to making this stuff look good is the q3map routine that works with\r
19 alphamap and the metashader (see below) to smoothly blends textures across the\r
20 terrain entity.</p>\r
21 </font><b><i><font SIZE="4">\r
22 <p>Texturing Overview</p>\r
23 </font></i></b><font FACE="Times New Roman">\r
24 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As noted earlier, Q3Map assigns textures, or more correctly, shader\r
25 manipulated textures, to each triangle used to create the terrain map. The\r
26 shaders used are part of a group of shaders called a metashader. The metashader\r
27 is the family name for the shader. Individidual shaders within it are identified\r
28 by a suffix, either an underline character followed by a number, or an underline\r
29 character followed by a string indicating a blend between two other shaders.</p>\r
30 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Within the body of the metashader, there are two types of shaders used. The\r
31 first, is the <b>root</b> shader. A root shader represents a terrain texture in\r
32 its unblended state. The naming convention for a root shader is &lt;metashader&gt;_#.\r
33 The second type is the <b>blended</b> shader. The blended shader creates a\r
34 crossfade between two root shaders across the face of a single geometry\r
35 triangle. The naming convention for a blended shader is &lt;metashader&gt;_#to#.\r
36 The map maker does not need to make a blend between each root shader, but for a\r
37 blend to occur, there must be a blend shader for the two root shaders.</p>\r
38 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Q3map will map a shader (root or blended) once and only once across the face\r
39 of the triangle. The shaders will not tile or repeat across the triangle face.</p>\r
40 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As noted earlier, the textures are planar mapped or projected on the surface\r
41 of terrain texture. The angle of any individual triangle does not affect the\r
42 angle or direction at which the texture lies on the brush surface. The angle,\r
43 however, does affect the apparent stretching of the texture on the surface. The\r
44 steeper the angle of the brush surface, the greater will be the stretch of the\r
45 shader on that surface.</p>\r
46 <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Q3map looks at the pixel on the alphamap that corresponds to a given vertex.\r
47 It uses the color of that pixel (or more correctly the identification number of\r
48 the position that color occupies in the palette) to determine which root shader\r
49 will be applied. That root shader is applied to triangles that have one vertex\r
50 located at the given vertex. It then examines the alphamap color of the vertexes\r
51 adjacent to the given vertex. If an adjacent vertex has the same color as the\r
52 given vertex, the root shader is applied to the surface. If an adjacent vertex\r
53 has a different alphamap color, the blended shader that crossfades between the\r
54 two.</p>\r
55 </font>\r
56 \r
57 <p align="center"><a href="clipping_the_terrain.html">Back</a> - <a href="table_of_contents.html">Table\r
58 of Contents</a> - <a href="the_meta_shader.html">The Meta-Shader</a></p>\r
59 \r
60         <p>&nbsp;</td>\r
61     </tr>\r
62   </table>\r
63 </div>\r
64 </font></b>\r
65 <p>&nbsp;</p>\r
66 <p>&nbsp;</p>\r
67 <p align="center">-20-</p>\r
68 \r
69 </body>\r
70 \r
71 </html>\r