Alberto Luaces wrote:
El Friday 04 January 2008 11:20:30 omkaranathan r escribió:
Hi all,
I am trying to load some .3ds files in OSG. The model becomes white in
colour when I turn off the lighting. Is this a known issue with .3ds files
or is it that I am doing something wrong? I am attaching the .3ds file.
Thanks
Om
I think it's fine. If you convert the model to a .osg file through the osgconv
program, you'll see that only materials are defined. When you disable
lighting, you are discarding OpenGL materials, and using the OpenGL colour
instead, which is white by default. See on the state set of every part of
your model:
StateSet {
DataVariance STATIC
rendering_hint DEFAULT_BIN
renderBinMode INHERIT
Material {
DataVariance STATIC
ColorMode OFF
ambientColor 0 0 0 1
diffuseColor 0.701961 0.635294 0.576471 1
specularColor 0 0 0 0.4
emissionColor 0 0 0 1
shininess 51.2
}
Alberto
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Thanks for the suggestion.
Is there any tool available to transfer the per-vertex material colour
to OpenGL colour(instead of default white) while converting to any of
the OSG supported formats?
Or is there any other way by which I can overcome this?
Thanks .
Om.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org