i need to import some geometries in my scene with three.js and each one specifies an RGBA color and an RGBA specular color. In threejs there is a problem, because it seems that it handles just RGB colors, with an alpha property for the whole object. But I need two separate values for the alpha: one for the color and one for the specular color.
Asked
Active
Viewed 636 times
0
-
I don't quite understand what you want to achieve. Are you using textures at all? Specular Color only specifies the specular amount of an object, so it is just a greyscale texture and maybe it is an RGB Texture if you want to tint your specular highlights. But it is never RGBA. Can you maybe clarify what you want to achieve? – GuyGood Nov 18 '13 at 23:30
-
I completely agree with you. But I have to import some geometries from a server. Some of them have a material.xml that defines some information about rendering, and there is a particular shader that uses a transparent specular color. The reality is that my boss told me that he needs this feature, and I was wondering how to use it, too. So, I'm glad to see that HE was wrong. – rastafermo Nov 22 '13 at 00:11
-
Well, you could of course write your own shader that somehow uses the aplha channel of the spec-tex to do some stuff (related or non-related to specular behaviour of the material). – GuyGood Nov 22 '13 at 08:50
-
Of course it is possible. But models are handled in an editor that, as I record, doesn't allow to change alpha in specular color. By the way, thank you very much!! – rastafermo Nov 22 '13 at 14:25