Collada transparency
by Stephen Colbran · in Torque 3D Professional · 08/14/2009 (3:53 pm) · 8 replies
Im also working on an application (mac) that can convert the kmz's to Collada files that can be dropped straight into Torque 3D.
Currently it is working perfectly, I just want to add a few more things before I post it up.
I was wondering how can I get the transparency from SketchUp to work in Torque.
What to I have to change in the Collada file?
Does anybody have a collada file with transparency in it that I could look at?
Thanks
Currently it is working perfectly, I just want to add a few more things before I post it up.
I was wondering how can I get the transparency from SketchUp to work in Torque.
What to I have to change in the Collada file?
Does anybody have a collada file with transparency in it that I could look at?
Thanks
#2
If not, then it doesn't seem to work anymore :(
08/14/2009 (7:14 pm)
Do the texture files need to have the opaque in them?If not, then it doesn't seem to work anymore :(
#3
No - in fact, that is the problem with Sketchup. It exports models without the opaque attribute, but with <transparent> color assuming the opposite of the collada spec.
Do you have an example of a model that is not being loaded correctly? Do you see the message in the console like:
Setting <transparent> "opaque" attribute to RGB_ZERO for xxxx <effect>
08/15/2009 (1:46 am)
Quote:Do the texture files need to have the opaque in them?
No - in fact, that is the problem with Sketchup. It exports models without the opaque attribute, but with <transparent> color assuming the opposite of the collada spec.
Do you have an example of a model that is not being loaded correctly? Do you see the message in the console like:
Setting <transparent> "opaque" attribute to RGB_ZERO for xxxx <effect>
#4
However, the transparency doesn't work on the model.
What im trying to do is make a glass window :)
08/15/2009 (3:20 am)
Yep, the console says Setting <transparent> "opaque" attribute to RGB_ZERO for xxxx <effectHowever, the transparency doesn't work on the model.
What im trying to do is make a glass window :)
#5
08/17/2009 (1:40 am)
Is there any chance you could send me the model? Or just post the <effect> (from the .dae file) and the resulting materials.cs file? Perhaps Sketchup have finally gotten around to fixing their exporter and we don't need to set the opaque attribute when loading anymore.
#6
http://www.samuco.net/EndCube.zip
In sketchup, the model looks like:

(Also, could you take a look at this other thread)
08/19/2009 (5:55 pm)
Heres the model below (Direct from SketchUp, just unzipped):http://www.samuco.net/EndCube.zip
In sketchup, the model looks like:

(Also, could you take a look at this other thread)
#7
08/26/2009 (8:50 pm)
@Stephen: I haven't forgotten about this => just been very busy with other things last week. A quick look this morning indicates the collada loader should be setting the translucentBlendOp to something other than 'None'.
#8
08/29/2009 (3:18 pm)
I uploaded a file i made with working transparency in .dae format. when you open it up in Torque 3D you will have to select the model and go into the material editor. Check the option that says alpha thresh hold. It should work then. Here is the site: www.megaupload.com/?d=7G8KIVXB
Associate Chris Robertson
You shouldn't have to change anything in the collada file to get transparency working in T3D. I haven't tried a Sketchup file in a while now, but I know this was working in the past.
Sketchup exports models with the "opaque" attribute of the <transparent> element set to the opposite of the collada specification. The T3D loader detects this situation and automatically corrects it (a message will appear in the console when this happens).