Jump to content
  • Advertisement
Sign in to follow this  
skillfreak

fog of war (war3?)

This topic is 4460 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was flipping through this thread over fog of war: http://www.gamedev.net/community/forums/topic.asp?topic_id=389954&whichpage=1� A quote from there: "IIRC (just from viewing) Warcraft 3 had large fog polygons..." Is that to say, high rez textures per polygon? My overall question is how is fog of war implemented, with fine blending as seen with Warcraft III? Thx as always, ^sf.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I've been using a 128x128 texture stretched over my entire terrain (which is 1024x1024 in units), Two screenies of a while ago:

Screenshot 1

Screenshot 2

I'm just filling up the texture with a D3DXFillTexture call (or something similar)

Hope this helps. I haven't played WoW. :).

Edit:

Hm, I'll have to explain a bit more.

I'm using a pixel shader. The pixelshader just determines how much the object should be darkened, by looking up the amount of red and green in the texture. This is applied to water, objects, terrain, etc. :).

Share this post


Link to post
Share on other sites
That was only my recollection from playing the game. I.e., that as you move, rather large triangular sections of the map become fogged or unfogged. If you want guesses as to how this is implemented, one guess would be that an artist (or tool) overlays a triangle layer over the ground, and that is used for fogging. If you draw it without depth checking, the layer's heights don't really need to be accurate.

But I guess what you're asking is about the soft edges. I really can't say about Warcraft. Watching it might bring a few ideas, but I haven't played it in years. Scaling up textures is a convenient way to get a soft edge. I did fog of war by applying a 16x16 fog texture to each ground square. Scaled up (using bilinear filtering) it looked rather smooth.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!