Another possibility: the COLLADA exporter expects the lights to attenuate a certain way, but the OSG plugin isn't setting any attenuation parameters.

--"J"



Tomlinson, Gordon wrote:
One possible caveat to add, Plugins such as the OpenFlight simply discards light sources when they are read from a file, mainly due to the limitation OpenGL gives us by default in OSG which is 8 Lights so I'm assuming without looking at the OSG colada plug-in that is most likely doing the same, conversely you might getting 8 lights applied to your model and its simply washing it out Best bet is to have root around the source of the OSG Collada plugin and see what it doing with the lights if any thing also NOTE this list is for submissions nad related posts only and not these types of OSG questions
/Gordon/

__________________________________________________________
/Gordon Tomlinson/

/Product Manager 3D
//Email / : gtomlinson @ overwatch.textron.com
__________________________________________________________
//(C)//:/ (+1) 571-265-2612*
*(W)//:/ //(+1) 703-437-7651//

"Self defence is not a function of learning tricks
but is a function of how quickly and intensely one
can arouse one's instinct for survival"
- */Master Tambo Tetsura/*

------------------------------------------------------------------------
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *David Spilling
*Sent:* Wednesday, November 12, 2008 3:58 PM
*To:* Steffen B.; OpenSceneGraph Submissions
*Subject:* Re: [osg-submissions] osg Collada Plugin

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] <mailto:[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 <mailto:[EMAIL PROTECTED]>
        *To:* Steffen B. <mailto:[EMAIL PROTECTED]> ; OpenSceneGraph
        Users <mailto:[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]
        <mailto:[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

Reply via email to