So there was one thing I’ve noticed on some build that I’m currently optimizing and one of the main big factors of lag ended up being the lighting on studio.
I really want to keep future lighting as it looks really good for a night time setting with all sorts of pretty lights n’ such but I’m not sure if there is a way to lower the performance costs of future lighting for players that just don’t have as powerful devices.
Here is also some of the objects inserted inside the lighting; not certain if any of these are costly performace wise in a night time setting in future lighting. I’d heavily appreciate feedback + tips on optimizing the lighting without changing it too much
But anyways back to the topic. Now, personally, my device is bad and I have no troubles with future lighting. Where’d you get the information from?
mainly from friends and friends of friends joining the game and comparing their lag to the other game
Game 1 is the one i personally optimized a lot (the file size is lower by 100+ KB) and has less terrain, parts, has some shadows + collision disabled etc and is set at night time
Game 2 is the one that i originally bought, has x2 more parts, way more terrain that people dont really see, and is also future lighting but set at day.
some players (one of them mentioned having a mac) mentioned that game 2 is less laggy than game 1, while most players mainly mobile devices and windows mentioned insane lag in game 2. One of them had loading issues for game 2 while game 1 loaded quicker.
edit: I also then noticed when i switched Game 1’s lighting setting from future to shadowmap, the amount of lag lowered significantly making me determine a lot of the lag had to do with the lighting as well; which is why i really want to look into trying to improve performance without switching it to shadowmap
Try relying on other types of lighting such as voxel.
Hey, I’m not too sure how many parts you’re using whilst using Future, but I understand that an immense amount of objects using CastShadow can be pretty costly to the performance of your game.
Having run into a similar issue a lot earlier, I’d recommend using this plugin to filter out all of your parts and control which parts use the CastShadow property simultaneously.
I’ve been optimizing our studio’s game for a while now, and if you look in the microprofiler you’ll notice how shadows are by far the biggest concern. I’d recommend my plugin that was posted above to turn off shadows for parts you don’t need easily, but overall you should also try:
- having less transparent parts (ie have Transparency be only 0 or 1)
- try not using Glass materials as it uses a different rendering pipeline (I use SmoothPlastic with 0.4 transparency — works well)
- try minimizing how many parts have CastShadow turned on
- minimize Meshes and unions, as primitives are the least expensive option
- Minimize how many parts you have in general
- try using the same colors, materials etc - if you have 1000 parts with 1000 different colors, it’ll be more expensive than 1000 parts with 100 different colors (so, 10 parts use a same color), because Roblox renders properties in bulk
Have a loading system for render distance and use quad trees to load in assets if their are a lot of assets in your game Crazy to think the Grand Piece Online uses future lighting and the game (to me) is super optimized and the game is huge, so their is a way. GPO does have a rendering system from what I’ve seen. Good luck with your endeavors!
This is correct! My personal solution for this, which avoids spending loads of time manually picking out which parts should or shouldn’t have
CastShadow turned on, is to parent Light objects to attachments, collecting all of those Attachments in a table, and then checking the distance of each Attachment’s WorldPosition to the Camera’s Position. If the distance exceeds 100, I turn off the Light’s
Shadows property. This saves on a lot of memory, and makes a much better performance.
At a 100 stud range, shadows aren’t exactly necessary. You can choose to blacklist larger lightsources from this optimization system, too.
I hope this helps