Search Unity

[RELEASED] Emerald AI 3.2 (New Sound Detection) - The Ultimate Universal AAA Quality AI Solution

Discussion in 'Assets and Asset Store' started by BHS, Jun 26, 2015.

  1. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Great to hear you got it all integrated. If your AI start sliding, and you’ve double checked that all needed animations are set to loop, then you may be missing an animation somewhere. It sounds like it’s one of your idle animations so make sure they are all applied and that none of the slots are missing animations.

    Your AI’s attack and stopping distance may also be too small which would have the AI play its idle animation before it’s done moving. Making these values bigger may also help.
     
  2. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Thanks Again! Don't know how I missed it, Default play time setting on one Animation for this AI was ridiculously small. :) Having good time with EAI though -
     
    BHS likes this.
  3. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
    I had to recreate my ranged AI, not sure what happened but one worked while the rest didn't. So i just recreated and they all turn right now.
     
  4. pjccccc

    pjccccc

    Joined:
    Oct 7, 2015
    Posts:
    43
    For someone who wants to use Emerald AI with UNET (maybe Photon).

    It just took 30 mins for me, I attached `NetworkAnimator` and `NetworkNavMeshAgent(which is not officially provided)`.
    and made some code modifications.
    (Just keep in mind that entire AI processing must be executed in server, client only replicates the animations)

    * Change every `SetTrigger` and `ResetTrigger` to `RpcSetTrigger` and `RpgResetTrigger`. You have to implement `Rpc~~` methods, it just 1 or 2 lines of code.

    * Add `Server` attributes to server specific methods such as `EmerandAIDetection.Update`.

    * `ai.Damage(...)` must be called on the server-side.

    Hope EmeraldAI officially support UNET.
     
    Last edited: Sep 2, 2019
    BlankMauser likes this.
  5. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    Nice bro!
     
  6. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @BHS Is there a way to get AI to utilize more than a single box collider? I have a deer and I added another box collider for the head, but it is totally ignored.

    upload_2019-9-2_9-2-29.png
     
  7. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    Have you tried using a different collider other than another box?
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Nope, I haven't.

    [EDIT]
    Now I tried Capsule Collider and same result. It seems that Emerald AI uses only the one generated box collider. I pause the game and the second box collider has been disabled. If I then re-enable it then it works. So, I need to figure out where emerald is disabling the additional collider. Not sure why it would do that.
     
    Last edited: Sep 2, 2019
    warthos3399 likes this.
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @BHS Another issue I'm seeing is AI alignment to terrain. I've set my deer AI to align to the terrain, but it's aligning in the opposite direction. I've checked and the model is pointing forward in the direction of the blue arrow, but the alignment is reversed.
     
  10. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Great to hear everything is working correctly.
     
  11. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks for making this guide to add UNET support.

    I do plan on adding network support, but since UNET is being/has been deprecated, the support for it will be offered through tutorials or external code. I will also cover other network solutions such as Photon and Mirror.
     
  12. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    The ragdoll initializer currently disables all colliders within an AI. I plan on adding the ability to use the ragdoll colliders for location based damage after 2.3. The only way to get this to work now would be to modify the code to not disable the colliders within the AI and set them to a layer that the AI's Obstruction Ignore Layer uses so they don't interfere with the detection process.
     
  13. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    That's strange. Every AI I've tested has alignment working correctly with both biped and quadruped types. Is this happening during the wandering, fleeing, or fighting behavior?
     
  14. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It happens everywhere and always. Whether it's just standing there on a hillside or running around.
     
  15. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, I'll do that then.
     
  16. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I can't seem to recreate this. Everything is working properly on my end. Have you tried using a different model?
     
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
  18. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey everyone,

    I plan on having Emerald AI submitted by the end of this week!

    While the previous version of Emerald AI focused on RPG AI, Emerald AI version 2.3 will be much more flexible allowing users to create nearly any type of AI, even shooter type AI with guns. With that being said, Emerald AI still fully supports animal based AI and version 2.3 will include a dynamic grazing and resource gathering system allowing AI to generate waypoints to food, water, or other resources. More information on this can be found here: https://forum.unity.com/threads/rel...lls-blocking-more.336521/page-73#post-4882796

    This video shows how version 2.3, and its new modular ability system, makes it easy to create nearly any type of weapon or projectile for your AI, even bullets, lasers, and rockets. The AI look at feature has also been rewritten to be a lot more responsive and accurate. It will also now smoothly transition to new targets.

    (Character Models by PROTOFACTOR, INC Lighting and Clouds by UniStorm)


    The updated Ability Object editor has been split into 3 categories. Support has been added for critical hits as well as damage over time. The above video shows the versatility of Emerald AI's new ability system. One of the best features of version 2.3 is that ability objects can be shared between AI and projectiles are no longer tied to each of an AI's editor like it is currently. (The name Spell will be renamed to Ability when Emerald AI is released to make the system more general)
    AbilitiesEditorUpdated.gif
     
    Last edited: Sep 3, 2019
  19. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Geez, put in a cover syatem and this thing is gold haha
     
    gearedgeek, SickaGames1 and julianr like this.
  20. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    @BHS yes, agree with this, it would make Emerald a top choice with a solid background to boot - 2.3 is looking awesome by the way! Can't wait to try it out!
     
    gearedgeek and SickaGames1 like this.
  21. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Looks great @BHS ! I agree that a cover system would be awesome for 2.4 :)
     
  22. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Wow BHS- you went to town on 2.3! Looks amazing. Great work!
     
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks everyone!

    I agree with a cover system feature. After 2.3, I'll start looking into how to go about implementing one.
     
    gearedgeek and julianr like this.
  24. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks! :)
     
  25. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    Love it @BHS, lookin damn good, cant wait for the update, as the added features will work in nice with my next project after Jurassic Extinction. :)
     
    BHS likes this.
  26. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    More importantly, I would like EmeraldAI to be able to be extended through APIs. Right now, it seems like I'm working with a blackbox AI. If so, we can add new behaviors if we want without waiting for EAI to support.
    Any work being done toward to extendable AI system?

    Thanks.
     
    warthos3399 likes this.
  27. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    Non - Combat EAI animation:

     
    BHS, Mad_Mark and huntersteeger like this.
  28. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Nice work. Are you making the quadruped animations yourself, or are they an asset? I've tried making a set of dog animations for a companion AI, and after learning my own limitations, have searched all over. The few that I have found are not transferable to other dogs, very skeleton specific. What are you (and others) doing for quad-anims?
     
  29. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    most all models have a good amount of animations (stand, Walk, Attack, idle, Die, etc.), EAI works great with any animation, alot of control.

    Dog animation...ive seen some here and there, but not alot out there.
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Emerald AI is pretty flexible. I've been able to create 2 external systems recently without having to alter any Emerald AI system code which expand an AI's behavior and functionality such as this waypoint generator to food, water, and resources: https://forum.unity.com/threads/rel...lls-blocking-more.336521/page-73#post-4882796 and this schedule system to give an AI the ability to move between destinations depending on the time of day: https://forum.unity.com/threads/rel...lls-blocking-more.336521/page-76#post-4916207

    I'm more than happy to expand the API further and Emerald AI is getting more modular with each update. What kind of behaviors or functionality are you trying to achieve?
     
  31. chrisk

    chrisk

    Joined:
    Jan 23, 2009
    Posts:
    704
    Hi, thanks for the answer. I think the best is to make EAI API modules/ability callable externally so that behavior system like NodeCanvas or BehaviourDesigner can call them.
    This will make EAI very flexible and powerful.
    Cheers!
     
  32. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    You’re welcome.

    Almost all of Emerald AI’s API is callable externally. It’s done through the EmeraldAIEventsManager script and you can change an AI’s behavior, confidence, destination, waypoints, play animations, and tons more. I haven’t tested this with NodeCanvas or Behavior Designer, but it works with PlayMaker so the process should be similar with other systems that can access a system’s API. If something isn’t working correctly with NodeCanvas or Behavior Designer though, I’m more than happy to resolve it.
     
    attaway likes this.
  33. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
  34. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Good day. Make it possible to move creatures dynamically. I mean without using NavMesh.
     
  35. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Looks great Warthos! I like how you share updates on your work - nice.
     
    warthos3399 likes this.
  36. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    BHS- So we may see 1.3 this weekend? :) Would be perfect timing while Dorian has us hunkered down.
     
  37. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks Mark, I had planned on linking this, but forgot. I will be creating a new example scripts doc after the release of 2.3 to show more complex examples of what's possible with Emerald AI. Feel free to let me know if there are suggestions for improvements with the docs and API.
     
  38. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Emerald AI is currently dependent on NavMesh. However, I can look into a non-NavMesh option with a future update.
     
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Not quite :) I'll be working through the weekend to get it submitted by Monday or Tuesday.
     
    julianr and warthos3399 like this.
  40. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    All good :) Appreciate the good work.
     
  41. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    Using Ranged type attack. It does not attack keeps looking at player. Any help Please? No Exception in console.
     
  42. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    ok, 1st we need more info, what are you trying to animate, and how do you want to animate it?
     
  43. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    Its Humanoid archer. Melee types are working fine.
     
    Last edited: Sep 7, 2019
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Are you using a character controller from the Asset Store or a custom one?

    Some character controllers have extra colliders that may obstruct your AI’s line of sight. Try enabling the Debug Tools and set all of the debug options to Yes on your AI. These are located under the Docs tab near the bottom.

    These will debug log the AI’s current target and obstructions so you will have a better idea of what’s going on. Ensure that the proper player object is being target. If it isn’t, you will need to either disable the obstruction object or add its layer to the AI’s Obstruction Ignore Layers located under the Detection Settings.
     
    tahir_ali likes this.
  45. pccross

    pccross

    Joined:
    Jun 20, 2015
    Posts:
    106
    So after a bit more investigation, looks like the rigidbody on the AI being set to 'Is Kinematic' was part of the problem, and why the character didn't respond to bullets (via 'AddForce'). However, if I turn off this 'Is Kinematic' setting, the AI's fall sideways, and run almost parallel to the ground, so guessing that's not right way to fix this. Hopefully, missing a simple setting somewhere. Any other suggestions?
     
  46. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    If you are trying to achieve location based damage, and have colliders with rigidbodies on the children part of the AI, they are deactivated on start as part of the ragdoll initialization process. If they are not disabled, they will interfere with the AI’s detection functionality. I’m working on location based damaged with the update following version 2.3.

    What specifically are you using AddForce for when damaging the AI, to physically move the parts hit by bullets? Emerald AI uses one box collider and a Kinematic rigidbody only for collision detection so it doesn’t actually use any physics. The movement is all driven by the NavMesh system. Disabling Is Kinematic will allow it to be moved by Unity’s physics which is why you see the undesired rotation and movement.
     
  47. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    My latest with EAI (scale has changed)...

     
  48. o0neza0o

    o0neza0o

    Joined:
    Sep 6, 2015
    Posts:
    165
    Ok, for some reason my AI doesn't move... Unsure why. Nav mesh is baked and everything.
     
  49. Alex3333

    Alex3333

    Joined:
    Dec 29, 2014
    Posts:
    342
    Good day. I have one more question. Is there support for old animations ?? or just an animator?
     
  50. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,745
    EAI doesnt support Legacy animations, use Generic or Humanoid.