1. Trouble with the game?
    Try the troubleshooter!

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

    Dismiss Notice

Possible to increase simulation time steps?

Discussion in 'General Discussion' started by Nuginu, Mar 21, 2021.

  1. Nuginu

    Nuginu
    Expand Collapse

    Joined:
    Nov 28, 2012
    Messages:
    34
    I'm not sure if this is the proper place to post this, but is there a way to increase the accuracy of the simulation? Not that I don't think it's accurate enough, I just enjoy pushing things to the limit. I heard it runs at 2000hz, even if I have to run the game in slow motion I'd love to see the effects of upping that figure.
     
  2. P_enta

    P_enta
    Expand Collapse

    Joined:
    Jan 11, 2020
    Messages:
    3,029
    It’s not really gonna work that way since the game engine is designed to run at a certain speed. The way to make the crashes more accurate is to up the density of the collision body’s (JBeam). Which I think should be done, since they aren’t very accurate or dense. Small dents are impossible, they gotta be like three times as thick.
     
  3. Nuginu

    Nuginu
    Expand Collapse

    Joined:
    Nov 28, 2012
    Messages:
    34
    Would be awesome to see that. I feel like the node and beam model would have to be subsampled or something like that. Not sure how it works.
     
  4. P_enta

    P_enta
    Expand Collapse

    Joined:
    Jan 11, 2020
    Messages:
    3,029
    some sort of dynamic JBeam Subsampling would be cool, but would only be available to people with a more powerful computer. Also, how would fracturing work?
     
  5. Nuginu

    Nuginu
    Expand Collapse

    Joined:
    Nov 28, 2012
    Messages:
    34
    Way beyond my knowledge. Was hoping to just increase a value in somesort of text file lol.
     
  6. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,436
    It would take several years to simply jbeam a bumper correctly if they were more dense. It's fine as it is now, low speed crashes may not be realistic, but remember that Jbeam is not only for the damage, it's more for realistic forces, handling, aero and similar kinds of stuff.
    And yeah it's not gonna work by just simply increasing 1 number somewhere. The game is doing extremely complex and precise calculations and changing 1 tiny thing would mess everything up so it's better to never touch the core files.
     
    • Agree Agree x 1
  7. P_enta

    P_enta
    Expand Collapse

    Joined:
    Jan 11, 2020
    Messages:
    3,029
    okay I don’t mean like, down to the atom dense, I just mean instead of 5 node widths across maybe you do 10.
     
  8. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,436
    That's still 2 times more of the time a modder would have to spend on Jbeam, barely anyone would have the patience for it
     
  9. P_enta

    P_enta
    Expand Collapse

    Joined:
    Jan 11, 2020
    Messages:
    3,029
    Okay I’m just saying as an experiment why are you people like this
     
  10. LucasBE

    LucasBE
    Expand Collapse

    Joined:
    Mar 22, 2015
    Messages:
    2,584
    Because you're basically asking people to do stuff that would take years to make just to satisfy your curiosity. There are reasons why this is not doable and even if it was it's not worth it.
     
    • Agree Agree x 1
  11. Alex_Farmer557

    Alex_Farmer557
    Expand Collapse

    Joined:
    Dec 28, 2016
    Messages:
    3,544
    bruh goes into defence mode so quick
     
  12. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,711
    The simulation time step at the moment is hardcoded I believe. I think I heard that the devs did play around with different speeds, but ultimately, 2000Hz proved to be the best balance between performance and realism. (don't quote me on that, I just seem to remember reading that somewhere on here before)

    RoR used the same 2000Hz time step, and honestly, I am not sure why pricorde originally settled on 2000Hz. If I had to take a guess its because, at the time (around 2005-2006) peek computers were getting into the 2.0 to 2.4GHz range on their processors. Plus, anything below that simulation step, and things have to be built so darn heavy that they usually just ended up exploding if they were made any lighter. Some of the machines were very heavy in the early RoR days because computers just weren't up to the task of hitting that 2000Hz calculation speed.

    Naturally, originally, when it came time to make Beam, the dev team just started with what they already knew worked... but if I recall correctly, I swear that they made mention that they tried other frequencies. Technically the higher the frequency, the more stable the structure would end up being (at a major cost to performance). This 2000Hz is why making things really light (think carbon fiber for instance) is so darn difficult to make with the high node density's that the devs like to use to get all the detail that they already do. The higher the node density, the lower the node weight, and the more likely for the structure to become unstable.

    If you have ever had anything become unstable in Beam (or RoR) and explode on you for seemingly no reason, it actually does come down to that 2000Hz calculation speed. If you make a node light enough, and a spring rate connecting it high enough, the node becomes capable of cycling at a frequency FASTER than the 2000Hz calculation cycles can keep up with. So basically the spring rate is so high, and the node mass is so low, that it can cycle from one extreme to the other in less time then the game has an ability to run the single calculation. This can cause the node to become "out of position" to where it ends up being somewhere where it shouldn't... so then the game calculates the spring, damp, mass forces that that out of position location would cause (which are much higher then it should be experiencing), which then causes the next cycle to have it WAY out of position on the next cycle... and this just keeps getting worse and worse until things blow themselves to bits.

    This actually works for the collision triangles too. The higher the frequencies of calculations, the more likely the node is to "not" penetrate the collision triangle... and thus less crash welding.

    Unfortunately... to start stepping up the calculation frequency would probably make for a pretty hard hit on performance... and my bet is that it wouldn't be a linier performance hit... but an exponential one. So 2000Hz was settled on as it just gives the best accuracy for the FPS... that would be my guess anyways.
     
    • Like Like x 5
    • Agree Agree x 1
  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