As of now, spawning even ten cars into the game causes tons of lag, but I have an idea that could allow this number to be greatly increased along with adding a traffic mode (where lots of cars drive around the map.) The AI cars spawn in and drive around, but with super simplified physics, so they barely require any computing power. It's as if they were a map editor object, but they can "drive" around the map. As soon as the player's car hits them (or goes within a certain radius), they become "real" cars that have their Jbeam structures, they can be crashed into properly. The player also won't be able to press tab to switch into these "vehicles" either. I hope the devs see this thread because if it works, It could allow for huge pile-ups and races without lag. The traffic mode could also go well with the upcoming new AI system. https://beamng.com/threads/ai-work.54961/
The problem is that if you wanna load a car just when you hit it, the game is gonna freeze like when you change a part or spawn a new car.
You know how pausing physics (J) stops all lag? The concept would be the same here. The actual car is loaded in already, but it's physics are disabled. Where?
Yeah. I would like cars driving around. The AI cars could have black windows, no interior, no suspension, no engine model, and no crash physics until you actually hit it.
Ive brought it up before, cant remember if it was here or in General subforum. I wasnt first either. Id like it alot too, should be possible with less detailed jbeams where suspension could be a simpler version or a generic one for all ai traffic. Much like 'russian mods' are today only that it would be a really simple one.
No such thing as 'crash physics' exist. What you see when you crash a car is the result of simulating vehicles to a certain level of details. There is no 'crash physics' switch anywhere. Anyhow, you cannot swap a vehicle JBeam on the fly, as if it was a 'LOD' for a static object. The Jbeam dictates how a vehicle moves and drives. It's the same as changing vehicle completely, still requires a loading in-between.
You could make it where the other cars have GTA V levels of Crash Detail, like minor dents and scuffs, but your car gets beaten up like a regular one Also, these AI drivers could detect the crash and honk their horn or pull over or something...It might be like a small stepping stone until vehicles would be able to be simulated by the GPU, like something of a fun, dumb way to test the limits of AI stupidity xD
It does not quite work that way, all physics are same level or does not exists at all, that is sadly how it works. Of course you could reduce number of beams, to make car with less say under 50 beams, it would still use very same crash physics, but it would be easier to compute. However it would be less realistic, so it might be that devs are not making such. Very simple jbeam, with tires that has less rays, maybe even body as single object and no detaching parts, that would give you more vehicles on road, but how much you would be willing to sacrifice for making kind of traffic to happen? I guess simplest form of a car would be something like this: Problem with that would be that you get launched off to air if you hit that. So instead of 10 beams, we need bit more to add shape to front and this is 19 beams: It might be that rear needs shape too, which increases number of beams, then engine needs some beams as well as tires and suspension, so while body itself would be possible to be made under 50 beams, there is more beams added to it. So if you manage to get amount of beams to something like 30-40% of original vehicle, you could run up to 3 times more vehicles than now, would that be enough for a traffic?
Box jbeam will actually have more beams, triangular shape uses least amount of beams. For 3D model, you can put pretty much any model, as that is not very hard to render, but of course less polys will always help. Vanilla cars with simplified beams and no interiors would run just fine, well as well fine as it is possible. Engine could be made without beams too I guess, so maybe 30 cars would be possible with desktop i7?
That is sorta what I meant, cars with simplified J-Beam structures... Also, that should be enough performance boost to add a few passive traffic vehicles to make the map less lonely They could also de-spawn after a while if the player leaves a specific area, although that might not be possible...Either way, that's a feature I wanna see in the future for BeamNG...
OH! I got an Idea! The AUTOMATION UPDATE HAS THE SOLUTION PEOPLE! I noticed i can spawn 15 or more ported automation cars at a time! And their crash physics and looks would suffice! Make them look like the standard Beam vehicles and BOOM! Traffic with realistic crash physics (altho add a warning for people running BeamNG drive on potato computers that it may cause slight frame drops, I have an i5 6600 and gtx 980 ti and I cannot test it on lower power hardware) THUMBS UP IF YOU AGREE! --- Post updated --- Sorry for the cringe, but for real, this is exciting news!
I doubt that would work too well, I have Automation exported car that I can't use more than 1 at the time, with 720p resolution. Automation cars are graphically quite heavy.
Automation physics and graphics are super basic, however i dont think this is a good solution. Their quality is very much subpar and i dont think that i want to see many cars with this quality roaming the map.
Plus, they lag more than a official vehicle. VeyronEB and NinetyNine! pointed that out before, and I happen to agree with both of them after downloading a few of them.
in my experience they dont. However it could be because i have only my own exported ones and never downloaded other people's.