Archive for the ‘Tweaks’ tag
Investigation: boosting fps in Batman: Arkham City with APEX .dlls from Mafia II
Today we have stumbled upon following article (and related post), that is promising huge framerate boost in Batman: Arkham City with GPU PhysX effects enabled by replacing certain APEX .dll file with same .dll, but from Mafia II title (which is also featuring APEX based GPU PhysX effects). We decided to perform a little research on this effect:
Author of this method is suggesting to replace original file APEX_Clothing_x86.dll, located in Batman: AC folder, with renamed APEX Clothing.dll from Mafia II installation. Both those libraries are used by APEX Clothing module (and are responcible for cloth and clothing simulation), but have different version – Batman’s .dll is related to APEX 1.1 and the one from Mafia II – APEX 1.0.
Thus, with APEX 1.0 library cloth assets in Batman are not recognized and not simulated – they are simply appearing on level in frozen state, hovering above the ground (like carpets and posters on a screenshot below).
Disabled cloth simulation is giving you desired fps boost, but you can achieve same effect by setting “Hardware Accelerated PhysX” option to “Normal” – this will switch off all cloth and clothing simulation, leaving only particle PhysX effects, without necessity to mess up the .dlls.
How to achieve quality simulation with PhysX plug-in for 3ds Max
Those of you who are familiar with PhysX plug-in for 3ds Max (for example, recently released 2.40 version) may already notice that by default simulation is not going as smooth as you can expect – rigid body objects are often interpenetrating each other, jittering and jiggling (especially when stacked) , and so on – making it hardly suitable for some scenes.
UPDATE: Not valid for 2.60 PhysX plug-ins and above
So, we’ve contacted Gavin Kistner, Product Designer for PhysX Max and Maya plug-ins at NVIDIA, and he gave us several tips, using those you can deal with simulation stability problems in most of the cases:
TIP I – Increase Frame Rate
If rigid bodies are showing inaccurate behaviour, this is indicating that physics engine is just not performing enough simulation substeps between frames. To fix that (as separate substeps control is yet not availalbe in public versions of PhysX plug-in) you can simply increase Frame Rate before previewing or baking the simulation (and than revert it back to normal during composing, for example).

To illustrate this tip, let’s set up a simple scene – several rigid body planks falling one at each other, trying to form a stack.

With default Frame Rate – 30 fps (shown above), simulation is just messed up. At certain frame planks are stuck together, solver is trying to resolve inter-collisions and repels planks – stack collapses.
Mafia II Demo: tweaking PhysX performance
Yes, all that dynamic clothing and particle effects are cool, but actuall performance of Mafia II with APEX PhysX effects set on “Medium” or “High” isn’t very fascinating – even GTX 480 users may met some annoying fps drops and lags. Fortunately, there is a way to tweak APEX content a little.
Note: Interested in how exactly APEX Framework is being used ? Visit Mafia II GPU PhysX profile page for additional information.
Important: Mafia II may have some issue with PhysX System Software installation. If you experiencing major slowdowns, reinstall it using 9.10.0512_SystemSoftware package from \Steam\steamapps\common\mafia ii – public demo\3rd folder.
You also may wanna try new 9.10.0513 PhysX drivers
PART I – APEX CLOTHING
Most performance is devoured by APEX Clothing module (why ? because it is running on CPU, not on GPU), that is responcible for realistic clothing simulation on main and several NPC characters.
Update: tweaking APEX Particles effects
Update #2: following tweaks will work with final version of Mafia II
1) Disabling all clothing
If you can live without flowing Vito trenchcoat and woman’s skirts, you can simply follow the path
\Steam\steamapps\common\mafia ii( – public demo)\edit\APEX
and delete (don’t forget to backup) directory named as
Cloth
This will remove certain APEX assets, and all character clothing will revert to static skinned mesh (like with APEX set to “Off“), but all particle effects will stay !
Result ? No more realistic cloth, but huge fps increase. 70 average fps vs 25 fps without this trick (APEX set to High, single GTX470 is used, GPU PhysX enabled).















