Hi all,

I've been looking at the FBX plugin over the last few days, and it seems to me that it sets all material diffuseColor to have 0 alpha... So the loaded objects aren't visible. This happens both when loading an FBX file I created myself in Softimage XSI Mod Tool 7.5, and when loading an FBX file downloaded from the net, for example:

http://creators.xna.com/en-US/sample/skinnedmodel

The zip file SkinningSample.zip from the above page contains a dude.fbx file in the directory SkinningSample\SkinningSample\Content. Loading this in either osgviewer or osganimationviewer (recent SVN, updated and compiled yesterday), you won't see anything. If I osgconv it to .osg, I can see that indeed, all Materials have the diffuseColor alpha set to 0. If I just set it to 1 and load that .osg file, everything is visible as it should.

I can see this code in the fbx plugin:

  pOsgMat->setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4(
      static_cast<float>(color[0] * factor),
      static_cast<float>(color[1] * factor),
      static_cast<float>(color[2] * factor),
      static_cast<float>(1.0 -
                         pFbxLambert->GetTransparencyFactor().Get())));

Why is it done that way? Are the files I've been using invalid (i.e. setting transparency as if it was opacity or vice versa)? It seems weird to me, since as I said I've confirmed this with both models created in XSI and a model I downloaded from the XNA samples. What models has this been tested with?

BTW, I was using XSI 7.5 Mod Tool with CrossWalk 4.1. Not sure what the sample model I downloaded was created with.

Thanks in advance,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to