Steffen, Can I suggest you try to reply to the mailing list, rather than just to me? Others might have a better idea.
In general, the issue of appearance preservation - and your specific issue of material/lighting - within an art path is a vexing one. The lighting equations used by a modelling package (3DS in this case) are not necessarily the same as OpenGL fixed function. Similarly, the meaning of all the various material coefficients within the lighting model - even if they have the same name - may not be the same.The way these various coefficients map to each other across file format conversions also matters. In your case, there are two possible sources of error : firstly the Collada exporter in 3DS, and secondly the collada importer in OSG, neither of which I know much about. I would use osgconv to convert your DAE into a .osg model, and then examine that in a text editor, looking for colours and materials (and even the lights themselves, if .osg will write them out). You could even post your .osg model - so long as it's small enough - to see if any of the rest of the mailing list spot anything. Alternatively you could load your model, and then (I guess, because I've never done it) traverse your scene graph with a custom visitor looking for statesets that have lights in. Once you find some, you could scale back their intensity one by one. What would be good in general would be to have a look at the OpenGL red book (old versions are available on line), or even http://www.falloutsoftware.com/tutorials/gl/gl8.htm, to see how lighting is applied. You might want to look at the globalAmbient settings, although I guess you could test to see whether this was the case by setting all your models lights colours to 0 0 0. Hope that helps. David 2008/11/12 Steffen B. <[EMAIL PROTECTED]> > With one light it isn't bright but still more bright as in 3ds MAX. Apart > from the fact that i still going via collada do you know how can i regulate > the intensity of the lights. > For example: > i create a simple red box in 3ds max and put 8 omni lights around. the box > is now white because of the lights. > if i decrease the intensity of the lights in 3ds max i can see a beautiful > illuminated red box. but when import the box > in my programm everything is still white. > now it would be interessting to know if there are some setting in opengl to > regulate the intensity of the lights. > > i hope you understand me > > thanks steffen > > ----- Original Message ----- > > *From:* David Spilling <[EMAIL PROTECTED]> > *To:* Steffen B. <[EMAIL PROTECTED]> ; OpenSceneGraph Users<[EMAIL PROTECTED]> > *Sent:* Wednesday, November 12, 2008 4:22 PM > *Subject:* Re: osg Collada Plugin > > Steffen, > > Are you still going via collada? Unfortunately I know nothing about the > Collada import route and how it handles lights defined in a model file. > > Does the same thing happen with only one light? I suspect that OpenGL is > just (correctly) adding up all the contributions from the various lights you > have and consequently saturating the output. > > David > > 2008/11/12 Steffen B. <[EMAIL PROTECTED]> > >> Hi, >> >> i have turned the specular colour to 0 0 0 and it is a bit better. >> But i have another question. In 3ds max i can regulate the ligth intensity >> with the multiplier parameter. do you know how i can regulate the >> intensity >> with osg? >> >> thank you for your efforts >> > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
