Ykkrosh Posted January 30, 2011 Report Share Posted January 30, 2011 I experimented a bit with using the terrain blending system for rendering fog-of-war, which looks like this (though it's a hacky prototype so I won't commit the code). It's very reminiscent of AoK's fog, and more stylised/cartoonish than the AoM/AoE3 wide blur. (We could use more or less blurry blend textures easily, but it'll still be strongly tile-based.)Is this a good artistic approach, or a terrible one? Quote Link to comment Share on other sites More sharing options...
Kimball Posted January 30, 2011 Report Share Posted January 30, 2011 Neat idea. I'm pretty happy with what we've got now, and I think I'm not alone in saying that the wide blur method is preferred. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted January 30, 2011 Author Report Share Posted January 30, 2011 I think what we've got now is awfully ugly . Diagonal lines in one direction are smooth but in the other direction are very jagged (which is unavoidable since it depends on the direction of triangulation of tiles), so it needs some new method (though not urgently). Quote Link to comment Share on other sites More sharing options...
Pureon Posted January 30, 2011 Report Share Posted January 30, 2011 I do prefer the look of your new experimental fog, much better in my opinion. I don't like to FOW in the current build, in some directions the huge spiky pixels look ugly, but it does serve it's purpose so can't really complain. Is it possible to have 2 different FOW options? Users with low-end systems could switch from the default FOW (possibly wide blur), to a less system intensive option like the one you just posted. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted January 30, 2011 Author Report Share Posted January 30, 2011 I don't expect there'd be any significant difference in performance, and I'd prefer us not to have to implement and maintain and test more options than is really necessary, so I think we should stick with just one (whichever matches the look we want). Quote Link to comment Share on other sites More sharing options...
Pureon Posted January 30, 2011 Report Share Posted January 30, 2011 In which case my preferred option would be AoE3 wide blur, but I'd be very happy if your experimental FOW was used to replace the existing method for now. Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted January 30, 2011 Report Share Posted January 30, 2011 AoE3 style is probably best, but that version is much better than what we have currently. So, I would say change it (as long as it's not too much work). Quote Link to comment Share on other sites More sharing options...
Kimball Posted January 30, 2011 Report Share Posted January 30, 2011 I take back what I said.. I suppose I hadn't really looked at our current fog rendering, but I agree that this is better than what we currently have. And I also agree that the wide blur style is what we'll want to adopt eventually. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted January 30, 2011 Author Report Share Posted January 30, 2011 (as long as it's not too much work)The code I used for that screenshot is awfully inefficient and slightly broken so it'd need to be entirely redesigned, and that would probably be about as much work as doing the AoE3-style blur, so in that case it sounds like it'd be better to just implement the blur instead. (I'm assuming the blur basically consists of a map-sized dynamically-generated greyscale texture that's stuck on top of the terrain, since that sounds like it'd work and I don't know how else it could be done.) Quote Link to comment Share on other sites More sharing options...
Shield Bearer Posted January 30, 2011 Report Share Posted January 30, 2011 Rite, blur i think is the best direction to take this in. But the one u showed above was pretty neat too, although i don' think it would fit our art style. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted January 30, 2011 Report Share Posted January 30, 2011 It's an incremental improvement, which is always good. I suppose it could work for now until someone figures out how they do the wide blur? Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted January 31, 2011 Author Report Share Posted January 31, 2011 I tried a blur. Does that look like what people want? (Should it be more/less blurry? Darker/lighter shade for the previously-explored areas?)(This is done by creating a bitmap with one pixel per map tile, then doing a single 5x5 box blur on it, then uploading as a GL texture, then multiplying the terrain by that texture. My current implementation is inefficient and buggy and needs to be rewritten but the basic idea seems to work.) Quote Link to comment Share on other sites More sharing options...
Pureon Posted January 31, 2011 Report Share Posted January 31, 2011 Looks perfect to me, both the smoothness of the blur and the opacity of the previously-explored areas. Nicely done. Quote Link to comment Share on other sites More sharing options...
Jeru Posted January 31, 2011 Report Share Posted January 31, 2011 Lovin' it! Quote Link to comment Share on other sites More sharing options...
feneur Posted January 31, 2011 Report Share Posted January 31, 2011 First when I looked at the picture I thought I was still in the Normal/Spec mapping thread and thought you'd implemented a version of Bloom. I was not impressed. Then I realized it was the Fog-of-war thread and was amazed Great work Philip, if you can get it quick enough this definitely seems like it's the way to go. (It even almost feels like this and the texture bug fix are enough to create a new release, but they're probably not big enough features for most people to care about. On the other hand, if we wait until we have AI before making the release they will probably not get noticed =) They're perfect for small news updates though, so I think that's the way to go. Alpha 4 waits for AI imho.) Quote Link to comment Share on other sites More sharing options...
Kimball Posted February 1, 2011 Report Share Posted February 1, 2011 Excellent! Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted February 1, 2011 Author Report Share Posted February 1, 2011 The most annoying thing about implementing this fog is that one part of it wants the graphics hardware/drivers to support 3 texture units, and OpenGL only guarantees 2. Currently our rendering code only requires 2 (it can make use of 3 or 4 but has fallbacks). In practice, I've only seen really ancient devices with 2 (except some modern mobile ones but they only support OpenGL ES so they won't work anyway) - it looks like GeForce4 MX has 2; GeForce 3 / 4 Ti has 4; Radeon 7500 has 3; Intel GMA 900 has 8; etc. This page indicates similar numbers.It wouldn't be particularly complex to continue supporting 2-TU hardware in this case - it just needs an extra render pass, but that'll make it even slower (and these are presumably extremely old devices), and it's another codepath to test and maintain. And actually this case is only when shadows are enabled, which are going to be terribly slow on old hardware anyway. So I think we should say that if you only have 2 texture units then you have to disable shadows - that'll simplify the code a bit and it shouldn't affect any real users. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted February 1, 2011 Report Share Posted February 1, 2011 That actually looks pretty good. Me like. Maybe a little lighter for the explored areas? Quote Link to comment Share on other sites More sharing options...
WhiteTreePaladin Posted February 1, 2011 Report Share Posted February 1, 2011 Very nice indeed. Quote Link to comment Share on other sites More sharing options...
Shield Bearer Posted February 1, 2011 Report Share Posted February 1, 2011 Awesome! Great job Philip! Quote Link to comment Share on other sites More sharing options...
plumo Posted February 1, 2011 Report Share Posted February 1, 2011 Very nice When you look closely it still is a bit edgy below the blur. But a massive improvement nonetheless. Quote Link to comment Share on other sites More sharing options...
Gen.Kenobi Posted February 1, 2011 Report Share Posted February 1, 2011 Amazing job indeed...Well about the old computers hardware issues, I guess that's why the Minimium Requeriments for the game play are there for...sometimes a game will just not play into an specific hardware (It already has happened to me...) Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted February 1, 2011 Author Report Share Posted February 1, 2011 When you look closely it still is a bit edgy below the blur. But a massive improvement nonetheless.I think it can never be perfectly smooth, since the input data is limited to one value per tile (since that's what the visibility computations provide). That's converted a texture with one pixel per tile, then blurred - I suppose it'd be technically possible to use a higher-resolution texture so the blurring can partially mask the tile edges but that sounds like a significant extra cost for little benefit (since the texture can already be 512x512). And I think AoE3 has exactly the same edgy behaviour, and nobody seems to mind their fog Well about the old computers hardware issues, I guess that's why the Minimium Requeriments for the game play are there for...sometimes a game will just not play into an specific hardware (It already has happened to me...)Yeah, I just don't really like telling people they can't play our game . Our stated minimum requirements are GeForce 3, and have been since about 2003, which is already very low (and prevents us from e.g. relying on shaders) - but someone over here had a Radeon 7500 which is lower than that, so it seems there's still some practical value in continuing support. But disabling shadows in those cases seems fine, and means there's no longer a problem. Quote Link to comment Share on other sites More sharing options...
Shield Bearer Posted February 1, 2011 Report Share Posted February 1, 2011 Yeah, AoE3 is like that too. I think its quite good and doesn't at all look bad. Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted February 3, 2011 Report Share Posted February 3, 2011 I just playtested with the new fog, and I think it actually looks BETTER than AOE3's FOW. Awesome work, Philip! And you thought it would be hard to do. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.