[SOLVED] Caelum + Materials

raymccooney

03-07-2009 23:13:07

Hi guys!

I've created a sample project and loaded a simple mesh (ogrehead.mesh). Once I include&enable caelum, the material/texture of the mesh disappears!
I figured out the reason: It's where the caelum system gets added to the root node:

mRoot->addFrameListener(mCaelumSystem);

When I comment that line out, the material of the mesh reappears, but of course caelum doesn't work anymore.
When I leave it that way, caelum works but the material disappears.
I already checked Ogre.log and couldn't find any missing file or any error/warning at all.
Funny thing is, when I insert the mesh in the CaelumDemo project, it doesn't work either. Only after I comment out the framelistener...


Here are two screenshots:




How I'm loading Caelum:
// Caelum
Caelum::CaelumSystem::CaelumComponent componentMask;
componentMask = static_cast<Caelum::CaelumSystem::CaelumComponent> (
Caelum::CaelumSystem::CAELUM_COMPONENT_SUN |
Caelum::CaelumSystem::CAELUM_COMPONENT_MOON |
Caelum::CaelumSystem::CAELUM_COMPONENT_SKY_DOME |
//Caelum::CaelumSystem::CAELUM_COMPONENT_IMAGE_STARFIELD |
Caelum::CaelumSystem::CAELUM_COMPONENT_POINT_STARFIELD |
Caelum::CaelumSystem::CAELUM_COMPONENT_CLOUDS |
0);

mCaelumSystem = new Caelum::CaelumSystem(mRoot, mSceneMgr, componentMask);

mWindow->addListener(mCaelumSystem);
mRoot->addFrameListener(mCaelumSystem);




Does anybody have a clue why this happens? What am I doing wrong/what's missing?

Thanks in advance!

Ray McCooney

Fish

03-07-2009 23:38:17

It looks like fog density is too high. Try:


mCaelumSystem->setSceneFogDensityMultiplier(0.0008f); // or some other small value.
mCaelumSystem->setManageSceneFog(true);


-Fish

raymccooney

04-07-2009 10:41:56

That did the trick, thank you a thousand times Fish!
For me it sounds a bit strange that fog isn't disabled by default, but that's probably the way you guys want it to be.



Case closed.