This is the cathedral I’m working on. Its part count is sort of high, but it’s not in the tens of thousands (yet). I prefer to use Future lighting to get the full effect, but I don’t know how to optimize it to reduce lag.
Is there anything I can do in this situation to reduce lag, or do I just need to turn off shadows and deal with it?
Edit: I found a solution to the problem. The range and brightness of the lanterns caused shadows to overlap, which was causing the lag. I’ve since added smaller point lights to get the ceiling and spot lights to get the floor. There’s still a bit of lag from the shadows, but it’s much smoother after a bit of loading.
4 Likes
oh my goodness thats detail is astonishing
btw for future lighting if you feel the lights arent reaching everywhere you can mess around with the pointlight/spotlight/surfacelight properties and still its not good i would ask you to make some invisible parts where it has light properties
Well, it’s not the reach that’s bothering me, it’s the lag. I have a decent computer, and it lags hard when I walk in the main hall. I’m mostly concerned about optimizing the high-end performance, as I plan to add a setting whereby the player can set the lighting to Shadow Map.
i dont think the lag comes from lighting its probably from part count
It might be.
I’m going through and making some of the more detailed parts meshes to see if that helps.
Edit: I switched the lighting to Shadow Map, and the lag disappeared.
also i did hear that future is so laggy and buggy now sometimes in makes to whole skybox black and its so glitchy especially on mobile
I’m pretty sure mobile doesn’t even have future lighting.
It is a pretty resource intensive feature, but I guess it’s a necessary sacrifice for great quality.
If you play your game normally and not play testing in studio, when you hit shift+f5 what FPS are you getting? If it’s over 30-40 then it’s not that bad.
Sorry for the second post,
If you have many small parts that are each casting a separate shadow, then that can cause some lag. I would recommend turning off the CastShadow property on any parts/small parts that don’t need to cast a shadow.
There’s a command that can this for any parts smaller than 1 stud in all dimensions:
for i,desc in pairs(game.Workspace:GetDescendants()) do
if desc:IsA("BasePart") and desc.Size.X < 1 and desc.Size.Y < 1 and desc.Size.Z < 1 then
desc.CastShadow = false
end
end
You should run this in the command line and if it’s not what you expected then replace the false
with true
(basically reverses it)
I wrote this in devforums without testing it but it should work!
1 Like
Maybe you could try changed a few models into meshparts? That might remove a bit of lag
Sup!
My advice for optimizing something like this is disabling unnecessary shadows on parts, and also ensuring you edit the collisionfidelity property for some meshes that don’t have collisions and setting it to ‘Box’, for meshes with collisions I’d recommend ‘Hull’; Default/Precise fidelities are super expensive and you will notice a performance increase by switching the fidelity.