User Tools

Site Tools


hpl3:engine:optimizations

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
hpl3:engine:optimizations [2011/08/30 07:18]
jens [Objects]
hpl3:engine:optimizations [2012/10/08 13:46]
thomas [Transparency]
Line 8: Line 8:
  
 **Alpha in all trans materials**\\ **Alpha in all trans materials**\\
-As mentioned above, a costly aspect is of translucency is that it both read and writes. This can be reduced quite bit by skipping pixels that are not needed. Normally particles and similar and round in shape and are on a square textures. This makes the corners of of the image have pixels that are never drawn. This can be fixed to some extent by having an alpha channel and set alpha to zero in these areas. The important part is that this works even more additive, mul and mulx2 blend modes! So where ever your material is invisible (add=(0,​0,​0),​ mul=(1,​1,​1),​ mulx2=(0.5, 0.5, 0.5)) have alpha value of zero and for the rest of the pixels 1 (gradient is not needed). This reduce the perfomance ​it by a particle system by almost 50%!!+As mentioned above, a costly aspect is of translucency is that it both read and writes. This can be reduced quite bit by skipping pixels that are not needed. Normally particles and similar and round in shape and are on a square textures. This makes the corners of of the image have pixels that are never drawn. This can be fixed to some extent by having an alpha channel and set alpha to zero in these areas. The important part is that this works even more additive, mul and mulx2 blend modes! So where ever your material is invisible (add=(0,​0,​0),​ mul=(1,​1,​1),​ mulx2=(0.5, 0.5, 0.5)) have alpha value of zero and for the rest of the pixels 1 (gradient is not needed). This reduce the perfomance ​hit by a particle system by almost 50%!!
  
 **Premultiplied alpha**\\ **Premultiplied alpha**\\
Line 35: Line 35:
  
 **Turn off shadow casting when not needed.**\\ **Turn off shadow casting when not needed.**\\
-Many objects like floor, ceiling and some walls, never cast shadows on anything. Small objects cast small, hard to see shadows that are unneeded. Objects along the wall, like beams, often cast shadows that can be turned off.  Think about this when working on the map and turn off shadows when it does not  (or only very slightly) affect the final visual outcome! This can help increase performance quite a bit!+Many objects like floor, ceiling and some walls, never cast shadows on anything. Small objects cast small, hard to see shadows that are unneeded. Objects along the wall, like beams, often cast shadows that can be turned off. Static objects located in a shadow from another static objects should have their shadows off as they are invisible. ​Think about this when working on the map and turn off shadows when it does not  (or only very slightly) affect the final visual outcome! This can help increase performance quite a bit!
 ===== Lights ===== ===== Lights =====
  
hpl3/engine/optimizations.txt ยท Last modified: 2015/09/17 10:59 by ian.thomas