spe02001
19-07-2009 08:33:01
How to remove the line between Caelum and Hydrax??
This is the image.
This is the image.
spe02001
19-07-2009 08:33:01
lansglenn
19-07-2009 11:34:24
// 4th argument must be set to true
mSceneMgr->setSkyBox(true, "SkyBox2048_01", 30000, true);
void StartState::initialize() {
LOG("StartState::initialize >>> Starting.");
mSceneMgr = getSceneManager(mRoot, "StartSceneMgr");
if ( !mSceneMgr )
mSceneMgr = mRoot->createSceneManager(ST_EXTERIOR_CLOSE, "StartSceneMgr");
// Ambient light
mSceneMgr->setAmbientLight(ColourValue(1.0, 1.0, 1.0));
// Sky
mSceneMgr->setSkyBox(true, "SkyBox2048_01", 30000, true);
// Fog
//mSceneMgr->setFog(FOG_LINEAR, ColourValue(1, 1, 1), 0.01, 15000, 30000);
// Set camera properties
mCamera = getCamera(mSceneMgr, "StartCamera");
if ( !mCamera )
mCamera = mSceneMgr->createCamera("StartCamera");
mCamera->setNearClipDistance(5);
mCamera->setFarClipDistance(99999*6);
mCamera->setPosition(0, 0, 0);
mCamera->pitch(Degree(0));
mCamera->yaw(Degree(0));
//mCamera->setAutoAspectRatio(true);
mCameraNode = getSceneNode(mSceneMgr, "StartCameraNode");
if ( mCameraNode == NULL ) {
mCameraNode = mSceneMgr->getRootSceneNode()->createChildSceneNode("StartCameraNode", Vector3::ZERO);
mCameraNode->attachObject(mCamera);
mCameraNode->setPosition(312.902,206.419,1524.02);
}
// Light
Ogre::Light *mLight = mSceneMgr->createLight("Light0");
mLight->setPosition(Ogre::Vector3(6000, 10000, 0));
mLight->setDiffuseColour(.75, .75, .75);
mLight->setSpecularColour(ColourValue(0, 0, 0)); // no specular
mViewport = mWindow->addViewport(mCamera);
mViewport->setBackgroundColour(ColourValue(0.0, 0.0, 0.0));
mHydrax = new Hydrax::Hydrax(mSceneMgr, mCamera, mViewport);
// Create our projected grid module
Hydrax::Module::ProjectedGrid* mModule
= new Hydrax::Module::ProjectedGrid(// Hydrax parent pointer
mHydrax,
// Noise module
new Hydrax::Noise::Perlin(),
// 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*/));
// Set our module
mHydrax->setModule(static_cast<Hydrax::Module::Module*>(mModule));
// Load all parameters from settings file
mHydrax->loadCfg("Mission01_Ocean.hdx");
mHydrax->create();
// Terrain *NOTICE HOW THIS IS BASICALLY THE LAST ADJUSTMENT TO SCENE MANAGER*
mSceneMgr->setWorldGeometry("StartTerrain.cfg");
mHydrax->getMaterialManager()->addDepthTechnique(static_cast<Ogre::MaterialPtr>(Ogre::MaterialManager::getSingleton().getByName("StartTerrain"))->createTechnique());
}
spe02001
23-07-2009 10:40:12
Not sure if you have the that same problem if you used a regular SkyBox, but that's the problem I was having a few hours ago and I fixed it by a few tweaks to the createScene method:
al2950
27-07-2009 09:30:19
spe02001
02-08-2009 20:00:46
std::vector<Ogre::RenderQueueGroupID> caelumskyqueue;
caelumskyqueue.push_back(static_cast<Ogre::RenderQueueGroupID>(Ogre::RENDER_QUEUE_SKIES_EARLY + 2));
mHydrax->getRttManager()->setDisableReflectionCustomNearCliplPlaneRenderQueues (caelumskyqueue);
didito
27-08-2009 22:17:27