Hi, I just spent some time looking into this and I have to agree with Baker about removing the divide by 9.99. I created a simple model and exported to some popular formats (3DS, collada, vrml) and the specular color in those models is a factor of 10 greater than the value in the osg file.
Regarding the shininess setting, I'm not sure what the right thing to do is. I looked at the value exported by the various formats, and they are all over the place. It does match the value in the 3DS format though, so I'm thinking we should stick to the current behavior. If nobody has any strong objections, I will go ahead and remove the divide by 9.99. Cheers, Farshid On Tue, Jun 28, 2011 at 3:16 PM, Bradley Baker Searles <[email protected]>wrote: > Hi Guys, > > We're running into this issue as well, and I'd agree that to synchronize > what the artist sees in MAX with what is rendered in OSG, the scale by 9.99 > should not happen. Currently the MAX specular level of 999 is required to > get an OSG specular material value of 1.0, which means the object is > "glowing hot" in MAX, and normal looking in our OSG app. > > This change would also allow the artist the range of 0.0 to 9.99 in the OSG > material, so they could oversaturate it if desired. > > I'm also of the opinion that the exponent shouldn't be scaled from the MAX > (0-100) to OSG (0-128). It's just the exponent for the specular > contribution. I'd personally trade consistency between the authoring > environment and our OSG app for losing out on the exponent values of 101+ > (which we aren't using anyway). > > So I'd propose that this code in MtlKeeper::createMaterial(...) remove the > divide by 9.99 from the setSpecular() call, and the setShininess() call > multiply by 100.0 instead of 128.0. > > Thanks- > Baker Searles > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=41001#41001 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

