开发者

GD/PHP heatmaps on geographical background

I am trying to reproduce the heatmap effect Bungie uses to show kills/deaths on specific halo 3 maps using PHP and GD. (Example: http://www.bungie.net/stats/halo3/heatmapstats.aspx?player=gatts007 - pick a map like "Guardian" for a better example.)

I have all the data and background map images from my game, but I am having trouble coming up with a way to actually get the gradient to work correctly.

Here is my process so far:

  1. On a pure black background: For each kill Draw white gradient-t开发者_Go百科ranslucent circle (solid near the middle, 100% translucent at the edge) at that location on the map. (This is working well.)
  2. Now replace any solid black pixel with a pure translucent pixel.
  3. Map a color scale to the remaining pixels to get the heat map effect. (Use gray scale value to map to a color.)
  4. Place this created image on top of the real map background.

I am having problems with steps 2 and 3. Does anyone have some good examples of these steps? Or better yet, a process that will give better results?

Thanks!


Maybe this class could help: http://www.labsmedia.com/clickheat/heatmap.html

You can also try Heat map API: http://www.heatmapapi.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