I need help with a question about shadows and all of optimization in Roblox Studio

Hello everyone, I need help with a question about shadows.

Does anyone know exactly how shadow rendering works in the engine? And also, which graphics settings are responsible for what? (Specifically from level 0 to level 21).

The whole problem is described here: Shadow Draw Calls are broken and here: Roblox lags, sheduler render is broken.. were are optimization in roblox????? - #3 by d_HaKeRo4eK228sky

I contacted Roblox support, wrote to staff, and posted on this forum - zero results. No one has helped me so far. Why does this problem affect everyone?

Because it’s a question about the optimization of the engine itself and the future development of the engine. The introduction of something new, more large-scale.

My questions about shadow rendering optimization started in the summer, and then after one of the updates, a problem with the Scheduler began - it started to grow in many places, and the general picture is that FPS dropped everywhere by about 20%. This affects all high-quality, complex places in Roblox. Even popular ones like Doors or Pressure.

I can’t explain the shadow recalculations and why we have such low performance. The Dump file doesn’t provide much information for me. I wanted to find the source code for Roblox Studio to understand how the rendering works there - because it uses its own algorithm. The only thing that’s clear in the game itself is that due to the movement of a single object, literally any movement, shadow calculation is activated for almost the entire map. And the more details there are on the map, the larger its scale, the more polygons the shadow calculation consumes. And imagine, shadows are consuming about 15 million polygons. This drops the FPS significantly. The on-screen scene is only 2 million polygons (Depth + Scene), but if you add Shadows, it’s already 17 million.

The strangest thing is that in popular games outside of Roblox, even projects from 2017-2020, don’t have problems with lighting; they create high-quality scenes while maintaining stable, high frame rates. So, the complexity of lighting in Roblox shouldn’t have such a drastic impact on optimization. If we created the same scene in another engine, we would get much better performance. But at what cost? The entire scene would be in memory, meaning almost nothing would be on the server, but I don’t think that’s the factor that makes the calculations so heavy.

I think Roblox urgently needs to pay attention to lighting mechanics and such systems because they are literally key.

What solutions could help?

  • Add baked shadows - thereby, there would be no need to recalculate shadows that are considered Static. Compiling such shadows would be fast and should save a lot of resources. We would now have a system of Dynamic and Static shadows; only Dynamic ones would be calculated, while the rest would be rendered at the very beginning.

  • Review the distances at which shadow recalculations occur. - I have a completely static map, and there is a part that simply rotates via a script. A couple of light sources shine on it, and it’s located in a small part of the map. But for some reason, this part makes the whole system strain, as if all light sources are recalculating their shadows - resulting in these 15 million polygons.

I’m not a professional in graphics, but it seems like no one wants to answer my questions, and I won’t stop inquiring until either someone helps me figure it out, or they fix it.

Thank you for your understanding and attention.

4 Likes

Is there anyone on this forum who can help with this???