<li><aclass="backlink"title="Click to do a full-text search for this title"href="./ArtReference_Q4Shaders_AnimatedStrips?action=fullsearch&value=linkto%3A%22ArtReference+Q4Shaders+AnimatedStrips%22&context=180">ArtReference Q4Shaders AnimatedStrips</a></li>
<spanclass="anchor"id="line-1"></span><pclass="line862">Animated strips are <ahref="./ArtReference_Q4Shaders.html">materials</a> that scroll in steps across an image simulated animation. Below are example <ahref="./ArtReference_Q4Shaders.html">shaders</a> and images from a fire animated <ahref="./ArtReference_Q4Shaders.html">shader</a> used in Quake 4. <spanclass="anchor"id="line-2"></span><spanclass="anchor"id="line-3"></span><pclass="line867">
<spanclass="anchor"id="line-23"></span></pre><spanclass="anchor"id="line-24"></span><spanclass="anchor"id="line-25"></span><pclass="line874">The important lines to notice are: <spanclass="anchor"id="line-26"></span><spanclass="anchor"id="line-27"></span><ul><listyle="list-style-type:none"><pclass="line891"><strong>scale 1 / 32 , 1</strong><spanclass="anchor"id="line-28"></span><spanclass="anchor"id="line-29"></span>This adjusts the scale of the image to only show 1/32th of its width. The image has exactly 32 parts. The height stays at the default of 1. <spanclass="anchor"id="line-30"></span><spanclass="anchor"id="line-31"></span></li></ul><pclass="line867"><br/>
<spanclass="anchor"id="line-32"></span><ul><listyle="list-style-type:none"><pclass="line891"><strong>scroll table32[ time * .6 ] , 0</strong><spanclass="anchor"id="line-33"></span><spanclass="anchor"id="line-34"></span><pclass="line862">This scrolls the image horizontally using a <ahref="./ArtReference_Q4Shaders_Tables.html">table</a> named <strong>table32</strong>: <spanclass="anchor"id="line-35"></span><spanclass="anchor"id="line-36"></span></li></ul><pclass="line867"><spanclass="anchor"id="line-37"></span><pre>table table32
<spanclass="anchor"id="line-45"></span></pre><spanclass="anchor"id="line-46"></span><spanclass="anchor"id="line-47"></span><ul><listyle="list-style-type:none">The table used must match exactly the scale dimensions to animate correctly. If you are using an image with 16 parts, you need a scale of 1/16 and a table that works in 16 steps. <spanclass="anchor"id="line-48"></span><spanclass="anchor"id="line-49"></span></li></ul><pclass="line867">
<spanclass="anchor"id="line-50"></span><pclass="line867"><hr/><pclass="line874"><spanclass="anchor"id="line-51"></span><spanclass="anchor"id="line-52"></span><pclass="line874">The animated fire image has 32 parts to it, each 128 pixels wide. This image has been resized to fit. <spanclass="anchor"id="line-53"></span><spanclass="anchor"id="line-54"></span><pclass="line867"><imgclass="attachment"src="./ArtReference_Q4Shaders_AnimatedStrips1.jpg"title="attachment:shader_stripimage1.jpg"/><spanclass="anchor"id="line-55"></span><spanclass="anchor"id="line-56"></span><pclass="line874">Here is a close-up of a part of the image. <spanclass="anchor"id="line-57"></span><spanclass="anchor"id="line-58"></span><pclass="line867"><imgclass="attachment"src="./ArtReference_Q4Shaders_AnimatedStrips2.jpg"title="attachment:shader_stripimage2.jpg"/><spanclass="anchor"id="line-59"></span><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">ArtReference Q4Shaders AnimatedStrips (last edited 2005-11-09 21:33:14 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>