Hi Sukender, that does indeed look incorrect. opacityFactor was added by Alessandro so I've not tested it myself. GetTransparencyFactor() has already been used to determine the opacity of the material, so it shouldn't be used again. Alessandro's comment says "in practice factor will always be zero" and this just tells me all his test models have been fully opaque. I've now removed opacityFactor completely and the RGB of opacityTexture will always be ignored. Unfortunately the FBX documentation is far too vague to say what the correct calculations should be. Can you test if this works for you?
On 17 February 2011 21:24, Sukender <[email protected]> wrote: > Hi Michael, hi all, > > I spotted a strange line in fbxMaterialToOsgStateSet.cpp : > result.opacityFactor = pFbxPhong->GetTransparencyFactor().Get(); > Which says the opacity map (if present) will be affected an "opacity". But > what is retreived from FBX is the "transparency", not the opacity. I guess > the line should be: > result.opacityFactor = 1.0 - pFbxPhong->GetTransparencyFactor().Get(); > But I'm not 100% sure. However, this solves the display of some models I > got :) > > Can anyone confirm (or not)? > Thanks. > > Sukender > PVLE - Lightweight cross-platform game engine - > http://pvle.sourceforge.net/ > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

