New Physics Stepping Method: Adaptive Timestepping

Hello everyone,

We will be launching a new option on the Workspace - PhysicsSteppingMethod

You will now be able to choose between physics stepping methods: Default, Fixed, and now Adaptive!

What’s the difference between these methods?

For now, default and fixed are identical options, and they will give you identical physics behaviour compared to what we have before. The new option (Adaptive) will automatically throttle the Stepping Frequency of the simulated physics on your game.

What do you mean by “Stepping Frequency?”

Every non-anchored assemblies in our engine are physically simulated. Even a single part that is seemingly doing nothing (think about a Part just sitting there on top of a baseplate) is physically simulated.

Our LDL-PGS solver solves the equation of motions on all simulatable assemblies 240 times per second with super-precise accuracy, either on the client or the server. This is great for hard-to-simulate situations such as fast moving objects, parts undergoing multiple contacts, stiff constraints, and so on!

Generally speaking, the more frequently you solve the equation of motions on the bodies, the more accurate and stable they become - but you may pay in terms of performance since you will be using more frame time to do the physics.

In some cases, solving the equation of motion on this part 240 times per second might be overkill; if the movement of the simulated parts are mild, or if we only care about just some Humanoid running around, it is possible that we can get away with solving the system only 60 times per second. This reduces the simulation time, freeing up CPU time for other operations.

  • The engine will take lower frequency rates whenever it considers it to be “safe”.
  • If high-freq. Bodies and low-freq bodies interact, the stepping rate will follow the higher rate of those two bodies.
  • We will support 60hz, 120hz and 240hz stepping frequency of the bodies within our engine.

What are the drawbacks?

This obviously comes at a cost - the physics won’t be as accurate.

To deal with this issue, our engine will try its best to optimize the stepping frequency of a simulated assembly. For example, if something is moving or rotating quickly, this means we will need a higher stepping frequency. If the constraint graph of the mechanism is considered too stiff, we might want to assign a higher stepping rate for stability. If you think your game requires high physical accuracy / stability, you might want to stick to the default option for your game (at least for now!).

Would my game benefit with this option?

How “physics-intense” is your game? Consider these two aspects: the amount of physics your games has, but also the intensity of the physics your game is trying to simulate. Best improvements will come for games with Large amount of phyiscs + Low Intensity simulations.

How can I test this feature?

This feature is available now as a beta feature in studio for everyone. Simply turn on “Adaptive Timestepping” in beta features, and select “Adaptive” for the “Physics Stepping Method” on the Workspace.

If you encounter any strange behavior with this feature turned on, let us know so we can look into the issue. Any feedback will be greatly appreciated!




P.S.

Currently this is only open for use inside Studio (you can’t have this turned on for live games). If you would like to participate in testing out this new feature for a live game, please contact me so I can have that set up for you!

287 Likes

This topic was automatically opened after 14 minutes.

Wow, I can’t wait for people to use this as an optimization option, physics are almost the main reason that causes lag

Hopefully this doesn’t change anything serious that we aren’t aware about :wink:

43 Likes

Could this mean that Roblox is finally getting over 60 FPS support?

45 Likes

This is great! More optimization & less lag is what we all want.

Bit confused, could you elaborate?

16 Likes

Looks great so far, from my limited testing its improved cpu speed by quite a lot.

13 Likes

You can also check the “Are Timesteps Shown” option in the studio physics settings to visualize what stepping frequency your bodies are taking.

image

?

23 Likes

No… This is related to the physics engine. The physics engine is independant from the frame rate a game runs on.

21 Likes

I’m curious will there be a way to check via some sort of property, to see the current timestep being used by the adaptive timestepping physics engine?

(while the game is running on an actual game not just in studio to be perhaps used by scripts)

15 Likes

I cant seem to find the property for this feature anywhere in studio.

Is there something wrong with this update?

5 Likes

hz means times per second

So, 60hz = 60 calculations per second, 120hz means 120 per second, and so on.

10 Likes

Does this mean there will also be a lot less client/server lag in games with a ton of NPCs and ragdolls for example with the new available settings?
Will we at some point also be able to manually set the stepping rate? Would be cool to gain more control over it.

4 Likes

Yeah I know what hz means, but will this improve the physics of Roblox?

4 Likes

For now, you can have the “Are Timesteps Shown” option in studio settings, this will highlight the parts accordingly (green = 60, yellow = 120, red = 240hz).

9 Likes

This will help reduce the amount of throttling that will happen, IF the bottleneck of your game is physics. The physics replication itself won’t be effected.

10 Likes

Will the Fixed option allow us to keep it at 60hz? I think that games that have a lot of moving parts, like mobs, would profit from this due to it not needing to have precise physics simulations.

4 Likes

Can you 1. restart Studio, 2. Check the beta feature option and see that if this isn’t showing?

6 Likes

Pegging simulation at 60hz will not be an option. The engine will automatically assign 60hz to certain parts only when considered safe.

7 Likes

OK, well… this is probably not supposed to happen… O_o

I had a massive lagspike that froze me for 6 seconds after unanchoring the aircraft and a lot of lagspikes aswell, after a while i even sank right through the ground!

32 Likes

Sorry if I am asking too many questions but I am just curious, what is the reason that there won’t be an option to keep it at 60hz? I also believe this option would benefit games with a lot of players, since usually games use R15 which is made out of 15 parts and with the max player count going up to 700 now if a server is full that would be 10,500 parts using 240hz physics simulations.

Edit:

After reading the thread again, this time slower I understood how humanoids will be handled. Very nice.

8 Likes