[osg-users] VPB and terrain normals

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Thu Nov 24 09:49:34 PST 2016


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 <robert.osfield at gmail.com>
wrote:

> On 24 November 2016 at 14:32, Trajce Nikolov NICK
> <trajce.nikolov.nick at gmail.com> 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
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161124/7f6eb5d1/attachment-0003.htm>


More information about the osg-users mailing list