+1 vote

I am making a large 3D indoor scene with lots of lights. The performance is very bad the only way of getting realistic lighting is with baked lightmaps and only static lighting. Is there away of optimizing the usages of lights to improve performance while making the lighting and shadows dynamic?

Thank you

in Engine by (61 points)

2 Answers

+1 vote

Godot 3 is not very good att handling large amounts of dynamic lights in my experience so you will have to be creative. I think Godot 4 will fix this soon.

I don't know any way to have lots of lights where they are all dynamic at once in Godot 3. If you can make it work with only nearby lights being dynamic and far away lights being static then I think you should be able to solve it with baked lighting and custom shaders that blend between baked lighting and dynamic based on distance.

There are many ways it can fail though so expect it to be a complex and time consuming project.

by (108 points)
+2 votes

You can use the Level of Detail add-on to hide shadows and lights in the distance. This is a common technique which is still used by AAA games today.

Also, I would recommend using baked lighting if you can (with static lights' bake mode set to All instead of Indirect). You can still have dynamic lighting effects by adding lights after lights have been baked, but you'll want to provide an option to disable dynamic lighting to improve performance on low-end devices.

by (12,719 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.