Hi Jonathan,

On 15 November 2011 13:21, Jonathan Klein <jonathan_kl...@web.de> wrote:
> Well, the problem is, that I need the surrounding heights. It is a terrain 
> visualisation project and i need to calculate things like openness (some 
> Ambient Occlusion related thing) or terrain roughness, for which I need for 
> example a 5x5 kernel around my pixel, so a heightmap lookup would be the 
> easiest..
>
> It seams that there is no way to extract that information just form the 
> vertex data (because the vertex shader only processes one vertex at a time).

osgTerrain and VPB are set up to do what you are asking of them - they
are set up to use HeightField for elevation data that is the source of
the geometry tiles, and use image layers for the textures that are
assigned to the geometry tiles.

However, perhaps you could assign a HeightField as a image layer and
have it be textured on to your tile?  I'm not sure how this would all
work out, but go have a look at the code and see how you might be able
to co-opt it to do what you require.  If there are small tweaks you
can make to osgTerrain and VPB to make it all hang together cleanly
then just post these into osg-submissions and I can review them what I
get back to do doing a submissions purge.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to