Hi John, Data that can potentially cover the whole globe introduces problems when trying to use texgen to generate the coordinates. Due to this limitation of texgen the OverlayNode is not suitable. The fact that the texture is predefined also means that OverlayNode is not really suitable. SphereSegment exist to represent radar sectors/ranges, so again isn't a suitable tool.
Personally I'd go for a custom management of texture coordinates. One could possibly use multiple texgen nodes to handle the whole earth, perhaps placing texture matrices above tile subgraphs might also be a useful trick in shader. The trick would be to use the terrain's local texture coordinates that go from 0.0,0.0 to 1.0, 1.0, and then move this into lat/long/text coord range. Perhaps post processing of the terrain database could be done to add the texture matrices, or perhaps even add a second set of texture coordinates. There is a but with this though.. precision of the texture coordinates will be problem, but then any route you take is likely to have issues with this, unless you a clever about it. Robert. On Wed, Aug 20, 2008 at 2:11 PM, John Vidar Larring <[EMAIL PROTECTED]> wrote: > Hi Robert, > >> osgSim::SphereSegment doesn't have any support for texture >> coordinates, so if you want to texture them then you'll need to use >> osg::TexGen/TexGenNode to create the texture coordinates. > > OK, maybe there's a simpler solution to my original problem, which is > applying a "dynamic" texture as a lat/lon-limited overlay on an osgTerrain > database. > > E.g.: A piece of OpenGL code that has not been ported to OSG yet generates > filled temperature contours as a texture for a segment of the globe. What I > want to do is to apply this texture as an overlay on the osgTerrain at it's > correct navigation (which may potentially cover the whole globe). > > I have looked at how the osganimation, osgspheresegment and osgsimulation > examples use osgSim::OverlayNode, and from what I understand OverlayNode > does not accept textures directly, but it generates textures to overlay its > children (e.g. terrain) from a separate subgraph > (overlayNode->setOverlaySubgraph(...)). Hence, I thought putting the texture > onto a SphereSegment and set the SphereSegment as OverlaySubgraph would do > the trick. > > Is there an easier/better approach? If I used a quad geometry for the > OverlaySubgraph, would I get problems if the texture covers the whole globe? > Or is SphereSegment+TexGenNode the way to go? Or...?? > > Best regards, > John > > > Robert Osfield wrote: >> >> On Wed, Aug 20, 2008 at 11:57 AM, John Vidar Larring >> <[EMAIL PROTECTED]> wrote: >>> >>> Hi all, >>> >>> In danger of exposing ignorance, I need to ask this question: It should >>> be >>> possible to texture a SphereSegment, right? >> >> osgSim::SphereSegment doesn't have any support for texture >> coordinates, so if you want to texture them then you'll need to use >> osg::TexGen/TexGenNode to create the texture coordinates. >> >> Robert. >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > > > -- > Best regards, > John > WeatherOne > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > _______________________________________________ > 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

