Announcement

Collapse
No announcement yet.

DoN's 3D-Pathfinding / Flying-AI system (with full source!)

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

    [MENTION=32939]formatt[/MENTION] - would you mind walking me through how you got it to work with 4.14? having some difficulty...

    Comment


      Quick question for you [MENTION=14603]VSZ[/MENTION] ...

      Is there any reason why multiple navigation volumes aren't supported? I realize code would need to be updated and I think I can easily make some small tweaks to support it...mainly wondering if there are any significant perf/memory costs. I have "pockets" of areas in my levels that need navigation, but they're very far apart so I would prefer not to use a single volume.

      If you can't think of a reason why I shouldn't do this, I'll post my solution here after I get it working

      Thanks!
      - Ryan
      Check out my ★★★★★ UE4 plugin if you want to go fast!
      • Feedback Event Factory: Perfect for managing sounds, particle systems, force feedback, camera shakes, time dilation, animations & more...all within a single Blueprint!

      Comment


        [MENTION=43607]rcdarcey[/MENTION] - You probably meant multiple navigation managers.

        This should be as simple as fixing UDonNavigationHelper:onNavigationManager to smartly pick up the closest/most relevant manager based on proximity to pawn (and therefore adding an FVector input parameter) and by updating any code that fetches the Nav Manager (eg: FlyTo task or your custom AI code) to use that function. I haven't gone in this direction yet as I'm fully relying on the Unbound manager these days and that works better when your A.I. absolutely needs to be able to pathfind from anywhere, no limits (ideal for sandbox gameplay). Of course, this is a great idea for your setup.

        Would love to see some videos of your game btw!

        ~~~

        [MENTION=295243]JordanA[/MENTION]riel - Are you still having issues? This should be as simple as creating a new C++ project, creating and copying the plugin into a Plugins directory under project root and letting the engine recompile the whole thing, so you can copy the compiled plugin folder back out to your project.

        I do not have 4.14 installed, otherwise I'd try to upload a new version when I find some time (and free space on my comp!)

        Steam Early Access: Drunk On Nectar - The Nature Simulator

        UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

        Comment


          Originally posted by VSZ View Post
          [MENTION=43607]rcdarcey[/MENTION] - You probably meant multiple navigation managers.
          Yes, I did! Sorry about that

          Originally posted by VSZ View Post
          This should be as simple as fixing UDonNavigationHelper:onNavigationManager to smartly pick up the closest/most relevant manager based on proximity to pawn (and therefore adding an FVector input parameter) and by updating any code that fetches the Nav Manager (eg: FlyTo task or your custom AI code) to use that function. I haven't gone in this direction yet as I'm fully relying on the Unbound manager these days and that works better when your A.I. absolutely needs to be able to pathfind from anywhere, no limits (ideal for sandbox gameplay). Of course, this is a great idea for your setup.
          This is exactly what I was thinking of doing. I had switched over to the unbound manager for a while, but switched back to the bound volumes when I needed access to some debug info that's only available with the bounded versions. In addition, I'm concerned about the runtime hits to perf with the unbound versions...tho I haven't actually taken any measurements so I'm not sure exactly how worried I should be about it. Do you have any specific figures there? Maybe I'll just switch back over to the unbound managers again instead of making these modifications to the bounded version...

          Originally posted by VSZ View Post
          Would love to see some videos of your game btw!
          My hope is to release a short teaser this spring! That teaser is mainly to serve as an art/music/audio high bar and won't feature many details about the gameplay, but I may release a much less visually refined "work in progress" gameplay video at the same time. I'll update this thread with links, especially if I manage to showcase how I've utilized this plugin!
          Check out my ★★★★★ UE4 plugin if you want to go fast!
          • Feedback Event Factory: Perfect for managing sounds, particle systems, force feedback, camera shakes, time dilation, animations & more...all within a single Blueprint!

          Comment


            Originally posted by rcdarcey View Post
            My hope is to release a short teaser this spring! That teaser is mainly to serve as an art/music/audio high bar and won't feature many details about the gameplay, but I may release a much less visually refined "work in progress" gameplay video at the same time. I'll update this thread with links, especially if I manage to showcase how I've utilized this plugin!
            Sounds good, looking forward to it!

            Originally posted by rcdarcey View Post
            I'm concerned about the runtime hits to perf with the unbound versions...
            A tip to anyone testing performance with the Unbound manager: don't be discouraged by in-Editor performance. It is much faster in a packaged build with no debug info (i.e. Shipping). The default max tick values are very conservative (to prevent FPS drops) so your A.I. queries may start timing out if you have many of them, but you should be able to tune the "max iterations per tick unbound" to a reasonable value for your needs.

            I recall a user reporting earlier in this thread that the Unbound manager was too slow for them but that was not a Shipping build AFAICT.

            If your A.I. does mostly straight-line navigation with only a few complicated path-solving journeys here and there then it's even better.

            Steam Early Access: Drunk On Nectar - The Nature Simulator

            UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

            Comment


              Originally posted by VSZ View Post
              A tip to anyone testing performance with the Unbound manager: don't be discouraged by in-Editor performance. It is much faster in a packaged build with no debug info (i.e. Shipping). The default max tick values are very conservative (to prevent FPS drops) so your A.I. queries may start timing out if you have many of them, but you should be able to tune the "max iterations per tick unbound" to a reasonable value for your needs.

              I recall a user reporting earlier in this thread that the Unbound manager was too slow for them but that was not a Shipping build AFAICT.

              If your A.I. does mostly straight-line navigation with only a few complicated path-solving journeys here and there then it's even better.
              Good to know. I am doing mostly straight line path-solving, so I'm probably a good candidate to use the unbound version. I'll probably switch back for now and when I get more heavily into optimization, I can evaluate whether I need to use the bounded versions. I don't think it would affect how I build my levels, regardless, as I imagine it'd be totally fine for me to ship w/ support for multiple bounded navigation managers.
              Check out my ★★★★★ UE4 plugin if you want to go fast!
              • Feedback Event Factory: Perfect for managing sounds, particle systems, force feedback, camera shakes, time dilation, animations & more...all within a single Blueprint!

              Comment


                Quick question;

                where in the navigation pipeline does the mesh rotation get set? Essentially I want to lock the axis to never rotate in the xy plane (no roll or pitch) because my mesh destruction animation requires no rotation about the xy plane and the pitch glitches it out.

                Comment


                  The plugin does not perform any locomotion of its own. All locomotion is routed to your pawn via AddMovementInput (or AddMovementInputCustom if you chose to implement the IDonNavigator interface) by passing the WorldDirection towards the next target in the solution path so your pawn can decide how it wants to get there.

                  So just check your own pawn's AddMovementInput behavior; setting Unreal's native pawn properties like bUseControllerRotationPitch and bUseControllerRotationRoll to false (in Class Defaults) may help if your pawn is using control rotation to drive itself.

                  Steam Early Access: Drunk On Nectar - The Nature Simulator

                  UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                  Comment


                    Hello VSZ, very good job on this Plugin, I'm using it for my project and loving it! =D

                    I do have a few issues tho, and I hope you can help me sort it out, sometimes my game just freezes when I place a few (1-5) flying Mosquitos around, I did everything I could think of, I made many Decorators to check if the location is within navigable world and if its beneath the landscape, disabled and enabled Multithreading, increased and decreased its values, reduced Query times and all that, still it sometimes just freezes. I can tell its from the navigation because when the Mosquito is either attacking the player, or its setting there doing nothing, it doesn't lag a single bit.

                    I'm using 100 Voxel Size and 300x300 Grid that covers my whole map.

                    Another minor issue is that they sometimes fly around one of the waypoints of the path before being able to continue on it, I have no idea why that happens, but I think it has to do with the Mosquito's fast speed.

                    Anyway, I'm sorry to post this just begging for help, I'm really really satisfied with your navigation system overall and I appreciate it very very much. I even added your game to my wishlist on Steam to give it a try !

                    Thank you very much, cheers.
                    Attached Files
                    Last edited by Narg; 02-15-2017, 05:57 PM.

                    Comment


                      Originally posted by Narg View Post
                      I do have a few issues tho, and I hope you can help me sort it out, sometimes my game just freezes when I place a few (1-5) flying Mosquitos around, I did everything I could think of, I made many Decorators to check if the location is within navigable world and if its beneath the landscape, disabled and enabled Multithreading, increased and decreased its values, reduced Query times and all that, still it sometimes just freezes. I can tell its from the navigation because when the Mosquito is either attacking the player, or its setting there doing nothing, it doesn't lag a single bit.
                      Are you getting any debug output in the log? There's a lot of useful info there for this system

                      Originally posted by Narg View Post
                      Another minor issue is that they sometimes fly around one of the waypoints of the path before being able to continue on it, I have no idea why that happens, but I think it has to do with the Mosquito's fast speed.
                      I assume you're using a pawn derived from the Character class? If so, crank up your "Acceleration" & "Braking Deceleration" values to see if that helps. Also, try increasing the "Minimum Proximity Required" value on the FlyTo node. Finding the perfect combination of speed, acceleration, braking deceleration & flyto proximity can take a little while
                      Check out my ★★★★★ UE4 plugin if you want to go fast!
                      • Feedback Event Factory: Perfect for managing sounds, particle systems, force feedback, camera shakes, time dilation, animations & more...all within a single Blueprint!

                      Comment


                        [MENTION=225491]Narg[/MENTION] - Agree with rdarcey on both questions.

                        Only thing I'd add is that even in single-threaded mode the plugin distributes its workload across multiple ticks to guarantee that the game thread is never held up for more than a certain amount. You can configure that amount by lowering "Max Solver Iterations Per Tick" and see if that helps. The editor build is far slower than the packaged build so the performance in your final game will be much faster. "DebugEditor" mode from Visual Studio is even slower than the normal Editor in case you're using that.

                        If the issue still persists, try placing a breakpoint inside the the Navigation Manager's Tick function to see what it is doing when your game slows down. With that information and the logs, we should be able to diagnose exactly what is happening. My own experience with this plugin has been that initial setup can take a while to get right, but once you're past that stage everything should just work.

                        Edit: And thanks for wishlisting my game

                        Steam Early Access: Drunk On Nectar - The Nature Simulator

                        UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                        Comment


                          Hey there! as those who tried the plugin in 4.15 will have found, its not very happy at all! as such, please feel free to use this FIXED FOR 4.15 source here:

                          http://www.filedropper.com/donainavigation415
                          [MENTION=14603]VSZ[/MENTION] thanks loads for this wonderful plugin, feel free to compile+post this version on the front page to save you the bother of fixing it I would but my internet is very slow, I can only upload small files such as this source

                          Comment


                            [MENTION=37067]2sneaky[/MENTION] - Thanks for that

                            I'll upload the binaries after I've had a chance to install 4.15 and test the sample project (still on 4.13 here!)

                            Steam Early Access: Drunk On Nectar - The Nature Simulator

                            UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                            Comment


                              v1.5 released with 4.15 support!

                              Plugin and sample project downloads are available at http://www.drunkonnectar.com/3d-pathfinding-ue4/

                              Thanks to [MENTION=37067]2sneaky[/MENTION] for the 4.15 migration help!

                              ~~~

                              Extras:

                              Watch 100 Monarch Butterflies navigate a procedural world using DoN's 3D pathfinding!



                              If you found this plugin useful check out DoN on Steam and consider purchasing it to show your support

                              You can also help by sharing this Monarch Lifecycle video around; it's perhaps the first game to depict an animal's complete lifecycle in full 3D from egg to larva to pupa to adult with 1mm scale accuracy (DoN uses a magnified world) and it could use some visibility

                              Steam Early Access: Drunk On Nectar - The Nature Simulator

                              UE4 Plugins: DoN’s Dynamic Mesh FX | DoN’s 3D Pathfinding

                              Comment


                                [MENTION=14603]VSZ[/MENTION], thanks for the 4.15 update! I just sent out a tweet w/ the video and purchased your game, too As a quick suggestion, I would think about cranking out some nice animated gifs w/ the #gamedev and #indiedev tags on Twitter, too. They can get a lot more attention than videos if they're done well. Here's some good advice on creating them:

                                http://www.gamasutra.com/blogs/Bundy...aking_Gifs.php

                                I've also got a quick question for you!

                                After many months of no problems whatsover...managed to find another bug! This time, it's with landscape geo. Basically, when AI units get close to the landscape floor and use a flexible origin, they will sometimes pop below the landscape geo and get stuck cause of the "safe" volumes detected just below the surface, as demonstrated in this image:

                                https://drive.google.com/open?id=0B9...2NYSE1UUHZLa00

                                Now, this might actually all be working as intended, but can you think of a solution for my use case?

                                Thanks!
                                Attached Files
                                Check out my ★★★★★ UE4 plugin if you want to go fast!
                                • Feedback Event Factory: Perfect for managing sounds, particle systems, force feedback, camera shakes, time dilation, animations & more...all within a single Blueprint!

                                Comment

                                Working...
                                X