<li><aclass="backlink"title="Click to do a full-text search for this title"href="./Effects_Performance?action=fullsearch&value=linkto%3A%22Effects+Performance%22&context=180">Effects Performance</a></li>
<spanclass="anchor"id="line-1"></span><pclass="line874">When creating effects, one needs to be aware of the performance hit on Quake4. Many things need to be balanced in a scene, from polygon count, textury memory useage, overdraw and physics/game code. <spanclass="anchor"id="line-2"></span><spanclass="anchor"id="line-3"></span><pclass="line874">The main things to be aware of are: <spanclass="anchor"id="line-4"></span><hr/><pclass="line874"><spanclass="anchor"id="line-5"></span>
<spanclass="anchor"id="line-6"></span><spanclass="anchor"id="line-7"></span><pclass="line874">Less segments are cheaper. Instead of 4 segments each with 10 particles, can you accomplish the same effect with 2 segments of 20 particles each? Every segment is a separate draw call to your video card and another set of particles for the game to process. Try unchecking segments of a complex effect and see if you notice a different. Many times a layered effect can have a segment or two removed that are just not noticeable within the big picture. <spanclass="anchor"id="line-8"></span><spanclass="anchor"id="line-9"></span><pclass="line867">
<spanclass="anchor"id="line-10"></span><spanclass="anchor"id="line-11"></span><pclass="line862">Overdraw is how many layers of shaders are in a scene. This can be turned on with <strong>r_showoverdraw 1</strong> at the console or by going to <strong>View>Show>Show Overdraw</strong> in the <ahref="./FXEditor.html">FXEditor</a>. The range of color represents the severity of overdraw. From least overdraw to most overdraw: <strong>Blue -> Green -> Yellow -> Orange -> Red -> Purple</strong>. <spanclass="anchor"id="line-12"></span><spanclass="anchor"id="line-13"></span><pclass="line867"><imgclass="attachment"src="./fx_overdraw_bad.jpg"title="attachment:fx_overdraw_bad.jpg"/><spanclass="anchor"id="line-14"></span><spanclass="anchor"id="line-15"></span><pclass="line867"><imgclass="attachment"src="./fx_overdraw_good.jpg"title="attachment:fx_overdraw_good.jpg"/><spanclass="anchor"id="line-16"></span><spanclass="anchor"id="line-17"></span><pclass="line867"><ahref="./FXEditor_Tab_-_Sprite.html">Sprites</a> can be very expensive when viewed in a line like a rocket trail. In some cases you might want to try using <ahref="./FXEditor_Tab_-_Sprite.html">line segments</a> instead of <ahref="./FXEditor_Tab_-_Sprite.html">sprites</a>. Since they always rotate to face the user, they can have much less overdraw than <ahref="./FXEditor_Tab_-_Sprite.html">sprites</a>. <spanclass="anchor"id="line-18"></span><spanclass="anchor"id="line-19"></span><pclass="line867">
<spanclass="anchor"id="line-20"></span><spanclass="anchor"id="line-21"></span><pclass="line874">Physics on segments is very, very expensive. If you must apply physics, consider applying it to only 1 of a few segments instead of all. An example of this would be if you have rock chunks fly out of a wall when shot. Make 2 rock chunk segments, one with physics and 3 particles and another without physics that has 9 particles. When the whole effect is played, seeing the 3 rock chunks bounce adds to the effect without being as expensive as 12 particles with physics. <spanclass="anchor"id="line-22"></span><spanclass="anchor"id="line-23"></span><pclass="line867">
<spanclass="anchor"id="line-24"></span><spanclass="anchor"id="line-25"></span><pclass="line874">Try to lower the count on effects and see if it really makes the effect look that much worse. Lower counts is less overdraw and lower poly counts in a given scene. Try to use less (more opaque) images rather than stacking higher counts of images that are partially translucent. <spanclass="anchor"id="line-26"></span><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">Effects Performance (last edited 2005-11-08 23:41:16 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>