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/

Reply via email to