revy
revy

Reputation: 4707

Led strip light in threejs

What could be the best way to simulate a led strip light in threejs like in the image? Is there any example around to make something similar?

enter image description here

Upvotes: 2

Views: 1164

Answers (1)

Berthur
Berthur

Reputation: 4495

It really depends on what kind of realism you want. There are always ways of making effects more realistic, but it quickly becomes rather complicated.

If we limit ourselves to THREE.js out-of-the-box functionality, though, we have the following light types at our disposal:

  • AmbientLight
  • DirectionalLight
  • HemisphereLight
  • PointLight
  • RectAreaLight
  • SpotLight

And out of these, I would personally recommend RectAreaLight, because it represents an area light (the shape of which you can specify to match that of your led strip lights), which is a rectangle that emits light uniformly across its face. A lamp such as those in your picture do perhaps not emit light completely uniformly, but depending on what your goal is, it might be a close enough approximation. You may also combine several area lights to pursue certain effects.

Upvotes: 3

Related Questions