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. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    @BHS Congrats on 3.0! Can wait to see ALL of the poll features come to life
     
    BHS likes this.
  2. Alexandus

    Alexandus

    Joined:
    Sep 5, 2012
    Posts:
    25
    @BHS Will the bug fixes be applied to Emerald AI 2.0? I get moving new features / refactors into 3.0, but bug fixes seem pretty integral
     
  3. YOAJ1

    YOAJ1

    Joined:
    Jul 17, 2014
    Posts:
    26
    How do I make the AI respawn again after it dies?
    Uses EmeraldAI 2.0
     
  4. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    It says URP is not supported, any plans for when it will be? V3
     
  5. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I can look into this, but you should be able to add each point within a spline as a waypoint and have the AI follow it. The API can be found here: https://github.com/Black-Horizon-Studios/Emerald-AI/wiki/Emerald-AI-API#addwaypoint
     
    Broudy001 likes this.
  6. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Emerald AI 2.0 is pretty solid, what bugs are you having? If there are any major bugs with version 2.0, they will be fixed.
     
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
  8. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    julianr likes this.
  9. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    125
  10. MonstaManly

    MonstaManly

    Joined:
    Apr 18, 2020
    Posts:
    11
    Hey, I recently updated to version 3.0 as you said. I added the Target Position Modifier to my Player and that In fact change the target position but unfortunately, the AI still refuses to attack on arrival. I have added an attack animation and all other prerequisites but still, once the character comes in position the AI refuses to attack.

     
  11. CommunityUS

    CommunityUS

    Joined:
    Sep 2, 2011
    Posts:
    240
    This is still happening for me. The blasts (fire/rock) don't damage the enemy. The rock acts like it doesn't have a collider on it and goes right through the enemy actually. The fire blast at least hits target but does no damage.

    Seperate Issue: (with fix)
    Code (CSharp):
    1. //CruxSystem.Instance.m_InstancedObject.SetActive(false);
    - CreatureSpawning.cs wasn't working on Terrain for Crux - I know this is the Emerald AI forum - just posting here as it is late. It worked on mesh though. Looks like there was an extra set active to false there that wasn't in the wildlife and NPC ones.
     
  12. TimDoesDev

    TimDoesDev

    Joined:
    Feb 23, 2018
    Posts:
    35
    Hi we're really interested in getting this asset but our game has procedurally generated terrain and we're curious if Emerald 3 can handle navigation for proc gen terrain?

    All the best,
     
  13. Mythran

    Mythran

    Joined:
    Feb 26, 2013
    Posts:
    85
    Please add the ability to have multiple needs, with each need having a range schedule and priority to override the current needs or needs in stack. I.e. Blacksmithing working, hunger striker or enemy attacks (perform action accordingly), go back to whatever was doing if still in range schedule, go to tavern talk, have a drink, go to sleep. Repeat.

    Thanks :)
     
    Michael_Berna likes this.
  14. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi,
    I've just updated to Emerald 3.0 and I noticed the following issue:
    The AI does not die anymore. They take damage but when their health is zero they don't die.
    I tried all the included scenes.
    I use Unity 2021.

    Thank you in advance for your help.

    Dom

    EDIT: nevermind! I re-imported Emerald and it works!
     
    Last edited: Oct 7, 2021
  15. Michael_Berna

    Michael_Berna

    Joined:
    Jul 5, 2019
    Posts:
    39
    I submitted this as a bug report, but would like to have a forum chat about it so that we can have a two way interaction and others can feel free to chime in if they have help. Here's the problem I have

    I created an emerald AI with 3 waypoints. If I set it to waypoint type of loop, it works, but if I use a waypoint type of random, it fails when it gets to the idle point. I believe this is somehow related to playing the idle animation.

    Here's the error:

    IndexOutOfRangeException: Index was outside the bounds of the array.
    EmeraldAI.EmeraldAISystem.Update () (at Assets/Emerald AI/Scripts/System/EmeraldAISystem.cs:1033)


    When I double click on it, here is the offending line of code that it brings me to:
    CurrentAnimationClip = AIAnimator.GetCurrentAnimatorClipInfo(0)[0].clip;


    I've tried two different animations that work and while trying these animations, I have re-assigned all of the idle animations in the editor as well as run the check for missing animations function. I've also tested the idle animations along with emerald by temporarily putting them in the walk straight animation and they play fine. I've also deleted and re-created the AI with the setup manager and still have the same result.


    I was able to prevent it from crashing by adding an if statement so that the line is like this. It still doesn't work right, the character does that weird thing when it has an invalid animation where it floats with the center where the feet should be (see image), but at least it doesn't cause an exception:

    Code (CSharp):
    1.                 if(AIAnimator.GetCurrentAnimatorClipInfo(0).Length > 0)//attempt at preventing errors. Added by MB 10/8/2021
    2.                 {
    3.                     CurrentAnimationClip = AIAnimator.GetCurrentAnimatorClipInfo(0)[0].clip;
    4.                 }


    upload_2021-10-8_11-4-14.png
     
  16. Michael_Berna

    Michael_Berna

    Joined:
    Jul 5, 2019
    Posts:
    39
    Found the problem:

    After looking through the animator manually, I discovered that somehow I missed adding the idle animations 1-6 in the the emerald editor although I added the idle non-combat and idle combat. This only shows up in check for missing animations if you add one but don't assign a clip to it. I think this should come up with a warning in check for missing animations or have a handler somewhere with a warning when you use wander types that have idle sections (random waypoint or dynamic wander). This will avoid confusion for others in the future.
     
    julianr likes this.
  17. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    111
    Hey there,
    Any Update on integrating GPU instancer?
     
  18. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I made the same mistake initially.
     
    Michael_Berna likes this.
  19. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    If an AI is following a target, but not attacking it, its line of sight is obstructed. This is usually a hidden collider somewhere within your target object. See this section of the Emerald AI Wiki to see if it can help you resolve this: https://github.com/Black-Horizon-Studios/Emerald-AI/wiki/Identifying-Detection-Issues
     
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there, I have had other Emerald AI users who use Unity's NavMesh extensions to procedurally build the NavMesh during runtime. These extensions can be found here: https://github.com/Unity-Technologies/NavMeshComponents#development
     
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks for the update. I'll add an additional check for empty animation slots in all animations lists to avoid similar issues in the future.
     
    StevenPicard and Michael_Berna like this.
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thanks for the suggestions. I plan on improving the needs system when I get the chance.
     
    StevenPicard and Mythran like this.
  23. Michael_Berna

    Michael_Berna

    Joined:
    Jul 5, 2019
    Posts:
    39
    I have a suggestion: Implement an integration with RogoDigital LipSyncPro
    In about an hour I was able to figure out based on the existing scripts in Emerald to add it to my implementation. I do not know how to add it in a way that wouldn't break if they don't have that namespace, but otherwise it is pretty simple, mostly just copying, renaming, and modifying the audio variables and lists to use the LipSyncPro clip instead of regular audio.
    upload_2021-10-13_11-31-24.png
     
    StevenPicard likes this.
  24. micuccio

    micuccio

    Joined:
    Jan 26, 2014
    Posts:
    143
    Hi there!
    I am trying to make the AIs reaching the Waypoint by using mostly running. I even set the movement to only Run, BUT when they are close to the Waypoint they pass to walk. I understand It's related to reducing the speed.
    It's possible to reduce this effect? I mean, I would like to have them decelerate much faster when closer to destination.

    Thank you in advance,

    Dom
     
  25. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Just change to a walk animation
     
  26. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    190
    @BHS
    I have a few questions:
    1. is it possible to make groups of animals or herds? in particular i want to be sure that when an animal is in the flee radius and starts to flee, all other animals of the same species should start to flee.

    2. is it possible to let animals wander together? i'm thinking of a deer and the deer child. or a group of wolves following the alpha wolf together.

    3. how can I influence that I am seen worse by the NPCs if I walk crouched or hidden in the grass?

    4. is there a way to improve the flee behavior? currently the animals flee pretty stupidly. partly they run towards the player.

    5. is there an approximate time when we can expect the sound detection feature? this would be very interesting.
     
  27. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    169
  28. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Yeah. Unity navmesh makes it impossible to make flying AI without a different solution. You can still use Emerald by moving the AI up on the Y axis.
     
    Michael_Berna likes this.
  29. Revelation_Jeff

    Revelation_Jeff

    Joined:
    Jul 17, 2012
    Posts:
    141
    @BHS I'm having an Emerald IK issue regarding the torso looking up too high when not at ranged attack position. Moving backwards or forwards causes the torso to look up. I"m using the target position modifier script at a height of 1.2 which appears fine at attacking range.

    Video reference of the problem:



    Also any idea what's causing my VFX to shoot side ways from the muzzle position? They are correctly set to Z axis local but come out X axis.

    Thanks for any help!
     
  30. keithsoulasa

    keithsoulasa

    Joined:
    Feb 15, 2012
    Posts:
    2,126
    This is going to sound kinda weird, but can you include some normal people examples in your next release.

    I really just wanted some people to wander around in the background , but I don't really have time to set them up myself./
     
  31. al3d

    al3d

    Joined:
    Feb 7, 2013
    Posts:
    51
    Hi I want to know if PuppetMaster work with Emerald AI 3.0 if yes I will buy it :)
    Because I want to do a vr fighting game with realistic collision when the player hit an opponent.
     
  32. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I just imported Crux, Emerald, and Unistorm into a fresh 2018.4.36 project and Crux threw an Emerald error.

    " (CruxSystem.cs) error - 'Emerald AiSystem' does not contain a definition for UseMagicEffectsPack"

    This is apparently my error, Crux does not support 2018.
     
    Last edited: Oct 21, 2021
  33. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    So I removed Crux, Emerald, and Unistorm from my fresh project, and only imported Unistorm for testing. Now, LighteningStrike.cs throws three (3) Emerald errors. Why are there errors with only Unistorm in the fresh 2018.4.35 project?

    I created a new fresh project Only Unistorm and it imported without errors. It seems deleting one or more of your assets in the Unity Editor does not completely clear it out.

    I also made a new fresh project with Only Emerald, and it imported without errors.
     
    Last edited: Oct 21, 2021
  34. chris73it

    chris73it

    Joined:
    Oct 15, 2013
    Posts:
    21
    I humbly suggest you do not add A* support to Emeral, because doing A* right is far from a trivial task and rather than spending time doing something mediocre, may I suggest you spend that time to integrate with the A* Pathing Project Pro that already does A* very well? My 2 cents, of course, Chris
     
    wood333 likes this.
  35. wraith1821

    wraith1821

    Joined:
    Nov 26, 2017
    Posts:
    30
    So my animations are all good and the AI works excellent....except for and intermittent issue with Idle to Walk Sliding. Sometimes the character transitions as expected and sometimes he idles then starts moving but doesnt switch to the walk animation. The animator reflects this. Any idea why or has anyone else run into this issue?

    Using Emerald 3.1 and Unity 2020.3.17f1
     
  36. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    I know this is a massive ask and hugely divergent request but have you thought about adding networking support with Unity's Netcode for GameObjects: https://docs.unity3d.com/Packages/com.unity.netcode@0.0/manual/getting-started.html

    This coupled with AStar navigantion integration would really set Emerald AI appart. I know both of these would ne huge undertakings for you but just wondering your thoughts.

    Thanks again,
    Nathan
     
    KIR99 likes this.
  37. RazT

    RazT

    Joined:
    Feb 7, 2019
    Posts:
    15
    I really love your asset <3 Itried but failed to configute the UI text system for VR. 2 issues:

    1) text is only seen in editor game view not in VR
    2) how should I position the emerald UI world space to float over a character?

    Thanks and trust me...I've tried ^_^
     
  38. agent_Macgyver

    agent_Macgyver

    Joined:
    Sep 1, 2012
    Posts:
    36
    I wanted to share a glitch or oversight that I came across.

    if two AIs are attempting to fight each other - if one is small, and the other is large, the large one might not "see" the small one at very close distances, even if tooclose is set to 0. This seems to be if the HeadTransform is too high up. I had to remove the headtransform or use an empty gameobject and the smaller character's height for the two to play well together.
     
  39. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    I know it's been asked numerous times (did a quick search), but what's the status on integration with PuppetMaster and A* Pathfinding? If it's been done already and won't cost me weeks to get working and works well with Emerald AI, I'll snag Emerald and set it up myself.

    EDIT: Also what kind of pathfinding is Emerald AI currently using? Simple navmesh?
     
  40. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    Excuse me, but I still need and answer for this. My Player shoots an Emerald ai within the ai detection range, using an Invector gun, does damage to the ai evidenced by diminished health bar, but the Emerald ai does not realize the player shot it, (just keeps wandering - neutral). I rely on the integration to inform the emerald ai that the player shot it, but this does not seem to take place. If I punch the ai, it knows I hit it, but I can stand right next to the ai, shoot it, and ....no response.
     
  41. PRfsJay

    PRfsJay

    Joined:
    Apr 22, 2021
    Posts:
    15
    Good Morning,
    Maybe this is the wrong place to ask this, but if I bought 2.0 is 3.0 a free upgrade or do I need to buy 3.0 at full price, thus having two AI packages?
     
  42. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    There is a $5 upgrade fee if you own version 2. You should see if it you log into your account that contains a 2.0 license.
     
  43. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    487
    I am currently on 3.0 and have not experienced this problem. This is not an answer to your question but rather a consolation that you probably won't get support. So many people have written to @BHS but he gives no response. You might have better feedback on the discord channel but he's not really active there either.
    He waits until enough questions have flooded in and then pops off all his responses at once.
     
  44. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    The looking up and down you are seeing is most likely the resting or neutral position the AI is supposed to have when moving. Normally, this is supposed to look like the aiming isn't being applied with no modifications to the aim's height. When moving, it changes its weapon direction source to not allow the movement of the weapon to affect the aiming process. When an AI reaches its target, it switches back to its Ranged Weapon Transform as its weapon direction.

    I tested this with a wide range of models and it seemed to work consistently with each one. So it could be something to do with the AI's rigging. If you could provide a link to the asset on the Asset Store, I could reach out the the developer so I can test this model to see what the problem may be.

    If you could also provide a video of the issue in the Unity Scene tab with all Debug Tools enabled, it could provide more info on what's happening.
     
    Revelation_Jeff likes this.
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    It doesn't work currently, unless you make the needed changes yourself. I have plans to add support for PuppetMaster when I get the chance.
     
  46. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    You need to import the UnityPackage file called Emerald AI 3.0 Support located within the Emerald AI 3.0 Support folder of Crux. This is with the newest Crux update.
     
    Chrysopy likes this.
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I noticed a few issues with how Root Motion is calculated and have made some big improvements with the upcoming 3.1 update. This should be live on the Asset Store within the next week. This most likely will fix any issues you are currently having with Root Motion.
     
  48. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    If you are attacking an AI outside of its detection radius, you need to make sure you are passing the AttackerTransform within the Damage function of Emerald AI. This is what provides the target source if no target is detected on the attacked AI. In this case, it sounds like it would be the Invector player (the object that has the Invector's health)
     
  49. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I am not attacking outside of the detection range and everything is being performed by the official Emerald Integration. I'm not "passing" anything. I rely on the integration. The integration works in melee. The integration passes damage in range. I do damage, but the ai does not recognize I attacked. With the ai set neutral I can stand right beside it and shoot it. It takes damage with zero reaction. Do I need to alter the integration script to add player recognition? I understand what you are saying, but not what you expect me to do to fix it. I anticipated the integration would handle this. In other respects the integration works fine. An ai standing beside the player that takes serious damage should react in some way. If I slash it with a sword, it fights until the player is dead. Shoot it, nada.
     
    Last edited: Oct 28, 2021
  50. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    @wood333 Try this:
    On the AI's "On Take Damage Event", Call 2 methods on the AI:
    In "Emerald AI Events Manager": SetCombatTarget
    In "Emerald AI Detection": SetDetectedTarget

    Both fields should have your Invector player collider assigned (I have never used Invector Controller so I'm not sure specifically what that should be, probably just the same game object as the player itself). This should tell the AI to attack your player when it is damaged.