Jump to content

wheel drag/friction on different terrain?


Recommended Posts

After coasting back to the KSP runway at +50m/s along the rolling grasslands hills to the west, I'm wondering if anything can be done to allow different wheel types to perform differently depending on the terrain.

Aircraft wheels? *great* on runway and roads but should crappy on unimproved grass, sand, etc.

Likely something mods could handle?

Link to comment
Share on other sites

As far as I know, the actual look of the terrain doesn't have any correlation to a value in game, its just the texture that is overlaid on the planet mesh, so it wouldn't be able to be done like"wheel is on grass, increased traction".

I like the idea very much, and I think the way to do it would be different values for each biome. For example, shores are sandy, so the shore biome would have high friction and low traction, grasslands would be a good middle ground, and the runway would be good traction and an average amount of friction.

Link to comment
Share on other sites

Unity wheels don't support this, at least for Unity 4.x (not sure about Unity 5, although I have seen developers complaining about wheels again in 5.x, so quite probably the same again). They explicitly ignore PhysX material types, using a different friction simulation to everything else in Unity / PhysX. That means that any variation in friction has to be completely new functionality created and maintained by the developer. It is not a quick or simple fix, as you have to create completely new ultra-fast, highly complex code which runs every physics frame (many times per second), to evaluate the current required behaviour due to surface type, relative slope, dynamic loading, etc.

Not worth the development resource to implement it, and maintain new complex physics code from now to the end of time, since this is not Kerbal Driving Program, GTA Kerbin, or GTA Mun. The wheels we have, using the Unity supplied, maintained, and optimised wheel physics are not brilliant, but more than adequate for KSP.

Real world wheels are simple to the layman (but have their own real world complexity in demanding applications). Simulated virtual wheels are incredibly complex and difficult to get right, and much more so if you are trying to simulate them in something other than the most mundane and simple circumstances.

Link to comment
Share on other sites

So I take it that in Unity, based on how I've seen wheels behave in KSP, traction is only determined by the normal force on each wheel?

Unity wheels have 2 static friction curves, one for forwards & backwards, the other for sideways. The curves themselves have very little parameterisation, basically only max friction before slip, then the reduced friction after slip. Torque from power or braking is applied to the forwards/backwards model, any non-aligned velocity component is applied to the sideways model combined with any sideways component of gravity (e.g. going across a slope).

So yeah, there's a static max friction value, torque gets delivered up to that point (translated into linear force), and it slips beyond that.

Link to comment
Share on other sites

Thanks for the responses.

It unfortunately sounds like for this particular aspect, KSP will remain wildly un-simulatory. Although I do balk at the notion that this isn't Kerbal Driving Program; We build rovers to explore these other worlds, yes? Varied surfaces and wheel-needs would be fascinating to figure out.

Edited by Beetlecat
Link to comment
Share on other sites

Unity wheels don't support this, at least for Unity 4.x (not sure about Unity 5, although I have seen developers complaining about wheels again in 5.x, so quite probably the same again). They explicitly ignore PhysX material types, using a different friction simulation to everything else in Unity / PhysX. That means that any variation in friction has to be completely new functionality created and maintained by the developer. It is not a quick or simple fix, as you have to create completely new ultra-fast, highly complex code which runs every physics frame (many times per second), to evaluate the current required behaviour due to surface type, relative slope, dynamic loading, etc.

Not worth the development resource to implement it, and maintain new complex physics code from now to the end of time, since this is not Kerbal Driving Program, GTA Kerbin, or GTA Mun. The wheels we have, using the Unity supplied, maintained, and optimised wheel physics are not brilliant, but more than adequate for KSP.

Real world wheels are simple to the layman (but have their own real world complexity in demanding applications). Simulated virtual wheels are incredibly complex and difficult to get right, and much more so if you are trying to simulate them in something other than the most mundane and simple circumstances.

In Kerbal style could they fake it till they (or unity) makes it?

Instead of true fraction use say the drag model physics with a boundary layer of super thick dense air at the ground.

The stickyness/density of the air and the height could change with different zones to make for different landing styles.

So say sand has a very sticky air film but only .2m above the surface.

Tall grass Grasslands 1m high film medium stickiness.

Compacted dirt runway low stickiness compared to the proper runway.

Ice might have no effect but snow would be like sand.

In my mixed up mind that could then work for wheeled plus belly and skid landings.

I mean if it works at all.

Link to comment
Share on other sites

Thanks for the responses.

It unfortunately sounds like for this particular aspect, KSP will remain wildly un-simulatory. Although I do balk at the notion that this isn't Kerbal Driving Program; We build rovers to explore these other worlds, yes? Varied surfaces and wheel-needs would be fascinating to figure out.

As stated (paraphrasing) by SQUAD:

Kerbal Space Program is a game first, simulation second.

Keep that in mind ;)

Link to comment
Share on other sites

Yea, it'd be great.

Mostly for adding a difference between ice, snow, rock and sand surface of the planets. Landing on a different grounds could start to matter in other way than just slope.

Sadly I think that it's yet another of these things where shortcomings of Unity Engine will make it very difficult to implement.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...