Hello!

    I'm using impostors in my application. I searched the mailing list for 
mails and the osgimpostor example that could answer the issue i have, but not 
one can answer.
To test the impostors, i just use them on 3 osg::Sphere. So for one osg::Sphere 
i wrote the following code:

osg::ref_ptr<osgSim::Impostor> impostor = new osgSim::Impostor();
impostor->setImpostorThreshold(DistVisu/2);
impostor->addChild(PlanetGeode.get()); /*PlanetGeode contains the osg::Sphere*/
impostor->setRange(0,0.0f,DistVisu);
impostor->setCenter(PlanetGeode.get()->getBound.center());

    But at runtime, i have white quads instead of the images that should have 
been cached by the impostors.

Then i thought it was because i forgot those 3 lines:

osgSim::InsertImpostorsVisitor ov;
root->accept(ov); /*root is an osg::Group that contains the three impostors*/
ov.insertImpostors();

    But those lines did not change anything, i still have the 3 white quads. 
And when i rotate the scene, i can see that the 3 quads do not point the 
viewer. In a while, when rotating, the 3 white quads are replaced by the 
osg::Sphere, and then the "LOD" does not seem to work anymore: when i move away 
from the 3 osg::Sphere, the spheres does not disappear but stay displayed until 
they are as big as one pixel.
Did i forget something in my code that makes the impostors not working 
properly? And why the quads (the cached images) do not rotate toward the viewer 
like billboards?

I thank you in advance!

Belthil

Créez votre adresse électronique [EMAIL PROTECTED] 
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to