[osg-users] Tiny normals: osgviewer vs osgcompositeviewer

Julien Valentin julienvalentin51 at gmail.com
Fri Feb 8 19:11:52 PST 2019


Hi,
Normal scaling happen in osgUtil/TransformAttributeFunctor.cpp l.44 

Code:
        for (osg::Vec3d* itr=begin;itr<end;++itr)
        {
            // note post mult by inverse for normals.
            (*itr) = osg::Matrix::transform3x3(_im,(*itr));
            (*itr).normalize();
        }


All seams right ..
perhaps forcing orthogonality of the 3x3 with pseudo inverse and remove normalization can give better result...Don't know
Cheers

Bonghi wrote:
> Hi Per,
> 
> I'm finding the same problem as I'm trying to build a viewer that integrates a variety of models coming in different units (eg. mm vs. m).
> 
> Have you had any further look at the code to include a fix?
> 
> My thinking is that normals should only be rotated by the transform matrix, but I've not invested time yet to understand where this should happen in the code. 
> 
> Thanks,
> Claudio
[/code]

------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75610#75610







More information about the osg-users mailing list