• Welcome to MX Bikes Official Forum. Please login or sign up.
 

A continuation of the "physics issues" talk. (Long effort post.)

Started by TunaIRL, December 04, 2023, 05:40:59 PM

Previous topic - Next topic

TunaIRL

Hi everyone!

Just like Some_Doofus last year, I've had thoughts about the key "physics" issues in the game. I am relatively new to the overall community but I'm passionate about the game being the best it can be. With me, this started with exploring the "slow physics" issues of the game after seeing many people ask and question why something was happening in the game. The forums of MXB and GPB seemed to be great places to read about things, since there were a lot of in-depth conversations about the physics of the game and real-life riding. I really recommend anyone interested to scour through some posts if you haven't done so. This post is maybe for people who haven't done or don't care to do that. A place for me to log my findings in the hopes someone else will find it interesting or useful. These issues are pretty complicated overall, which is why the post is long to go through each point as clearly as I can.

Doofus mentioned a few things in his post like the leg simulation. I completely agree with his assessment of them. They cause weird things to happen every now and then when the rider tries to keep the bike up at a standstill and you just end up sliding sideways. This is something I will not touch on further, because the issue seems quite straight forward. Either you have them, and weird things happen, tune them so it happens less, or remove them so you fall over more.

What I wanted to touch on and go in-depth is the virtual rider. I made a half an hour video version of this post which you can go watch, I will probably refer to it at times. (It's a bit repetitive, sorry, I am an inexperienced commentator, but I wanted to make sure the points are clear.) Here's the video:

The video and this post have some different information, so it doesn't hurt to check both.

Starting off,
we need to consider how a bike turns to understand what the virtual rider is doing. How you lean the bike to get into a turn and how you get out of it. I explain it in the video which is timestamped to key parts.

We all know to start a lean, you need to first steer in the opposite direction of the turn. This makes the bike lean. We must then stop steering, which straightens the bars, and we start to turn the bike. To then stop turning, we need to stand the bike up. For that, we turn the bars in, which causes the front wheel to essentially go under the bike, and the forces push the bike to stand up again. Simple so far... in real life that is.

The problems
arise as we assign these actions to a controller. The way MX Bikes (and MX Sim, I'll touch on this further later) handles this is by giving you the ability to direct the desired lean angle. You can do this in a few ways. You can either have the stick match 1:1 to the desired lean angle, E.g., direct lean at 100% or lean help 0. This essentially means when the stick pushed halfway, the bike is asked to lean to a 45-degree angle. Another way to do this is by having the stick increase or decrease the amount of lean angle incrementally depending on which way you push it. E.g., if you were to stab the stick one way, it would tell the game to go to a lean angle of 20-degrees. It keeps the 20-degrees, until you stab it the other way. When the stick is not pushed in any direction, you're not giving the game any more inputs. This is how a direct lean of 0 acts like. This is also how sim does it normally.

Now what does this mean? Why does the bike wobble back and forth for apparently no reason in MXB? This is where I must refer to the video a bit since it's complicated to explain in only words. You can watch forward from the part "The Wobbling" (For some reason chapters aren't working for the video but timestamps are in the description).

Essentially, when you want the bike to come up from a lean, you must turn the wheel in. If you do this fast, your front end will jump after the bike is standing up. The OEM bikes seem to show this the best. This momentum will carry you on while the front wheel is in the air, and you will start to lean the other way. Now, while you're not touching the stick, what you're telling the game is that you want to be upright. Since you're being thrown around, the bike must now turn the bars the other way to correct the mistake you did before. You're now in this loop of a back and forth simply because you're not touching the stick until the bike is either settled upright or you fall over.

It's happening because of what you're inputting to the game. At a direct lean of 100, you're giving a constant input to the game for what you want to be doing. At direct lean 0, this isn't the case.

What about the front tucking?
Sometimes the front wheel will suddenly lock, and nothing can be done. This is caused when you lean too much, while going too slow. (There might be some nuance since there are scenarios where you're simply putting too much force on the front wheel, and it will turn since the rider's arms can't keep it straight. (although in 99% of cases it's more likely to be in reaction to a mistake you already had made.)) You can try doing a sort of donut at a standstill. You will see the front wheel locks. This ISN'T because you're asking it to turn tightly. This happens because the lean angle you're asking for isn't possible without turnging the wheel all the way till lock. The bike tries to keep you up but it's impossible, because there isn't enough speed to lean so far over so fast. This then gets combined with the leg simulation to cause annoying weirdness.

MX Sim comparison
I mentioned MX Sim having a similar control scheme, why doesn't it have the problems? The difference is simply the external forces that act on the rider and keep the bike up. MX Sim has plenty of dampening options for steering and rolling of the bike. I believe "leveling" in MX Sim, is essentially what direct lean is in MXB. You can tune these settings to make the bike act in the same way MXB does. Here's a video to demonstrate:


