Mafia Scene - Mafia I & II Game Fan Site

Modders Corner => Mafia Editing => Mafia mods => Topic started by: Mr Robville on August 29, 2012, 11:42:28 AM

Title: huge FPS drop when inserting NPC's
Post by: Mr Robville on August 29, 2012, 11:42:28 AM
Hello All.


 




I am a bit stuck with a problem placing NPC's.


 




The Titanic exterior scene while it's sailing works fine, with 34 FPS having the whole ship in one sight, and around 50-60 FPS when normally walking around (no far drawdistance models added yet)




And if I turn the level of detail down the FPS lies constantly around 50-60 FPS.


 




But as soon as I add one NPC onto it's deck, the FPS decreases to no more than 15 FPS.




Weird thing is, if I add even 10 more, the FPS stays the same.


 




I once spoke to ASM about it and he believed it was the collission model grid that was too complex.




So I increased it's calculating grid size and removed all collissions except one surface where I tested the NPC's on.




And still the problem persists.


 




Does anyone know how to fix this?
Title: huge FPS drop when inserting NPC's
Post by: vapno92 on August 29, 2012, 12:25:00 PM
Try to not use FACE Collisions at all...




Maybe it's because of missing grid in check.bin file?
Title: huge FPS drop when inserting NPC's
Post by: Mr Robville on August 29, 2012, 12:53:56 PM
Maybe, because there's no check.bin file at all.


 




If the dock scene's weren't corrupted by DC||ED I could try placing NPC's on the ship there.




I remember the dock itself was face collisioned, even more complicated than Titanic's special made collission model. And the only FPS drop there was caused because of the many animated characters, but still very playable.
Title: huge FPS drop when inserting NPC's
Post by: vapno92 on August 29, 2012, 01:04:29 PM
DO you remebmer my lightmap problems? Almost zero-sized polygons causing crash while creating LMAP. Maybe thee tiny polygons strikes again... Does game "lag" why the NPCs try to move, or instatly right after inserting the NPC?




Maybe you hit LS3D engine limit  <img src="/wp-content/uploads/invision_emoticons/tongue.png" alt="(//tongue.gif)" data-emoticon="" srcset="/wp-content/uploads/invision_emoticons/tongue@2x.png 2x" width="20" height="20">
Title: huge FPS drop when inserting NPC's
Post by: Mr Robville on August 29, 2012, 02:41:16 PM
As soon as they touch the collission model, it happens.
Title: huge FPS drop when inserting NPC's
Post by: vapno92 on August 29, 2012, 03:32:11 PM
Then you just probably answered to yourself. Try to temporary delete face collision and use primitive collision.
Title: huge FPS drop when inserting NPC's
Post by: Mr Robville on August 29, 2012, 03:55:21 PM
I could try it, but I think the problem ain't in the face collission method.




And even if it works, it is impossible colliding the whole Titanic this way.
Title: huge FPS drop when inserting NPC's
Post by: vapno92 on August 29, 2012, 04:04:49 PM
Try to create lightmap on "bad" object. If it don't work properly, then you cannot expect also collision to work.