[osg-submissions] Fixes and tweaks to .obj material handling

Robert Osfield robert.osfield at gmail.com
Mon Dec 10 11:48:29 PST 2007


Thanks Ulrich, changes now merged and submitted to SVN.

On Oct 12, 2007 2:58 AM, Ulrich Hertlein <u.hertlein at sandbox.de> wrote:
> Hi Robert,
>
> attached are some fixes and tweaks I made to the .obj loader:
> - Material class contained both 'shininess' and 'Ns' member variables
> - 'Ns' and 'Ni' are initialized to 0 ('Ni' is unused at the moment)
> - only 'Ns' was read from .mtl file but 'shininess' was used for osg::Material
> - 'illum' was read from .mtl file but never used; it is now used as follows
> -- illum==0 -> no osg::Material created/attached therefore no lighting
> -- illum==1 -> osg::Material specular is set to black
> -- illum==2 (default) -> specular read from .mtl file is used
> - 'map_Kd' and 'map_Ks' may contain additional arguments (e.g. '-s 1 1 1'),
> these are now skipped over and the texture filename is properly extracted
>
> Cheers,
> /ulrich
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>


More information about the osg-submissions mailing list