[osg-users] Issue with Model Display in OSG with VR Juggler
gbivins at objectreservoir.com
Thu Jul 3 11:50:24 PDT 2008
Have you tried "normalizing" your normals after scaling?
On 7/3/08 1:36 PM, "Galen Faidley" <gfaidley at gmail.com> wrote:
> Thanks for getting back to Abhishek on this. I have been working with
> him on the issue as well.
> We had already tried alternate default lights and the custom lighting
> but nothing seemed to help (we also tried them again after your post
> as a sanity check). However, seeing the working lights in your screen
> shot made us do some more experimentation. It turns out we were not
> quite using the default osgNav. We had scaled the model by a factor
> 0.001. When we removed the scale the lighting behaved as expected.
> We also added the scale to the osg file and the lighting in osgviewer
> looked exactly like what we originally saw in juggler (the files are
> both attached).
> So I guess the question is how do we scale a light or at least get
> equivalently lighting with the scaled model? I tried a number of
> things: attaching the light below the scale transform, scaling the
> light position, and scaling all the light parameters
> (constant_attenuation, linear_attenuation, etc). So far none of these
> seem to make a difference.
> We'd appreciate any insight.
> On Thu, Jul 3, 2008 at 11:26 AM, Doug McCorkle <mccdo at iastate.edu> wrote:
>> On Jul 3, 2008, at 11:06 AM, Abhishek Seth wrote:
>>> Hi !
>>> I am having problems with how models look when loaded in my Application. I
>>> am using OSGNav Sample program from VR Juggler 2.2.1 with OSG 2.4. Juggler
>>> uses osgUtil::SceneView but does not use osgViewer::.
>>> When I load the file in OsgViewer it looks great; however in Juggler's
>>> OSGNav it looks awful (the colors get washed out). I suspect this is related
>>> to how Juggler is handling the Materials and Lighting while rendering the
>>> model. I have spent a fair amount of time working through osgviewer.exe in
>>> the debuger to try to determine the what it is doing with lighting. It
>>> seems to set up multiple lights and calls into the light::apply each frame.
>>> Juggler sets up a sigle light and never calls into the light::apply after
>>> the initial set up. Before I investigate this further I thought I'd asked
>>> the list since I have the suspicion that is this something simple and
>>> someone might recognive the issue my just looking at a few screen shots. I
>>> have attached screenshots for both Juggler's OSGNav & OSGViewer and also the
>>> osg file them self. Furthermore, I have also included a simple model of a
>>> cube that demonstrates the same effect.
>> I imagine this has something to do with how the light is being setup. I
>> would try using different settings in the:
>> or setup your own light:
>> Here is what your data looks like in my VR Juggler / OSG app.
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users