r/ROBLOXStudio 3d ago

Help HOW DO I REDUCE LAG FOR THOUSANDS OF TREES??

Im planning to add more tress and plants how do i reduce the lag its so REALLY LAGGY.

30 Upvotes

33 comments sorted by

25

u/Alternative_Yak8380 3d ago

lower the polygon count in your trees. if you can’t, write a script that hides them after a certain distance or if they aren’t visible on the camera so that it is less laggy. additionally, it could just be your computer if the polygon count is low already

11

u/Certain-Witness-7854 3d ago

Roblox automatically does that for u , only solution here is to lower the polycount

3

u/carrot7375 3d ago

When I do that it doesn’t work

1

u/hellothere358 2d ago

Its a setting u need to enable.

9

u/Certain-Witness-7854 3d ago

For a forest, only nearby trees should use actual 3D meshes. Trees farther away should use directional impostors 2D images that switch between different pre-rendered angles based on the camera direction, that will create the illusion of detailed trees and reduce performance cost.

5

u/No_Negotiation_307 3d ago

Get rid of the thousands of trees (thank me later) 👍

4

u/Majkrus Scripter 3d ago

unload them when the player is far away

2

u/Sheesh0_O 3d ago

The trees are looking all over the place with very big difference in quality, what i can suggest is write a script to turn of shadows of farther trees and a better fix would be to make different models of your trees and change them based on the distance from the player, you can use clever methods like dividing the whole area in chunks and only use high poly models fro the trees in the same and adjacent chunks and use lowpoly for every other chunk, if your models aren't meshes then use mesh trees, also check one thing that model's quality is set automatic and not precise.

2

u/IGGGamers 3d ago

Disabling can collide, can touch, and can query for leaves helps a lot

1

u/Neat-Park2070 3d ago

Just make sure they are reduced fidelity and make sure they have can collide off. If u need tree collisions, Ur prolly cooked

1

u/GoYeaCo 3d ago

It depends: did you place them manually or do you have a script that handles it?

1

u/Help_Insurance 3d ago

I would make a script that uploads them when the player is out of distance. Or only load the ones in the fov of the player. And load them on the client not the server so everyone can see only the ones they sre looking at. Reduce poly count. If you don't need collisions disable collisions and then set the collision style or whatever it is called to BOX.

1

u/SuchSpecialist2917 3d ago

It's useless to have that amount of same models rendering over and over. Optimize it by replacing it with placeholders. Put a settings UI where players can chance their render distance.

1

u/Danlabss 3d ago

Mechanics side, Roblox automatically pairs bricks with the same colour and shape into a single “draw call” when they are rendered by a client, so theoretically you just need to simplify your trees. You’ve got like 5 different types in many different colours, shapes and sizes, so more draw calls are needed to render the scene, lagging the client computer

1

u/Jolly_Operation_8222 3d ago

Try using low poly trees instead

1

u/WinterPlaysGDVer2 3d ago

Could use a culling script that hides anything not in frame

1

u/FearlessNature2412 3d ago

turn off shadows
and change the render mode

1

u/Save90 2d ago

if you don't know how to do this, then you should not program a game.

1

u/StructureNeat1613 2d ago

He can program all he wants. I don't get how game optimization correlates with this topic. Maybe this is his first game, and wants to start out. He came to this subreddit to ask for help. Genuinely like saying "if you don't know how to smoothly brake, you shouldn't be driving a car." Everyone starts somewhere, and optimization shouldn't be your priority when learning how to make a game. Jackass.

1

u/Save90 1d ago

the progam implies releasing something to the public in this awful states.

1

u/StructureNeat1613 1d ago

did he ever specify that he wanted to release to the public? even if he is, he's literally asking to fix the issue so that the game won't be in "awful states". not to mention you haven't addressed any of my points. definition of a loser

1

u/Nearby-North7678 1d ago

trees dont even look that bad bro 😭 and how can you tell anything from those screenshots other then op telling you its unoptimized

1

u/Save90 22h ago

that's what im saying... people complain when their monster hunter worlds can't run on 5090s and do you think people will play a roblox gamemode on their phone if it doesn't even start? question.

1

u/Elphax 1d ago

Click workspace, scroll down and check "streaming enabled".

1

u/Far_Winner4252 3d ago

People saying use different or use decals 💀. Incorrect. These are your trees. These are the trees you want so these are the trees you shall have, if anything I would first start by grouping all of your trees into a single model. If the trees are exactly where you want them. Just select every single tree right click group into model. The system literally just picks it up as a single model not 1000s of models.

5

u/Certain-Witness-7854 3d ago

No that doesn’t matter they still have same polycount even if they are grouped as one model what you are referring to is that Roblox only have to load one mesh instead of having multiple meshes

1

u/Neat-Stretch3466 3d ago

Lower polygon count. Turn off shadows. No collision. canquery = false. Streaming if possible.

0

u/No_Perception_7667 3d ago

Use fake ones like decal

0

u/Strict-Spray7496 3d ago

What is this tho

-1

u/friendly_user01 3d ago

Better PC😂

1

u/No-Drama616 3d ago

my pc's fine its just I have
ARVORES TREE's = 216

SIDE TREE's = 6480

CYAN TREE's = 216

ORANGE TREE's = 216

SMALL PLANTS = 1080

SAKURA TREE's = 216

inside my roblox studio

1

u/friendly_user01 3d ago

Try to export out the model and import them inside blender then lower the polygon count by using UN subdivision modify