Smeenk, R.J.M. (Roland) wrote:
Hello Roger,
I did not make a study of the Collada transparency intricacies like you did. The assumption I made was that a texture for diffuse specifies the diffuse components to use in the texture. The fact that texture coincidently was packed with an alpha channel (which of course happens a lot) should not influence that. When you consider the chain <texture><sampler><surface><image> the responsibilities are clearly dividided. It could be possible that somebody decides to pack an ambient occlusion or specular value in the alpha channel of an image. The semantics of the data source should be specified by the texture elements in ambient, diffuse, specular, etc. That's why I added code to only enable blending if a texture was specified in the transparant element.

What you say makes sense, but I've never seen it done this way in any of the files I've used or created via COLLADA plugins. I think we need to support the "RGBA texture in diffuse channel only" model, just because so many files and tools work that way. This isn't ideal, but it's probably necessary.


I've been very suprised to see suggested everywhere that the common profile maps to the fixed function pipeline, but this easily falls short if you need to support both blinn and phong. Well OpenGL FFP does not even support phong shading. Gouraud is the closest we get with per vertex lighting.

It clearly doesn't map to FFP, but it's as close as COLLADA comes. The biggest problem with handling profile_COMMON with shaders is that it makes it hard for an OSG developer to use his/her own shaders higher up in the scene graph. I think this is what drives the desire to handle profile_COMMON with FFP.


I don't know how to map textures specified for both ambient, diffuse, specular etc. to the Ogl FFP. Texture combiners might bring us a little closer, but I hardly consider this the FFP.

Well, I believe ARB_texture_env_combine was made a core feature in OpenGL 1.3, so many would consider it FFP. But I digress...


Besides what happens if the surface contains a channels specification other that rgb or rgba? It gets even worse if it is allowed to compose 3 channel input for a diffuse texture combining components of three different source images. I am not sure if this is allowed in the profile_COMMON. Though very flexible, who is going to support this?
I don't think that is allowed (the schema says only one color or texture per channel). That would get out of hand quickly. I don't think anyone here expects that to work anyway. We're just talking about a single RGBA texture in the diffuse channel.


--"J"


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to