Realistic Vehicle Physics - Made with Unity

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 06 Jan 2015, 10:32

Hello folks

I'm a new member here on the forum, and i just wanted to share a little from my project, i've been working on the project for about 3 month now with my partner "Arraial". Im doing all the programming and the setup within Unity, while Arraial does all the 3d modeling and texture work.

So far my focus has been around the physics, i'm not using any parts of Unity's built in Vehicle SDK/WheelCollider, it felt way too "arcadish" for what i had planned, instead i started marking my own system for everything motor, suspension, wheels collision, wheels friction etc etc. In the videos you can see my progress so far, we can make very realistic simulations of all types of vehicles, cranes, machines and much more.

Keep in mind this is a work in progress it does not represent the final result, many things will be changed/improved and added, the graphic effects and environment is pretty much untouched yet.

- Anders Ørum










Last edited by AndersOrum on 14 Feb 2020, 20:09, edited 1 time in total.

User avatar
jonaz.dk
Site Admin
Posts: 4158
Joined: 04 Mar 2008, 22:24
Location: DK
Contact:

Re: Realistic Vehicle Physics - Made with Unity

Unread post by jonaz.dk » 06 Jan 2015, 12:38

wow! impressive setup.

Is the wires in the crane also entirely simulated? I could image it would be a headache to do wires properly.

Regardless excellent work!

Are you planning on taking on Cape with their Dig It! simulator? ;)
http://cape.net/games/dig-it/

User avatar
Code
Level 39 - Hitman
Posts: 394
Joined: 13 Feb 2013, 14:56
Location: Aalborg
Contact:

Re: Realistic Vehicle Physics - Made with Unity

Unread post by Code » 06 Jan 2015, 23:44

wow nice job, this look really good!
Spiludvikling og undervisning i Unity3D
http://www.code.dk

Danmarksmesterskabet i spiludvikling.
http://www.dmspil.dk

User avatar
Pegepinden
Level 16 - Hellghast
Posts: 164
Joined: 17 Jul 2013, 22:51

Re: Realistic Vehicle Physics - Made with Unity

Unread post by Pegepinden » 07 Jan 2015, 01:32

Looks really awesome!
I code stuff, it is true!

Jesper Kondrup
Level 27 - Drooling zombie
Posts: 274
Joined: 09 Nov 2009, 13:37
Location: Cph
Contact:

Re: Realistic Vehicle Physics - Made with Unity

Unread post by Jesper Kondrup » 07 Jan 2015, 08:42

Impressive work :like:

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 08 Jan 2015, 00:09

Thank you guys, i'm glad you like it;)

jonaz.dk wrote:
Is the wires in the crane also entirely simulated? I could image it would be a headache to do wires properly.

Are you planning on taking on Cape with their Dig It! simulator? ;)
http://cape.net/games/dig-it/
Currently the wires aren't simulated properly, we do however have plans to make that aswell or atleast to make some test with it, in the end it depends on how much performance it will require to simulate, because the trucks/cranes will already take a big bite of your CPU.

Hehe yes it's no secret that we get a little inspiration from Cape's Dig It! However our plans with this project is more some kind of combination between "Eurotruck Simulator" and "Spintires". Both me and my partner are former modders of "Spintires" this game is really what inspired me to get started on my own, and i believe my vehicle physics system is getting very close to what you see in "Spintires".

User avatar
vonknut
Level 78 - Basher of noobs
Posts: 823
Joined: 14 Mar 2008, 16:34
Location: CPH

Re: Realistic Vehicle Physics - Made with Unity

Unread post by vonknut » 30 Jan 2015, 15:28

how is the performance?
-can it run on mobile?

And do you plan to put it on asset store?
-if you do, we want to pre-order :)
Hans von Knut Skovfoged - Creative Dir.
PortaPlay - Interactive Entertainment and Learning

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 22 Mar 2015, 20:03

Hello again

So i'm back again working hard on my project after a little break.

I want to show you guys a little update on the project, hope you enjoy.

-Anders Ørum



Last edited by AndersOrum on 14 Feb 2020, 20:18, edited 3 times in total.

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 22 Mar 2015, 20:10

vonknut wrote:how is the performance?
-can it run on mobile?

And do you plan to put it on asset store?
-if you do, we want to pre-order :)

