1
votes

Are there any opacity maps for THREE.js ? Like:

enter image description here

so that I can use it on a map like

enter image description here

1

1 Answers

14
votes

MeshBasicMaterial, MeshLambertMaterial, MeshPhongMaterial and MeshStandardMaterial support an alphaMap.

Alternatively, you could bake the transparency into your color texture's alpha channel.

In either case, you need to set material.transparent = true.

EDIT: If you are implementing a cut-out (alpha is either 0 or 1), then instead of setting material.transparent = true, you can just set material.alphaTest = 0.5.

three.js r.87