<li><aclass="backlink"title="Click to do a full-text search for this title"href="./ArtReference_Q4Shaders_Textures?action=fullsearch&value=linkto%3A%22ArtReference+Q4Shaders+Textures%22&context=180">ArtReference Q4Shaders Textures</a></li>
<spanclass="anchor"id="line-1"></span><pclass="line874">In Quake 4, we use a shortcut version for writing textures called a guide. This section covers how to on writing texture shaders in a long hand form. This way is useful if you want the texture to do something else. (Alpha, modulations, glow passes, etc) <spanclass="anchor"id="line-2"></span><spanclass="anchor"id="line-3"></span><pclass="line867"><strong>Definition</strong>: Most of the lines have been defined in Section 1, except <strong>qer_editorimage</strong>. Qer_editorimage is used mainly in textures. What this line does is add an image that is viewed only in the editor. Its useful if something has alpha or uses a flat color. (like glass) The Image is used so the designers can have a point of reference when they place a texture on a brush. It is used only in the editor. <spanclass="anchor"id="line-4"></span><spanclass="anchor"id="line-5"></span><ul><listyle="list-style-type:none"><pclass="line891"><strong>2.1 Step 1: Remember the shader path</strong>: The shader path you wrote down or copied in the previous step will be used a lot for the generation of the shader. In the example the targas are in textures/terminal directories. The targas in the terminal directory are: <spanclass="anchor"id="line-6"></span><spanclass="anchor"id="line-7"></span><ul><listyle="list-style-type:none">t1_wall1_local.tga <spanclass="anchor"id="line-8"></span><spanclass="anchor"id="line-9"></span>t1_wall1_d.tga <spanclass="anchor"id="line-10"></span><spanclass="anchor"id="line-11"></span>t1_wall1_h.tga <spanclass="anchor"id="line-12"></span><spanclass="anchor"id="line-13"></span>t1_wall1_s.tga <spanclass="anchor"id="line-14"></span><spanclass="anchor"id="line-15"></span></li></ul><pclass="line891"><strong>2.2 Step 2</strong>: Write in the path in the appropriate places: Ok, at this point you should write in the paths: <spanclass="anchor"id="line-16"></span><oltype="i"><li>After qer_editorimage write: qer_editorimage textures/terminal/t1_wall1_d.tga this will view the diffuse targa in the editor <spanclass="anchor"id="line-17"></span><spanclass="anchor"id="line-18"></span></li><liclass="gap">After diffusemap write textures/terminal/t1_wall1_d.tga this will render the diffuse targa in game <spanclass="anchor"id="line-19"></span><spanclass="anchor"id="line-20"></span></li><liclass="gap">After bumpmap addnormals write ( textures/terminal/t1_wall1_local.tga, heightmap ( textures/terminal/t1_wall1_h.tga, 1 ) ) The first parentheses holds the local map and a comma, (Plus the next line) the second parenthases after heightmap holds the _h file and the value it should use. This will combine the local and height targa and render them in game. <spanclass="anchor"id="line-21"></span><spanclass="anchor"id="line-22"></span></li><liclass="gap">After specular write textures/terminal/t1_wall1_s.tga this will render the specular targa. <spanclass="anchor"id="line-23"></span><spanclass="anchor"id="line-24"></span></li></ol><pclass="line891"><strong>2.3 Remember to properly open and close out your shader entry.</strong><spanclass="anchor"id="line-25"></span><spanclass="anchor"id="line-26"></span></li></ul><pclass="line874">The easiest thing to do is find a shader that is working like you want, copy it and paste it into the .mtr you’d like to use. <spanclass="anchor"id="line-27"></span><spanclass="anchor"id="line-28"></span><spanclass="anchor"id="line-29"></span><spanclass="anchor"id="line-30"></span><pclass="line874">Here’s an example of a complete long hand texture shader: <spanclass="anchor"id="line-31"></span><spanclass="anchor"id="line-32"></span><pre>textures/terminal/t1_wall1_d
<spanclass="anchor"id="line-40"></span></pre><spanclass="anchor"id="line-41"></span><spanclass="anchor"id="line-42"></span><spanclass="anchor"id="line-43"></span><pclass="line874">Nine times out of ten you won’t be writing textures this way, but by doing this, you’ll be able to understand how texture guides work, (shortcuts) and be able to write them yourself. Otherwise, you’ve added a new texture entry in the textures/terminal/directory called t1_wall1_d, which will appear in the editor at textures/terminal/t1_wall1_d. <spanclass="anchor"id="line-44"></span><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">ArtReference Q4Shaders Textures (last edited 2005-11-04 21:37:27 by <spantitle="MattVainio @ 67.129.250.254[67.129.250.254]"><aclass="nonexistent"href="./MattVainio.html"title="MattVainio @ 67.129.250.254[67.129.250.254]">MattVainio</a></span>)</p>
<li><ahref="http://moinmoin.wikiwikiweb.de/">MoinMoin Powered</a></li><li><ahref="http://www.python.org/">Python Powered</a></li><li><ahref="http://validator.w3.org/check?uri=referer">Valid HTML 4.01</a></li>