[Solved]How to remove the line between Caelum and Hydrax??

spe02001

19-07-2009 08:33:01

How to remove the line between Caelum and Hydrax??
This is the image.

lansglenn

19-07-2009 11:34:24

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:

1.) Make sure to set sky to *DRAW FIRST*.

// 4th argument must be set to true
mSceneMgr->setSkyBox(true, "SkyBox2048_01", 30000, true);


2.) Move the setWorldGeometry method down in the createScene method as far as syntax-tically(sp?) possible.

Here's my complete "createScene" method:

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());
}



Don't ask me how that fixes that line problem, it just does. I found out by process of elimination and comparing differences between the createScene in the demo and my own.

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:

So how about using Caelum to be the skybox.
(Caelum 4.0 and Hydrax 5.0)

al2950

27-07-2009 09:30:19

Please make sure you search the forum before posting.....

You should find all your answers here;

viewtopic.php?f=20&t=8458&hilit=hydrax+caelum

Enjoy :)

spe02001

02-08-2009 20:00:46

I found the solution now.
It is better to use this code. :mrgreen:


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

thanks, works for me as well!!!

my specs:
software libs: caelum 4.0 + hydrax 5.0 + ogre 1.62
system: intel macbook pro on winxpsp2 via bootcamp, nvidia 8600m gt, nvidia driver version 178.08, directx 9c
hydrax rendermode: hlsl and cg
ogre rendermode: direct3d9

i will test on my mac as well and post the results...

any info why this help and how it works?
would be interesting to know. thanks in advance