minimap

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RE: minimap

      This can be handled in a lot of ways.

      Option #1 - break your large texture up into smaller bits and display only the ones that you need to show your map. If you need to support zooming in/out, then yes you'll need to create mipmaps for the entire texture and display the ones that represent your zoom level.

      Option #2 - Put tags on the 3D objects that need to be included in the minimap and render them in real time with a separate camera - render them to a texture that you then apply to your map object. This has the advantage of being able to show a real time "satellite" view, even with dynamic objects in the scene.

      Option 2 also has the advantage that you don't have to re-author your map texture every time your map changes. It is a method that demands more from your CPU/GPU.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • RE: minimap

      Also - by my calculations that 2500x2500 texture is going to take about 23Mb of memory - which is a bit beyond the maximum texture size of many gaming platforms (2048x2048 is the maximum for many iOS devices, for example).

      That's just another reason to break this texture up into smaller bits.

      One final thing - in order to display a portion of it onto the screen, just create a quad and set the UV coordinates to whereever represents the location you want to display. If you want to draw a circular "radar" style map, look into using a stencil buffer technique.
      Mr.Mike
      Author, Programmer, Brewer, Patriot