Robert,

Thanks for the quick response. Doh, that was my first thought! But I got 
sidetracked when I saw that camera node in the scene and wondered what would 
happen if I took it out!

I think I will hack a renormalize option into osgconv and see what happens.

However, I still do not understand why removing the cone drawable, which as far 
as I can see is switched off by the switch node, should make things appear to 
work. 

Roger

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Robert Osfield
> Sent: 02 July 2007 13:11
> To: osg users
> Subject: Re: [osg-users] osgconv scaling affects colours
> 
> Hi Roger,
> 
> Lighting issues related to scaling are typically associated with the
> scaling of normals causing problems with OpenGL lighting computation
> See include/osg/Transform for details.
> 
> Robert.
> 
> On 7/2/07, Roger James <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > I am seeing some strange colour effects on a simple model exported from
> > Google Sketchup. All these tests have been done on OSG 1.9.8 but with my
> > Collada mods from 2.0 applied. If someone could verify the results on
> 2.0
> > that would be helpful. The attached Collada file plank.dae was extracted
> > from a kmz archive exported by Sketchup. The units for the file are
> inches.
> > If you display the file or its osg equivalent plank.osg (produced using
> > osgconv with no parameters) you should see a lump of wood with a simple
> > brown colouring.
> >
> >
> >
> > However I needed the model to be metric so I ran osgconv on it with "-s
> > 0.0254,0.0254,0.0254" to put a scaling transform in it. The result of
> this
> > is attached as plankscaled.osg. When I look it this file in osgviewer,
> > instead of seeing a nice brown plank I see a white one with some strange
> > subtle directional colour effects overlaid on it. The geometry also
> seems
> > slightly distorted. How can a simple scaling transform produce such
> effects.
> >
> >
> >
> > On looking into the collada file I saw that the scene in there included
> a
> > camera node. This is translated by the importer into MatrixTrasnform
> node
> > which holds a Switch node which holds a Geode containing a Cone
> drawable.
> > This cone drawable is switched off. So in theory it should have no
> effect on
> > the osg scene. I decided to hand edit the Collada camera node out of the
> > Collada file. To my surprise (well not really J) the scaling operation
> now
> > worked exactly as expected. The results are attached as
> > planknocamera.dae/osg and planknocamerascaled.osg.
> >
> >
> >
> > So firstly can someone verify this on 2.0 for me, and secondly does
> anyone
> > have any idea what is going on?
> >
> >
> >
> > My finger of suspicion is currently pointing at the optimizer.
> >
> >
> >
> > Roger
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to