Whats better performance wise? A manual weld or a WeldConstraint?

I was looking for performance comparisons about manual welds and weldconstraints, but i couldn’t find any.

I noticed that if i use weldconstraints instead of manualwelds in my game, i no longer have to replicate hingeconstraints properties and a lot of other constraint properties to the server.

Players will always stand ontop of creations without offsetting and they do not get flung into space that easily if i use weldconstraints.

But what is different between weldconstraint and manualwelds and could weldconstraints be used on massive creations with over 10k parts with no difference performance wise?

5 Likes

From what I have read, I believe manual welds to be faster in performance compared to weld-constraints in huge quantities. Apparently it is possible to disconnect parts from each other with weld constraints which is supposedly impossible. I’m not sure if that has been fixed but the posts I have read claiming this information come from around the start of this year.

4 Likes

So what if you’d weld everything via manual welds and have the parts from constraints like hingeconstraints etc use weldconstraints?

That way, the players would still not get pushed off whenever the properties aren’t being replicated to the server.

Would this affect the performance a lot aswell?

1 Like

I’m not sure but thinking logically, welding less parts with the WeldConstraint object should result in smoother performance. I’m not that experienced in this type of field so perhaps this post will grant you some additional information. Welded Parts Causing High Amounts of Physics Lag? - #20 by Hexcede

2 Likes

While I don’t know which Weld Object performs better, both welds have different use cases. I believe WeldConstraints were created for static offsets where welds with a editable C0 and C1 property are used for dynamic offsets. The C0 and C1 property allows for consistent offsets using local object space.


With that being said, I believe WeldConstraints are more performant over Welds because they are the more updated version with what seems to be less functionality.

3 Likes

WeldConstraints most likely play nicer with the PGS physics system, since it was released alongside all of the other constraint objects. My intuition would say that ManualWelds are probably faster since they have been around longer and their relatives, Motor6Ds, are core parts of character rigs and thus probably have been scrutinized and optimized heavily.

Your best course of action is to set up some kind of test where you weld a bunch of parts together and let them move around and to observe performance for either weld option.

1 Like

Is there a way i can benchmark this accurately?

There’s virtually no difference; and if there is, it’s almost definitely negligible. The main difference between the two is UX wise: WeldConstraints handle offsets for you automatically while other welds require you to set the offset yourself. They’re also part of the new constraint line so you could probably use them if you’re looking for some consistency in using constraints for any physics-involved models.

3 Likes

Performance-wise, WeldConstraint is generally better, as it supports the new Physics Solver, which can result in better performance and stability.

2 Likes