1. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  2. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.25 Bug Reporting thread
    Solutions and more information may already be available.

Question about Physics FPS

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by TechnicolorDalek, Feb 15, 2014.

  1. TechnicolorDalek

    TechnicolorDalek
    Expand Collapse

    Joined:
    Dec 6, 2013
    Messages:
    1,031
    I tried searching for the answer to this, but to no avail.

    My question is thus. Why, if my graphics card can handle rendering 60fps with the physics paused, and the physics are running at a nominal 2000fps (even though it's usually lower) are the physics limiting the frame rate? I'm probably missing something, but to my understanding, physics are attempting to be calculated 2000 times every second. So why is my fps rate so much lower? I do usually get fine performance with one vehicle, but add another in and it drops noticeably. However, looking at the debugging screens, I can see that the physics are still being calculated at a rate of 1000+ fps. So yeah... if the physics are so fast, why isn't the graphics?
     
  2. simon48

    simon48
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    203
    You are CPU bound. The physics are always trying to run at 2000 steps per second. Your CPU is having hard time calculating all the physics steps. At 60FPS the CPU has to calculate 33.3 per frame and your CPU isn't going that fast. Anytime you pause the game and your FPS goes up you are CPU bound. What FPS are you getting while not paused (control + F)?
     
  3. TechnicolorDalek

    TechnicolorDalek
    Expand Collapse

    Joined:
    Dec 6, 2013
    Messages:
    1,031
    Ah.. that makes sense. I'm not complaining about my framerate, as it's fine - playable, at least - up to 5 or 6 vehicles. I didn't understand why I couldn't have a full 60fps if it was calculating 720 physics steps per second. But you have clarified that. I didn't know that it had to render a certain amount of physics steps for every graphical one.
     
  4. simon48

    simon48
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    203
    Yeah, if the physics "clock speed" was dependent on your FPS the physics wouldn't be consistent for all players.
     
  5. driverx

    driverx
    Expand Collapse

    Joined:
    Oct 10, 2013
    Messages:
    7
    I'm trying to do some more controlled tests with BeamNG and I've discovered that physics are not quite consistent.

    Running a van in controller tests (accelerate for X seconds then pause game) (developed a program to hit keyboard keys at specific intervals) leads to the following possible outcomes:
    1) When pausing the game, the van is in different positions on each run. Sometimes it is a matter of 3-4 meters in difference (just an guesstimate). It is NOT due to keyboard delays or something like this.
    2) Even if the steering is not used at all, the van takes different paths on each run. Deviation of 1, 1.5 meters after rolling about 10 seconds
    3) Now the most interesting part. Under the same controlled tests, the van is in different positions if the camera is on the van or if the camera is in free mode located in the position where the van should be when the game is paused. Now the differences are even higher. Up to 5-6 meters.

    IF FPS does not affect the physics, then why the point 3) is happening?

    Note that the tests where made under the following conditions:
    - ASUS laptop with Intel i7 4710HQ
    - NVidia 840M (yeah, shitty graphics)
    - SSD
    - 16 GB RAM
    - Graphics settings set to Lowest to adapt to the low graphics performance of the 840M
    - 3 cars on the map, only one running and visible
    - During tests, 30-33 FPS constantly
    - Most of the time Physics delay was around 0.2-0.4ms, BUT sometimes for very short period of time up to 13 ms. But this is rare.
    - Application responsible to hit the keyboard was tested and deviations are bellow 0.007 seconds.
    - Van running at 103 km/h when game is paused. Which means it runs at about 28 meters/second. Errors are way above 10% when differences is about 3-4 meters when comparing tests.

    If physics FPS is not affected by graphics FPS, then why I get inconsistent results? And I focus more on scenario 3, but also point 2) is worrying.

    How can I get more consistent simulation?

    Thanks,
    Attila
     
    #5 driverx, Feb 13, 2016
    Last edited: Feb 13, 2016
  6. BlueScreen

    BlueScreen
    Expand Collapse

    Joined:
    Apr 5, 2014
    Messages:
    624
    Pretty sure it's floating point errors.
     
  7. Cira

    Cira
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    283
    Sounds like CPU is downclocking a.k.a. overheating for me.
     
  8. driverx

    driverx
    Expand Collapse

    Joined:
    Oct 10, 2013
    Messages:
    7
    Thanks guys for the feedback..

    And what can I do about it?

    I did some tests now with CPU-Z opened while playing. Multiplier stays almost all time at 33 (8-35) sometimes increases to 34 and BUS speed between 98.9 and 99.8 MHz. Sometimes multiplier is dropping to 25. I wonder if such drop can affect BeamNG running on this processor. Should I look for something else?
     

    Attached Files:

    • BeamNG perf graph.png
  9. BlueScreen

    BlueScreen
    Expand Collapse

    Joined:
    Apr 5, 2014
    Messages:
    624
    You can't.
     
  10. driverx

    driverx
    Expand Collapse

    Joined:
    Oct 10, 2013
    Messages:
    7
    Guys, I understand your arguments and agree with them. That's why I went further and provisioned a Amazon Server with GPU which I hope that it does not throttle :)

    Results: pretty much the same, some kind of consistency for few of the first runs, then all over the place.

    One more thing I tried with my laptop was to lower the maximum FPS to 5-10 FPS. I made this to lower the burden on CPU but especially on GPU were I saw some delays as well. But physics seem the remain behind a lot. I would expect that physics behave the wide while I see the evolution in low FPS.

    It kills me because I can't track down where the inconsistencies comes from...
     
  11. Cira

    Cira
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    283
    Your multiplier dropping to 25 just means that your laptops CPU lost ~30% of its performance in a CPU demanding application. Maybe a CPU-Z screenshot would be useful.
     
  12. driverx

    driverx
    Expand Collapse

    Joined:
    Oct 10, 2013
    Messages:
    7
    Yeah. I agree. We can also agree that my laptop is not a gaming grade rig so things like proper cooling and the GPU seems to be not enough for BeamNG.

    That's why I made some test on Amazon AWS. And that's Intel Xeon E5-2670, 8 CPU, 16 Gb with a NVIDIA GRID K520 (I think equivalent to a GTX 960). But I got pretty much the same inconsistencies. I haven't installed CPU-Z or MSI afterburner other server assuming that those servers do not have issues with cooling and also I don't know how reliable CPU-Z is in a virtual environment.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice