godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.98k stars 21.08k forks source link

Lights turn on/off depending on camera loc/rot #25945

Closed unfa closed 4 years ago

unfa commented 5 years ago

Godot version: Godot Engine v.3.0.6.stable.official.8314054

image

OS/device including version:

$ uname -a
Linux unfa-desktop 4.15.0-43-lowlatency #46~16.04.1-Ubuntu SMP PREEMPT Fri Dec 7 14:42:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    2
Core(s) per socket:    8
Socket(s):             1
NUMA node(s):          1
Vendor ID:             AuthenticAMD
CPU family:            23
Model:                 1
Model name:            AMD Ryzen 7 1700 Eight-Core Processor
Stepping:              1                                                                                                                                                                                                                     
CPU MHz:               1446.562                                                                                                                                                                                                              
CPU max MHz:           3000,0000                                                                                                                                                                                                             
CPU min MHz:           1550,0000                                                                                                                                                                                                             
BogoMIPS:              5988.37                                                                                                                                                                                                               
Virtualization:        AMD-V                                                                                                                                                                                                                 
L1d cache:             32K                                                                                                                                                                                                                   
L1i cache:             64K                                                                                                                                                                                                                   
L2 cache:              512K                                                                                                                                                                                                                  
L3 cache:              8192K                                                                                                                                                                                                                 
NUMA node0 CPU(s):     0-15                                                                                                                                                                                                                  
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca 
$ nvidia-smi
Sat Feb 16 17:30:16 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.130                Driver Version: 384.130                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 106...  Off  | 00000000:27:00.0  On |                  N/A |
| 36%   39C    P8     6W / 120W |   1104MiB /  6072MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      4568      G   /opt/teamviewer/tv_bin/TeamViewer              1MiB |
|    0      7196      G   /home/unfa/.steam/ubuntu12_32/steam           25MiB |
|    0      7238      G   ./steamwebhelper                               2MiB |
|    0      8329      G   kdenlive                                      51MiB |
|    0     23520      G   ...passed-by-fd --v8-snapshot-passed-by-fd    33MiB |
|    0     28775      G   /usr/lib/xorg/Xorg                           248MiB |
|    0     29066      G   kwin_x11                                      15MiB |
|    0     29076      G   /usr/bin/krunner                               7MiB |
|    0     29382      G   ...quest-channel-token=4193870180538968032    80MiB |
|    0     29738      G   /usr/bin/plasmashell                          79MiB |
|    0     30370      G   ...table_x11.64/Godot_v3.0.6-stable_x11.64   554MiB |
+-----------------------------------------------------------------------------+

Issue description: Any time I try to play around with lights a bit - sooner or later I end up having this problem. Especially if I try enabling shadows. Some lights start to work only when the camera is oriented in a certain direction, or in a certain place. Needless to say - this completely breaks the immersion and the look the game.

I don't know why some lights seem to not be affected at all, but some almost never work well.

Here's a video demonstrating the problem - note: only pay attention to the orange lights, some other lights in this scene are meant to flicker (but they make sounds when they do): https://youtu.be/Q4XeniXFueM

What could be causing this? Is this a by-product of Godot's rendering optimization or what?

Here's the whole project that the above video is recorded with: Game.zip

volzhs commented 5 years ago

I guess #15651 is releated. the limitation is per object.

unfa commented 5 years ago

That could explain everything, since I try to keep all geometry of my level in a single mesh (the pillars however are a separate mesh). I guess if I split it into separate meshes for each room, the problem might go away...

aaronfranke commented 5 years ago

This probably won't be solved until 4.0, considering that's when Vulkan will be added. I don't think the current rendering code will be looked at much in the future since they're planning to remove GLES 3.

Calinou commented 4 years ago

Closing as a duplicate of #15651.