Improved PGS Solver Studio Beta

If your place uses a lot of physics involving constrained moving bodies, you would like to have a look at this new and improved version of the Solver!

As we continue to roll-out this improved versions of the PGS solver, we are looking for volunteers to try a special Studio build posted here (Windows only).

https://s3.us-east-2.amazonaws.com/roblox-studio-betas/Win32-RobloxStudio-LDL.zip

Please remember that testing this feature in Studio does not mean this feature will be working in your game released to the Roblox site. This is a Studio only beta test.

We will also be enabling this feature in a few days, on a select number of places that have been posted in this thread:

In case you haven’t heard about this feature, called the LDL-PGS solver, it provides much improved behavior with larger, more complex machines and mechanisms, models with high mass ratios and velocities, and over-constrained or inconsistently constrained systems.

33 Likes

This is perfect for my place! I’ll post feedback here as soon as I can test it!

After some thorough testing, I can affirm that this update has improved the performance of all PGS objects in my game. At this time, I haven’t found any issues caused by the new system.

I’ve noted that constrained objects, particularly those using Servo movers seem more responsive when at a distance; whereas in previous versions they would stutter or not move at all.

2 Likes

Thanks for your feedback @devSparkle

prototyping.rbxl (16.9 KB)
This solver seems to have lag spikes up to half a second for a large number of constraints with this new PGS solver. I’ve uploaded the repo file above.


This does not happen in roblox studio’s normal PGS solver for me, with about 1 to 2 milliseconds per frame for the physics tab.

1 Like

Awesome. I got some real-world-scale aircraft that use Constraints for suspension. I’ll report of any new issues.

2 Likes

You are correct. The spike happens only on structural changes to the mechanism (adding removing a body or constraint).

In your case you have a complex mesh of 324 rods. It will kill your performance for a frame.

1 Like

In my case I am not adding or removing parts from the web of rods and balls, so what structural changes to the mechanism are happening that causes these lag spikes?

If you don’t add or remove constraints or bodies, then it will happen only once, when you create the mechanism. Basically the engine has to make a complex analysis of your mechanism that grows exponentially with the number of cycles you have in your constraint graph. In your example you have 18 parts connected by over 300 rods.
The question I have is whether a mechanism like that is necessary?

This works great with large scale mechanisms. Definitely more stable, especially with PrismaticConstraints and HingeConstraints. Great work!

2 Likes

I am not really trying to argue that my complex web of constraints is a common and necessary mechanism. I’m just highlighting a repeating lag spike problem that upon further inspection seems to occur when the network ownership of the mechanism changes, causing a redundant complex analysis of the mechanism.

Yes changing network ownership of the mechanism would do this re-computation too. Good point! But since this seems to happen only for extremely complex mechanisms that won’t appear in any real game - as far as I know - I wouldn’t worry about this performance issue until later.

2 Likes

Alright thanks for taking the time to respond to my questions

1 Like

my swinging rope platform has 73 constraints :D

5 Likes

It’s not the total number of constraints but the complexity of the constraint graph that matters (number of constraints / number of bodies). In your case you have more or less the same amount of bodies than constraints.

Nice model btw!

1 Like

I’m very keen to jump on that… for testing purposes of course. Link?

2 Likes

Not sure if this is related to the same thing. But with the old version and the new test version of studios this happens. https://youtu.be/eTdNNmgrQ8Q?t=620 I can’t figure out if its constraint related or just bad physics. Because I can rebuild the track 8327532985 times make it perfectly smooth but cars still bounce into the air over different areas. Originally I thought it was the constraints dying but after constantly testing and stuff it only happens when driving over new track segments.

Thanks for the great feedback so far on the beta build everyone! In addition to posting repro levels/instructions for any problems you encounter, please also post your success cases here. We definitely want to see those as well!!

2 Likes

@NWSpacek

My cars still don’t seem to be able to steer properly in the place with this system enabled. The cars just sort of lift off the ground and loose all speed whenever I try to steer which doesn’t happen in any other places that don’t have this enabled.

This is what it currently looks like:

@chefdeletat That repro I sent last time still reproduces this in case it’s needed

1 Like