Unlit/Grey Terrain

rhaith

01-10-2009 15:53:14

I'm having some issues implementing Caelum into my program. After setting up Caelum I am able to get a gradient sky with a sun and moon but my terrain turns grey - much like it has no light on it. I'm also not able to get any kind of movement or clouds working. I've been trying to load different scripts from the exaple sky config file and I'm able to get them to load somewhat but they are all static and without proper light sources. Any help me much appreciated. Here's a screen shot of what I mean.
[attachment=0]problem.jpg[/attachment]


Update: My terrain shows up fine in OpenGL mode but looks like above in DX9

Fish

01-10-2009 18:48:03

Have you tried something like this:
viewtopic.php?p=60686#p60686

-Fish

rhaith

02-10-2009 13:52:00

That got it! Thank you very much!
I must of missed that post when I was searching yesterday, sorry for the duplicate question.

jolen

03-11-2010 11:11:39

EDIT: alright, never mind.. I copied the code from the CaelumDemo and did not initialize the paused-variable... should've thought about that eralier, when dealing with a paused scene :oops: ... well, now I know that an uninitialized bool seems to be flase by default in vstudio ;)

I'm also not able to get any kind of movement or clouds working. I've been trying to load different scripts from the exaple sky config file and I'm able to get them to load somewhat but they are all static and without proper light sources.


Hi, I had the same problems and setting the fogdistance solved the grey meshes. But how did you solve the problem of the static sky, sun and clouds? They show up fine in my application, but they are all static. I guess there is some initialization or updating step I'm missing, but I can't figure out which one...

I initialize my CaelumSystem like this:

Caelum::CaelumSystem::CaelumComponent componentMask;
componentMask = Caelum::CaelumSystem::CAELUM_COMPONENTS_DEFAULT;

// Initialise CaelumSystem.
_caelumSystem = new Caelum::CaelumSystem (_ogreRoot, _sceneManager, componentMask);

// Set time acceleration.
_caelumSystem->getUniversalClock ()->setTimeScale (4096);

// Register caelum as a listener.
_engineRoot->getRenderWindow()->addListener (_caelumSystem);
_ogreRoot->addFrameListener (_caelumSystem);

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

caelumUpdateSpeedFactor(_caelumSystem->getUniversalClock ()->getTimeScale ());


From what I've read, this should be all I have to do right? I also tried adding this to my frameStarted() function:
_caelumSystem->notifyCameraChanged (_camera);
_caelumSystem->updateSubcomponents(evt.timeSinceLastFrame);


But nothing changed. Is there something I have to do before I create the CaelumSystem or after it? I tried creating it right after creating the camera and I tried it at the end of my scenecreation...