I’ve been using body movers to move around a high number of models around.
This works fine up to the 200’s where it then becomes to lag at amazing amounts:
The problem is when I just use the main part affected by physics:
It’s completely fine
My question is if it’s the physics causing the large amount of lag due to more physics being applied to welded parts, or if it’s the models (they’re each around 1000 tris).
Based on your screenshot (the width of the bar is the amount of time that thing took) Render is very high. That most likely suggests this is not due to physics, but rather rendering on the client. Try setting every part’s Transparency to 0 excluding the base of the model and see if you get normal fps. If so, you may have too many triangles in your Meshes.
Perhaps try turning collisions off? I saw a post somewhere where someone experimented with the FPS when zombies collided with each other, and saw a massive lag spike when they did, opposed to when they didn’t touch each other.
Unfortunately this most likely would not help. According to above they tried setting the parts to Transparency 1 which has the same effect as disabling shadows. This does appear to be physics based.
@BladianMC Can you tell us what specific joint types you are using? Have you tried setting parts to CanCollide false and Massless true together? Are you creating body movers in these parts or are you only using one mover for the root? What types of body movers are you using? Are any of your scripts looping over Descendants, Children, etc of your models? Does this only occur in the Roblox player or studio explicitly?
The Render bar displayed in the image is a worker thread waiting for the Main thread (where the actual rendering is happening) to finish. If you drag the microprofiler upward, you’ll be able to see the Main thread hiding at the bottom. That should hopefully show more detail on the cause.
The cause may involve instancing, which is detailed here:
You should replace your WeldConstraints with Welds. I’ve found WeldConstraints to be very strange in terms of their behaviour. It appears as if they don’t actually create a real rigid joint, but simply move their connected parts in unison without changes to physics. I have been able to separate parts using WeldConstraints which should be impossible, so maybe this could be a reason for physics lag.
Additionally, what @Anaminus said is correct, the render section appears to be the actual issue, not physics. I believe if you zoom in (mouse wheel) and move everything all the way down you should be able to see more detail for the render section. It should have a Textures and Lighting section to it. You can pause the microprofiler as well which will help with moving it.
Are you 100% sure you set the part’s transparencies to 1.0? Doing this should prevent them from rendering at all if I’m not mistaken. Make sure you don’t have Textures/Decals or anything within these parts when you do this.