Download

MiniMap with Texture instead of Scene Capture 2D

Hi Guys,

I have implemented a MiniMap based on textures or images, avoiding usage of the scene capture 2D, which however will be also available in future releases.

52buGM3.png

Here is my material which I use to present the map texture:

85aa3d5e81a88e84817526063c568b0f0cf306e2.png

Map based on textures (Material)
In current version the widget supports only maps based on textures. The textures must be in a quadratic form and cover an quadratic area of the UE space which is centered around x=0 and y=0.

Customizable size and position
The Map widget can be set to any size as long as the width and height are same. The widget is placed on a canvas panel and can be docked anywhere in the viewport.

Zooming
The map can be zoomed in and out. The zoom level can be adjusted from blueprint externally.

Dynamic POIs (Points of Interest)
The widget uses a collision sphere around the player character and detects bign and end overlap events. When such an event happens, the widget checks for specific tags under the actor and based on that adds POIs to the map and keeps track of them. When the actors leave the collision sphere, the POIs are removed.

Static POIs (Points of Interest)
Static POIs can be manually added and will be tracked always on the map even when out of range the POIs will be shown on the corner of the map and point in direction of that actor, which is useful for point to some game objectives or location further away.

Map to World translation
Clicking on the map will trigger an event dispatch which provides the map click location and the click location translated to world location.

The Sample Project on Github with tutorial on the wiki page: https://github.com/damirporobic/UE4_Minimap
Let me know if you would like to see some additional features.

Cheers,
Damir

Just wondering, how are you planning on producing the map textures? If you have a way that creates a parallel projection of the map then I may be able to help, but if it’s not then the coordinate system will be unpredictable.

If performance is your concern, I’d suggest using a scene capture 2D however using show flags to only render minimap objects (these are abstractions of the actual world data, such as a simple unlit sphere instead of a player or NPC).

This type of thing is definitely possible in Unity, but I haven’t yet attempted it in Unreal.

Edit:

On manual inspection, it seems UE4 neither supports orthographic scene captures nor layer based selective rendering. You could probably do some hack to hide everything that doesn’t have a certain tag, but it seems like there’s no legit way to do this, which is a shame because I need a minimap in my project.

sooooooo i have done a minimap with umg i’m suppose to make a tutorial for it but haven’t done it still

Even with a hack I think it won’t give the right results. I have used the scene capture 2D in some project but always there was this question about providing a minimap that uses a drawn map instead of a 1:1 image of the map. I’m not sure yet how it scales with large textures, need to test this, eventually use several smaller images with some offset.

Can you share some details? Does it use this kind of approach or is there a better way to do it?

yes,it’s using umg a dynamic material and basically i just alter the uv of a texture to move it similar to your way,i also use a timer and a overlap sphere to get all the objects in it(i compare them to the old list if something is in the old list but not in the new i delete it in the list and remove the widget,if it doesn’t exist in the old one i add it in the list and create a widget and if it exist in the old one and it’s in the new one it just updates the widget).the widgets are positioned around the character(he is ignored in the sphere overlap) and we just add a widget that is static in the middle of the widget,the other ones we convert to local to your character by subtracting it’s location to your character where we get coordinates we can use for the minimap we need to scale those by the scale of the widget and by the distance of the minimap texture is zoomed at(this might be tricky cause it matter how much of the map you’re viewing with the minimap texture).
|

Thanks for the tips. I’ve managed so far to show POIs on the map, it also works with zoom in and out. Will look tomorrow into dynamically adding those POIs, so far it’s only statically. The Overlay padding gave me some headache, 100top != 100left, seems to be asymmetric but my map is a square so it was always positioned incorrectly, fixed that by multiplying the left padding with screen.width/screen.height.

I’ve added now dynamic POIs though I’ve used a bit different approach then you Velocityx, I’ve created a collision sphere which add POIs on begin overlap and removes them on end overlap, I’m happy with the solution, looks nice, works fine I guess. I’ve added some comments to make it easier to understand, will eventually add some tutorial for it on the github page and also add more functionality, like click on map translation to world location, pointers which show direction and so. I’m open for more community wishes :slight_smile:

