Re: [osg-users] VPB and terrain normals

2016-11-24 Thread Trajce Nikolov NICK
Thanks Nickolai ! :)

On Thu, Nov 24, 2016 at 7:15 PM, Nickolai Medvedev 
wrote:

> Hi, Nick! :)
>
> You try to create the implementation of a terrain?
> Try this example.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69496#69496
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB and terrain normals

2016-11-24 Thread Nickolai Medvedev
Hi, Nick! :)

You try to create the implementation of a terrain?
Try this example.

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





18_FindingTriangles.7z
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB and terrain normals

2016-11-24 Thread Trajce Nikolov NICK
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 
wrote:

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



-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VPB and terrain normals

2016-11-24 Thread Robert Osfield
On 24 November 2016 at 14:32, Trajce Nikolov NICK
 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@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] VPB and terrain normals

2016-11-24 Thread Trajce Nikolov NICK
Hi Community,

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?

Thanks a lot as always

-- 
trajce nikolov nick
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org