Announcement

Collapse
No announcement yet.

Journeyman's Minimap - Code Plugin for Minimaps and Fog of War

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    Yo there

    I feel like a complete beginner. Everything is solved now.

    Click image for larger version

Name:	Good.jpg
Views:	1
Size:	99.5 KB
ID:	1131485

    The problem was:
    - the component "Area Map View" was offset by 1500 / 200 in the MapBackground actor
    - I must have moved it by mistake while I was selecting it for discovery reasons (I click everywhere like a madman :x)

    It's really silly and I feel a bit sorry for the screenshot spam these past two days when it was so simple!

    But! To make it sure nobody makes the mistake again, I suggest you to set the relative position of the "Area Map View" component to 0;0;0 in the Construction Script.

    Another thing that bothered me was the weird relative location / rotation of the "Capture Scene Component". I resetted it but nothing was captured after that so I dropped another Map Background just to see what its original Transform. And it is indeed a very weird transform Maybe you should also add it to the list of things you set in the Construction Script to avoid people from resetting it thinking they have modified it by mistake.

    Thank you very much for your support and your time You put me back on track with your answers (it was in fact the first suggestion of your previous message that made me think of this fix).

    I can't wait to try things out now

    PS: You can change the color of the Navmesh if your project settings!

    EDIT:

    Actually I have another question [MENTION=23394]Zhi Kang Shao[/MENTION]!

    I rotated the Widget Minimap by -45 Angle (in Widget, tried both the minimap widget directly and a box containing it). Here are the results (the red Arrow is the character):
    Click image for larger version

Name:	RotatedMinimapRender.jpg
Views:	1
Size:	120.5 KB
ID:	1131490

    You can see the Character Icon is offset by an amount on the minimap but everything else works fine!

    Here is the widget setup:
    Click image for larger version

Name:	RotatedMinimap.jpg
Views:	1
Size:	347.9 KB
ID:	1131491
    Last edited by Yun-Kun; 07-24-2017, 05:20 PM.
    [Released] Multiplayer Combat Editor
    A-RPG Sacred Swords
    Auto-Chess Live Development
    Youtube Tutorials

    Comment


      #77
      Hey Yun!

      Originally posted by Yun-Kun View Post
      Yo there

      I feel like a complete beginner. Everything is solved now.

      The problem was:
      - the component "Area Map View" was offset by 1500 / 200 in the MapBackground actor
      - I must have moved it by mistake while I was selecting it for discovery reasons (I click everywhere like a madman :x)

      It's really silly and I feel a bit sorry for the screenshot spam these past two days when it was so simple! But! To make it sure nobody makes the mistake again, I suggest you to set the relative position of the "Area Map View" component to 0;0;0 in the Construction Script.
      No problem, I have experience myself with issues that turn out to be that something was moved accidentally. That is a good suggestion, I will set that AreaMapView to (0, 0, 0) in the C++ BeginPlay, as there is no benefit to moving it off center. I won't make an update purely for this but it will be part of the next one.

      Originally posted by Yun-Kun View Post
      Actually I have another question [MENTION=23394]Zhi Kang Shao[/MENTION]!

      I rotated the Widget Minimap by -45 Angle (in Widget, tried both the minimap widget directly and a box containing it). Here are the results (the red Arrow is the character):

      You can see the Character Icon is offset by an amount on the minimap but everything else works fine!

      Here is the widget setup:
      Hmm, if changing the render angle of a parent widget doesn't affect the children correctly, I think that is an issue with UMG. I had noticed another issue when rotating things in UMG: any canvas clipping is applied before the render rotation so when I rotated an icon that is near the edge of the minimap, sometimes half the icon wasn't visible (because that part would fall outside the minimap canvas if the icon wasn't rotated). This is why for this plugin I made a material based workaround. Bottom line, UMG render transform has some known issues. I believe they are going to be fixed as part of UE4.17, because there was a recent Epic blog post about that.

      Something you can try instead of using the render transform:
      1. Make a duplicate of the BorderedMinimap widget asset and in that, rotate only the border image (not the internal Minimap widget) by -45 degrees. (Edit: I suggest not modifying the existing one because those changes can be lost when you download an update)
      2. At the character's BeginPlay set his MapView to the right world rotation (so that the minimap's North marker aligns with what you want to be north).
      3. Make sure the MapView doesn't inherit yaw by unchecking the built-in setting, but you've probably found that already.

      Hope this helps!
      Last edited by Zhi Kang Shao; 07-26-2017, 08:52 AM.
      Journeyman's Minimap - Available on Marketplace - Forum topic - Video

      Comment


        #78
        Hi!

        I just recently purchased this plugin as it looks fantastic. I have run into some initial issues however and was hoping you might be able to help me solve them.

        First of all is that the fog of war visibility shape is not circular, it is a sort of rounded square with two hard edges. These images should explain better:

        Click image for larger version

