Would it be possible to "port" beamNG to Unity ?

Discussion in 'Programming' started by skflowne, Jul 20, 2015.

  1. skflowne

    skflowne
    Expand Collapse

    Joined:
    Jul 20, 2015
    Messages:
    2
    Hi fellow developpers, first let me say I think what you've done with this engine is amazing and I've been waiting since forever for something like this to show up. So great job!

    Now for my question, as I'm usually using Unity for game development, I was wondering if there could be a way to integrate your physics engine with Unity ?

    How hard would it be or is it even doable ? Is beamNG the whole soft bodies engine or is it a middleware for a soft bodies engine ?
     
  2. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    BeamNG is the middleware, *currently* not available for 3rd party licensing.

    BeamNG.Drive is the game demonstrating the middleware on the Torque3d engine.
     
  3. argilla11

    argilla11
    Expand Collapse

    Joined:
    Sep 8, 2013
    Messages:
    131
    Why? Torque 3d works just fine.
     
  4. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    I think he was asking in the context of if a 3rd party wanted to use the physics engine rather than having the full BeamNG.Drive ported to unity.
     
  5. skflowne

    skflowne
    Expand Collapse

    Joined:
    Jul 20, 2015
    Messages:
    2
    Yes that is what I meant. My goal is to be able to use that kind of physics in Unity. I've been searching more on the subject of soft bodies physics and it seems some people have been able to do similar things to beamNG in Unity.

    But I'm pretty sure recreating this in Unity would take a lot of time, so if there was a way to import the beamNG middleware instead, that would be great.
     
  6. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    Well at the moment it isnt available for 3rd party licensing.
     
  7. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    What will happen if beaming gets licensed? Can it then be patented by other companies if they make changes to it? I guess what I'm getting at is what are the possible drawbacks of licensing it?
     
  8. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    I asked Unity at gamescom, they are not interested. Well, their problem.
     
    #8 tdev, Aug 7, 2015
    Last edited: Aug 8, 2015
    • Like Like x 2
  9. Funky7Monkey

    Funky7Monkey
    Expand Collapse

    Joined:
    Oct 12, 2014
    Messages:
    977
    That's really disappointing. I thought that game devs would be jumping on ultra-realism for their racing games. I'm disappointed in them.
     
  10. TheAdmiester

    TheAdmiester
    Expand Collapse

    Joined:
    Aug 7, 2012
    Messages:
    577
    I'm all for BeamNG becoming more and more popular, but there are tons of reasons why it wouldn't work in racing games. The main two that come to mind are performance and playability, with performance being the main one. I have a relatively powerful rig and it only takes 5 cars to be riding on the edge of a playable framerate. 5 cars at once is perfectly fine for a sandbox game like BNG is right now, but it's a pretty low count for a modern, full fledged racing game. Consider for a second that Gran Turismo 4 had 6 cars on track at once back in 2004 on the PS2. It'd be a bit weird to be around that level in 2015, especially in *insert popular game*. It's a big selling point to have big grids of cars, and if the complexity of them causes performance to tank, then it's not really feasible.

    Playability, well, imagine that GTA 5 had BeamNG's physics engine for a moment. You're chasing a car down a freeway, you nudge the barrier ever so slightly and now one of your driven wheels is jammed. It's nice and realistic and all, but you're playing a GTA game where crashes are bound to happen. Having to constantly switch cars really isn't fun. Even GTA 5's current car damage system is scaled back when you switch online (wheels no longer jam, car always drives straight, engines are far more robust) just so that cars last longer. The same goes for something like the Burnout series. You're racing along, smash another racer into the wall and see a cool cutscene of him crashing from your takedown. Now what? The camera cuts back to your car and it's a mangled mess. You're out of the race after one shunt. In a lot of games real world physics just aren't suitable, and that's fine because plenty of games have different focuses.

    Serious simulator developers are always striving for more realism in their games, but it doesn't make sense to use Beam physics unless that's the focus of the game, and unless the hardware can handle it. Maybe in N amount of years' time, when either the hardware or optimisation has progressed massively, we'll start to see more offers come through to the devs for applying Beam physics to other games, but for right now it's too much of a strain to process so many cars, and it especially doesn't make sense in more action oriented games.
     
  11. Funky7Monkey

    Funky7Monkey
    Expand Collapse

    Joined:
    Oct 12, 2014
    Messages:
    977
    I really wasn't thinking about the BeamNG engine in a GTA-like game. I was thinking more along the lines of Project Cars or another racing simulator. A game where realism would improve the gameplay experience. I thought that a larger game developer might want to work together with BeamNG to get the engine much better optimized, so that the engine can be used in their racing sim.

    Another thing that I think a game developer would do with the engine is to make it much lighter weight (and therefore, less realistic) but combine it with a hard-body engine like the one from GTA to get realistic deformation without the extreme workload. Not quite sure how (or how well) that would work, but it's an idea that popped into my head.

    In a game like Project Cars, where you really wouldn't be crashing into people or things (at least not intentionally), when you do bump into someone or something, it'll do damage to the body of your car, causing changes in the aerodynamics of your car. Or your suspension, directly changing the handling of your car. You can't just brake late and rear end the guy in front of you to get into a turn because you'll ruin the front end of the car.
     
  12. TheAdmiester

    TheAdmiester
    Expand Collapse

    Joined:
    Aug 7, 2012
    Messages:
    577
    Still, Beam physics would likely be the worst of all in pCARS, considering I doubt that it's possible to "combine" hard and soft body physics. Assumedly it's one or the other, but I might be wrong on that. But regardless, one of the things pCARS boasts over competitors is the fact that some tracks can support 55 car races, something that wouldn't even run on Beam physics.
     
  13. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    Just for fun what kind of hardware would be needed to run 55 Beamng cars at least 14-15 fps?

    Xeon E5 18 Core 2687W v3 CPU, 128GB DDR4 ram, 4x GTX 980's, 1500Watt PSU?
     
  14. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    GPU wouldnt be required really. Well, it would to an extent but quad SLI is probably overkill. RAM, 128gb will be overkill. 18 cores might do the trick on something small like a pigeon but not much more.

    However. There are boards that will take twin xeons. That will do it ;)
     
  15. ThreeDTech21

    ThreeDTech21
    Expand Collapse

    Joined:
    Sep 27, 2013
    Messages:
    1,616
    Dual Xeon E5 18-cores, 36 cores! Yeah that'll do it for sure, I assume that in about 4-5 years time 20-30 core CPU's may be just about mainstream.
     
  16. TheAdmiester

    TheAdmiester
    Expand Collapse

    Joined:
    Aug 7, 2012
    Messages:
    577
    In theory, 55 cores would run 55 cars just fine, assuming the scaling of performance is linear like that.
     
  17. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,630
    Mainstream would likely only be 8 cores, and maybe enthusiast level CPUs would have 12 or 16 cores...
     
  18. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,630
    Does beam even support duel CPU systems?
     
  19. SixSixSevenSeven

    SixSixSevenSeven
    Expand Collapse

    Joined:
    Sep 13, 2013
    Messages:
    6,960
    BeamNG and other win32 applications cannot manage cores.

    Applications for win32 can spawn threads (as BeamNG does per vehicle already). Windows actually allocates where these threads run. Windows can support dual CPU systems. It is upto windows to determine that it would be most efficient to put a thread on either CPU or whether it might even be a better idea to have multiple threads share a core (which can happen, you simply run 1 thread for a short time slot, then have some minor overhead before running the next thread for a slot, its how a single core machine can still get away with having multiple windows open...)
     
    • Like Like x 1
  20. Cira

    Cira
    Expand Collapse

    Joined:
    Aug 8, 2013
    Messages:
    282
    @Slayersen Short answer "yes".

    Long answer BeamNG doesn't care for the mainboard being dual or quad socket. It cares about cores that the OS provides. If you have 1 CPU with 12 cores it will work just fine as a 2x CPU with 6 cores each.
     
  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