kdr35
06-01-2011 10:33:14
Hi,
I use orthographic camera and want to use fog effect in Mogre.
For example:
mSceneMgr.SetFog(FogMode.FOG_LINEAR, fadeColour, 0, 50, 500);
or
mSceneMgr.SetFog(FogMode.FOG_EXP2, fadeColour, 0.003f);
But I have one problem with orthographic camera. While the fog effect works fine in with perspective camera, it doesnt work with orthografic camera.
In addition to that, I dont use any terrain in my program. Instead of terrain, I use Rectangle2D then i do some settings ;
My Rectangle2D isnt effected by fog , it is correct because it doesnt has any perspective properties.
I have two question;
1- Can i use fog effect in orthographic camera?
2- Can i use fog effect with infinite Rectangle2D background ?
thanks
I use orthographic camera and want to use fog effect in Mogre.
For example:
mSceneMgr.SetFog(FogMode.FOG_LINEAR, fadeColour, 0, 50, 500);
or
mSceneMgr.SetFog(FogMode.FOG_EXP2, fadeColour, 0.003f);
But I have one problem with orthographic camera. While the fog effect works fine in with perspective camera, it doesnt work with orthografic camera.
In addition to that, I dont use any terrain in my program. Instead of terrain, I use Rectangle2D then i do some settings ;
Rectangle2D rect = new Rectangle2D(true);
rect.SetCorners(-1.0f, 1.0f, 1.0f, -1.0f);
rect.SetMaterial("BackgroundMaterial");
// Render the background before everything else
rect.RenderQueueGroup = (byte)RenderQueueGroupID.RENDER_QUEUE_BACKGROUND;
// Use infinite AAB to always stay visible
AxisAlignedBox aab = new AxisAlignedBox();
aab.SetInfinite();
rect.BoundingBox = aab;
rect.VisibilityFlags = 2;
SceneNode nodeBack = Mogre.Root.Singleton.GetSceneManager("Main").RootSceneNode.CreateChildSceneNode("BackgroundNode");
nodeBack.AttachObject(rect);
My Rectangle2D isnt effected by fog , it is correct because it doesnt has any perspective properties.
I have two question;
1- Can i use fog effect in orthographic camera?
2- Can i use fog effect with infinite Rectangle2D background ?
thanks