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.

The main things to be aware of are:


Segment count

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.

Overdraw

Overdraw is how many layers of shaders are in a scene. This can be turned on with r_showoverdraw 1 at the console or by going to View>Show>Show Overdraw in the FXEditor. The range of color represents the severity of overdraw. From least overdraw to most overdraw: Blue -> Green -> Yellow -> Orange -> Red -> Purple.

Sprites can be very expensive when viewed in a line like a rocket trail. In some cases you might want to try using line segments instead of sprites. Since they always rotate to face the user, they can have much less overdraw than sprites.

Physics

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.

Particle Count

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.

Effects Performance (last edited 2005-11-08 23:41:16 by MattVainio)