[osg-submissions] OBJ Loader Patches
Doug McCorkle
mccdo at iastate.edu
Thu Jul 3 09:07:38 PDT 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objPatches.tar.bz2
Type: application/bzip2
Size: 7891 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080703/65872230/attachment.bin>
-------------- next part --------------
More information about the osg-submissions
mailing list