Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[WIP] Birds Eye - Terrain Mapping

Discussion in 'Assets and Asset Store' started by NemoKrad, Feb 25, 2016.

  1. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Continuing on from a discussion started in the Distingo Thread (Page 6)
    This is for a current WIP, at the moment it is a real time elevation map rendered to a UI RawImage, but this will be extended to a Texture2D so you can then do what you like with the map at any point during your game.



    Other than an elevation map, is there any other map types I could look at rendering (by the way, this already has a satellite option too).

    If you are interested in this asset then you can check out the online documentation as I write it too here :)
     
    Last edited: Apr 8, 2016
    TheSeawolf, boysenberry and Tinjaw like this.
  2. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,927
    Excellent! How about a road map? Is that possible? I think it would have to be done with some sort of markers on the terrain though, not sure. Or you could maybe only map that particular texture used on the road?
     
  3. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Is there a noise texture applied or what is producing the "old map" noise?
     
    NemoKrad likes this.
  4. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Could be a good starting point for a mini-map to then add in quest marker icons and various settlements/POIs :)
     
    Stormy102, TheSeawolf and NemoKrad like this.
  5. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    At the moment, the elevation map is using the camera depth texture, Ill have a think about how I could create a road map.

    No, at the moment it's just using a texture for that, it's optional too, ill get some more pics up on here later to show the sort of things you can do with this map type.

    Yep, that could be another map type :)
     
  6. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,927
    NemoKrad likes this.
  7. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes, I saw that, tried it, it does not work, or I could not get it to work any way. My approach would do a similar thing, only with shaders. I think they are doing all that via JavaScript, I don't think it is optimal, I might be wrong though.
     
  8. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    So, here are some more screen shots to give you an idea of what you can do with the simple elevation map.


    You can change the line thickness (and color, but not took a shot of that)

    Change the BG base color

    Change the magnitude of the elevation layers

    Zoom the map in and out

    Apply a BG texture

    Have a Satellite view (I have miss spelled it on the current UI) :(

    Current UI looks like this


    So, that's the current elevation map, would be good to know what other map types I could add, and see how I could do them, all input welcome :)
     
  9. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Suggestion. Add a utility script that can be attached to GameObjects. If it is attached, Birds Eye will plot a 2D (top down) icon on the map. This way I could tag things like buildings or roads, etc. Ah... add a list of filters to Birds Eye, so that you can toggle on/off what tags are used for icons. Thus you could toggle on/off buildings or toggle on/off paths.

    That... I would buy.
     
  10. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I could do that, it would be more than a shader, bit of UI scripting magic I think. Ill see what I can do :)
     
    Tinjaw likes this.
  11. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    Ah. OK. Didn't know that. And what makes Birds Eye "special" is being a shader (for the benefits that brings). Got it.

    Well, what other things can you do with shaders? (To keep it shader-only).
     
    NemoKrad likes this.
  12. mwituni

    mwituni

    Joined:
    Jan 15, 2015
    Posts:
    345
    looking good
     
    NemoKrad likes this.
  13. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Looks like this may be developing into more than just a nifty shader, but a nice minimap asset with a really good shader back-end for the map part :D
     
    NemoKrad likes this.
  14. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    No, not at all, be great to be able to to have a UI script or two to add POI to the map :D
     
    hakankaraduman and Teila like this.
  15. mensch-mueller

    mensch-mueller

    Joined:
    Nov 25, 2014
    Posts:
    156
    Goodgulf and NemoKrad like this.
  16. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
  17. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Now have it rendering the maps, using a gradient as well as now able to render POI's on the map too :)

     
    Tinjaw likes this.
  18. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    353
    Is it possible to lower the amount of lines rendered. I mean, for example, if it now renders the lines between every 50 unit changes in the elevation, can we change it to make lines more dense or low dense? I hope I could explain what I want to ask :)
     
    NemoKrad likes this.
  19. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes, there is an elevation magnitude slider for that :)
     
  20. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    So, created a stock of default POI's you can use.


    Forgot to mention last time you can also save the maps too if you want, so hitting the save button on the screen above, gives the following image.


    Forgive my programmer art, I am sure you will be able to create much better POI icons than me :)
     
    Tinjaw likes this.
  21. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Here is the scene as it looks with the POI markers in the world.

    The POI's are simple to set up, just attach a script to a GameObject in the scene, this could be anything, a tree, a MOB, an empty GameObject (in this case)


    POI Camera is required to know if the POI is in the camera view, the Canvas UI is used to render the actual POI UI element and the UI prefab is what get renders on the Canvas. The Visible bool indicates if the POI is visible in on the Canvas, this will be used when I get around to the POI filter. The Description is how it is displayed on the map.

    Getting there, baby steps :)
     
    John-G, Tinjaw and hakankaraduman like this.
  22. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Well thanks a lot NemoKrad!

    As if I didn't have enough assets in my wish list already. Here, just take my money now, it's no use to me anyway :)

    This will be just perfect for my game. Will you consider adding a toggle on/off script line for in game play?
    Also, have you thought about adding the ability for fog of war?
     
    Stormy102 and NemoKrad like this.
  23. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Toggle On/Off? As in the map it's self? The UI to display and manage the map will be down to you, you may want it in a specific Canvas, or have a Mask on it (if you do use Masking in your UI element, may I recommend another of my Assets, it allows you do to soft alpha masking on UI elements :))

    Fog of war is indeed what I am looking at next, so it will reveal the map as you explore it, I am thinking you give it a range value, and that will be how much of the map around the player (target Transform) would get shown.

    Also you will be able to make POI only visible if they are within a given range too (not in there yet, but on my to do list)
     
    Stormy102 and Tinjaw like this.
  24. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Last night, I have simplified the implementation of Birds Eye, you just drag the script onto an empty Game object and it sets it all up for you, all you have to do is tell it what Target (player) you want to follow, create the canvas and RawImage you want the map displayed in and pass that to the Birds Eye Editor and the map's center point (the little white arrow in the demo) Then just place POI scripts on GameObjects in your scene and they will show up on the map.

    This morning, I have added the ability to filter POI types out of the map if you want to, by default they are all assumed to be in play. ALL the POI's can be replaced or added to, they are given here as default examples, but you just have to create them the same as I have the 21 examples.

    All of the UI above is down to you, this is just provided for the Demo.
     
    Tinjaw and TheSeawolf like this.
  25. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Looking very good so far, good news about the fog of war, that is exactly what I meant.

    Regarding the toggle on/off birds eye view, will you be scripting it to appear on or off by choosing a key like "m" for map or f12 etc, etc?
     
  26. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    I am really just supplying the framework for you to have the flexibility to write your mini maps how you want them to appear. I am thinking if I was buying this asset, I would not want a lot of code already in place that I would then have to chop out as it would not fit my game, and I have the potential of breaking it. This way you can present the map however you want to, creating controls to switch the map on/off, decide what features you want from it. I think this gives you greater flexibility as a developer than me creating a rigid component that you either use or have to chop at to get it to fit your game.

    I guess I can add the ability to switch the menu on/off in the Demo scene so then you have an idea of how you may want to approach this in your own game.
     
    TheSeawolf and Tinjaw like this.
  27. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Just so that I understand how your other asset would work. If I was to supply it with the image below as a mask, it would make the black areas transparent in the UI element, thus effectively give me a circular overhead map view?

    Untitled-1.png
     
  28. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yep :) And rather than a hard alpha blend, it would be a soft blend so it would bleed into nothing at the edges :)
     
    Tinjaw likes this.
  29. smada-luap

    smada-luap

    Joined:
    Aug 22, 2013
    Posts:
    945
    Cool. Looks like that one's going onto my wish list (just so I know about it when it comes to me actually needing it :D lol)
     
    NemoKrad likes this.
  30. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Started looking at Fog Of War in Birds eye, still lots to do....
     
    radimoto, hakankaraduman and John-G like this.
  31. hakankaraduman

    hakankaraduman

    Joined:
    Aug 27, 2012
    Posts:
    353
    Will Fog of War include this feature, Map show realtime changes of positions etc. in your current range, but shows the last recorded state of other POIs where out of range. So it's not completely black once you explore there, but it's also not getting updated before it enters your range again.
     
    TheSeawolf and Tinjaw like this.
  32. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Not at the minute, Ill get basic FoW working first, may then submit it, then add stuff like that later.
     
    hakankaraduman likes this.
  33. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    @NemoKrad

    Please consider me now, and in the future, a Beta Tester for this and any other asset you cook up. :cool:
     
  34. TheSeawolf

    TheSeawolf

    Joined:
    Apr 10, 2015
    Posts:
    267
    Correct me if I'm wrong, but this is essentially a mini map right? I won't need another mini map asset?

    Also, the concept of us creating the UI is better as that allows for more flexible creativity. Some may want smaller larger and or different shapes.

    Looking forward to seeing how this develops, and I'm also happy to be a guinea pig as Tinjaw mentions :)
     
    NemoKrad likes this.
  35. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Yes, well the idea started off as a way to view your terrain as a elevation map, but has sort of evolved into a mini map asset. A basic one I grant you, but I think the way I have done it gives you some flexibility in how to implement it, from the behaviour to the way it is rendered.

    I am even thinking of dropping FoW for the first drop, as my version will just be a "this is how you could do it" and not one that would cover all bases.

    I think the documentation for this will be important. It''s simple to set up, but you will want good docs to let you know how and what you can do to extend/modify it.
     
  36. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Hi all, just to let you know, I am still on this, but at the moment, working an existing asset update, normal service will resume shortly ;)
     
    Stormy102 and TheSeawolf like this.
  37. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    OK,

    So, hoping to get some dev time on this this week :) Just took 20 minutes and Birds Eye can now have the map rotate with the player, rather than have a player marker rotate and the map stay static :)

    For those beta testing, I am hoping to try and get the documentation done describing how to create your own POI's, how to place them in the world and how to create your own Icons for them in the map.
     
    Stormy102, BackwoodsGaming and Tinjaw like this.
  38. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632

    Playing with the possibilities of having it for internal use. Also it makes sense in a scene like this to have it only render the walls that the player has seen, so, that's something else for me to add :)
     
    Stormy102 and BackwoodsGaming like this.
  39. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Also, for those that are interested I have started on the documentation for this and have put it on line, so you can check it out, it's now in the initial post here, but I will also put the link here too.

    If you spot anything in the documentation that should not be there, bad spelling, or just confusing text, let me know.
     
    BackwoodsGaming likes this.
  40. NemoKrad

    NemoKrad

    Joined:
    Jan 16, 2014
    Posts:
    632
    Gah! Now I am thinking about adding a compass.... The feature creep has to end soon...
     
  41. Stormy102

    Stormy102

    Joined:
    Jan 17, 2014
    Posts:
    495
    :eek: As if Distingo wasn't good enough...
     
    NemoKrad likes this.
  42. kai_lehmann

    kai_lehmann

    Joined:
    Apr 14, 2020
    Posts:
    4
    Is this project still alive? I cannot find it anywhere in the Unity Asset store...