There are generally two ways of creating minimaps. One way is to let an artist draw a representation of the map, as shown in the following screenshot. This usually ends up beautifully as it gives considerable freedom to the artist when it comes to style. The method is not that viable during development when scenes might be changing a lot, or for games with procedural content where the end result is not known beforehand.
In those cases, taking a snapshot of the actual scene can be very helpful. The resulting image can then be run through various filters (or shaders during rendering) to get a less raw look.
In this recipe, we'll achieve this by creating a new ViewPort
port, and FrameBuffer
to store a snapshot of a camera. Finally, we'll create NiftyImage
out of it and display it as a GUI element.