Hi,

The problem is that I can't find any osgTerrain:Terrain node in the file 
generated by VPB. 

The following command always returns NULL:

osgTerrain::Terrain* testNode = 
findTopMostNodeOfType<osgTerrain::Terrain>(terrainNode);

/David


-----Ursprungligt meddelande-----
Från: [email protected] 
[mailto:[email protected]] För J.P. Delport
Skickat: den 26 februari 2009 10:20
Till: OpenSceneGraph Users
Ämne: Re: [osg-users] How to use setSampleRatio on terrain generated with VPB?

Hi,

have a look at the osgmultitexturecontrol example. Search for setSampleRatio.

jp

David Karlsson wrote:
> Hello,
> 
> I'm having problem with my terrain generated using Virtual planet builder. 
> Basically, what I want to do is to control the resolution/lod-scale of the 
> rendered terrain. If I simply add the node to the scene graph, the terrain is 
> rendered using the most detailed lod-level very far away from the camera 
> resulting in a lot of unnecessary geometry: 
> 
> http://www.student.itn.liu.se/~davka531/render_wireframe2.jpg
> 
> I found out that I can control this by using setLODScale(...) on the camera, 
> but this will unfortunately change the behaviour of all lod-nodes in the 
> scene - not only the level of detail of the terrain. 
> 
> Instead I tried to use setSampleRatio(...) on the terrain node. The problem 
> in this case is that I can't find a osgTerrain::Terrain node in the .ive file 
> generated from vpb. All I got are osgTerrain::TerrainTile nodes, and I can't 
> get the osgTerrain::TerrainTile::getTerrain(...) functions to return a valid 
> pointer. What have I missed? Aren't TerrainTiles supposed to be connected to 
> a Terrain node?
> 
> Some addtional info:
> 
> The command used to build the terrain:
> 
> osgdem.exe --geocentric --TERRAIN --PagedLOD 
> --max-visible-distance-of-top-level 200000 --layer 0 -t dir1 --layer 1 
> -t dir2 --layer 2 -t dir3 -d heightDir -l 10 -o terrain.ive
> 
> OSG version: 2.8.0
> VPB version: 0.9.9 (revision 953)
> 
> Finally, I would like to say thank you to the osg community for helping me 
> out with some of my previous posts. Very appreciated!
> 
> /David
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
> org
> 

--
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

_______________________________________________
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