1
votes

I have a similar issue as in this post, using the same model, also loaded with the Collada loader.

The windows of the car are not displayed as transparent in three.js. You cannot see through them.

After digging through the three.js object data structures, it looks like the material for the window has opacity = 1 and transparent = false set on it.

I tried both with the release and with the dev version of three.js, as advised in the above referenced post but without any luck.

I also tried setting the opacity to 0.3 and transparent to true by hand in the material object (in debugger) and the transparency appears ! (although with some flickering).

Any idea what is wrong ? Is it a Collada loader problem ?

UPDATE: same problem on a much simpler model:

screenshot of the problem

link to the SketchUp model

Thank you

Martin

2
Can you share the problematic model?mrdoob
Follow the link at the beginning of the post, the linked post references the model. I will try to create a simpler model too because this transparency thing seems to be pretty consistent in Sketchup. Thanks.Martin Gorner
Updated the question with a much simpler model (cube inside of transparent cube)Martin Gorner

2 Answers

2
votes

I just tried this and it's working for me. I took the model from open3dhub and imported it into ThreeFab and then exported it to a jsfiddle(source). I still see the flickering (that's a separate problem). This is on three.js from master.

enter image description here

0
votes

I still do not know if this is a ColladaLoader bug, a SketchUp issue or a bizarre feature of the Collada spec but I found an easy enough workaround:

Edit the Collada file by hand, find the tag and set its value by hand to 0.3 or anything you want instead of 1.

Not perfect but workable.