[Solved] SkyX Problem

RcALTIN

29-01-2013 00:41:48

I have a problem with skyx...

If I move the camera some blinking black areas appear on the sky, but when i sink the camera into to hydrax water, these black areas looks like ok without a problem...






(camera in the water, sky is ok)

my createScene func:
//world
mLoader = new DotSceneLoader();
mLoader->mTerrainGlobalOptions->setUseVertexCompressionWhenAvailable(false);
mLoader->parseDotScene(mSceneFile, "General", mSceneMgr);

//pg
for(unsigned int ij = 0;ij < mLoader->mPGHandles.size();ij++)
{
mLoader->mPGHandles[ij]->setCamera(mCamera);
}

//hydrax
mHydrax = new Hydrax::Hydrax(mSceneMgr, mCamera, mWindow->getViewport(0));
Hydrax::Module::ProjectedGrid *mModule = new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
mHydrax,
// 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(/*264 /*Generic one*/));
mHydrax->setModule(static_cast<Hydrax::Module::Module*>(mModule));

mHydrax->loadCfg("Hydrax.hdx");
mHydrax->create();

//depth to hydrax
Ogre::TerrainGroup::TerrainIterator ti = mLoader->getTerrainGroup()->getTerrainIterator();
while(ti.hasMoreElements())
{
Ogre::Terrain* t = ti.getNext()->instance;
Ogre::MaterialPtr ptr = t->getMaterial();
mHydrax->getMaterialManager()->addDepthTechnique(ptr->createTechnique());
}

// Create SkyX object
mBasicController = new SkyX::BasicController();
mSkyX = new SkyX::SkyX(mSceneMgr, mBasicController);
mSkyX->create();
mSkyX->getVCloudsManager()->getVClouds()->setDistanceFallingParams(Ogre::Vector2(2,-1));
mRoot->addFrameListener(mSkyX);
mWindow->addListener(mSkyX);

// create our character controller
mChara = new CharacterController(mCamera);


Also i couldn't compile skyx from source, because i couldn't generate files with cmake of it.. So i am using precompiled depencies from here but this is compiled for ogre 1.9.0(i'm using 1.8.1 sdk), i think this is not the reason?

RcALTIN

29-01-2013 02:43:40

I found the problem, it related with clipdistance!

I just deleted these lines, then it solved:

mCamera->setFarClipDistance(500000);
mCamera->setAutoAspectRatio(true);



Sorry for creating topic, this is my fault, i would check this firstly...