Hi Torben, On Fri, Dec 31, 2010 at 5:47 PM, Torben Dannhauer <[email protected]> wrote: > Would a line intersection (Height of terrain) return elevation values at a > hole, or does i regocnize that "there is no terrain inside the hole" ?
If you've generate an osg::Geometry mesh that has the holes in it then it won't return intersections at these holes. However if you clip fragments to create the holes then the intersection routines will return a hit and you'll need to post process the intersection to see of the intersection is in one of your holes. > What could be the right source to clip the fragments? > > a ) Using an alpha value and using the alphaFunc to clip the fragments, or > > b) would it be better (regarding long term improvement of osgTerrain) to > introduce a new layer type as "mask" to mark which parts of a tile are > visible and which are part of the hole in the terrain. For fragment based clipping then it has to be done on the GPU using a texture as input, or by passing in a per vertex attribute and use a geometry program or fragment program to clip the primitives accordingly. Which is a better approach will depend upon the data your have and your specific needs. > If you recommend using approach a), how can I apply alpha value to the color > layer? My VPB database has compressed textures, so it is not possible to add > an alpha channel and set alpha values on the fly :( is it possible to use the > alpha channel of a second color layer for blending? You can attach multiple colour layers to a terrain, and you can also assign alpha values and still have the imagery compressed. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

