defcon's water gradient?

does anyone have any idea as to how one would do the ‘water gradient’ in java similar to what was done in the maps of defcon?

http://www.introversion.co.uk/defcon/about/screenshots.html

cause i’m just loving that ‘glow’ but I cant really think of how you would code it to evenly/smoothly dispurse away from an irregular coastline…

any ideas ppl?

Could be a version of the vector map, scale based on the normals of the vertices and then using vertex colours to provide the graident. The strip of geometry around the outside would have it’s vertex colours set to the background colour and inner set to some bright version.

Kev

2 pixel-based ways:

You could follow the lines (Bresenham) and draw circles with low intensity in white (or change the hsv values in the destination image), then draw the continents with 80% intensity.

If you don’t have a Bresenham:
for i=1 to 5

  1. draw continent outlines
  2. blur the whole image
  3. goto 1)

then draw the continents.

The images look like if they did it that way because the continents are ca. 80% black and 20% background color.

I can’t tell from the screenshots - is the gradient actually part of the map/globe, or is it added on top as a regular bloom/glow pass?

I suppose you could even do it as a offline bloom pass and save the result to a texture since the map won’t ever change.

Not sure of the exact process - but there are 2 polygon meshes, a high detail one used for the borders, and a low detail one - which looks like it maybe used for the glow.
This would account for the apparent discontinuity between the white borders, and the underlying blue highlight.

Not sure if the above behaviour can be changed in the graphics detail settings though.

My guess would be that for every vertex in the low-poly mesh, it is drawing a texture with a radial gradient.

Whatever it’s doing, it isn’t very efficient - Defcon used to run like a dog on my work PC.

If it’s two actual meshes then it’s entirely possible it was created by hand. After all Defcon isn’t really an art-heavy game and they only have one globe so it’s probably much easier to get an artist to spend a couple of days on it than write some complicated rendering method which will probably be slower to draw and exhibit artifacts.