You can see the virtual rider of MX Sim "overcorrecting" just like MXB. The dampeners that make this go away completely, are as far as I know, fake. (But are valid ways to fix it.)

From what I've read, PiBoSo isn't a fan of such forces and wouldn't like to help the rider with them.

Then what can be done?
Either we accept the fact that a stick is a too sensitive way of controlling a bike, or we control the bike smoother.

I thought of 2 ways so far:

  • At slow speeds, we could have the controls be at a direct lean of 0 since you don't need to lean over much at all when going slow. You could then change the inputs after going a certain speed. (You could possibly set a maximum and minimum direct lean, and it then slide between the 2 when speed changes? (Yeah, another slider. This is basically how the direct lean percentage came to be in the first place haha)) So, at a high speed, you can control the bike in an agile way while keeping precise control at low speeds without wobbles. This will still cause the bike to wobble if you land sideways and are making a mistake in the input. But at least the bike will be nicer to ride slowly.

  • We could also try a separate button that, when pushed, changes the lean settings. If someone wants to ride with a low direct lean most of the time, in turns and such, but wants to have more direct control when scrubbing and whipping. That could be mapped to pushing the left stick in to simulate you pushing on the bars harder.

These are obviously just ideas that I have no way of testing if they would work effectively, but they serve as examples of ideas we should rather be exploring instead of saying the games code is broken. We should be exploring the control methods for the bike. Not the physics. (Of course, traction and suspension physics are an endless fight to make the best they can but they're a separate issue.) You can also start to see why Sim has so many options for stabilizing the bike. Everyone has different preferences to how they think a bike should handle on a controller.

Additional interesting notes:

  • As mentioned, the OEM bikes demonstrate this issue the best from what I've seen. The factory bikes along with PiBoSo's own bikes, seem to behave in a more controlled manner even when trying to change lean too fast. This is probably why some people feel the OEMs are hard to control nowadays. The huge differences direct lean settings make are also what cause others to experience more problems than others. Surprisingly the way leaning feels is similar with factory bikes and PiBoSo's own. I never considered this since I just never rode PiBoSo's own bike while examining the behaviour. I wonder what makes the difference in the OEMs? (Are there input filters you can add into the bike files, or is the difference purely the changes in geometry and bike physics?) Here's a video comparing the same stick input and settings with different bikes. (100 direct lean, 140 linearity, smoothing off and gain set so it leans over as much as possible)


  • You can also try turning the virtual rider off if you believe it is a hinderance. By adding these settings to your profile.ini, you can try to see what it would be like to control a bikes handlebar on a controller:

    [hardcore]
    directsteer=2
    directsteer_maxangle=50

    I also explored this a bit in the video.

    (Hint: it's not very pleasant. You can understand why a virtual rider is a good solution.)

  • We recently saw that even LFS has bikes. It too can suffer from the exact same control issues, as we can see from this video from @SimRacingBible: https://www.youtube.com/shorts/jbplBjPMGXQ Curious how 3 games with 3 different engines and physics can produce the same results. (LFS' bikes also use the same way of controlling lean as far as I'm aware https://www.lfs.net/forum/post/1908069#post1908069.)


Clarifications:

  • I'm NOT bashing any of the bikes in the game. I like riding all, OEM, Factory and even PiBoSo's own bikes. (Honestly they're pretty fun if you change the sound and looks, it affects a lot.)

  • I know the post sounds direct and that I'm asserting 100% facts, but this is just an easier way to express ideas than adding: "I could be wrong" and "I'm not sure" to everything. I'm very open to other interpretations and opinions, I just wanted to have this talk. Again, these exact issues may have been talked extensively either publicly or internally, but all I've seen are very buried forum posts. HornetMaX comes to mind for example. Maybe everything here is obvious, and I have just misunderstood something. At least I felt like I learned a lot doing this.

Thanks for reading

Sincerely,
Valtter / Tuna

mxalex229

I think this is a good breakdown of the current underlying issue. That explains why the bikes feel so unstable. It seems like the bikes feel incredibly light, but with a very high center of gravity; as if it were centered more like 5 feet above the riders head. So the reaction of weighting the front tire has an exaggerated effect and completely removes weight from the back tire.
This is demonstrated super easily in the game just weighting the front wheel and holding the gas. The bike won't naturally do a donut, it endos without even having forward momentum.
This further helps understand why when riding, the bike always feel like they have a light/weightless feeling, but then landing/braking/acceleration feels sluggish. I like to think of the games physics like a 45kg bowling ball suspended in air 5ft above the rider as the center of the controls. It sounds insane, but thinking of it that way makes the physics make more sense naturally and the bike reacts more how you would expect it to.

Or I'm completely off my rocker and this game has driven me insane.

Regardless, the physics, especially at lower speeds, feel nothing like the way you would naturally feel and react to the physics in real life.