Re: [osg-users] GeometryTechnique and texture coordinates

2014-04-03 Thread Sebastian Messerschmidt

Hi Robert,

Thank you. Works like a charm.
I mixed up Terrain and TerrainTile, and since the top-level node of the 
osgdem is a Terrain, it was a piece of cake ;-)



On 2 April 2014 15:55, Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de 
mailto:sebastian.messerschm...@gmx.de wrote:


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.


No, the design is meant that your just assign your custom 
TerrainTechnique to the Terrain node that decorates the terrain scene 
graph.


Robert.


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


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


Re: [osg-users] GeometryTechnique and texture coordinates

2014-04-03 Thread Robert Osfield
On 3 April 2014 08:15, Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de wrote:

  Thank you. Works like a charm.
 I mixed up Terrain and TerrainTile, and since the top-level node of the
 osgdem is a Terrain, it was a piece of cake ;-)


Great to hear that it worked out, as nature intended :-)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] GeometryTechnique and texture coordinates

2014-04-02 Thread Sebastian Messerschmidt

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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] GeometryTechnique and texture coordinates

2014-04-02 Thread Robert Osfield
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 
sebastian.messerschm...@gmx.de 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
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] GeometryTechnique and texture coordinates

2014-04-02 Thread Sebastian Messerschmidt

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 
sebastian.messerschm...@gmx.de 
mailto:sebastian.messerschm...@gmx.de 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
osg-users@lists.openscenegraph.org
mailto:osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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


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


Re: [osg-users] GeometryTechnique and texture coordinates

2014-04-02 Thread Robert Osfield
On 2 April 2014 15:55, Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de wrote:

  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.


No, the design is meant that your just assign your custom TerrainTechnique
to the Terrain node that decorates the terrain scene graph.

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