Elhoim
Iron Tower Studio
Orgasm said:So, now it uses something like below? Instead of loading separate textures?And why where the meshes separated before?
Something like that, but we mostly used one texture already. The main problem was having separate meshes (the body was cut in like 8 pieces that were shown/hidden depending on the armor. When the guys started working on the game many years ago they were more concerned on reducing polycount by hiding stuff without much knowledge of the drawcalls.
Now we have a single model per armor (hair and helmets are separate meshes, weapons too, of course) and they have two textures: one for the armor, another for the skin (so that they can switch metal type and skin color).
Orgasm said:How many drawcalls where you making per frame in your scenario before and after the optimization?
I superficially read a bit around and skimmed across something saying that the drawcalls bottleneck at the cpu. True in Torque?
In a test level with 20 NPCs, we went from 1094 to 197 drawcalls (and in the shadow pass from 675 to 75).
Orgasm said:What about this
Also, we've discovered a new way to place objects on the levels that reduce memory consumption
We were using datablocks for all objects, including the static scenery ones. These datablocks are all loaded when a level is created, no matter if they are used or not. Plus they are "aware" of their position in the level, so they have a very little performance hit. But since there were like 800 of them in the level, there was a 10% decrease in fps.