Search Unity

Apex Path v2.0 [RELEASED] - High Performance, Easy to use dynamic Pathfinding

Discussion in 'Assets and Asset Store' started by Reinholdt, Jul 16, 2014.

  1. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Interesting, thanks for taking the time to explain this. So I am wondering would it be possible to use multiple portals almost as waypoints to define the path that an AI unit would use to climb up the building? Referring to the image below, instead of simply having a single portal at the top and bottom (refer right) , would it be possible to position several portals to match the shape of the building (refer left) and have the AI unit follow them using the Portal Action None Component as the portal action?
    PortalWaypoints.PNG
     
  2. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    No I am afraid not, units cannot navigate on inverted faces, and portals in general cannot be placed vertically, there is no vertical path finding. You will have to script your own behaviour for this as part of the portal action.
    I would imagine you also want different animations for the different legs of that climb.
     
  3. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    I have purchased Apex Path several days ago now. The one thing I am having trouble working out is how to move portals around. I am using the example "Portals" scene but whenever I try to drag a portal to move it a new one is created instead. In this video there are move and resize gizmos for each portal, but in the included example I do not get this:

    Apart from clicking the "edit portals" button is there something else that I need to do to move a portal around?
     
  4. Reinholdt

    Reinholdt

    Joined:
    Sep 12, 2011
    Posts:
    42
    Apex Steer Submitted to the Asset Store!

    Hi

    Just letting you know we have submitted Apex Steer to the Asset Store.

    Apex Steer Introduction


    Apex Steer Features
    • One-click quick starts
    • Local avoidance
    • Grid, circle, line, row formations
    • Avoidance priority
    • Swarming
    • Vector fields
    • Crowd simulation
    • Dynamic avoidance
    • Destructible geometry
    • Supports procedural content generation
    • Load balancing
    • Easy to extend
    • Integrates with Apex path
    • Integrates with forthcoming products
    • High performance
    You can find feature details on the product page here

    Here are some useful links.

    Apex Steer Unity forum thread. (let us know what you think)
    Apex Steer product page.
    Apex Steer tutorials.



    The Apex Team
    www.apexgametools.com

    Follow us and get all our news, updates, tutorials, etc.
     
  5. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    That's good news! I would have expected Steer to be an addon for Apex Path, but it's got it's own category on your website while Dynamic obstacles is under addons. Does this mean Steer isn't an addon to Apex Path? I mean it will still require Path, will it not?

    Also if you don't mind me asking, what's the pricetag on Steer? :)
     
  6. Reinholdt

    Reinholdt

    Joined:
    Sep 12, 2011
    Posts:
    42
    Hi MattyWS

    Im glad you like the news!

    Apex Steer is an addon product for Apex Path, so it requires Apex Path.
    I guess we could rename the "addon" category to utils or something :)

    Apex Steer is 65$
     
  7. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    I see here on this thread that Apex supports the concept of node traversal costs. My question is, does that data need to be created programmatically or is it exposed in the editor somewhere?
     
  8. dkoontz

    dkoontz

    Joined:
    Aug 7, 2009
    Posts:
    198
    I see there is a IMoveCost that you can provide to the system but I can't find any API docs that would let me see if I that would solve my issue. What I'm looking for is a way for designers to put elements into the scene that will be taking into account when calculating paths. Can the move cost calculation that would be implemented by the IMoveCost have access to what was in that grid cell when the pathfinding graph was built? Could I have my path prefabs be non-blocking but still be usable by the cost calculation?
     
  9. Reinholdt

    Reinholdt

    Joined:
    Sep 12, 2011
    Posts:
    42
    Apex Steer 1.0 Released

    We are super excited about this Apex Steer is now released!
    You can find it in the Asset Store here


    Apex Steer Unity forum thread here

    The Apex Team
    www.apexgametools.com

    Follow us and get all our news, updates, tutorials, etc.
     
  10. LampRabbit

    LampRabbit

    Joined:
    Jan 31, 2013
    Posts:
    30
    Very cool, I've heard rumblings in the Playmaker community that actions would be made for Apex pathfinding at some point, any word on this?
     
  11. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    It has been the plan for a while, but unfortunately we do not currently have the resources to do this.
    I am afraid it is impossible to give a realistic estimate of when we will be able to look at it again, since the other pending tasks before us are rather elastic time wise.
     
    LampRabbit likes this.
  12. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Well full cost field functionality is not yet available, however very basic cost is implemented. Each cell has a cost property that can be set to whatever, the higher the value, the less appealing it will look to the path finder.
    There are however no components available to be able to assign costs to cells.
    We will be adding a cost field package later with more advanced functionality in addition to editors for cost configuration.
     
  13. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    Hi,

    Is there a way to create a platform in real time and have it added to the system, in any height and orientation ?

    For example i want to add a platform a few meters above the hero connected to the ground with a ramp and click to calculate the pack to that in real time, is that possible ? Is there any extra setup i need to do to handle this, or is automatic (like say the nav mesh method)

    Also is it possible to have platforms one above the other ? Or multi layer buildings ? From the height map sample it seems that this is not possible.

    The grids with height map are calculated on the fly and is it automatic or needs some exta setup ? If i add a platform in one spot will it be automatically included in the height map and what is the cost for that operation ?

    Thanks
     
    Last edited: Apr 5, 2015
  14. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Multi level geometry is only partly supported. Each level needs its own grid and levels cannot overlap height wise.

    So no you cannot simply add a platform above a unit as that would invalidate the area below it, where the unit is.
    The easiest way to explain this is that looking from the top down within the confines of a grids boundary, there can only be one height at any given point.

    So multi-layered buildings are fairly simple to set up, each level has its own grid and levels are connected via portals on the stairs etc.

    With regards to dynamic updates, i.e. adding or removing geometry at runtime, this is not something that automatically happens, a request to update a certain area is required. You indicate that nav meshes do this automatically, but that is certainly not the case, in fact nav mesh implementations very rarely support dynamic updates, and if they do, the performance is generally horrible.

    Apex Path does not require baking, all you need to do is specify its boundaries.

    I hope that answers you questions.
     
  15. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    Thanks for the clarifications.
     
  16. Hamesh81

    Hamesh81

    Joined:
    Mar 9, 2012
    Posts:
    405
    Just reposting my previous question since it seems to have been lost in the Apex Steer release :)

    I have purchased Apex Path several days ago now. The one thing I am having trouble working out is how to move portals around. I am using the example "Portals" scene but whenever I try to drag a portal to move it a new one is created instead. In this video there are move and resize gizmos for each portal, but in the included example I cannot find how to get these gizmos:

    Apart from clicking the "edit portals" button is there something else that I need to do to move a portal around?
     
  17. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Portals editing changed some version back. Portal end points cannot be moved but can be repositioned simply by drawing them in the new position. You can move the entire portal, i.e. both end points, by moving the game object hosting the portal.
     
  18. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Hello,

    In my game I have a ship constantly moving on water meaning its x, y, z position and rotation are always in flux.

    I would like to have the ai crew be able to move about the ship while it's moving.

    I am wondering if your pathfinding solution is able to accomplish this? I assume it means modifying path finding at runtime in a reasonable way but any waypoint pathfinders that I have looked at so far don't seem to be capable of that.

    Any help would be much appreciated, thanks!
     
  19. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    We do not currently support that I am afraid. Local space path finding is on the back log, but has yet to be scheduled for implementation.
     
  20. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    73
    Okay, thanks for the quick response!
     
  21. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    I'm having an issue with Patrol routes, it seems I cannot assign a route to a unit prefab unless that unit is in the scene. In other words when the unit spawns it won't have a patrol route. :( This wasn't an issue a while ago (pre 2.0) and I was happily getting enemy units wondering the map going from point to point at random. Unless I'm mistaken?

    My issue is I have a map with a patrol route, I'd like to set units up to spawn and start following it straight away but I can't even assign that patrol route object to my prefab in the project, it can only be done in scene Hierarchy.
     
  22. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Admittedly this is not something we have tested, but the standard patrol behaviour references a patrol route which in turn is made up from a number of game objects that represent patrol points, so these have to be in the scene.

    Have you tried prefabing the patrol route and then assign it?

    You won't be able to use the quick start on the unit prefab though since it will add the patrol route to the Game World which of course does not exist in prefab scope. But you can just add the patrol behaviour manually from the component menu.
     
  23. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    I have tried prefabbing the patrol route and assigning it and while I can assign it that way, the unit still doesn't work when spawned in-game. I'm guessing it's the same as assigning a patrol route that doesn't get spawned in the world (even though it's actually already in the world).
     
  24. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yeah I guess it has to do with how prefabs work, the one you have in the world is an instance of the prefab, which is not the same reference as the one assigned to the unit.

    So for now you will most likely have to assign the patrol route to the unit when it is spawned, however the standard patrol behaviour starts itself in start, so it will complain that it does not have a patrol route. And assigning it after will not make it restart itself.

    So you either have to spawn the unit disabled, assign the route and then enable it, or create an alternate implementation of the patrol behaviour (it is pretty straight forward) that will behave appropriately.

    We will probably look into improving the patrol behaviour at some point, but currently it is not on the top of the list I am afraid.
     
  25. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    That's a shame that it doesn't just work.. I'm not exactly an amazing programmer, I wouldn't know how to even assign it after the object is instantiated. I suppose I could for now put a single unit in the world under my map and have it fall to it's death when the scene starts, and just assign that unit to be spawned instead, but it'd be an awkward workaround. I do only have one map though so I guess it would be ok to do that for now just for a quickfix.
     
  26. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I agree that its a shame it does not work and we will look into it, but for now you do have some other options. You can have a unit mold in your scene, which is just a disabled fully configured unit. You can then instantiate that instead of the prefab. There are a number of examples in the examples project that uses this approach, GroupingExample is one such example.
     
  27. douglasg14b

    douglasg14b

    Joined:
    Oct 2, 2014
    Posts:
    34
    Hey Apex, picked up Path and my first order of business is replacing the InputRecieverBasic and the InputController with my own. I already have an input and selection system, that handles unit selection, grouping, deselsection...etc

    Looking through your InputController, it ties into your GameServices class. Which seems to have unit selection, and grouping inside, among other things.

    Would it be terribly difficult to gut unit selection and just tie w/e calls are necessary into my own selection behaviors. Or would it be reasonable to continue using mine, just replacing the InputRecieverBasic & Inputcontroller and tying calls to the GameServices and friends into my own controller. Just letting Apex Path continue handling selection and grouping...etc on it's own alongside my own solution?
     
  28. MattyWS

    MattyWS

    Joined:
    Jan 24, 2013
    Posts:
    70
    Exactly what I ended up doing. ^^ I wouldn't worry too much about it for now as I'm sure you have other more pressing issues.

    So far though I'm pretty pleased with most other aspects of Apex. I plan on getting the Steer addon soon as well. I'm glad I invested in an ever growing and evolving pathfinding package! My game is nearing an early Alpha release soon, I'd still be miles behind without Apex.

     
  29. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    The grouping in Apex Path provides a means to control how a group of units is given move related orders. This video explains this in more detail.
    In Apex Path alone, grouping is not really a requirement, nor is the built-in selection. If you are also using Apex Steer grouping is required.

    So you can have your own grouping and selection logic side by side with the built-in stuff, and there are two ways you can do this.

    The first is to simply use the built-in selection methods in addition to your own, which in turn will create the groupings.
    This is done by calling the various methods on the GameServices.gameStateManager.unitSelection, you can use the default InputController implementation as a reference.

    The second option is to cut out the selection bit and create the groupings yourself. You will then use this grouping to issue move related orders. The above linked video has more details, but given that you have a list of units (represented by their game object or a component) the way to do it is like this:
    Code (CSharp):
    1. var units = myUnits.ToUnitFacades();
    2. var grouping = GroupingManager.CreateGrouping(units);
    Hopefully that makes sense.
     
  30. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Glad to hear that it worked out, and super nice that you are well on your way to a finished game. We would obviously be very interested in seeing the game once it is playable.
     
  31. douglasg14b

    douglasg14b

    Joined:
    Oct 2, 2014
    Posts:
    34
    Thanks for the reply Geminior, I'll end up using Apex Steer as well so I'll leave the selection and grouping as is and just run it side by side with my own solution.
     
  32. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hi,

    your steering solution is out now, and again your pathfinding solution looks better and better. Is your steering solution able to handle different type of units, like a car, a tank and simple infantry? All three unit types have different kind of turning requirements and one has a faster acceleration and the another a faster top speed or faster turning speed. In my case, the tanks and the vehicles drive by vehicle collider, similar to real cars and tanks.

    How act the group with such different properties?
     
  33. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    The short answer is that it is entirely up to you how they act.
    When a group (or grouping rather) is created, the default behaviour is to simply put all the units in the same group and treat them as one group.

    However the grouping strategy is something you can implement yourself, this video explains more about grouping.
    So you could make it so that when you select a bunch of these 3 units you describe, you actually create 3 groups (for the purpose of steering). Each group would then receive its own path to follow according to their capabilities.
    Another option would be to stick with one group, but pick a specific unit type to be the 'model unit', which would likely be the unit with least capabilities, e.g. slowest unit, so all other units adapt to that.
    Now the latter option currently requires creating a new group type, but this will be improved in a soon to come update.
     
  34. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365
    I am looking into path finding solutions right now and Apex Path looks really good, but I just read something in the forum that makes me think it might not work for me. I am doing procedural terrain generation using a voxel system (Ultimate Terrain) and am trying to find a solution that will work with voxel terrain.

    Any chance you know of any clients that might be using Apex Path for path finding?

    Thanks in advance
     
  35. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    I am not sure what you read, but we have full support for procedurally generated worlds.
    As long as what you end up with has a collider it will work with Apex Path.

    I do not know of any customers specifically using Ultimate Terrain with Apex Path, but if any are out there perhaps they can answer you as well.
     
    boysenberry likes this.
  36. boysenberry

    boysenberry

    Joined:
    Jul 28, 2014
    Posts:
    365

    That is really great news. I expect Apex Path will be my next asset store purchase.

    What I read that made me question whether or not it would work was the discussion about overlapping navmeshes; I figured with there being caves in my generated terrain that might be an issue.

    I can't wait to get Apex Path and dig in.

    Thanks,
    Boysenberry Payne
     
  37. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Ah I see, well in that case you are right. Apex Path does not support multilevel geometry in a single grid, so caves looping back under themselves for example will not work with Apex Path.

    You can have different levels however, each level just requires its own grid, the last video on this page has more on that.
     
    boysenberry likes this.
  38. GenericJoe

    GenericJoe

    Joined:
    Apr 27, 2012
    Posts:
    33
    Hello, has the Apex Path Examples and Tutorials Project been updated for Unity 5? I have just downloaded and imported and I'm getting loads of "The associated script can not be loaded" error messages, on all the scenes in \Apex Path Examples and Tutorials Project\Assets\Apex Examples\Apex Path\Scenes
     
  39. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    The tutorial project is Unity 4, but you simply allow Unity to upgrade it when it asks.
    The scripts are all Unity 5 compatible.
     
  40. efreet

    efreet

    Joined:
    Sep 2, 2009
    Posts:
    34
    Hi,

    My game is a 3d space game with all movement occurring on X and Z, Y = 0 for all players, npc's, obstacles ect. Player has unlimited movement on X and Z.

    I figure I would have 9 (might get away with less) prefab grids in total, and when player in nearing the edge of one I spawn/initialise another so it becomes endless.

    Will the grids auto join up once the have been initialised? As in the AI can calculate a path if the player had crossed into a different grid.
     
  41. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Grids are connected via portals. This is not an automatic process however, so when a new grid is created it must be connected to its neighbour(s) by creating portals between them.

    Currently the API for doing portal connections is a bit lackluster, but we will improve on that in an upcoming update where there will be additional changes to portals.
     
  42. GenericJoe

    GenericJoe

    Joined:
    Apr 27, 2012
    Posts:
    33
    Hi Geminior, thanks for the reply. I did allow it to upgrade, that bit went fine. There just seems to be a large selection of missing scripts:

     
  43. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    It appears as if the example project has not been unpacked correctly, that somehow Apex Path (scripts) are missing.
    How does it look in the project view?
     
  44. GenericJoe

    GenericJoe

    Joined:
    Apr 27, 2012
    Posts:
    33
    The project view looks like this:

     
  45. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Well that does look correct. I honestly have no idea what would be causing this. Are you sure all the files were extracted, I mean I know they are in the zip file.
     
  46. neroziros

    neroziros

    Joined:
    Aug 25, 2012
    Posts:
    129
    Hi all! I have a question. If the Off Grid Navigation was disabled in Apex 2.0, what is the intended way to implement the multi grid setup? The problem I'm having is that I can't just initialize the grids in which the units are because they can't reach the next grid because there is no Off Grid Navigation (and therefore, can't move from a grid to another)
    Cheers and thanks for the help
     
    Last edited: May 2, 2015
  47. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Use connector portals for stitching the grids together. This will work in a similar fashion to off-grid navigation, and come the next update even more so.
     
  48. neroziros

    neroziros

    Joined:
    Aug 25, 2012
    Posts:
    129
    I understand, I'm creating the map grids with the Apex's grid field utility which also create the connecting portals. However, even though I'm initializing the grid where the player starts, its portals doesn't work I think because the neighbouring grids are not initialized. Is there a way to get a reference to those neighbor grids so I can initialize them?

    Thanks for your time and help!

    PS: It's odd but when I don't initialize any grid I can move freely between grids (but without the pathfinding). Once I initialize a grid I get the pathfinding but cannot move from a grid to another

    PS2: On the same topic I have another problem. I tried to manually initialize the 4 neighbouring grids (I got the reference to them by adding the grids size to the player current position and using GridManager.instance.GetGridComponent). However I'm getting weird artifacts on the paths between grids. Here I post an example:

    Path in the same grid: http://puu.sh/hz4pL/73b9c8b3f6.jpg
    Path between grids: http://puu.sh/hz4rH/3fe1e72257.jpg
     
    Last edited: May 2, 2015
  49. Geminior

    Geminior

    Joined:
    Feb 12, 2014
    Posts:
    322
    Yes this is by design, uninitialized grids basically don't exist. The grid component is there, but the actual grid is not.

    You do that using the GridManager. IT might be an idea to add a method to more easily get a reference to a neighbouring grid, I will add that to the requested features list.

    This is because a unit not on a grid can move around. So you could say that there is some element of off-grid navigation. However a unit that is off-grid cannot move on grid, and as you say there is no path finding.

    I am not sure I know what those pictures are showing. Are you drawing your own path representation using the path of the unit?

    If that is the case you need to know about the portal part of a path. When a path includes a portal transition, the portal node itself is part of the path. This entry is just a marker the system uses to realize that a portal transition is required, but for the purpose of path visualization these nodes must be ignored.
    Have a look at the DrawVisualization method in the PathVisualizer class.

    The next update will include a GetPoints method on the path that will do this for you.
     
    Last edited: May 3, 2015
  50. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432