Search Unity

Dynamic AI Project[Navigation Released]

Discussion in 'Assets and Asset Store' started by brilliantgames, Oct 13, 2012.

?

Should the Navigation be available as a separate purchase?

  1. No, keep it exclusive to Dynamic AI.

    33 vote(s)
    22.4%
  2. Yes, I am only interested in the Navigation in this project.

    53 vote(s)
    36.1%
  3. Yes, but I also want this to be compatible with Fantasy AI

    61 vote(s)
    41.5%
  1. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Yes, you can use this for whatever you want. But specific behaviours are up to you.
     
  2. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    669
    Greetings Brilliant Studios. Gratitude for making awesome stuff. I am interested in picking up the Fantasy AI 2.0 and Dynamic Navigation packages for our game. I wanted to ask you first, however, if you think it will work with my project. Our game terrain is a procedural generated voxel terrain (smooth though, not boxes like Minecraft). Do you think this would be a problem with this system? For example, a small portion of the world is generated when the user loads in. As they move forward through the terrain, new chunks of terrain are generated on the fly in front of them and the old chunks (and any game objects) behind the player are removed, when out of range (but saved). We would like to use the AI for our monsters and NPC's. I can provide an example if you need further clarification.
     
  3. EnigmaFactory

    EnigmaFactory

    Joined:
    Dec 10, 2011
    Posts:
    91
    Brilliant, can you just clarify if this is included in Dynamic AI 1.1 already? I've watched the tutorial videos and I never see the scripts that would drive the FPS combat in there.
     
  4. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Well yes. But it all depends how large your local grid size is. The bigger the grid, the more lag you will get when updating. The most Dynamic part of Dynamic navigation is the use of 'dynamic obstacle' but terrain and walkable areas that change must have the entire grid regenerated, though grid creation is VERY fast(Its not really possible for it to be any faster really).
     
  5. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Dynamic Navigation is a separate package. Dynamic AI is not out yet. :)
     
  6. EnigmaFactory

    EnigmaFactory

    Joined:
    Dec 10, 2011
    Posts:
    91
    That's really confusing. First page of this thread makes it seem like those features are included in this package.
     
  7. Half_Res

    Half_Res

    Joined:
    Apr 16, 2013
    Posts:
    11
    Hi Brillant Studios,

    Just left you a PM :D

    Cheers

    Half Res
     
  8. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    Ok, I'm a bit confused,

    I see you have a few different AI packages out. I have some questions on what I would need to achieve the following:

    Of course all of the pathfinding and all, but also

    1) Enemies that shoot back
    2) Enemies that can take cover, dodge and hide behind objects and then shoot back from cover.

    Thanks,
     
  9. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    218
    When Do you Release the Dynamic AI?
     
  10. GBCFraser

    GBCFraser

    Joined:
    Apr 11, 2013
    Posts:
    94
    Does this work in Unity Basic?
     
  11. blaze

    blaze

    Joined:
    Dec 21, 2011
    Posts:
    211
    I need a feature:
    War Formation navigation, to make the soldiers walk in formation where is possible.
    $showcase-syntagma-phalanx(official).jpg

    You can add this to the Dynamic Navigation?

    And, I need some help. How can I do the units stay in the middle of the squared grid? I'm trying to make a movimentation like Age of Empires 2. Then, I need that each unit use one square to stay inside. How can I do that?
     
  12. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928

    Well this sort of movement is not necessarily pathfinding. Also, having those amounts of units have to be operated in different ways. See with those types of games its all a big trick, they are sharing pathfinding, each unit is just for visual effect. I am actually doing a contract for a strategy game right now actually, and who knows, I might release some squad/legion based movement.

    Yes.
     
  13. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,889
  14. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    If your AI require pathfinding then yes of course. ;)
     
  15. blaze

    blaze

    Joined:
    Dec 21, 2011
    Posts:
    211
    What about the navigation inside the grid?
     
  16. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,889
    Okay nice move ;)

    What I meant is that it seems to work with planar projection, but what about non euclidian space full of curve in all 3 dimensions, will it automatically detect it too? I mean generate path on sphere or any 3D shapes, how does it work? It's seems designed to work with grid too, but the grid will totally break on curve!
     
    Last edited: May 31, 2013
  17. Gatof81

    Gatof81

    Joined:
    Jun 5, 2013
    Posts:
    1
    Hi, i recently bought dynamic navigation and its great, the tutorial worked out great.

    im new at unity so maybe this is a lame question, but i wanted to use this script for an rpg game, and i was wondering if i can assign the target of my character dynamically. from where the character its standing to where i click with my mouse.
    if this is posible? its there a tutorial or can you help on how to get started with it?

    thanks
     
  18. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,889
    Okay I guess that's my answer it only deal with heightfield surface :/
     
  19. Julian-S

    Julian-S

    Joined:
    May 31, 2013
    Posts:
    72
    So I have a question about your system.

    I'm designing a game where I have a boat that I want the crew to navigate. It has a few layers.

    The thing is that the boat will probably be constantly moving and rotating. Is there a way to use your system so that the crew can navigate the ship while the ship is moving around and rotating?

    Thanks,
    Julian
     
  20. Andy2222

    Andy2222

    Joined:
    Nov 4, 2009
    Posts:
    81
    Some small feedback from starting to work with the system.

    I would like to have the nearest (distance check) "Grid" assigned at Start() automatically, if no manually grid is set. This is a good default behavior simply assuming any AI/Obj naturally "wants" the grid closest to its own location. The manually set is simply a override and a bit tedious, since most of the time we only use one in a scene anyway.
     
  21. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Yes, apologies. It is limited to heightfield surface.


    That is a tricky one. Does your boat need to be moving? Can you not move the water instead?

    Yes that would be convenient. But, this would be very easy to implement yourself. Or if you only had one grid you could give it a tag and say something like,

    Code (csharp):
    1.  
    2. GameObject SceneGrid=GameObject.FindGameObjectWithTag("grid");
    3.  
    4. Grid gridscript=(Grid)GetComponent("Grid");
    5.  
    6. Navigator navscript=(Navigator)GetComponent("Navigator");  
    7.  
    8. navscript.Grid=SceneGrid.transform;
    9.  
    10. gridscript.Grid=SceneGrid.transform;
    11.  
    12.  
    13.  
     
  22. Andy2222

    Andy2222

    Joined:
    Nov 4, 2009
    Posts:
    81
    Yeah im doing something like this atm:

    Code (csharp):
    1.  
    2.     public void SetTarget(Transform inTransform)
    3.     {
    4.         Target = inTransform;
    5.         Navi.Target = inTransform;
    6.         if (inTransform) {
    7.             GridPosition gridpos = inTransform.GetComponent<GridPosition>();
    8.             if (gridpos == null) {
    9.                 gridpos = inTransform.gameObject.AddComponent<GridPosition>();
    10.             }
    11.  
    12.             if (gridpos  gridpos.Grid == null) {
    13.                 gridpos.Grid = GameObject.Find("NavGrid").transform;
    14.             }
    15.  
    16.             if (gridpos  gridpos.Grid) {
    17.                 Navi.NavigateTarget = true;
    18.             }
    19.             else {
    20.                 Debug.LogError("Error adding GridPos Comp!");
    21.             }
    22.         }
    23.         else {
    24.             Navi.NavigateTarget = false;
    25.         }
    26.     }
    27.  
    Btw im getting this error:
    The idea is basically that my ai can use any placeable object/waypoint as target and just adds the missing "Grid" component if it gets set as target, so the navigation works. The actual navigation works fine in my test-case, but i cant get rid of the above error. Is there any way to debug this or u have a clue what might be the problem?

    Update: Just did add the GridPosition Component manually via the editor to some of my target objects and seems the dynamic runtime code, is causing the error. So how can i fix this, since the navigation itself works fine? Whats the difference between dynamic creation/adding and static creation via editor for the GridPosition class?


    Question1: I also wonder if there is some way to detect a timeout or pathing error, since "SlowToStop" will also trigger if the path was not created. Is there a way to distinguish between "path not yet created" and "path error not reachable"?

    Question2: How do u suggest to handle obstacle avoidance of the enemies itself? Atm we use a rigidbody and the MovePosition() call, which unfortunately can result in 2 Ai's blocking each other, since the movement is not force based. Is it suitable to make all Ai agents into dynamic obstacles or is this problematic, given the frequency at which the Grid needs to-be updated?

    Assuming u have solved this in your dynamicAi, could u post your solution? Btw any ETA on the dynamic AI system?
     
    Last edited: Jun 21, 2013
  23. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Yes unfortunately you will get an error at the start cause I believe there may a few things that occur in the grid position script at the start.(It will still work like you said but for now you may have to put up with those erros at the start until the next update)

    If you were to add dynamic obstacles to the AI themselves this would cause problems. The reason for this is that the AI would have nonwalkable areas under their feet.

    There is actually a simple avoidance system built into the open source AI script, did you notice that? If you play the demo you will notice they attempt to avoid eachother on collision. The approach is very simple, when they collide with an object they ask if it has the obstacle tag, if it does they briefly turn the opposite direction as the object they are colliding with.
     
  24. Andy2222

    Andy2222

    Joined:
    Nov 4, 2009
    Posts:
    81
    Oki so the next update will remove those errors, its kinda annoying since it spams the log console.
    I also would like a way to determine if a path is still generated or if a path is "blocked". I noticed the log output "Path is blocked", so can we get separated events/bools for "path generating" or "path generation finished", "path blocked". Can u also plz put a few more comments into the c# file for each member variable, there are some that are not documented at the website?
     
  25. Andy2222

    Andy2222

    Joined:
    Nov 4, 2009
    Posts:
    81
    Just noticed that i cant get multiple "ignore collision layers" to work? The "2/3/4" members are all ignored for my setup, only the first is used?

    Also if i try to dynamically force a update via "grid.CreatGridNow = true;" the resulting grid does not correctly "ignore" the setup "ignore collision layers".

    Basically only "CreateGridNow" before i start the game in the Editor will generate a correct grid, as soon as i dynamically add GridPos or DynamicObjects via script and force a update the setup layers are not used?
     
    Last edited: Jun 25, 2013
  26. heskethgames

    heskethgames

    Joined:
    Jul 2, 2013
    Posts:
    18
    Hey there, currently working on a large scale RTS game and after a heavy heart I decided to ditch my pathfinding system (The only other decent one on the asset store) for your one and found it soooooo much more reliable. Thank you!
    Although noticed a lot of the screen shots and tutorials were out of date in terms of what some of the options did, was wandering if you have considered setting up a proper forum? Its rather hard to sift through one giant thread and would be handy to have different threads and topics on how to use and problem solve. Just an idea :)

    Thanks again! And heres hoping your system fixes my issues.
     
  27. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928

    Hey, glad you like it. But have you not seen this page?.. http://forum.unity3d.com/threads/159725-Dynamic-AI-Project-Help-Page?p=1092936#post1092936

    There should have been a link in the readme on the asset in the editor. Theres also a link to this at the front of the page.
     
  28. heskethgames

    heskethgames

    Joined:
    Jul 2, 2013
    Posts:
    18
    Indeed I have, and its very useful, however it seems a little out of date as trying to find out what things like "Detect Static target" and "initial path speed" also a few more options on the other nodes too.
    Might be cool to have a help file with a list of all the current features and exposed variables on the scripts.

    Cheers
    Rob
     
  29. CaptainChristian

    CaptainChristian

    Joined:
    Apr 3, 2013
    Posts:
    97
    Which grid parameters are you using for your grid and to make pathfinding work? I found every size above 350 to crash or eat up too much resources, but difficult to make characters navigate the terrain on higher cube and capsule sizes. They keep trying to run outside the grid or do weird stuff like patrolling or circling around.

    Edit: I got a huge terrain.
    Which grid and ai parameters do you recommend for large scale terrains?
     
    Last edited: Jul 10, 2013
  30. Precizion

    Precizion

    Joined:
    Nov 19, 2012
    Posts:
    8
    A question regarding something mentioned a while ago in the thread:

    Wouldn't it be possible to just run through all the treeInstances on a terrain, grab their world position, and just mark those parts of the grid as non walkable? Would save having to create the grid at run time, every time. Guess you might have a problems with some people having vastly different tree widths, but for majority I expect just blocking off one unit would be fine (and could always put in a variable to increase that).
     
  31. Andy2222

    Andy2222

    Joined:
    Nov 4, 2009
    Posts:
    81
    While working more with the system i noticed some functionality missing, compared to what i was used too in UDK.

    1) "Reachable" test, a abstract test that justs test's if a GridPos/Vector3 Pos would be currently reachable or not, without actually triggering internal nav logic/setup or the need to setup a GridPos object.

    2) A way to test if a collider can create/place a valid GridPos dynamically and if possible move it to a valid pos. This is needed for dynamic GridPos, where it is not clear if the source position vector is valid to create a pathable destination for the NavSystem. Ideally given a radius, the system will try to find a valid pos, "near" the given source position.


    Thx Andy
     
  32. SoBiT

    SoBiT

    Joined:
    Dec 5, 2012
    Posts:
    44
    Is there seriously no way to avoid rigidbodies?
     
  33. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Sorry what do you mean? Rigidbodys are not required for anything in Dynamic Navigation.. Or are you talking about dynamic object avoidance? You can use the Dynamic Obstacle feature for that?
     
  34. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    There are more features like that coming in the future for Dynamic Navigation. Understand its a one man team working on other projects as well. Including 'Dynamic AI' which is FINALLY well on its way everyone! ;)
     
  35. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    No there wouldnt be any point in simply grabbing all the vectors considering there would be no real way of knowing an accurate radius of the trees... Its very simple to do this.. Just simply create a grid during game time and copy it, then stop the game and paste it in edit mode. ;)
     
  36. SoBiT

    SoBiT

    Joined:
    Dec 5, 2012
    Posts:
    44
    Sorry, I mean objects with rigidbodies. In your first post you mentioned, that we can only avoid dynamic objects WITHOUT rigidbodies.

    That's what you say: "Objects of any size or shape without rigidbodys, can be moved, rotated, or scaled and the grid will update the footprint."
     
    Last edited: Jul 18, 2013
  37. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    627
    @brilliantgames

    Any estimate on when 'Dynamic AI' will be released? Moreover, what's the difference between it and your existing Fantasy AI?

    Thank you.

     
  38. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,928
    Sorry that was meant to say that rigid bodies are not required. :)


    I hope no more than a month. Though its been hard to say, I have been all over the country and working other projects. But I will have a new video revealing the features and what not very soon. :)
     
  39. lod3

    lod3

    Joined:
    Mar 21, 2012
    Posts:
    627
    Nice. Looking forward to the reveal.

     
    Last edited: Jul 23, 2013
  40. SoBiT

    SoBiT

    Joined:
    Dec 5, 2012
    Posts:
    44
    How easy would it be to make a character wander randomly?
     
    Last edited: Aug 12, 2013
  41. CaptainChristian

    CaptainChristian

    Joined:
    Apr 3, 2013
    Posts:
    97
    I'd simply create a gameobject with gridposition attached at a random position and then move it around as soon as it comes within range (or a little farther away) of your chars DistanceStop value. Your character should follow that gameobject.
     
  42. HaroldBalls

    HaroldBalls

    Joined:
    Oct 30, 2012
    Posts:
    20
    im not sure if this has been asked so far ( i havnt read the whole thread) but does this addon work for Windows 8 phone, and Windows store? now that they are supported in unity 4.2

    thanks
     
  43. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,113
    Any update on the Dynamic AI component, still holding out for this AI system.
     
  44. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    522
    Any chance of adding a How-To set up a ladder?
     
  45. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    hi

    i'm interested and was running the different demos and i notice that they get stuck on things and fall off as they are following you around or coming to you or going to where you tell them to go.

    the worse problems were with the new demo, but even with the desert demo there were problems where all 3 came to me, there was a large crates blocking path two ran up to me the third hit the crate cause of the formation and kept trying to run, all it had to do was step 1 foot left to go around crate.

    also in the new demo there is always at least one getting stuck on stairs in the warehouse before the door. two will most likely make it into the rooms, but one keeps trying to run into the wall instead of using the stairs and or get caught on the door. the stair is right there, its on it, it should try to use it. and if its at the door all it has to do is use it, it hits it like 1 foot off.

    so you need to have some checks if you are not able to move try something else, see if you can go around.

    so please fix these things cause i'm shopping.

    thanks in advance!
     
  46. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    seeing it was on sale i got this earlier today and when i download the latest version using latest unity 4.2 and imported it and opened the demo scene 'Warehouse' and ran it i got 6 errors

    a bunch of

     
    Last edited: Aug 28, 2013
  47. 99thmonkey

    99thmonkey

    Joined:
    Aug 10, 2012
    Posts:
    522
    For all of those Animation Bip001 errors, click the error and follow it to the character. They need to reference player instead of Bip001 (I think that's what it was).

    Those sword errors, I couldn't figure out, so I just deleted the swords. They were part of the minicrystal project which I'm not using.

    For the Terrain ones, I ended up following that and deleting the terrains under the Tree Editor folder. After that no more errors.

    Only problem I'm at is if I run some Fantasy AI in the Dynamic Navigation demo scene, the AI tends to get stuck at the top of the stairs. It's probably just a setting, but *shrugs*
     
  48. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
  49. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    hey were are the demo scenes used to create all the videos and snapshots and even the tutorial demo scene is not there!

    except for a single demo scene "Warehouse" all the other one demos which he has in all those videos are not included in the asset which makes it difficult for someone starting out since you immediately jump to the most advance demo and have to try to figure it out yourself.

    where is this demo scene

    https://dl.dropboxusercontent.com/u/65183439/Navigation Demos/Navigation demos.html

    or this one

    https://dl.dropboxusercontent.com/u/65183439/Navigation Demos/Stress.html

    or this one

    http://dl.dropboxusercontent.com/u/65183439/dust2/WebPlayer.html

    it does say this "Screen shot of demo scene included. AI uses an elevator in his navigation" but the demo scene is not included at all.

    he only included the Warehouse.scene.
     
    Last edited: Aug 29, 2013
  50. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    758
    Hi. Sorry if this has been asked already, but how does Dynamic Navigation compare with the Unity Pro's Navmesh and Aaron Granberg's A-Star implementations?
     
unityunity