Then I tried to add osg::PagedLOD with several 3D models instead of single osg::Node* 3D model. After these changes - I can't see any 3D models on Earth and no errors in console.
So I decided to use osgEarth::GeoTransform and osg::AutoTransform:
this->modelScaled = new osg::AutoTransform;
this->modelOnEarth = new osgEarth::GeoTransform();
// To enable textures on 3D model
This looks almost fine, but if I set object position with Altitude=0 and move camera close to object - object's 3D model is very big. It doesn't return to scale=1.0. And PagedLOD is also not working.
I guess some wrong calculations of AutoTransform are made, so that it thinks that camera is too distant from Node.
Any ideas how to fix this or should I use another approach?
And now I observe strange behaviour of PagedLOD.
In case EarthManipulator is watching straight to earth (90 degrees), PagedLOD is loading Mid-poly model no matter how far the camera is.
If I tilt Manipulator a bit, this spot of blue mid-poly models moves towards projected position of Manipulator to earth's surface.
Is it correct behaviour?
P.S. Also in this video you can see switching from high-poly to mid-poly while zooming. I guess that's problem with my implementation of autoScale.
You don't show your entire PagedLOD setup but I will speculate.
One guess: PagedLOD is based on distance from the camera to the bounding sphere of the object. Since an AutoTransform'd object scales based on distance, its bounding sphere will scale as well, causing the effective range calculation to be the same regardless of the camera distance.
Another possibility is that you are using PIXEL_SIZE_ON_SCREEN mode which, as above, will cause the ranges to be expressed in pixels instead of meters.