I'm new in Three.js
Can someone explain me about the characteristic of lighting in Three.js?
And which type of lighting can I use for making a lamp in a room? I need the one which can cast shadow too. Thanks!
1
votes
Is there anything you tried so far? I am a bit like you and just shoot questions around but the guys around here get a bit annoyed when you don't show what you tried so far.
- nicholaswmin
I think it should be pointlight. But, pointlight can't cast shadow. Any suggestion?
- Ricky
Edit your question Ricky:)
- nicholaswmin
bake your 3d model first in max(for shadows), then use point lighting.
- user2633451
Check out Threejs.org and the examples. There are plenty of examples to go off of.
- Dale
1 Answers
0
votes
This is a more general question for 3D modeling and it almost always involves a lot of trickery. To mimic a lamp, I would use a spotlight within the lamp model. See illustration below:
Also, you can use point lights wherever a lightbulb is, but this often causes unpredictable behavior of light shining through polygons that it shouldn't.
To your point about point lights not having shadows, they should. From the Three.js docs:
A light that gets emitted from a single point in all directions. A common use case for this is to replicate the light emitted from a bare lightbulb.
This light can cast shadows - see LightShadow page for details.
