Hi Thomas, On Tue, Dec 21, 2010 at 3:51 AM, Thomas Dickerson <osgfo...@tevs.eu> wrote: > If I have a heightfield which tiles cleanly, is there a mechanism to > make a terrain repeat indefinitely?
There's isn't any mechanism in osgTerrain for repeating terrain. The OSG allows you share subgraphs so you could repeat a sugraph offsetting it by decorating the subgrpah with transform node to place each shared subgraph in it's appropriate place. > Is there any sort of mechanism to draw a hole in a patch of terrain? There isn't any built in support for changing the mesh of each tile to have holes in it. You can however make holes using a texture such as having a texture with a alpha value then clipping the fragments out based using osg::AlphaFunc (wrapper for glAlphaFunc). > If not, how would such a thing be implemented? It depends upon you actual requirements. If you do need to modify the mesh then you could implement your own TerrainTechnique in place of the default GeoemtryTechnique, your custom TerrainTechnique would then take over responsibility of meshing the height fields and setting up the appropriate state (i.e. texturing etc.). > Can you have multiple layers of texture over the same heightfield? > (i.e. a background texture and another "detail" texture painted over it? Yes, TerrainTIle allows for multiple colour layers. > In the documentation I see names like "TerrainTechnique" "Layer" > "Terrain" and "TerrainTile" being thrown around without much description of > the roll of any individual class. Is this documented in any reasonable form > somewhere, or would someone care to explain them? osgTerrain::TerrainTile holds all the data required to represent a side terrain tile - holding a elevation layer and any colour layers that you wish to be textured ontop of it. osgTerrain::TerrainTechnique is the base class for techniques that convert the TerrainTile data into a renderable scene graph, this scene graph for rendering is held by the TerrainTechnique and passed to the cull traversal on each frame. GeometryTechnique is currently the only implementation of TerrainTechnique provided by osgTerrain. osgTerrain::Terrain is an optional terrain control node for decorating the scene graph that contains your TerrainTiles. The Terrain node provide high level control over vertical scaling, the terrain technique to use etc. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org