Thanks Robert for the good explanation (as always ;-) ). I was looking for
the piece of the code in VPB that generates the normals, was curious about
the algo. But found it in the osgUtil::SmoothingVisitor .. This one is
actually generating very nice results.

Thanks again!

Cheers,
Nick

On Thu, Nov 24, 2016 at 4:49 PM, Robert Osfield <[email protected]>
wrote:

> On 24 November 2016 at 14:32, Trajce Nikolov NICK
> <[email protected]> wrote:
> > anyone with a knowledge if VPB is generating normals for the terrain skin
> > and can point me to the code snippet where these normals are being
> > calculated?
>
> By default VirtualPlanetBuilder creates paged databases that use
> osgTerrain::TerrainTile for the representation and rendering of the
> individual terrain tiles. The height field component
> (HeightFieldLayer) is uses an osg::HeightField internally to store all
> the heights, no normals are stored.
>
> The normals used for rendering at created by the TerrainTechnique, if
> you use the default osgTerrain::GeometryTechnhique then it'll create
> an osg::Geometry with vertices, normals and texcoords to do the
> rendering.  If you use the DisplacementMappingTechnique then it'll be
> the shaders that that will compute the normals in the vertex shader.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to