Eugene Fitzher
Eugene Fitzher

Reputation: 163

How can I give objects whole side with light?

I'm looking for an way to give specify light for some objects.

I have added new light to object to remove shadow on it, but then, the other objects also affected by additional light, and I don't want it.

I have let the object's castShadow = false; receiveShadow = false, but it doesn't work.

When the camera is positioned with the light directions, camera will see the 'light' meshes, and at the opposite position, camera will see the dark side.

I want both sides to see 'light' meshes.

now (I want to remove the shadow.)

Thanks for your help. :)

Upvotes: 1

Views: 630

Answers (1)

Mugen87
Mugen87

Reputation: 31076

I have added new light to object to remove shadow on it, but then, the other objects also affected by additional light, and I don't want it.

What you are looking for is called "selective lighting" which is not yet supported by three.js. Check out the following issue for more information:

https://github.com/mrdoob/three.js/issues/5180

The only workaround right now is to work with multiple scenes and render passes.

When the camera is positioned with the light directions, camera will see the 'light' meshes, and at the opposite position, camera will see the dark side.

When using a single directional, point or spot light, it's normal that this setup produces a lit and unlit side of a sphere mesh. You can only avoid this by adding an additional light on the other side of the mesh, by using unlit materials or again by using different scenes with different lighting setups.

three.js R112

Upvotes: 2

Related Questions