Hi Vonknut

Sorry i haven't replied to your question before now.

-Performance? Well compared to the other Vehicle Physics solution out there( like Edy's, UnityCar Pro) etc. then it's pretty heavy i'm pretty sure this wont work on mobile, although i haven't tried my self. But i'm still working on optimizing everything i can.

-I still haven't decided if i'm going to sell it or not.

User avatar
vonknut
Level 78 - Basher of noobs
Posts: 823
Joined: 14 Mar 2008, 16:34
Location: CPH

Re: Realistic Vehicle Physics - Made with Unity

Unread post by vonknut » 23 Mar 2015, 12:55

Thanks for the reply.
Hans von Knut Skovfoged - Creative Dir.
PortaPlay - Interactive Entertainment and Learning

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 06 Oct 2015, 18:16

Hi guys,

So it's been a long time since i last posted any updates, but that does NOT mean development have stopped meanwhile, so here is a few of my lastest videos of my progress with the project.

I have 2 new main features i've been working on the last couple of months.

1: Physics Based Tire Deformation, i've completely redesigned my old WheelCollider and come up with a much better system that allows for simulation of tire pressure, deformation and much more this is not just a visual effect the wheelcollider is deforming aswell, it's still in early stage with room for much improvement especially the visual deformation needs some smoothing as you can see in the video below.

2: Physics Based Terrain Deformation, I've worked a little on a terrain deformation system, i want to be able to simulate different types of surfaces & soils, currently it's only in prototyping phase there is a ton of things a need to figure out before this will make it to the game, but i'm optimistic about it.




Best regards
-Anders Ørum
Last edited by AndersOrum on 14 Feb 2020, 20:19, edited 2 times in total.

User avatar
vonknut
Level 78 - Basher of noobs
Posts: 823
Joined: 14 Mar 2008, 16:34
Location: CPH

Re: Realistic Vehicle Physics - Made with Unity

Unread post by vonknut » 09 Oct 2015, 11:22

Please put on asset store - asap, so I can throw money after it :)
Hans von Knut Skovfoged - Creative Dir.
PortaPlay - Interactive Entertainment and Learning

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 11 Oct 2015, 19:25

vonknut wrote:Please put on asset store - asap, so I can throw money after it :)
Sorry it wont be on the Asset store anytime soon, after i've finished my game i will consider whether or not i will put it up for sale ;)
Last edited by AndersOrum on 13 Oct 2015, 00:34, edited 1 time in total.

Jesper Kondrup
Level 27 - Drooling zombie
Posts: 274
Joined: 09 Nov 2009, 13:37
Location: Cph
Contact:

Re: Realistic Vehicle Physics - Made with Unity

Unread post by Jesper Kondrup » 12 Oct 2015, 07:35

:like:

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 13 Oct 2015, 00:39

Hi, another update on the tire physics, i've improved handling and stability of the tire which gives vehicles much better handling at higher speeds, and also improved the visual deformation.

Last edited by AndersOrum on 14 Feb 2020, 20:37, edited 2 times in total.

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 18 Dec 2015, 23:06

Hi again,

New update on tire physics again, and yet again i've started work on a new wheelcollider, that means scrapping the old model from the last 2 videos, bye bye 3 months of work :p Anyway i'm happy to scrap the old model for what i'm working on now, i'm currently working on implementing Truss Softbody Physics Engine(similar to RoR & BeamNG's physics engine) in my system so far i've only worked on the tires, but i will soon start working on softbody based suspension and chassis.

The change to softbody based tires has made major improvements to the vehicles handling specially at high speeds or when crawling on rocks and other stuff.

Toyota FJ40 & Mtvr MK25:

Last edited by AndersOrum on 14 Feb 2020, 20:56, edited 2 times in total.

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 18 Apr 2016, 21:06

Hi finally time for an update again,

Lately i've been working on improving Powertrain/Drivetrain simulation, all Powertrain/Drivetrain (Engine, Gearbox, TransferCase, Differentials etc.) code is completely reworked since last videos and is now based on real ratios & values, but it's still work a in progress(at 2.05 & 5.00 differentials are locked which is the reason for the suddon power/traction).

Last edited by AndersOrum on 14 Feb 2020, 20:56, edited 2 times in total.

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 20 Jul 2016, 02:38

Good news! I've finally started working on fully softbody based vehicles, similar to RoR/BeamNG, here's an early test of it.

Last edited by AndersOrum on 14 Feb 2020, 20:57, edited 2 times in total.

User avatar
jonaz.dk
Site Admin
Posts: 4158
Joined: 04 Mar 2008, 22:24
Location: DK
Contact:

Re: Realistic Vehicle Physics - Made with Unity

Unread post by jonaz.dk » 26 Jul 2016, 12:53

Nice! excellent work as usual!
Love the wobbliness of the wooden part of the lorry.

This might be out of scope. But will material fractures be part of the plan at any point in the foreseeable future?

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 28 Jul 2016, 18:50

jonaz.dk wrote:Nice! excellent work as usual!
Love the wobbliness of the wooden part of the lorry.

This might be out of scope. But will material fractures be part of the plan at any point in the foreseeable future?
Thank you ;)

