I am using setFarValue() to set how far my user can see but it looks like the terrain just ends at that distance and the sky starts. I am wanting an effect like world of warcraft has where there is a fog or blur that starts at a certain distance to fade out the terrain. Where if setFarValue() is high then you have a view like this....
however when setFarValue() is low then you get a blured effect like this...
instead of this hard edge
I believe the per pixel lighting tutorial uses fog, very lightly in it so that will show you how to set it up.
Basically i think all you need to do is to firstly set up the fog with driver->setfog() and then for each scene node you want affected by the fog you set the material flag for fog to true on that node.
//setup the fog
driver->setFog(video::SColor(0,138,125,81), true, 1000, 10000, 0, true);
//apply the fog to terrain
terrain->setMaterialFlag(video::EMF_FOG_ENABLE, true);
I went a little overboard with the amount of fog in this screenshot now i just have to make the bottom parts of my skybox match the fog. Thanks again for the quick response.
Yeah that's the only problem with this fog is that it only affects scene nodes, not the skybox or open space, so if you had a gap in your terrain you could just see straight through it and there would be no fog there, but if you are surrounded by terrain all the time then it should look fine!