How to make light affect particular objects Cocos Creator 3.6.0?

Hi, sorry about duplication of my old question, I can’t respond there any more:

but now I again need help with this.
The problem I want to create UI what will have 3D meshes, also I have directional light in the scene what rotates every time. The problem is my 3D meshes in UI container affects by this light.

I want to have separate direction light just for UI 3D objects:


As you see directional light shine to the bottom, and my trees in 3D scene and trees in UI become dark.

I want to make trees in UI be shined by another static light.

I suggest to use unlit material in 3d object seeing by UI camera. Then you can also use color to adjust its visual manually

I thought about this one, but in this case, meshes look very simplified. For example, in Unity you can set light layers. I also saw such effect in some games (where you have world and UI) and UI meshes have different light.
In Three.js you can create separate scene what will have its own light and render this scene with your world scene.

I understand, we also have regional directional light in development, but it’s planned in 3.7.
Otherwise, you can also modify the UI camera setup so that it sees the trees lightened side or modify the trees transform so that the lightened side facing the camera

1 Like

Ok, thanks.