compvis
04-03-2015 02:22:41
Hi,
I have problems with combining Hydrax, SkyX in Ogre 1.9.
- The Hydrax is not infinite, and it alway moves when camera moves
- The SkyX automatically scales when camera moves
- The Skyx doesn't reflect on the Hydrax's serface.
The code implements is:
Pic1: Hydrax is not infinite, moves when camera moves

Pics2,3: SkyX scales and doesn't reflect on Hydrax

I have problems with combining Hydrax, SkyX in Ogre 1.9.
- The Hydrax is not infinite, and it alway moves when camera moves
- The SkyX automatically scales when camera moves
- The Skyx doesn't reflect on the Hydrax's serface.
The code implements is:
///CAMERA SETTINGS
m_camera->setNearClipDistance(0.1f)
m_camera->setFarClipDistance(99999);
///SKY
m_sky_controller = OGRE_NEW GS_SkyController();
m_sky = OGRE_NEW SkyX::SkyX(Scene::getSingletonPtr()->getSM(),m_sky_controller);
m_sky->create();
SetDefaults(); //Init sky params
m_sky->getVCloudsManager()->getVClouds()->setDistanceFallingParams(Ogre::Vector2(2, -1));
RootObj::getSingletonPtr()->getRootObj()->addFrameListener(m_sky);
RenderObj::getSingletonPtr()->getRenderObj()->addListener(m_sky);
///HYDRAX
mSea = OGRE_NEW new Hydrax::Hydrax(Scene::getSingletonPtr()->getSM(),Scene::getSingletonPtr()->getCamera(),Scene::getSingletonPtr()->getViewport());
mSeaModule = new Hydrax::Module::ProjectedGrid(
mSea,
// Noise module
new Hydrax::Noise::Perlin(/*Generic one*/),
// Base plane
Ogre::Plane(Ogre::Vector3(0,1,0), Ogre::Vector3(0,0,0)),
// Normal mode
Hydrax::MaterialManager::NM_VERTEX,
// Projected grid options
Hydrax::Module::ProjectedGrid::Options(64));
mSea->setModule(static_cast<Hydrax::Module::Module*>(mSeaModule));
mSea->loadCfg(ConfigFile);
mSea->create();
//Update Sky and Hydrax in frameStarted
mSea->update(timePassed);
m_Sky->update(timePassed);
Pic1: Hydrax is not infinite, moves when camera moves
Pics2,3: SkyX scales and doesn't reflect on Hydrax