Martin
Martin

Reputation: 675

Show an overlapping object in three.js when using an alpha map

In my three.js project I have two objects. One is a golden ring and the other one is a diamond. Now I would like to "cut out" a piece of the ring and place a frame for the diamond in the hole.

I created an alpha map for testing and applied it to the ring material. I also positioned the diamond to be above the point where the ring is now transparent.

ring and diamond

Everything seems to work fine, except that I still can't see the diamond "inside" the ring. After looking at this and this post I have set renderOrder to 1 on the diamond but this does not help.

Upvotes: 1

Views: 726

Answers (1)

Martin
Martin

Reputation: 675

Well in the end it turned out to be a very stupid mistake. I forgot to set transparent: true on the material.

Upvotes: 1

Related Questions