Hi, I'm still fairly new to OSG and finding my way around. I have a little problem that I need done very quickly, so hope someone can help.
I'm trying to apply alpha to a group node so it affects all geometry under it while preserving their other material properties. I've loaded a .lwo model, that comes with its own materials. It has several different materials applied to its various parts. I need to control the transparency of the whole model at once. I can make a new osg::Material, set the alpha and apply it to the top node, that works, but then I lose all the materials the model came with, and gives me default greys. How can I just modify the alpha of the whole thing and leave the rest alone? I've tried 'getting' the material and setting the alpha to that, but it crashes on the setAlpha call. (Although I'm probably handling something wrong there, since there are several materials involved, not just one). Do I need to recurse thru the model's scene graph, get each material, and set alpha individually? If thats the case, ok, but could someone show me some quick code to do that? Like I said, I've been crashing on setting alpha in the material I 'get', and also I've never recursed thru an imported model before, (which I will eventually need to do anyway). Any help is appreciated Thank you! Cheers, Phil ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30882#30882 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org