Hi, I'm running into an issue that I think is related, but not exactly the same.
Prior to the 3.2 release, I could load an .stl file using the osgDB::readNodeFile(~) function, and it would come out looking like a diffuse white material. Presumably this was just a default setting somewhere in OSG or OpenGL, because the .stl file doesn't encode color or material properties. In the latest release, the file gets loaded as a shiny golden color (attachment "A"). I tried applying setGlobalDefaults() to the Viewer's Camera, but this had no effect. I also tried applying setGlobalDefaults() to the node which gets generated from osgDB::readNodeFile(~), and this changed the golden color to a blackish color (attachment "B"). I found that I could crawl through the auto-generated node and parse out its geodes and geometries, then change their color array to whatever I want. I imagine I could do something similar with their materials to get rid of the shininess. However, this is a problem for two reasons: (1) It's annoying, and more importantly (2) If some color/material properties are loaded from the file, I don't want to overwrite them. I'd really just like a way to get back the behavior prior to 3.2 where a loaded node would have some reasonable default rendering properties if the properties aren't provided by the file that's being loaded. If anyone has suggestions for how I might be able to accomplish this in a robust way, I would greatly appreciate it! I suspect there's probably some stupidly simple thing I could do that I'm just not aware of because of my inexperience with OSG. Thanks! ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61381#61381 Attachments: http://forum.openscenegraph.org//files/dark_robot_376.png http://forum.openscenegraph.org//files/gold_robot_174.png _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

