Page MenuHomeFeedback Tracker

Disable Physx and Sounds when enablesimulation false
Closed, ResolvedPublic

Description

"If a tree falls in a forest and no one is around to hear it, does it make a sound?"

Apparently in Arma 3 YES and this causes performance issues.

When one spawns in a vehicle and puts enablesimulation false and hideobject true into its init line, one expects this object NOT to consume resources. However I have found that when spawning in hundreds of vehicles, the FPS drops dramatically which is unexpected. Take these classnames for example:

Starting at 56FPS
C_Boat_Civil_01_police_F FPS: 53
Box_NATO_Wps_F FPS: 56
B_MBT_01_arty_F FPS: 27
B_Boat_Transport_01_F FPS: 56
C_Offroad_01_F FPS: 28
B_Heli_Light_01_F FPS: 53

I found that the sound eventhandler engine and Phsyx were not being disabled with enablesimulation false. Until now, this was only an assumption. I have since started hacking the config.bin of vehicles and trying to figure out why land vehicles (cars) drop FPS much more than air or boats. I have found two areas of simulation that are not disabled with enablesimulation false:

class Sounds {}; (7FPS change in my testing when omitted from config.bin)

simulation = "carx"; to simulation = "car"; (11 FPS change, in config.bin which dictates if Physx is used on the vehicle) https://community.bistudio.com/wiki/Arma_3_Cars_Config_Guidlines

I am not sure how the Arma 3 sound engine works, however it is my assumption that they rely on Event Handlers which still simulate per vehicle even with enablesimulation false.

Details

Legacy ID
4288384963
Severity
None
Resolution
Duplicate
Reproducibility
Always
Category
Engine
Steps To Reproduce

Use this repro mission which spawns the classname defined in /functions/Core/fn_test01.sqf line 9 _spawncar = "B_MBT_01_arty_F" createVehicle _pos;

https://github.com/Fankserver/ArmA3-BugSamples/tree/master/18451
Big thanks to Fank for the repro mission and simplification of my original script!

Delete all class Sounds in a vehicle's config.bin (change http://pastebin.com/PFeM3SDw to class Sounds {}; for example)

Change simulation = "carx"; to simulation = "car"; in config.bin to disable Physx (old simulation from Arma 2)

Rerun the test and see that when Sounds and Physx is disabled that FPS doesn't drop with enablesimulation false.

Additional Information

Fix?

Disable class Sounds (Event Handlers?) and Physx simulation on vehicles that have enablesimulation false.

Additionally one could ask for this new command:
enablephysx BOOL (which flips simulation between "car" and "carx", "ship" and "shipX" and so on) would be nice to be able to set during mission runtime

enablesounds BOOL

Event Timeline

zorrobyte edited Additional Information. (Show Details)
zorrobyte set Category to Engine.
zorrobyte set Reproducibility to Always.
zorrobyte set Severity to None.
zorrobyte set Resolution to Duplicate.
zorrobyte set Legacy ID to 4288384963.May 7 2016, 6:28 PM

Previous ticket (before confirming Physx,Sounds slowdown/cause)
http://feedback.arma3.com/view.php?id=18451

Corrected some phrasing in order to avoid confusion.

This ticket was written while I was at work and in a rush, apologize for the abuse of the english language ;)

Why did you change it back to "proposed"? Do you know what a proposal is? This sounds like if you suggested that they should NOT be disabled.

Didn't mean to Fireball, I hit Edit to fix some wording issues in which you may of edited before I hit save, feel free to modify.

Fank added a subscriber: Fank.May 7 2016, 6:28 PM
Fank added a comment.Apr 23 2014, 10:33 PM

thx zorrobyte i created the FpsManager.fsm, so every body can be feel free to use.
https://github.com/Fankserver/ArmA-Script-Sandbox/blob/master/Arma3/FpsManager.fsm

if you wana add me to steam: fankserver

I was speaking more of the BIS FpsManager.fsm which Highhead found in the modules.pbo and modified for general use:
https://www.dropbox.com/s/wikzxjn40sk9lzf/fpsManager.fsm

Your FSM would be very interesting to test, thank you!

Will add you to Steam!