Hi Robert,

Thanks for the quick response. This means a lot of code duplication and I guess I will have to traverse every tile for Terrain nodes.

I'll check it and see how it works out.

cheers
Sebastian
Hi Sebastian,

osgTerrain is designed to allow you to override the TerrainTechnique attached to the TerrainTile via the Terrain node that can be used to decorate the terrain. The Terrain::setTerrainTechniquePrototype(TerrainTechinque*) is used to set the TerrainTechnique that tiles should use.

By default osgTerrain will use the GeometryTechnique but you provide your own implementation or subclass from GeometryTechnique.

Robert.


On 2 April 2014 15:38, Sebastian Messerschmidt <[email protected] <mailto:[email protected]>> wrote:

    Hi,

    I have geocentric dataset (which is already compiled with osgDEM)
    and I'm facing an issue.
    In my shaders I rely on valid texture coordinates for tangentSpace
    generation and various other effects like detail-splatting.
    Unfortunately (and quite obvious due to performance restrictions)
    the GeometryTechnique will not create texture coordinates for
    Terrain tiles without textures.
    Due to missing LandSat-data at this areas, there are no images for
    those areas.

    (see around line 484 in GeometryTechnique.cpp)

    I wonder if there are any other options than
    a) modifying the VertexNormalGenerator::populateCenter function to
    create texture coordinates anyways
    b) Overriding the GeometryTechnique to use a custom
    VertexNormalGenerator which clones the functionality of the
    original one + adding texture coordinates for tiles without
    ImageLayer.

    Since the dataset is quite big, so recompiling it is out of the
    question right now.
    Also it would be a performance killer to traverse the TerrainTile
    manually and re-add some fake image layer.

    My idea would be to change the vertexNormalGenerator to optionally
    create texture coordinates. But I don't have an idea yet how to
    get this option into it.

    Any hints, ideas?


    _______________________________________________
    osg-users mailing list
    [email protected]
    <mailto:[email protected]>
    http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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

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

Reply via email to