Sign in to follow this  
id_roman

which fog to use?

Recommended Posts

Hello. I have a terrain that will be dynamically loaded so that terrain that is far from the camera wouldn't be rendered(preloaded maybe). What I want is to use fog to hide not-rendered-at-the-time terrain. What would be the best way to do this? There is no need to fog the sky because my camera is locked to up-down view. Is there any documentation that compares different fog techniques? I've tried using Direct3D render states to add fog but I managed only to fog my vertices. There is no actual fog in the air. Good luck!

Share this post


Link to post
Share on other sites
Quote:
Original post by id_romanI've tried using Direct3D render states to add fog but I managed only to fog my vertices. There is no actual fog in the air.

Thats 'cos thats what 'fog' means to a graphics card - it shades all the vertices with the fog colour based on their distance to the camera.

Typically you set the background colour to the same as the fog colour, then objects appear to move in and out of the fog. Where this breaks down however is with sky boxes/domes/etc. Obviously you don't want to fog these, otherwise they'd be totally obscured, so you turn fog off. However now you've probably broken your illusion of fog because you can see the fully-fogged geometry popping up in front of your detailed skybox.

Often people just colour their skybox horizon the same as the fog colour. I've also seen methods that attempt to fade the terrain out into the skybox, but that tends to need lots of blending and tends to look at tad odd IMHO.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this