Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Polarith AI (Free/Pro) | Movement, Pathfinding, Steering

Discussion in 'Assets and Asset Store' started by Polarith, Apr 18, 2017.

  1. sylon

    sylon

    Joined:
    Mar 5, 2017
    Posts:
    246
    Hi.

    I am trying for a while now to have some decent moving animals in my (3d)game.
    Tried a few assets, but i'm not happy.
    Either results are not solid or performance is horrible.
    Polarith looks very promising and i am thinking of spending some time with the free version to get a better idea.
    I would very much like to see more demo's (videos) of some applications in practical use though. Applied to animals for instance ;)
    Do you have plans for that?
     
    Polarith likes this.
  2. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey @sylon,

    We can totally understand what you've experienced. All this Polarith thing started because we felt the same about steering behaviour design. During our work on a little game in the past, we have not been happy at all, too. Of course, our technology, sometimes, may require you to think twice, so our plugin still has got a learning curve due to its new approach. But I'm convinced that you will love it and its endless combinatorial potential until you get the main ideas behind it.

    Well, believe me, we would also like to see more practical use, too. Unfortunately, we're still a small team. So we have to plan well with our human resources. We're always kept in the fight: Awesome demos vs. better features. So, of course, we plan to show the world how great our plugin can be used for different kinds of scenarios and we're always thankful for such suggestions of yours. Thank you!

    Two of our team members just built up three major example scenes, one with a space setup, one with racing and another one with a pong clone, and as you might have noticed, we already began to release videos with this kind of setups. With the next patches which we're going to release during the next weeks, we'll try to roll out more and more of this stuff.

    Edit from one of my developer mates: he currently works on a demo scene for bird boids and flocks. :)


    Martin from Polarith
     
    Last edited: Jul 21, 2017
  3. sylon

    sylon

    Joined:
    Mar 5, 2017
    Posts:
    246
    Thank you Martin.
    I'll see how things progress. I have enough to do anyway and animals are on hold for now.
    To really test this though, i think i'll just buy your asset, since some crucial things for my situation are missing from free.
    Completely understand though :)
     
    Polarith likes this.
  4. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    You're always welcome. We'd love to hear from you when you begin experimenting. Maybe we can help you out here and there.


    Cheers,

    Martin from Polarith
     
  5. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    @jabevan: Just where did our conversation from yesterday go?
     
  6. jabevan

    jabevan

    Joined:
    Apr 2, 2016
    Posts:
    72
    In our Inboxes ;)
     
    Polarith likes this.
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Hi. I am just trying out Polarith AI Free to see if it will work for my game before going Pro, but I'm having issues as I follow along with the online documentation. I've gone through the Getting Started docs up to the point where I add and configure the AIM Seek component. At this point I'm not getting any agent movement or any indication from the gizmos that it wants to move in any direction. I've checked and double checked all the components I've added and their references, but I can't see anything wrong.

    I've created a scenario where my player ship is the object of Interest and it's in the Environment list:

    upload_2017-8-5_17-12-44.png

    My agent has the following setup:

    upload_2017-8-5_17-13-32.png

    Am I missing something still or is one of my settings wrong? I can't figure out what could be wrong.
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Here is what the gizmos look like for the agent during gameplay.

    upload_2017-8-5_17-33-2.png

    upload_2017-8-5_17-33-33.png

    It's supposed to be seeking the blue player ship.

    [EDIT]
    OK, so I see I needed to go further for it to start moving. I went all the way through to adding the AIM Simple Controller 2D and now the agent moves, but it's going the wrong direction. I'll keep trying, but if anyone has some advice, it would be appreciated.

    [EDIT 2]
    To further clarify, the agent isn't just moving in the wrong direction, it's not really seeking the item of Interest at all. It's just moving steadily straight forward. It never changes rotation or direction no matter where I put the item of interest in the scene.
     
    Last edited: Aug 6, 2017
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I'm finally able to see it show green lines as detecting items of Interest and I can see the direction line as well. But the green lines of interest are indicating something ahead of the agent is of interest, but the only item of interest in the scene is the blue player ship in a completely different direction.

    upload_2017-8-5_19-2-39.png

    [EDIT]
    I figured it out. I didn't see the section of AIM Seek where I needed to specify Filtered Environments or specific game objects to seek. The online documentation is slightly out of date and it doesn't explain this as far as I can tell.
     
    Last edited: Aug 6, 2017
  10. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey, @magique!

    We're glad that you managed to figure this out while we were sleeping here in Germany. You're absolutely right. Patch version 1.2 overhauled the complete inspector UI. Although we included this change in our Get Started video tutorial, it seems that we've forgotten to mention/include all these changes in the Getting Started manual page as well.

    Thank you very much for pointing this out, and sorry for the wasted time which our little mistake might have caused you.


    Martin from Polarith
     
  11. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    No problem. I just thrilled that I got it working. I really like it so far and will probably end up going Pro once I do a bit more testing.
     
  12. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    That's great! Let me know if you need any further help, you're welcome.

    By the way, your spacecraft assets look awesome.


    Martin from Polarith
     
    magique likes this.
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    How can I tell if an agent has reached it's target position? Say that it's heading towards an Interest item and it arrives. Is there some callback I can use to do something when it makes it there?
     
  14. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Currently, there is no such callback. The easiest way to achieve what you want would be a little script for checking such arrivals, whereby the script might be attached to the items utilizing a simple radius mechanism or Unity's Collider functionality (OnTriggerEnter and OnTriggerEnter2D). We do this in many of our demos for picking up items.

    Nevertheless, this might be a good addition for future versions. For implementing it, we can extend the Seek behaviour itself for keeping track of the currently targeted object as well as arrival events.

    Thank you.


    Martin from Polarith
     
    Last edited: Aug 7, 2017
    one_one likes this.
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Yeah, I was thinking along those lines as well if it wasn't directly supported.

    Sounds like a good feature.
     
    Polarith likes this.
  16. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Where Are the Next Tutorials?

    Hey there! In one of my posts here in the forum, I've promised that we plan to release one tutorial every week. So what happened to that plan?

    Well, we're still planning to realize such release schedule but we really want to increase the overall quality of future tutorials to show you what our technology is really capable of. That's why we decided to improve the Pro and Free package assets first. So for future tutorials, we want to use scenes which are much closer to real-game assets to really help you out with certain everyday situations.

    In the future, we would like to put most of the tutorial scenes directly into the package. This way, you'll be able to learn, watch and experiment with the results side by side. The first scene we're going to utilize for such purposes we call Tiny Wood. It will be patched in during the next updates. Here's a little preview. We hope you find it decent enough. Besides that, we plan a larger wood and a space scenario as well.




    However, the next patch v1.5 is at the ready to be released soon. The following features await you:
    • The Steering Perceiver will get a spacial grid/hashing for boosting up performance in large scenes.
    • We'll dramatically improve the load balancing for masses of agents.
    • We'll add another performance feature we call lazy percept receiving making sure that expensive data extraction/perception is only done when it is really necessary.
    • We're going to add a better way for determining and predicting the current velocity and agent orientation for all steering behaviours.
    • We'll take the first steps towards a simplification of the inspector GUI. So that one day, you'll have a simple editor view showing the most important parameters and an advanced view showing everything.
    If you want, you guys can post topics here for tutorial videos you would like to see first. Thank you for your continuous support!


    Martin from Polarith
     
  17. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    I have the pro, and I am trying to make a group of fighter to avoid colliding with each other, I don't see any mention of avoiding other agents in your video tutorials and the "Performance test" scene has agents bumping into each other all the time. Could you elaborate of how to set it up and how expensive performance-wise is that going to be?
     
  18. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey @yc960,

    nice to have you here! You're right, avoiding each other is actually not the focus of this scene. Last month we were all in improving the mechanics and algorithms (preparing 3D as well) so that we, unfortunately, disregarded the package examples for a while now. In fact, I personally consider the package examples as insufficient. Like I've already pointed out in the last post, that's why we decided to massively improve the Free and Pro packages after the release of v1.5. We will add in a lot of scenes that we will use in detailed tutorials, too.

    Now, let's answer your question: Agents are nothing more than dynamic obstacles and, of course, there are a couple of decent solutions to your issue. So I try to provide you a detailed overview (shame on us, we didn't manage to release a tutorial or to ship a decent example scene on this topic until now). I hope that the following description can make you happy.
    • Well, you can use AIMFlee(Bounds) on Interest and AIMSeek(Bounds) on Danger with the correct parameters for passively forcing agents to keep distance to each other. For a massive amount of agents, it is very important to set up a higher value (~0.2) of the InnerRadius for eliminating self-detection in the current version. Please note that with v1.5, this will be unnecessary because we provide a better option for automatically detecting self-references. In addition, we'll add in spatial hashing for solving possible performance bottlenecks for such scenarios. By using AIMThreading, you will easily be able to do what you want with the current version, too.
    • Now, if you really want to make sure that there is no collision at all, you can add an AIMAvoid on Interest for achieving an active avoidance as well.
    • Make sure that agents are all in one AIMEnvironment and are able to perceive each other.
    • Then, you need to take special care of the MagnitudeMultiplier and (outer) radii of the used behaviours. This way you are able to prioritize when to passively avoid and when to actively flee or avoid another agent.
    I hope that this is a good starting point. If you need any further help, we can either skype about this topic or I can attach/send you a little example scene for further investigation.


    Cheers,

    Martin from Polarith
     
    Last edited: Aug 26, 2017
  19. MrJBRPG

    MrJBRPG

    Joined:
    Nov 22, 2015
    Posts:
    40
    So far, I am enjoying those tools and felt very good to be an early adopter because I do plan to use them for my games. However, I believe I like to get advice on how I can achieve the desired behavior:






    I basically want the AI to move towards the moving target. When it does, it should quickly align itself to the player with some spacing in between. Basically, it is somewhat similar to boids for a single individual.

    I tried combining a few components alone such as arrive / pursuit, align + follow, and orbit. However, none of them seem to match what I desired.

    I like to know how I can adjust the individual's speed when it gets closer to the player so it goes at the same speed and direction but having distance from the player?

    I am currently using the latest version of Polarith AI 1.4.3. Looking forward to any suggestions soon.


    P.S. I am also using procedural generation and I am curious if it is possible for waypoints to be generated and linked on the fly since roads are constantly placed and removed. Feel free to answer it if you can.
     
  20. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey @MrJBRPG,

    I'm really happy to read something from you again.

    Let's get to your questions directly. The behaviour we see on your lovely little illustration can be achieved with the following parametrization easily:
    • AIMFollow or AIMSeek to the blue agent, MagnitudeMultiplier = 1
    • AIMAdjust to the blue agent, radius as you desire, MagnitudeMultiplier > 1
    The adoption of the speed will be much more comfortable and reasonable with v1.5, but with the current version, you can achieve what you want quickly as well:
    • When you use AIMSeek you can switch the RadiusMapping from InverseLinear to Linear
    • Alternatively, you can play around with AIMReduction and combine it with what you've got; note that AIMReduction will be updated with v1.5 to work more intuitive
    Now, let's have a look at the waypoints. Of course, everything what you can do with the inspector, you can do at runtime with the API, too. For this purpose, AIMLinearPath offers you methods like SetPoints() and SetLocalPoints().

    I hope this helps you out. You're always welcome. As your game progresses, we would love to hear from you. If you want, we can promote your game on our website. :)


    Cheers,

    Martin from Polarith
     
    MrJBRPG likes this.
  21. MrJBRPG

    MrJBRPG

    Joined:
    Nov 22, 2015
    Posts:
    40
    So far, it seems approachable, but for some strange reason, that is pre-1.5 because it is not out yet, the moving agent always goes behind the fast moving object such as the player. Is there other ways to make the moving object like a chasing ship catch up to the player and then align itself in the same direction but can also be side-by side or in front of the player?

    I feel that the problem is that I expected the agent that uses adjust aligns itself to the player's speed once within the outside radius rather than outside the outer radius.

    I also discovered that when agent that moves faster than player and player is within adjust region, the agent goes fast again and then has to catch up while being behind the moving player.

    I feel very helpful you gave those suggestions because they are great starting points for experimentation and that I can concentrate on individual pieces to make desired behaviors in the long run.

    Edit 1: I tried orbit in hopes of staying aligned, but will need more tweaking to get the desired behavior

    Edit 2: Got very close with both having pursue and adjust, but still the big problem is that they turn away from the player rapidly rather than staying on consistent position away from the player, even if they are orbiting within player boundaries.
     
    Last edited: Sep 1, 2017
    Polarith likes this.
  22. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Alright,

    now we understand what you're trying to achieve. We suggest a solution using a ghost/dummy target for this purpose. I write you a private inbox message which will help you to contact Franz. He is one of our developers and he already prepared a little demo scene for you that he wants to show. Moreover, this way, Franz can ask you some questions so that we can give you a far more precise answer to your issue.

    When we're done, I'm going to post the results here in the forum so that others can learn from it, too.
    So please, check your inbox. :)


    Martin from Polarith
     
    one_one and MrJBRPG like this.
  23. MrJBRPG

    MrJBRPG

    Joined:
    Nov 22, 2015
    Posts:
    40
    Thank you for providing a contact so I can have direct access to help rather than relying on the forum.

    Also, I am looking forward to the updates for 1.5 as they should really set the benchmark for AI as the star of the show!
     
    Polarith likes this.
  24. Rabagast

    Rabagast

    Joined:
    Jan 30, 2013
    Posts:
    78
    Hi!
    I just downloaded the free version. Looks great, but is it possible to make an AI like Pac Man, where the ghosts chasing the player? If so, will it also work in the free version?
     
  25. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey there!

    So do we! :)

    Welcome, @Rabagast! Of course, this is possible. We even managed to use our Free AI building a Pong clone. :) The clue about these kinds of games is the controller. You will have to build your own controller operating on your level structure ensuring that it can only move along valid paths/directions. When this is guaranteed by the script moving your ghosts, you can utilize Polarith AI Free for deciding if it should go left, right and so forth.

    You probably should consider going Pro since the Pro version has got a pretty path structure and complete NavMesh integration which can help you a lot with your level structure. This way you might not need to write too much custom controller code.


    Martin from Polarith
     
    Last edited: Sep 4, 2017
  26. Rabagast

    Rabagast

    Joined:
    Jan 30, 2013
    Posts:
    78
    Hi!
    Just to mention that, I'm a Playmaker user and already have the pac man controller with Playmaker. :)
    Would it be possible if you could make and AI example of pac man? You don't need to make a pac man controller. Only the ghost. Just to see how good it is. :)
     
  27. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Sorry, we're currently super busy polishing v1.5 and after that is done, we plan to add a lot of new example stuff in v1.6 anyways. Our developers might take your wish into account for that patch. ;)


    Martin from Polarith
     
  28. Rabagast

    Rabagast

    Joined:
    Jan 30, 2013
    Posts:
    78
    Ok, I understand. :)

    I need to explore the free version before I go for the pro version.
    I know that the pro version has more features than the free version.
    But can you tell me if it's possible to make it in the free version?
    And is it possible to make AI in a platformer like in this old classic C64 game "Lode Runner"? :)

     
  29. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    It definitely is possible, although such kinds of games require more work than an RTS, a racing game or any other game where you move on a virtual ground in the 3D world. :) The integration of AI and controller will require you to do some extra work. The shape of the sensor might be crucial as well depending on your underlying level structure and controller.

    I'm really sorry that I currently have no super matching example for your scenario.


    Martin from Polarith
     
  30. MrJBRPG

    MrJBRPG

    Joined:
    Nov 22, 2015
    Posts:
    40
    Thanks to Franz's explanation and solution from my design problem, it seems that AI states would be the more appropriate tool to handle desired behaviors. I am sure there will be future tutorials on handling AI state behaviors, which should encourage people to think differently beyond simply combining behaviors.
     
  31. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    I'm happy that Franz could help you out. You're right using behaviours together with Unity's Mecanim or some kind of state logic is crucial for achieving the certain behaviour. When the TinyWood example is to be released, we will show how to do this with the help of this scene.


    Martin from Polarith
     
  32. Ferrinas

    Ferrinas

    Joined:
    Sep 18, 2017
    Posts:
    1
    I was curious, in all of the demos I have seen, the AI can only move in the direction it is rotated - is there a way to have the AI's model remain static while leaving their movements the way they are?
    For example I'm creating an isometric 2D game and would like the character's sprite to remain straight up, and essentially FREEZE Z without them rotating with their movements.

    Thank you in advance!
     
  33. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey, @Ferrinas, of course, this is easily possible. The reason why the demos rotate the character towards the movement direction is the purpose of visualization. That is why we implemented the example character controllers this way. However, you can easily utilize your own controller mechanisms for moving your characters as desired with the help of our API, a good starting point would be the AIMContext.DecidedDirection property for obtaining the vector your character should move to.

    If you need a fast solution to your issue, you might have a look at the source code of the controllers we distribute together with both the Pro and the Free package. In there, you can out-comment the lines which influence the rotation of the NPC.

    I hope this is helpful enough. Let me know if you have any further questions, you are welcome.


    Martin from Polarith
     
    Ferrinas likes this.
  34. RodMath

    RodMath

    Joined:
    Oct 21, 2014
    Posts:
    13
    Hi Polarith, I'm having fun trying out your free version - very impressed by it (and especially the docs!) so far.

    Just wondering, how would you suggest getting agents to stay inside a certain area - and not necessarily a square one (e.g. circle/random polygon). I guess I could put lots of Danger objects all along the outer edges, but that doesn't seem terribly efficient?

    Thanks, and keep up the great work
     
  35. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey, @RodMath, we're glad that you like it, but now you've got us! Actually, the Pro version has got two mechanisms for this purpose: the bounds behaviours and the NavMesh behaviours. Unfortunately, the Free version has neither. The only way for being efficient using the Free version would be to write a custom behaviour. This is not so hard as it sounds though.

    Ironically, it is exactly this missing feature in Free which makes us trouble at the moment during the creation of new examples for the packages. So we are thinking about making the NavMesh behaviours (not the pathfinding) for Free with the next patches. That way, we would be able to create better examples which might influence our community to buy the Pro version anyways. What do you think?


    Martin from Polarith
     
  36. RodMath

    RodMath

    Joined:
    Oct 21, 2014
    Posts:
    13
    Haha, I thought as much. Thanks for the quick response.

    To be honest - and though I'm doing myself no favours here! - I would leave the features in the Pro version only for now so people have more of an incentive to upgrade.

    I'm not sure what you've already included for 1.5's demos, but I would love to see examples of classic flocking type behaviour (i.e. with flocks) and in particular formation flying.

    Am going to have a look at the custom behaviour now, I may have more questions :)

    Thanks
     
    Polarith likes this.
  37. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Alright, we will have to see how things go. 1.5 will be the algorithm foundation for the new demos and examples, especially concerning your requested boids. That said, the actual demos and examples will be rolled-out step-by-step with minor patches 1.5.x. We can‘t wait to see what you guys think about all this stuff. We hope that the Asset Store admins mange to release this first major 1.5 patch during the next week.

    You‘re always welcome. Let me know if you need any help writing your custom behaviour. I wish you happy scripting.


    Martin from Polarith
     
  38. wilco3d

    wilco3d

    Joined:
    Feb 15, 2015
    Posts:
    6
    Firstly, the asset really looks great and got me interested very quickly which made me a paying customer.

    I'm trying to use AIMFollowWaypoints, but without the AIMPathConnector, as I already have all my waypoint positions completed, and purely want to test your system for steering. Looking at the documentation it looks like this should be done by directly adding to the AIMFollowWaypoints.Points List, but whenever I do - it's always empty, which I'm sure is why it's not working for me.

    Simple example...

    Code (csharp):
    1.  
    2. Debug.Log(track.points.Count); // 50;
    3. for(int i = 0; i < track.points.Count; i++)
    4. {
    5.   AIM.Points.Add(
    6.     track.points[i]
    7.   );
    8. }
    9. Debug.Log(AIM.Points.Count); // 0
    10.  
    If I change to use the PathConnector, and set some points manually for a test, that works as expected.

    Any help to know what I'm doing wrong? There's no errors or warnings or anything like that. It's a little frustrating that with the PRO version, there's no source included to actually trace back what's happening I must admit, meaning my development slows down :(



    Many thanks!


    P.S - Using the PathConnector, when I place points on my screen they're miles away from where I click. I'm using a retina screen, I'm not sure if that's why as it appears to be out by a factor of 2 (far right of the screen makes point appear in the middle for example).
     
    Polarith likes this.
  39. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey, @wilco3d,

    let me welcome you to the Polarith community. Nice to have you here!

    Now, let's get to your problem: You understood everything correctly so far, that's nice. But you've missed one little tiny detail, which might be our fault since it seems we didn't make it clear enough in the docs. So thanks for pointing us to this issue.

    The Points property you try to utilize does the data transfer per copy (actually, that's roughly described in the docs of that property as well but not clear enough I think). So it behaves exactly like Unity's Mesh.vertices property. Instead of calling List.Add() on your local copy of your data, you need to re-assign the list for making the data going live.

    Code (CSharp):
    1. Debug.Log(track.points.Count); // 50
    2. yourFollowWaypoints.Points = track.points;
    3. Debug.Log(yourFollowWaypoints.Points.Count); // 50
    This assignment does not overwrite the list reference, it copies the data right into the system instead.

    We're really sorry for causing you trouble, but thanks to you, we can now update the docs so that it is clearer in the future how this property works. You're right, the source code could have helped you with your issue. That's why we offer special licenses including sources (we call Enterprise) for all interested customers. The pricing is made individually together with us and based on your business situation (whether you're a small indie or a larger company and so forth).

    Oops! The problem with your retina display is completely new to us. Using a non-retina display, we didn't notice any issues. Thank you for telling us. We have to further investigate on this problem.

    I hope that my message can help you out. Let me know if you have any further questions. You're welcome.


    Martin from Polarith
     
  40. wilco3d

    wilco3d

    Joined:
    Feb 15, 2015
    Posts:
    6
    Hey Martin

    Unfortunately I'm getting the same result

    Code (csharp):
    1.  
    2. AIMFollowWaypoints followWaypoints = GetComponent<AIMFollowWaypoints>();
    3.  
    4. Debug.Log(track.points.Count); // 50
    5. followWaypoints.Points = track.points;
    6. Debug.Log(followWaypoints.Points.Count); // 0
    7.  
    I'm sure I'm just being dumb, but let me know! track.points is just a List<Vector3>

    Many thanks in advance!


    P.S - If you could PM/Email me cost of a Enterprise licence for a 1 man indie, that would be great.
     
  41. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Well, congratulations! You've found a bug. I'm so sorry for wasting your time.

    Here is the affected source snippet in our code base:
    Code (CSharp):
    1. public virtual IList<Vector3> Points
    2. {
    3.     get
    4.     {
    5.         return new List<Vector3>(points);
    6.     }
    7.     set
    8.     {
    9.         if (pathConnector == null || value == null)
    10.             return;
    11.         Collections.ResizeList(points, value.Count);
    12.         for (int i = 0; i < points.Count; i++)
    13.             points[i] = value[i];
    14.     }
    15. }
    So, what do we see here? We do a check against pathConnector == null ... That's stupid. I'll send you a re-compiled revision without this bug to your mail address. Moreover, I'll talk to our sales officer tomorrow for making you a special offer concerning a source code version and how much this would cost in your case.

    Again, sorry.


    Martin from Polarith
     
  42. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    You Demand, We Deliver



    Hey there! We haven’t talked in quite a while. And we all know what that means: Loads of content and new features! We’ve received a number of suggestions and wishes from you which we’ve sculpted into our most comprehensive update yet. So if you are into fast performance and clearer workflows while maintaining a tidy and sleek interface, this patch is for you! There’s an XXL changelog waiting for you. So without further ado, let’s get right into it!






    Here’s the changelog for v1.5:

    Changes
    • [Pro] With this patch, we laid the foundation for new formation components arriving in the next patches
    • All Polarith AI inspectors are now Unity-conform, especially all foldouts and tabs
    • All enhancements and fixes allow for great example and demo creation in future patches
    • The core steering algorithms are now deterministic when the whole application infrastructure is deterministic as well, have a look at the corresponding manual page
    Enhancements
    • [Pro] Added AIMPerformance, a new component that replaces AIMThreading and provides further performance optimizations
    • [Pro] AIMPerformance: Added single-threaded load balancing which equally distributes agent updates over the available frames
    • Added AIMContextEvaluation: By inheriting from this class, you have full control over the update cycle of all AIMContext instances within the scene
    • AIMSteeringPerceiver: Implemented spatial hashing using a regular grid to improve the performance of the overall perception pipeline
    • AIMSteeringPerceiver: Implemented lazy percept receiving such that a percept is processed only if it is really relevant to at least one agent, this improves the overall performance
    • AIMSteeringFilter: Added a Range parameter that filters percepts before they are processed by a behaviour, this can improve the performance a lot
    • AIMSteeringTag: Added a Radius parameter to improve the handling of differently sized objects, so the same parameters can now be used for different object sizes
    • Added LayerBlending and LayerNormalization: All AIMSteeringBehaviour components are now able to store their intermediate results, these can then be normalized or applied to the Context using a different operation, this allows for a much more powerful behaviour combination to easily achieve boids, herds etc.
    • All AIMSteeringBehaviour and AIMReduction components can now predict their own future position based on fixed parameters or their actual velocity
    • Implemented a better self-recognition so that a percept representing the agent itself is ignored by behaviours (no need to have an inner radius for this purpose any longer)
    • Optimized the velocity tracking: When the velocity reaches the zero vector, the last valid non-zero vector is used to provide at least a valid direction
    • Instead of using a tracked or physics-related velocity, it is now possible to let the behaviour use a direction based on its rotation (most behaviours only need the direction and not the magnitude of the velocity vector)
    • Added a button to the behaviour inspectors that displays or hides more advanced options to improve the overall user experience
    • Added the two special predefined sensors LeftRightXY and DiagonalXY which might be useful for certain 2D setups but impossible to create without having AIMPlanarShaper
    • Improved the documentation content, look and feel
    Fixes
    • [Pro] AIMFollowPath and AIMFollowWaypoints: Fixed a bug which prevented the Points property from setting data when there was no AIMPathConnector (thanks Joe)
    • [Pro] AIMPlanarShaper: Fixed a problem that occurred because of API changes in Unity 5.6
    • [Pro] PlanarSeekBounds: Fixed a bug that led to wrong results when using a significance value other than 1
    • AIMContext: Fixed an error that occurred sporadically within the inspector
    • AIMContext: Fixed a bug which led to an annoying flickering of the indicator gizmo
    • AIMAvoid: Fixed the velocity warning that was shown even when there was a valid velocity source
    • AIMAvoid and MoveBehaviour: Fixed the method MapBySensitivityPlane() which had problems with any other transform scale than (1, 1, 1)

    What’s Next?

    Well, now we’ve got the right foundation, we’ll keep our promise: With the next patches, we’re going to produce decent content and examples corresponding to cool tutorials which will be continuously released on YouTube. Besides that, our developers are working on a Master Component so that the management of multiple behaviours will be easier. Moreover, most of you guys have formations on your personal wishlist. You’ll be happy to hear that we’re almost done with some really great stuff to be released next. Let me provide you some insights.

    http://dl.polarith.com/videos/formation-1.mp4
    http://dl.polarith.com/videos/formation-2.mp4


    Martin from Polarith
     
    Last edited: Sep 29, 2017
    one_one and MrJBRPG like this.
  43. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Great to see the recent updates. I know it's hard to predict deadlines, but since it's been some time, how is the work on 3D mesh sensors going?
     
    Polarith likes this.
  44. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hey, @Korindian.

    Once the formations are released together with the package improvements, 3D will be the direct successor. Due to the package update, we delayed the 3D development about 4 to 6 weeks off the original deadline. So it seems that we all get an early pre-christimas gift. :)


    Martin from Polarith
     
    Korindian likes this.
  45. RodMath

    RodMath

    Joined:
    Oct 21, 2014
    Posts:
    13
    Hi again, I am really enjoying playing with this, but beyond the simple seek + flee behaviour you cover in the tutorial, I'm really struggling to get other behaviours working well. I'm sure it's because I don't think I quite grok it yet, not anything wrong in the plugin.

    So, for example see the picture below, I have added a Seek behaviour and an Avoid behaviour. Above the player are two objects to avoid (with Steering Tags to give them a radius). Way beyond them in the distance is a goal that we are seeking for. Looking at the debug sensors (a brilliant feature by the way), I can see that the Blue "Avoid" sensors come up with a much larger vector to either side than the Green "Seek" ones. However the orange line indicates we are choosing the solution of going straight up anyway.

    I have tried reducing the Seeks magnitude multiplier, and lots of combinations of Value writing, Value mapping and Layer blending, but with no success. To be fair I don't really get the difference between them and there are a lot of possible combinations there!

    Screenshot 2017-10-02 19.41.49.png


    So a few questions:
    - Are the left and right blue sensors cancelling each other out, hence choosing to go up?
    - What should I do here to get it to turn to the side?
    - What is the difference between Avoid and Flee, I thought Avoid would be better at hugging around obstacles (once I got it working) but now am not so sure?

    Sorry if this is all very simple, but really appreciate your guidance :)

    Thanks
     
    Polarith likes this.
  46. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hi, @RodMath.

    Nice to hear from you again. Let's get straight to your question which shows us once more that we really need to publish more tutorials, it's time.

    There is a huge difference between Flee and Avoid: Flee is intended to achieve a "passive Avoid" by preventing the AI from selecting interesting directions which have too high danger. Hence, Flee should write into your danger objective. As against Avoid is for an active avoidance of obstacles and, thus, it should write its values into interest.

    Moreover, you can use both at the same time. This way your agent will prefer directions having less danger achieving implicit avoidance. But when there comes the situation - and this will usually be there from time to time depending on your game - where too high danger is all around, then an active Avoid should take over for maneuvering around the obstacle by writing into interest.

    Don't worry. Since we haven't done tutorials about this yet, it is not so easy to guess. But I think that we have got an example scene featuring Avoid in the package which shows that it needs to write into interest. :)

    I hope this helps you out. You're welcome.


    Martin from Polarith
     
  47. RodMath

    RodMath

    Joined:
    Oct 21, 2014
    Posts:
    13
    Ahhh! I had totally missed that. It's working much better now!

    Thanks for your help and I look forward to the tutorials :)
     
    Polarith likes this.
  48. renski

    renski

    Joined:
    Sep 27, 2013
    Posts:
    14
    Hi.

    Been searchin around for the different AI, pathfinding solutions. Polarith looks very promising. Will it be suitable for a city/road traffic simulation using vehicle physics, taking into account traffic lights, queing, lane change and pedestrians ?
     
    Polarith likes this.
  49. Polarith

    Polarith

    Joined:
    Nov 22, 2016
    Posts:
    317
    Hi, @renski.

    Nice to have you here! :) Do you mean something like this?



    Concerning the pathfinding: I want to make clear, Polarith AI is a toolbox for local decision-making (steering) rather than just another pathfinding implementation. However, we implemented a connection between both worlds so that your agents can both follow a path while also avoiding local obstacles without altering the path. In the current version, we integrate Unity's pathfinding right out of the box (which means that we have a component for that). All this should be perfectly feasible for your scenario. (Additionally, we designed our API such that it is easy enough to add support for other pathfinding solutions.)

    Regarding the vehicle physics: As the little GIF above shows, it works well. The next update will contain this scene including an example vehicle controller made by us.

    Based on our experience that we made with these scenes so far, I can say that moving cars which should follow strict rules, like priority roads, traffic lights etc. is not a quick and easy task in general (regardless the AI system). A lot of additional logic is required. Of course, our system identifies the traffic and can make decisions, whether it is safe to change the lane or if it is safe to cross the road and so forth. But in the example above, we had to use different AI state (machines), e.g., one for driving in the roundabout and one for entering it. The same would apply to traffic lights, stop signs, priority roads and so on. Therefore, you can directly use Unity's Mecanim since the plugin consists of components respectively behaviours which can easily be enabled or disabled when you need them.

    I hope that I made things clearer for you. Let me know if you have any further questions. You're welcome.


    Martin from Polarith
     
    Immu and renski like this.
  50. renski

    renski

    Joined:
    Sep 27, 2013
    Posts:
    14
    Epic response. Thanks for taking the time to demonstrate it, i will for sure grab the asset from the store and start experimenting. Hope to get some more guidance on the implementation. Thank you.
     
    Polarith likes this.