4 ms·
not 100% related but is there any good information source on the web to learn how to build a good car simulator ? I've looked around and it's not very helpful.
by wiz21c 7y ago
not 100% related but is there any good information source on the web to learn how to build a good car simulator ? I've looked around and it's not very helpful. Usually I end up with physics courses which always repeating the same things. But not much about about : pneumatic (especially how they influence the overall speed), independent wheel modelling, suspension, mass shift, frame deformation, ...
I've checked the source code of torcs but it seems quite simple (although the results are very convincing).
My goal was to model a (indoor) kart.
- acomjean 7y agoCars are pretty complex. Sony spends years modeling various ones in its “grand turisimo” game. But simpler games model cars pretty well, I’m assuming with a dozen or so parameters (turning radius, acceleration, tire grip, suspension..) you should get something. The “pako ios car simulation” (not open source), has a bunch of cars you drive around that behave more or less like actual cars.
- vsskanth 7y agoI work as a vehicle simulation engineer for a Motorsports team. What you're looking for is broadly classified as Multibody Dynamics. You can model each part individually and connect them to make a complete simulation. There are two parts to building these types of models: 1. IDE and Language - Modelica, ADAMS, Project Chrono, SimScape etc. There are open source and commercial solutions for this. 2. Libraries - Claytex, Modelon etc. most detailed vehicle models and components are sold separately. These are typically written in Modelica. Some IDEs like MapleSim or Mathworks bundle it in their IDE. You can build your own components from scratch but it takes time. The closest to open source I found is: https://sbel.wisc.edu/2018/07/23/chronovehicle-template-based-grund-vehicle-modeling-and-simulation/ https://sbel.wisc.edu/2018/07/23/chronovehicle-template-base... https://github.com/projectchrono/chrono https://github.com/projectchrono/chrono If you want to learn how to do it properly, you can easily find online versions of this book: https://www.elsevier.com/books/the-multibody-systems-approach-to-vehicle-dynamics/blundell/978-0-08-099425-3 https://www.elsevier.com/books/the-multibody-systems-approac...
- hesdeadjim 7y agoIt may be lighter fare, but some of the game engine packages available for purchase are pretty advanced. Check out Edy’s vehicle physics for example. https://assetstore.unity.com/packages/tools/physics/edy-s-vehicle-physics-403 https://assetstore.unity.com/packages/tools/physics/edy-s-ve...
- dahart 7y agoI was vehicle physics lead for a couple of games that sold very well, but are not considered racing sims. Happy to answer questions as best I can. What is missing from Torcs? It looks like a pretty good place to start, it has independent wheel modeling, and suspension, and mass shift of the car (I suspect it can handle mass shift of the driver if that’s what you’re after). You can probably model frame deformation yourself by building a frame in a physics engine out of flexible parts and/or joints, but I’m skeptical that it’s worth the effort when modeling indoor karts, I’m not sure they flex enough to matter, but it depends on exactly what you’re trying to do. The car physics my team built was made on top of the Bullet physics engine, so Bullet handled integration and collision dynamics, and we added transmission, braking, suspension, wheels, etc. It’s definitely worth asking yourself how good you need the simulator to be, and how serious you are about this. It’s a multi-year project to get something “good” and/or better than Torcs. I would tend to agree with their answer to the FAQ question “should I start my own racing sim project?” http://torcs.sourceforge.net/index.php?name=Sections&op=viewarticle&artid=30#c1_10 http://torcs.sourceforge.net/index.php?name=Sections&op=view...
- gmueckl 7y agoThe FAQ answer is the kind if condescending tone that I don't like and some developers of long running OSS projects use after a while. I know that these projects are hard and take lots of effort. I've experienced it myself. Warning people that X is more complicated than it may first seem is perfectly OK. But telling them to just stop is wrong. There are valuable lessons to be learned by starting from scratch. Commanding them to help out others instead denies them this experience. Sometimes the journey itself is the goal.
- dahart 7y agoSpeaking personally, it would be safe to say my career successes are defined by ignoring warnings like this and doing something from scratch anyway. So I completely agree, and I guess this FAQ answer is really meant to talk to the casual developer who doesn't know what they're getting into. The person who does know and does it anyway will (and should) ignore stuff this like. I don't think it was meant to be condescending, I took it more as a joking tone but with a real warning that it's a long road, which is true.
- LoSboccacc 7y agodepending on how much you want to cheat, since indoor kart don't jump (aren't supposed to, at least, been at a bad track that ruined my back once) can use a very simplified 2d model using acceleration to estimate weight transfer to render suspension/tires getting loaded. this is a good starting model https://github.com/spacejack/carphysics2d https://github.com/spacejack/carphysics2d I wrote an extension for it that handles loss of traction, power drifting and mapped terrain friction that I can share, it's all mit licensed after all, but it's in Java, it's simple enough to port it whatever language you want because it's just math primitives
- wiz21c 7y agoHello :-) My kid has been driving indoor karts for 4 years now and he's around 0.5 sec behind top drivers (which is very good and not good at all, depending what you're looking after). I've observed him on hundreds of races and karts do jump :-) They jump when coming too fast in a corner and turning strongly. In that situation, the wheels slides a bit and then regain grip instantly. When that happens the kart starts bumping around the front wheel which stands outside the corner. This costs a few 0.1 of seconds (that's huge in races). This happens to experienced pilots as well but they usually manage to find the limit in the curve and better breaking points to avoid it. Simulating this is what interests me because it seems absolutely non obvious. As said by someone else, maybe I'm looking at a problem that his out of my reach (my physics skills are rather weak). That is, I have no idea of how that happens.
- ficklepickle 7y agoI found this article that goes in depth into kart cornering[0]. It talks about chassis flex and briefly mentions wheel hop. I'm not a physics person either, but wheel hop seems to occur when the force overcomes friction between tire/track, causing an oscillation between grip/no grip. It is a lot worse on vehicles with suspension, because they have more give. I find it easier to visualize with a car, because it is more pronounced. Although with a car it is usually occurs on a standing start, whereas with karts it is a lateral force thing. This karting forum suggests high center of gravity contributes to wheel hop.[1] [0] https://www.paradigmshiftracing.com/racing-basics/how-karts-work-part-1-a-three-wheeled-vehicle#/ https://www.paradigmshiftracing.com/racing-basics/how-karts-... [1] https://4cycle.com/karting/threads/wheel-hop.87876/ https://4cycle.com/karting/threads/wheel-hop.87876/