Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

PathFinder 3D - pathfinding in three-dimensional space!

Discussion in 'Assets and Asset Store' started by SnigirevNikita, Oct 7, 2017.

  1. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    Hi there!

    This topic is dedicated to the PathFinder 3D asset. The last actual version is 0.3.5. Below we will talk about some of the features of this asset, as well as about the prospects for development.
    • Our asset allows you to search for paths in space on scenes of various configurations. It is perfect for any game scenarios where there must be flying or floating bots. For example, birds, spaceships, airplanes, fish, submarines or any other objects for which the path must be found in three-dimensional space, and not on surfaces.
    • The search for the path is very fast, even on rather complex scenes. Pathfinding is performed using one of two algorithms:
      • Modification of algorithm A *
      • Lie algorithm (it’s a wave algorithm)
    The first algorithm is suitable for use in open spaces, i.e. in most game scenes. The second will give an advantage in search speed compared to the first on cramped scenes with a maze configuration.​
    • All the major algorithms of our asset are implemented using multi-threading, so the frame rate should not be lost under any usage scenarios.
    • Obstacles can be any game objects of your choice. It is enough that the game object has a mesh of sufficient size and a special tag, or mesh collider. The obstacles of the scene are processed at the time of the start of the game. With the correct settings, this process does not last long and may well be included in the level loading process. But for procedurally-generated worlds, our asset is also suitable.
    • Any objects that appeared on the scene after the start of the game can also be asynchronously handled during the game and entered into the space graph. Deleting objects from a space graph in real time is also possible. Thus, the process of finding a path can be performed even on changing scenes.
    • Also in the asset there are built-in tools for smoothing and optimizing the found trajectories. These methods give the found trajectories a more natural look.
    • We also have a means to move along the paths found. So building game scripts with bots will not present any major difficulties. We even have a tool for smooth pursuit of moving targets. (without jerks and expectations when rebuilding the trajectory)
    In short, we have a lot of things :)
    More information about all the possibilities, as well as about the use of an asset, you can read in the user's guide.
    Thanks to everyone who read this post, we hope you were interested in learning about our product!
    If you are interested, you can go to the asset store page. If you have any questions - write us an email, or ask a question directly on the forum.
    Also, you can try PathFinder 3D in action! Demos availible here.

    Now we will tell a little about our plans for the future.
    • In the future, we want to introduce support for full-fledged dynamic obstacles, i.e. those obstacles that move, change size, shape, and so on.
    • We also want to introduce a local avoidance mechanism. What would a large number of agents could search for paths and move without colliding and without intersecting with each other.
    • Since the asset provides pathfinding possibility, it would be advisable to also provide users with the ability to build full-fledged AI. In order to use our product to create complex behavioral scenarios, as well as to customize the logic of interaction between bots and the player. Thus, there is an idea to create a full-fledged AI system with advanced settings for behavior and interaction.







     
    Last edited: Dec 9, 2018 at 7:16 PM
    Korindian likes this.
  2. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    1,898
    Looks nice :)

    how do you feed the system with obstacles? Physics colliders?
     
  3. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    Yes, so it is implemented :)
     
  4. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    1,898
    Nice.

    What is the speed like? calculating a route. Like in one if the example images here?
     
  5. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    The speed of calculating the route depends on the size of the space and the degree of detail in which the search is performed.
    The examples shown on the website show it is slower than it really is.
    In any case, there is a choice between the search speed and the quality of the route.
     
  6. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    1,898
    just within a order of magnitude? is it 1 ms or 100 for a path like this? Any problem to split over frames? I assume it needs to be in main thread as you access physics.
     
  7. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    The search algorithm is implemented as a coroutine. So measuring the speed of search is an incorrect question. Delays between frames are insignificant when the search parameters are correctly configured.

    If the search is too difficult, the delay will be visible.

    But we have implemented a state machine, this allows you to mask the search process, for example by adding some wait animation.
     
  8. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    860
    This looks just like what I've been looking for. Impressive work.

    Question: In my game, I have flying objects that have attached rigidbodies. I move them around using physics forces, rather than just changing the transform. (That is, using PID controllers). With Unity's NavMesh system, it's possible to just use the data provided by an Agent to get a path, without using the Agent to actually move the gameobject around. Does your system do something similar? That is, can I use your package to determine the path to take, while handling the movement on my own?
     
  9. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    Hi, Dan!
    Of course, this possibility is present. You can only get the path without moving along it. We can also help you with setting up a package for this purpose.
     
  10. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    326
    Is this compatible with Unity 2018.1? Can this be used for swimming NPCs? This still does not support colliders?
     
  11. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    Hi!

    1)The asset has been assembled and tested on Unity v 2017.1.1. So, there is no reason to believe that there may be problems when used with version 2018.1. In any case, we'll help you to solve any problems, if it appear.

    2)What do you mean by swimming NPCs? If this is NPCs, for which the movement is planned in space, then yes, the asset is suitable for this.

    3)At the moment asset support any obstacles, provided by mesh collider, or mesh with special tags. More details can be found in the documentation for the Asset on our website - https://gracefulalgs.com/portfolio/pathfinder/
     
    Last edited: Jun 23, 2018
  12. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    326
    Thanks for the reply. Yup, that's NPCs (Non-Player Characters). Planning to use it for animals/creatures. Can the GameObjects that has the Pursuer script have colliders? Also, can the distance between an obstacle and a Pursuer be adjusted? I noticed in the EXE demo that the planes are very close to the mountains and some move jerkily.
     
  13. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    Indeed, according to our idea, objects that have a component of Pursuer can have colliders. And they should not be regarded as obstacles in finding a way. But recently one of our users encountered some problem. More details can be found in the last review on the page of our Asset in Assetstore. Therefore, I can not fully guarantee the fulfillment of this requirement. But I can assure you that the next update will solve the problem.

    Concerning the jerking of the pursuers and the approaching of the passage to the obstacles - yes, such a problem exists, and we also reflect on it. We hope that we will manage to solve it. Now the problem of approaching obstacles can be solved by increasing the dimension of cells in the search graph. I suggest you do not hurry with the purchase of the asset and wait for the next update (it is expected by early August). Then you can try new demos, which will be published on our website.
     
  14. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    326
    Thank you very much for your honesty. Will just watch this asset for updates. All the best to you and your team! :)
     
  15. JamesMillsTunacorn

    JamesMillsTunacorn

    Joined:
    Mar 21, 2018
    Posts:
    3
    Hello,

    I am attempting to use this asset in UWP and it looks like it won't work at all due to the asset using System.Threading, of which UWP doesn't have access to. Is there any way around this?
     
  16. SnigirevNikita

    SnigirevNikita

    Joined:
    Jul 1, 2013
    Posts:
    8
    Hello, James! In the update to version 0.3 we have implemented several code elements that should solve this problem by providing Windows.System.Threading namespace(which supports at UWP) instead of System.Treading. Unfortunately, we can not guarantee working capacity, because we do not have the opportunity to test our asset on this platform. (This update is currently not released, but is pending review at Asset Store.)