How can I optimize this for players not to lag?

So basically, with low end PC’s I know this is going to kill it. So I used StreamingEnabled, but I know that ain’t enough, so what can I do to really optimize it so that they don’t experience lag or overheating?

2 Likes

FYI, we aren’t even done placing down all the trees and such, and I need way to make it so depending on where they at, not all trees load at once, but depending on their position and such.

I don’t have much information about how your build is actually made, so I’m assuming each tree is a bunch of roblox parts/unions, and the leaves are just parts with decals on them. In this case, the biggest impact on performance from experience would be the sheer amount of instances and triangles that need to be rendered and calculated each frame. There’s not much you can do if you aren’t willing to change the tree models, other than changing the lighting or using less of them lol.

This sounds counterintuitive, but using PBR meshes can actually improve your performance significantly, due to reducing the amount of triangles and instances you’d need in a scene. If you still want that great detail without sacrificing performance, I’d think PBR is the way to go. PBR lets you use normal maps, which can make parts look like they have way more triangles than they actually do, without actually adding any. With modeling in a 3D software and using normal maps, you could make leaves that are basically just triangles with textures and normal maps on them (that also look super realistic), and super-realistic looking tree bark without sacrificing performance. This could also all be in only two meshes, one for the tree and one for the leaves (due to collisions), drastically cutting down on instances. It’s often intimidating and confusing to start using 3D software, but I think in the long run its definitely worth it. I just created my first PBR part using very high resolution textures (8K) and with ~2k triangles and duplicated it 3000 times in render view, and it ran fine on my pretty old phone.

2 Likes

Their actually meshes.

Then they’re pretty well optimized as I can see they also use surface appearance. Not much you can do then, other than changing collision fidelity and render fidelity. Using automatic render fidelity lets the client render lower resolution versions of the mesh when far away, and changing collision fidelity to box (not default) for the leaves would also probably improve performance (they dont need to collide anyways). For the trunks, if you don’t need extremely precise collision, you could change their collision fidelity to “hull”, and they’re mostly convex too so it should work well for them. Have you tried it on lower-end devices? It’s important to establish that a problem exists in the first place if you can.

Yeah I will try on a lower end PC and see what optimization I can make.

I suggest cutting down on your usage of terrain.

These areas, unless they’re being used, don’t really need terrain. You can try to use MeshParts for terrain and then create invisible barriers.


Also, just because it’s a Roblox released asset pack, doesn’t mean it’s brutally optimized like you’d think.

I did a little dive into the objects in the asset pack, and most of the trees have default collision. While this sounds fine, using tons of them, especially when your game isn’t based around climbing trees, is a bad idea. I suggest going through the trees and changing their collision from “Default” to “Hull” or “Box”.

Above is an infographic I created on the different types of CollisionFidelity choices. I’m currently working on creating a mega-thread for MeshPart performance, you might benefit from reading it by clicking here.


As for other things to do, set the trees leaves to Performance. Players won’t be directly staring into the trees but they will be rendered anyways to the max unless they’re far away from them. Judging by how your map looks, the players will never be far enough away from the trees to get them to be performant.

As a person who had a really bad computer, I would’ve thanked you for changing the RenderFidelity of the trees leaves from Automatic to Performant, because a bunch of these trees so closely together would’ve obliterated my FPS.

Edit: Also doing some more investigating, I found out that the leaves of most of the trees in that asset pack have horrible collisions.

88568f3da4bcd4237b7103ccf9e438ca

When you have properties open, select the tree leaves MeshPart and then change the settings shown above to the settings shown here:

c382bb2e85bb3e85766c67ce4fa890e0

I won’t go into detail here, but if you do as I just suggested, the engine won’t bother calculating collisions for the tree leaves, which will really help as the leaves themselves are really high tris and are probably the main cause of lag.

6 Likes

I’m using Region3 in my game to do a distance check and set parts to transparent. I suppose it would be best in Roblox at least to have just a few stages of polygon detail and if possible swap the surface appearances out with ones lacking normals and stuff, you can’t change surface appearance settings but I think you can clone one and paste it in. I’d try Region3 and minimum part models!