I am trying to load a single texture containing transparent elements to a collada model. Initially, I set:
this.renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
However, this gave the background color of the html page.
Then, going through other SO links, I found and tried these:
material.transparent = true;
material.depthWrite = false;
material.depthTest = false;
material.alphaTest = 0.5;
But the result remained the same (white instead of transparent). I finally found a solution that suggested editing the dae file and adding a line below every occurrence of <transparent></transparent>
block:
<transparency><float>0.100000</float></transparency>
After this, the white disappeared and the transparent texture was rendered, but only partially.
This effect is more pronounced when viewing it from the other side:
Link to view this effect live is here
I've tried the following SO links and they do not seem to be working:
Three.js / WebGL - transparent planes hiding other planes behind them
Managing z-buffering with transparent textures in Three.js
Three.js png texture - alpha renders as white instead as transparent
Displaying background colour through transparent PNG on material?