Hello,

Attached is patch that corrects/improves the following issues with the OBJ loader:

1. Added options to control wether the osgUtil::Tessellator or osgUtil::TriStripVisitor are run. By default they still run just as before. 2. Added support for the Emissive material. The data was being read from the mtl file but was never being applied to the model. 3. This is the main bug addressed, when a model is read in with an alpha value specified like:

newmtl Material__8
        Ns 24
        d 0.33
        illum 2
        Kd 0.204 0.204 0.204
        Ks 0 0 0
        Ka 0.153 0.153 0.153

where the alpha value is d. The loader would then overwrite the alpha value when reading the diffuse, specular, and ambient colors. I have changed all the material color readers to only set the values they read and to use the default colors specified in the constructor of the obj class. With these changes, the obj reader now handles opacity correctly if the alpha value is specified before the material color.

Doug

Attachment: objPatches.tar.bz2
Description: application/bzip2




_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to