1. Trouble with the game?
    Try the troubleshooter!

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

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

beamNG how trustworthy is this simulator

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by b00gieman, Feb 9, 2014.

  1. b00gieman

    b00gieman
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    3
    Hi there,

    I'm new to this forum and it might be, that my question has already been talked about, but i could not find it, while i was searching.

    My question is: How trustworthy are the simulations according to the real life situations, could anyone tell me the algorithm of this program. How is the algorithm of this program working, calculating each crash?
    It is really important for me to know that because i will be asked about it on my Master Degree defense.

    Thanks in advance for every helpful post :)
     
    #1 b00gieman, Feb 9, 2014
    Last edited: Feb 9, 2014
  2. Cardinal799

    Cardinal799
    Expand Collapse

    Joined:
    Oct 15, 2013
    Messages:
    1,068
    If you were getting a Master's degree, you wouldn't be typing like that.
     
  3. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,074
    I would like to see you speak polish dude. Not everyone is a native speaker
     
  4. SHOme1289

    SHOme1289
    Expand Collapse

    Joined:
    Nov 6, 2013
    Messages:
    1,286
    true^

    well, for starters, the crashes sure do look realistic, don't they?
     
  5. Ckykyro

    Ckykyro
    Expand Collapse

    Joined:
    Aug 3, 2013
    Messages:
    101
    Mom's friend went to an on line college to get her degrees, you would think 4th graders were writing those papers and answers.
     
  6. Singh336

    Singh336
    Expand Collapse

    Joined:
    Sep 5, 2013
    Messages:
    208

    yep, all it means is they can copy... and paste.
     
  7. b00gieman

    b00gieman
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    3
    So i see that my question is either too difficult or nobody knows the answer :(
    Anyone can help?
     
    #7 b00gieman, Feb 9, 2014
    Last edited: Feb 9, 2014
  8. Singh336

    Singh336
    Expand Collapse

    Joined:
    Sep 5, 2013
    Messages:
    208
    yes too difficult.

    its not vague at all
     
  9. Potato

    Potato
    Expand Collapse

    Joined:
    Feb 19, 2013
    Messages:
    1,160
    Actually, I believe you. Good luck.
     
    #9 Potato, Feb 9, 2014
    Last edited: Feb 11, 2014
  10. David Fortsc

    David Fortsc
    Expand Collapse

    Joined:
    Jan 29, 2013
    Messages:
    193
    It's really realistic and trustworthy..

    How do I know?


    (imported from here)

    Real world: 1998 Ford Ranger XLT
    BeamNG: D-15 (Roughly modeled after larger trucks)

    The resemblance of the damage is really close, so if someone modeled a Ranger and took the time to get the structure as real as possible, it'd be spot for spot damage.

    As far as the "Algorithym" or how ever it is spelled goes.. I have no idea. ;)
     
  11. SHOme1289

    SHOme1289
    Expand Collapse

    Joined:
    Nov 6, 2013
    Messages:
    1,286
    This type of question has been answered, but not the way you need. The devs cannot simply explain to you how the algorithm and calculations work. It is simply because then the way the game works and all the physics and math behind it all are leaked, leaving the risk of all their hard work to be bastardized by someone who either has a big mouth, or will try and make their own version. Also, im sure it would be a huge task to write a post explaining how it all works. If you do some research, (as someone who is going for their master's degree is surely not a stranger to) im sure you can find some satisfactory answers and information that will help you in your quest. But it is simply a NO, no one can explain it to you without either going into tons of detail, and also Im sure the devs don't want all the fine specific details about the game engine leaked on the internets.
     
  12. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    268
    Before starting, a disclaimer. We do not claim that BeamNG is suitable to be used for any "serious" engineering, or other purposes, where lives or money is at stake. There are other (non realtime) simulation software packages that are created specifically for these purposes.

    Having said that, i want to say that under the realtime constraints that we are working under, we are doing our best to keep the simulation fidelity as high as possible.

    Right now, the simulation works by calculating at 2000 physics steps per second. The 2000 steps number, is the same as what some of the *non realtime* movie SFX physics simulators use. The more steps that a physics simulator does, the stiffer the materials that it can simulate in a stable manner. 2000 steps, is enough to approximate materials that are used in normal cars (but not exotic materials like carbon fiber).

    For each step, we do the standard (for physics simulators) integration - force calculations - collision detection processes. All of these steps are using the correct physics equations. For example, to deduce the equations for material deformation i had to read through a lot of papers from the civil engineering, and other relevant, fields.

    We try to avoid any physics simulation "cheating" as much as possible. For example, most of the realtime physics simulators play fast and loose with friction, for example by increasing it as much as possible to stop the objects early so they'll be able to sent them to "sleep" (stop calculating them completely). Another "trick" that other realtime physics simulators do with friction is that when an object is stopped, they "glue" the object to the ground by "freezing" its position completely. In our case, we don't do any tricks at all. When an object is stopped, it is stopped by having the friction forces continuously keeping it still. We also try to use (friction and other) parameters that are taken from real engineering tables.

    Concerning collisions, most of the realtime simulation engines try to reduce their collision processing workload using a number of tricks, like skipping calculating collisions on some of the physics steps, or doing the collisions on a bounding box. Because we wanted to be as accurate in collision processing as possible, we had to develop an extremely fast collision processing algorithm that is able to calculate the collisions in all of the physics steps, using the same physics skeleton that the rest of our physics also uses. This is an extremely hard thing to do, and most probably we are the first ones to do that and still remain realtime.

    For the next update (sorry it is taking that long), we wanted to make sure that the physics simulation is as correct as possible. So i'm re-checking and re-deriving (by hand) all of the equations of the core to make sure that they are correct. The most visible problems that this checking process has uncovered, are some problems with the brakes/parking brakes and another problem concerning "ignored" collisions (the major cause of the vehicle "shaking" after a crash). These, and a lot of other not so visible problems, have been fixed.

    All of the above physics engine work, would be wasted if the vehicles weren't designed correctly. The way our physics works, requires vehicles designed in a realistic manner. We are lucky that our vehicle designer (gabe), is a perfectionist when he designs his vehicles. This isn't an easy task, because if you want a simulated vehicle to behave like a real one, then you have to design/construct it like the real one. This means that the weights of the parts need to be correct. The suspension needs to be of the same type and configuration as the real one's. Think of how many different things a real vehicle is composed of, and you'll realize the amount of effort that is needed to recreate it in a virtual setting. If there are "flaws" in the design, then weird things happen. Like the extreme wheel vibration that we had some time ago, because of the gyroscopic effects caused by the unrealistic weight distribution of our simulated wheels.

    Best of luck with your Master Degree defense.

    Edit: For an example of how far we are willing to go concerning simulation fidelity, look into "drivetrain.lua" and try to deduce how fuel consumption is calculated...
     
    #12 estama, Feb 10, 2014
    Last edited: Feb 10, 2014
    • Like Like x 1
  13. ScottL

    ScottL
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    27
    Very good points, that was an interesting read. :)

    Drive seems to be a greatly improved version of an open source program written by the same developers as Drive, Rigs of Rods.

    Both Rigs of Rods and BeamNG Drive use a node/beam system for physics so the math behind both of them should be roughly equivalent.

    If you can understand C++ you can look at the actual source code for the physics in Rigs of Rods for your Masters Degree:
    http://sourceforge.net/p/rigsofrods/codehg/ci/default/tarball

    This will give you the exact algorithms used for the collisions.
     
    #13 ScottL, Feb 10, 2014
    Last edited: Feb 10, 2014
  14. b00gieman

    b00gieman
    Expand Collapse

    Joined:
    Feb 9, 2014
    Messages:
    3

    Thanks so much for your post, that is a really good example :) would it be ok if i could use that pictures to show it to the examination board/examiners to make me believe its close to the real thing?

    - - - Updated - - -

    Wow, i am so thankful for your exhaustive answer! That was really what i was looking for :). I know it's really hard to explain a whole program and the way it works when its that elaborated.
    But you did a very good job. Now it is much more easier to understand how it works. I will be able to answer their question for sure :)

    - - - Updated - - -

    Thanks for that post :) i will definitely take a look!
     
  15. Singh336

    Singh336
    Expand Collapse

    Joined:
    Sep 5, 2013
    Messages:
    208
    Thanks for posting that info, thats really interesting info to know



    I WAS going to say, haven't most of these collision equations been done since earlier version of rigs of rods .36 or something, but if its by the same guys like estama and tdev then that all makes sense
     
  16. estama

    estama
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 7, 2012
    Messages:
    268
    RoR's dynamic collision subsystem was coded by me.

    If RoR's collision subsystem is thought as generation 1, the one that is used in the released BeamNG, is generation 3, and the current one (in development) is generation 4.

    To give you some idea of the differences between generations. The difference between generations 3 and 4, is that in generation 3 the collision subsystem could scale up to around 3-4 vehicles. Generation 4 can scale up to around 7-8 vehicles, while at the same time being more precise than generation 3.
     
    • Like Like x 1
  17. David Fortsc

    David Fortsc
    Expand Collapse

    Joined:
    Jan 29, 2013
    Messages:
    193
    Sure, go ahead if you think it'd help.
     
  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