Unfortunately no, fracturing is not supported and i don't think it will be anytime soon either. But i can make parts breakable, like cabin,hood,doors,fueltank etc under heavy forces they can be ripped of the chassis.

Here's a small update on some of the stuff i've been working on this week, i'm working on a debugger system for my softbody based vehicles, this system allows me to check chassis and parts for stress.

Visibility increases as stress raises
Red link = Compression
Blue link = Stretching
Dark Blue/Black = Deformed

Last edited by AndersOrum on 14 Feb 2020, 21:13, edited 3 times in total.

User avatar
ZeroHero
Level 36 - Tron
Posts: 362
Joined: 21 Jul 2009, 19:03
Location: England
Contact:

Re: Realistic Vehicle Physics - Made with Unity

Unread post by ZeroHero » 29 Jul 2016, 09:42

Amazing!!!!
It looks just incredible!
Is there any way I can try it out for myself by any chance?
Well done to you.

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 11 Aug 2016, 17:43

ZeroHero wrote:Amazing!!!!
It looks just incredible!
Is there any way I can try it out for myself by any chance?
Well done to you.
Thank you :) and sorry for the late reply, unfortunately no i don't have a demo ready yet, i hope to have it ready within a month or so, but i'll post more info here as soon i got any ;)

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 11 Aug 2016, 17:55

After almost 2 years of lonely driving i finally made some buddies/enemies to play with, i've started working on some AI controllers for my vehicles, currently it features 4 different modes:

1. Chase: They will try their best to wreck you
2. Follow: Useful for convoy driving
3. Checkpoint: They will follow a predefined route(route can be changed during runtime)
4. Flee : They will try to get away from you(not shown in video)

Last edited by AndersOrum on 14 Feb 2020, 21:18, edited 1 time in total.

AndersOrum
Level 2 - Grain of sand
Posts: 26
Joined: 05 Jan 2015, 03:52
Location: Denmark, Aalborg

Re: Realistic Vehicle Physics - Made with Unity

Unread post by AndersOrum » 15 Jan 2017, 05:05

Finally time for an update on my terrain physics system, this video is a early test of the new updated system, many improvements have been made since my last video on the terrain system:
- It now works with 2 physics engines PhysX and Truss, and can run both simultaneously or just engine alone.
- Added terrain mesh generation based on terrain heightmap.
- Added runtime terrain mesh deformation based on heightmap, this is used if the terrain only is deformed in Truss physics, in that case the Terrain Component isn't needed, and a mesh will be used render the terrain instead.(this currently used in the video)
- Added terrain tiling support.
- Massive performance upgrade.
- Because of tiling support and the performance upgrade, the detail of the terrains collision mesh is now 6-7 times higher, and could be increased even further without much effect on performance.
- Improved the terrain physics model(still based on a simple model, but will be improved a lot later).
- And many many other changes.

Last edited by AndersOrum on 14 Feb 2020, 21:19, edited 1 time in total.

User avatar
vonknut
Level 78 - Basher of noobs
Posts: 823
Joined: 14 Mar 2008, 16:34
Location: CPH

Re: Realistic Vehicle Physics - Made with Unity

Unread post by vonknut » 15 Jan 2017, 19:47

Sexy stuff!

Have you tested it on mobile at all?
-or do you know for a fact, that its a no-go.

And whats the eta on the assets store version?
-so people can throw money your way :)

Post Reply