Viewport weird and unwanted lighting behaviour

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By God Of Theory

I have multiple viewports in my scene.
Something like this(simplified version):

-Control node
----Viewport container node
---------Viewport node 1
--------------Camera node
--------------Directional light node
----Viewport container node
----------Viewport node 2
--------------Camera node

As shown,I placed a directional light under viewport node 1,but I can also see the effect of that directional light on viewport node 2,which shouldn’t be the case.

What I’ve tried:
1)I’ve changed the color of the light in viewport 1 and the mesh under viewport 2 gets affected and changes colour.This confirms the problem that the light is sharing between viewport.
2)I’ve tried creating a directional light under viewport 2 using code,but with different properties.However,there is no changes/effect at all.It still uses the light from viewport 1.
3)I’ve run and debugged the game several times using the debugger,print() and the remote server,but I can’t find anything wrong.

My question:
What is actually happening?

,I’ve solved it by setting the own world property of the viewport to true. However,I’m still not sure why it happens though…

God Of Theory | 2020-06-02 05:12