Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpotLight3D stops lighting for "high" values of Range, Zoom or for certain angles #89698

Open
L30n4rd0-4rg3nt1n0 opened this issue Mar 19, 2024 · 0 comments

Comments

@L30n4rd0-4rg3nt1n0
Copy link

L30n4rd0-4rg3nt1n0 commented Mar 19, 2024

Tested versions

-Reproducible in: Godot Engine v4.3.dev.custom_build.c9c17d6ca (2024-03-15 10:07:39 UTC)

System information

Godot v4.3.dev (c9c17d6) - Debian GNU/Linux trixie/sid trixie - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 (nvidia) - Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz (8 Threads)

Issue description

Using a SpotLight3D, it is observed that for sufficiently large values of the "Range" parameter it stops illuminating (at least at certain angles depending on where the point of view is located). This happens in both the camera preview and the normal editor view. It is also observed when playing the scene.

My scene consists of:
--A "Floor" - a SaticBody3d with a child MeshInstance3D with PlaneMesh resource and a child CollisionShape3D. Its size is 200mx200m.
--A "small block" - a RigidBody3d with a child MeshInstance3D with BoxMesh resource and a child CollisionShape3D. Its size is 1mx1mx1m
--A "big block" - a RigidBody3d with a child MeshInstance3D with BoxMesh resource and a child CollisionShape3D. Its size is 100mx100mx100m
--A Camera-Light system - a Camera3D with a child SpotLight3D, with the same position and alignment (essentially the camera illuminates what it sees)

In the following images you can see what the "Preview" shows. For "small" values of the "Range" parameter (below 140m) I do not observe a problem, but when I start to gradually raise it, "clustering artifacts" appear similar to those reported in #81772 and #78500. These clusters are "dark clusters." The dark region grows for larger values until there is no more light left.

01
02

In the following images you can see the normal view of the editor. You can see what happens by zooming in a little.

03
04

I don't know if I should justify why I want to work on a scale of hundreds of meters. Actually it comes from another previous problem when I wanted to build a scene with a small block 1cm on a side, the big one 1m on a side and the floor 2m on a side. In that case the physics of contact between the small block and the floor fails, so I decided to work on a scale 100 times larger (where the previous problem disappears but problems arise with light). That is, problems are encountered working on a small and large scale, which limits the range in which it is possible to work.

Steps to reproduce

As I said before, the steps are:
--Build some volumes of a few hundred meters
--Illuminate those volumes with a SpotLight3D
--The problem arises when raising the value of the "Range" parameter somewhere between the values 100 and 200
--Navigating and orbiting the scene you can see positions in which the lighting is visible, others in which it is not, and others in which clusters of darkness can be seen.

Minimal reproduction project (MRP)

bug_20230319.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants