Low FPS, CPU Stalled when Collision or Physics enabled
I experienced serious cpu stalling upon adding 100.000 instanced mesh with collision and physics enabled. While the expected result would be increased cpu and gpu usage, actually the opposite is happening. As i increase the number of instances, the cpu and gpu usage goes below 15%, the FPS is drops seriously as well to 16 fps.
Recreated the very simple situation in 4.8.3 and was suprised to see the collision and physics were performing much better in that older editor version.
For the measurements i used HISM to spawn the built in EditorCube mesh (12 triangles only) with the WorldGridMaterial applied. These are engine defaults. Also set the fps limits to be opened, so i can measure the best possible rendering circumstances. Here are the results in 4.8.3 then 4.15.1.
When i increase the number of blocks from 100k to 150k, and let the physics and collision to be enabled, the fps drops to 16, but there is no reason because no cpu or gpu is the bottleneck here. Then what is? I entered the console command " stat DumpFrame -ms=10" to show what is taking so long, and this is what i found:
Can somebody please explain me, why the cpu is stalled here? Is there any way to change this behavior to allow more small physics objects to be added to the scene?
I7 4790, 16Gb ram, gtx 1070, Windows 7 Ue 4.15.1 (built from 20th Feb repo)
Attached below the demo project that will reproduce the situation for you. It is required to be opened in 4.15. You can increase the number of the instances, just set the public values of the blueprint on the details panel.
I've tested this across multiple versions and it appears to break from 4.13 to 4.14. Which happens to be when we upgraded to PhysX 3.4. There isn't really any immediate fix for you, but I've entered UE-42956 for investigation. You can track the report's status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.
answered Mar 15 '17 at 08:11 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here