Sky goes black when moving camera

hedphelym

24-10-2009 21:21:37

Hi,
I'm having problems when translating camera, the sky turns black.
It is no such problem when rotating camera, just when "moving" it.
Any tips? (I'm using the wrapped version and Mogre).

[attachment=1]sky_black.jpg[/attachment]

[attachment=0]sky_color.jpg[/attachment]

Fish

25-10-2009 00:47:00

You need to read the API docs for CaelumSystem. Look for the "Updating" section.
If notifyCameraChanged is not called correctly the most likely result is "flickering" when moving the camera. If you move the camera AFTER notifyCameraChanged then the domes will not be positioned correctly and will appear to lag slightly after the camera. Since updates are always done every frame keeping the camera still will make problems disappear. The lag also results in the sky turning black. You can also read about CaelumSystem updating on the wiki. Look for the "Updating CaelumSystem" section.

During Caelum setup you need to call:

mCaelumSystem->setAutoNotifyCameraChanged(false);

and then once per frame you need to call:

mCaelumSystem->notifyCameraChanged(mCamera);
mCaelumSystem->updateSubcomponents(timeSinceLastFrame);


Hope that helps. :)

-Fish

hedphelym

25-10-2009 10:40:23

hi, thank you for the reply,
I realised today that I forgot to say that it happens while using the compositor..("Bloom").

When not using the compositor it works great.