Jump to content

Cloud layer is vanishing when setting semimajor axis of ellipsoid


photo

Recommended Posts

Hi,

just tried to let the clouds vanish at the horizon. When using the c++ api, only the standard value of 6378.137 km is working correctly for the ellipsoid of the GeodeticPivot.

When I slightly change it the clouds will vanish.

I am using OpenGL and Unigine 2.7.2.1.

m_cloudsGeodetic = Unigine::GeodeticPivot::create();
m_cloudsGeodetic->setOriginBasis(Unigine::GeodeticPivot::ORIGIN_BASIS_LOCAL);
auto ellipsoid = m_cloudsGeodetic->getEllipsoid();
ellipsoid->setMode(Unigine::Ellipsoid::MODE_FAST);

ellipsoid->setSemimajorAxis(6378137.); //coverage normal
//ellipsoid->setSemimajorAxis(6378137.-500.); //coverage gets higly reduced
//ellipsoid->setSemimajorAxis(6378137.+500.); //coverage normal
//ellipsoid->setSemimajorAxis(6378137.+1000.); //no clouds visible anymore

....

m_cloudsGeodetic->addChild(cloudLayer->getNode());

Did I miss something or is it a bug?

Thanks

Sebastian

elipsoid+500.PNG

elipsoid-500.PNG

elipsoid+1000.PNG

Edited by sebastian.vesenmayer
Link to comment

Hello Sebastian,

Ellipsoid for GeodeticPivot has kind of "value based" semantic. Modifying the ellipsoid directly leads the geodetic pivot to inconsistent state.

Add this line:
m_cloudsGeodetic->setEllipsoid(ellipsoid);

It forces a geodetic pivot to update internal state according to the ellipsoid

Link to comment

Thank you this works. Can you please update the manual of the  Unigine::GeodeticPivot class and write a notice to the setEllipsoid and getEllipsoid method?

Link to comment
×
×
  • Create New...