Hey nice work, would you mind adding a picture of the radar how it looks in game? Also a video tutorial on how to add this map would be so awesome. Still thanks for the share

Thanks for the feedback! I’ll try to add those two, pictures today, tutorial later on when I find some spare time :wink:

guess your gonna make it,i might do a ability/weapons combo tutorial

I have implemented a small tutorial on how to add the widget in your own project, check out the “Getting Started” page on GitHub. I will later on make a tutorial that explains how to create this kind of widget but for now, I’ll continue with adding more features.

Excellent, nice to see some more free content for this community, but I’m not sure if I will be able to use your map, because I am creating a maze game and if the layout of the maze is displayed on the mini map it’s not very good for me. Also I need to display the enemies only when they are in your field of view or atleast they are visible from your 360 degree view. Nonetheless, I will keep an eye on your progress, keep us updated :smiley:

Well that is in interesting idea with just the view in front of the player character, I’ll keep that in mind in case some idea crosses my mind :slight_smile:

Also maybe it would be a good idea to make it more like a radar? (that most mmorpg has) I’m not saying that minimap is bad, but the radar could be more practical and maybe easier to make. What do you think?
Example:
images.png

this is basically the same thing,if you read my comment i explain how to do it if so i think his project has it

Yeah, it’s a nice idea. I think that this could be easily implemented, even with current setup, just try to use a box collision instead of sphere and position it like this:

70efebf92b236e04f8fe69d70b9fe7ca51c46879.jpeg

On the map only POIs will appear that are within the collision shape you have provided when creating the widget. I’ll check it out later if it actually works, but it seems to be doable.

@Frutis6, here an example with super professional textures:

Screenshot_20160708_162011.png

To get this kind of setup, just get any kind of grid background and set it as texture in the MaptMaterial. Next, open up the MiniMapWidget and add two new images to the Overlay. Make sure the first one (in my example called viewport) is set as variable, the other can be left as default. In the first image, the one that is a variable, you set the image that will present the viewport, in the second image you set the cover that comes at the top and hides the corners.
Screenshot_20160708_163700.png

Last step, disable map updates, this will prevent the grid from moving around and add a rotation to the viewport image so that it always point in the same direction which the player character is facing.

df91c36eed55b263a48ea5f912851017a0477ec5.png

You can expand this further with only showing actors in front of the player character (though this would not be a real radar in my opinion) and make it nicer without the ugly cover, so on…

Hope this helps :slight_smile:

[MENTION=32788]Damir Porobic[/MENTION], very nice man. I’m very new at ue so I will try to set up this somehow :D. Do you have nay ideas how to display enemies only from your field of view? Furthermore, if you can fully finish the radar, I would suggest adding it to the market for like 5$(free is also good, my point is that I would better pay a small fee instead of getting an unfinished product, most of the free content is good, but usually it gets outdated, putting it on the market would leave you obliged to make updates). It would help out a lot of people + you will get something in return.

Those points are valid but there is already a MiniMap/Radar Widget on the Marketplace and my intention was to provide some content to those people that do this here on a hobby basis and can’t afford to buy everything from marketplace. I personally like to know how stuff in my projects work so I would usually check out how someone has implemented it and then try to do it myself in a way that fits my project and just spending 40$+ just to have a look at something how it was made makes no sense to me. Another point is that I don’t want to duplicate content (and I don’t know what Epic says about it), as said, there is MiniMap Widget out there which seems to be working fine, people that can afford it are happy with it.

Regarding the support stuff, I’ll keep supporting and upgrading as long as people are interested in the stuff :slight_smile:

Awesome to hear that, but I don’t think that there would be a problem adding a similar addon to the marketplace, it wouldn’t make sense if you can only have 1 type of addon inside the market. And there would be definetely people buying for 5$, because personally I wound’t spend 40$+ on a radar. Nonetheless, as I said before, it’s cool that you are giving something free for the community. Will probably use your minimap/radar when it’s a little bit more polished, because I don’t have enough knowledge to do something more than it is now.