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
Faded Terrain Distance?
Try using the fog then
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.
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.
Thank you for the setFog() tip it worked just as i was wanting.
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.
Code: Select all
//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.