1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice

Question about the simulation frequency/fps

Discussion in 'General Discussion' started by Hati, Jun 9, 2015.

  1. Hati

    Hati
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,389
    So the game is cited at running it's physics simulation at 2kHz, that way beams in BeamNG are sufficiently rigid ingame. I have a question though, because you need the 2Khz to make the beams rigid enough, it stands to reason for me that when I have beams that are intentionally more flimsy than the maximum stiffness of a beam then I could lower the frequency of the simulation for those beams in order to save on doing calculations I don't need to do. Sort of a 'dynamic' asynchronous simulation of beams. The less rigid the beam, the less computing power I devote to it.

    but I have to wonder, do you treat all beams in beamNG indiscriminantly? if yes, why?

    Also, is the physics engine about as optimized as it can be? or can we look forward to some significant performance boosts moving forward too? Out of curiosity.
     
  2. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    268
    The actual beam calculations are a significant % of the whole CPU workload, but considering the big picture it is a small part of the whole (collision detection for example is ~30% by itself). Even so, the original version of the Rigs of Rods beam core (where we were previously working on) was actually trying to reduce the updates on the beams that were relatively "calm" (until i removed the checks after doing some benchmarks), in a similar manner to what you are suggesting above. This made sense in the older CPU generations where "checking" (conditional "if" in programming) to see if something is "calm", is computationally cheaper than doing the actual physics computation.

    In newer CPU generations, the "checks" are quite costly and CPUs have become a lot faster in number crunching. This means that now-days it is cheaper to not do any checks and just blindly do the actual physics computations.

    Concerning the optimizations of the physics engine, it is very heavily optimized but it still has room for more optimizations. In more detail, i don't expect the single threaded (simulation of a single vehicle) performance to change by that much. For the many vehicles case, there are still significant optimizations that we are looking into. Also there are some parts of the physics that we are planning to move to the GPU side. The main constraint right now is that the upgrade from DirectX9 to later versions will have to happen first.
     
  3. JackAttak

    JackAttak
    Expand Collapse

    Joined:
    Sep 12, 2013
    Messages:
    567
    Awesome. As far as I'm aware, that could improve performance and make re-implementing Oculus Rift support possible. I like these technical explanations from you.
     
  4. Hati

    Hati
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,389
    thanks for answering, sounds straightforward. Cheers.
     
  5. Nucula

    Nucula
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    6
    Would be great. For what are you aiming currently?
     
  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