+1 vote

I'm working on a project that includes torches. I've made them out of a small particle system and an OmniLight (one per torch). I put a few in my scene. I can look directly at the OmniLight and I see it's effect on the terrain around it, but when I look down some, away from the light on the top of the torch, the light ceases to show on the ground like a switch was just flipped and it went off.

There's no code behind the torches. They're a simple scene saved to be instanced in my main scene.

Any idea why they would behave like this?

in Engine by (113 points)

1 Answer

+2 votes
Best answer

It is the Godot light manager turning them off.

Old OpenGL could only do 4, modern OpenGL can do 8.
The interesting part is that every object has it's own support for 8 lights. Meaning the more objects is in a scene the less noticeable the problem is.

Every object will calculate it's lights based on the ones nearest to it and the camera.

For the floor a grid like structure can be used to allow more lights:
enter image description here

Also large lights add to each other, obscuring the problem.

by (1,492 points)
selected by

Ok. It should be in your inbox now.

Note that the maximum number of lights per chunk/quad is 3 for easy debugging. Set it to 8 for your game. Also you can jump super high so that you can see the ground from bird's eye view and place torches from there. Hope I did good with the comments.

Ok! I’ll look at it soon!

How's it going?

Good. I've looked at what you've done. It may take a bit for me to fully understand. It seems to be working the way I'd like. I'll need to look more into it.

I'm currently working with navmeshes and seeing if it's possible to rebake a navmesh at runtime to update when you add torches and stuff so AI will avoid new obstacles. I'm beginning to think that updating at runtime is not possible, though...

Yeah I saw your question about that. Too bad I don't have an answer.

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.