Name:	Pic01.png
Views:	1
Size:	271.1 KB
ID:	1131823

        Click image for larger version

Name:	Pic02.png
Views:	1
Size:	581.5 KB
ID:	1131824

        Any ideas on how I could make this the circular shape shown in the preview screenshots?

        Also I have noticed a rather annoying flickering effect on the fog of war when played in the editor. Hopefully it is visible in the attached video:

        https://youtu.be/Ufesto7gpMA

        It is a little tricky to see but definitely there. Any suggestion how to eliminate this would be greatly appreciated.

        Cheers!

        Comment


          #79
          Hi Rob,

          First off thank you for purchasing the plugin and for bringing this bug under my attention. I know what is causing the fog of war revealer not to be round. UE4.16 changed the behavior of one of the most basic material nodes (BreakOutFloat2Components) to lose information about negative values. This affected some other parts of the plugin too which have been fixed, but it seems I've missed a material. I will be submitting an update to fix this issue, but in the meantime you can fix it locally by replacing the first part of that M_Revealer_Circle material with this:



          As for the flickering, I'm not sure. Let me think about that some more.
          Journeyman's Minimap - Available on Marketplace - Forum topic - Video

          Comment


            #80
            Hi,

            Thanks for the prompt reply. Your suggestion has fixed the Revealer and it works as intended now, thanks very much. I am still noticing the flickering that I previously mentioned but will continue to look and see if I can find the root of the problem.

            Cheers

            Comment


              #81
              Originally posted by Rob M View Post
              Hi,

              Thanks for the prompt reply. Your suggestion has fixed the Revealer and it works as intended now, thanks very much. I am still noticing the flickering that I previously mentioned but will continue to look and see if I can find the root of the problem.

              Cheers
              Hey Rob!

              Glad to hear the fog of war works now. I haven't gotten any ideas on what can cause the flickering yet. Increasing the resolution of the fog of war texture on the MapFog actor might reduce the issue. If you find out anything else that might hint at what causes the issue, please let me know.
              Journeyman's Minimap - Available on Marketplace - Forum topic - Video

              Comment


                #82
                Hey everyone,

                A small update should be coming online soon for engine versions 4.15 and 4.16. This update will also make the plugin compatible with 4.17. Here are the changes:
                • Minor code changes to compile without issue for 4.17
                • Fixed circular fog revealer not being a complete circle
                • Fixed issue causing loading errors after adding minimap components to a blueprint and restarting editor
                • Fixed issue causing the minimap background texture not to show correctly after manually calling RerenderBackground
                • Added a MapBackground C++ and blueprint event OnMapBackgroundRendered that fires whenever the background is rerendered with scene capture. Use this event to manually render extra items into the render target.


                I have had questions about Mac support. The marketplace page does not list Mac as a supported platform, because I haven't tested for Mac OS. People have reported that the 4.15 worked fine for development on Mac, but 4.16 didn't. I'm not sure why this is the case, because the plugin doesn't do OS specific calls. I will be borrowing a MacBook to ensure that development on Mac will also be supported for 4.15, 4.16 and 4.17. Please look forward to that if you develop on Mac.
                Last edited by Zhi Kang Shao; 08-14-2017, 02:44 PM.
                Journeyman's Minimap - Available on Marketplace - Forum topic - Video

                Comment


                  #83
                  This looks like a really well implemented minimap and fog solution!

                  I've read through the documents but am interested to know a little bit more about the Fog of War solution - is it easily possible to check Server-side who is visible to whom?

                  Comment


                    #84
                    Originally posted by kaimaiiti View Post
                    This looks like a really well implemented minimap and fog solution!

                    I've read through the documents but am interested to know a little bit more about the Fog of War solution - is it easily possible to check Server-side who is visible to whom?
                    I have updated this post. Please reread.

                    Hi kaimaiiti!

                    Thanks for the kind words. The data of what fog is cleared is stored and updated client-side. Clients will see the same minimap if they entered the game at the same time and the same fog revealers are enabled i.e. the client-side executed game code marks all team mates of the local player to grant vision and marks all enemies to not grant vision.

                    I'm afraid the provided implementation does not process fog on the server. This has two consequences that you must be aware of:
                    A) A later joining client does not automatically receive what fog has been cleared.
                    B) There is no "true" version of a team's fog data.

                    You can implement a manual solution for issue A. For example, when a player joins a team the server requests all fog data from team members' clients and sends the combined result to the new team member's client. From there on, all game clients will update the fog locally again.

                    Issue B can be worked around depending on your requirements. If you simply want all fog maps to look the same to the pixel, you can periodically sync the render target data via RPCs, but the plugin does not do this yet, currently. If you want fog data to only be updated by the server, I'm afraid this is not possible if you plan to run dedicated servers on machines without GPUs. Fog is updated by drawing to render targets, which is great for efficiency (its an ideal task for the GPU) but can't be run without a GPU.

                    With code changes, you can let a server track fog data for both teams, but this will only work on servers hosted on machines with a GPU:
                    - Modify the "MapFog" to have render targets for both teams and the fog updating code to pick a render target depending on the fog revealer's team.
                    - Implement a way to send each team's fog data to the clients. Since render targets (texture data) can be quite large, it would have to be something smarter than just sending the data every tick. This step isn't required if the reason you want fog data on the server is not authority, but just as a convenient server-side vision system.

                    I know some people have used this minimap in combination with another system that checks whether actors are visible to each other. If you have such a system in place, you can make that an additional requirement for showing an icon on the minimap. In that case you can call SetIconFogInteraction( VisibleWhenRevealed ) to only show an icon when its not inside fog and call SetIconVisible( true or false ) based on the result of your own vision system. That vision system can be server authoritative and the icon will only show when not in fog AND deemed visible by the server.
                    Last edited by Zhi Kang Shao; 08-17-2017, 10:57 AM. Reason: Realized dedicated servers on GPU-less machines cannot process fog
                    Journeyman's Minimap - Available on Marketplace - Forum topic - Video

                    Comment


                      #85
                      Any plans to update this for 4.17?

                      Comment


                        #86
                        Originally posted by riuthamus View Post
                        Any plans to update this for 4.17?
                        Hi riuthamus,

                        I submitted the 4.17 update on August 14. I'm afraid Epic marketplace staff hasn't processed it yet despite a reminder I sent. More marketplace sellers seem to be waiting for their 4.17 update to go through.

                        If it is an option for you, download the 4.16 version of the plugin. It is compatible with 4.17 after you remove the line saying "private_subobject" in MapBackground.h and MapAreaBase.h and recompile. If compiling is not an option for you, know that the update is in Epic's hands and should be out soon.
                        Journeyman's Minimap - Available on Marketplace - Forum topic - Video

                        Comment


                          #87
                          We are seriously looking at it, just wanted to make sure it is being updated. Seems like from your post it is, so I will let my team know.

                          Comment


                            #88
                            Originally posted by riuthamus View Post
                            We are seriously looking at it, just wanted to make sure it is being updated. Seems like from your post it is, so I will let my team know.
                            Thanks for considering this plugin. If you run into any issues while using it let me know.
                            Journeyman's Minimap - Available on Marketplace - Forum topic - Video

                            Comment


                              #89
                              Originally posted by Zhi Kang Shao View Post

                              Thanks for considering this plugin. If you run into any issues while using it let me know.
                              Can you PM me your email you want me to send the proof of purchase to? we just picked it up tonight, but the 4.16 is not building for 4.17.

                              Comment


                                #90
                                Originally posted by riuthamus View Post

                                Can you PM me your email you want me to send the proof of purchase to? we just picked it up tonight, but the 4.16 is not building for 4.17.
                                Done. If anyone else needs the 4.17 version of the minimap urgently, send me an email (zhikang [dot] shao [at] gmail [dot] com) with:
                                * A screenshot of your Epic Games Receipt for the plugin
                                * A screenshot of the plugin in your Epic Games Launcher > Library > Vault

                                and I will send a 4.17 compatible version of the minimap to you. It is now exactly one month since this version has been in the hands of the marketplace team. I don't want this to hold back your development.
                                Last edited by Zhi Kang Shao; 09-13-2017, 09:30 AM.
                                Journeyman's Minimap - Available on Marketplace - Forum topic - Video

                                Comment

                                Working...
                                X