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
    Because the new version of Emerald AI uses an interface class type for damage, it will be easier to do integrations. I will have Invector support on release, via an included script. However, I will have to look into Opsive as the version I bought was unfortunately deprecated.
     
    Last edited: Jun 9, 2023
    julianr, nordegraph and Blackghost like this.
  2. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    27
    @BHS when will you release the update?
     
    SickaGames1 and Blackghost like this.
  3. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    It must not be ready yet if I was a betting man.
     
  4. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I really tried to have the update ready by the end of May, but it just wasn't possible. This is why I don't like giving ETAs as they aren't always accurate. There is so much this update is offering and I want to ensure everything works as intended for when the update is released. The behavior rework and modular actions also took a lot longer than I expected. I will being doing another status update by the end of the week to share more of what the update is offering.

    A part of the large discount I am offering for upgrading is due to the fact that I've pushed the update back a couple times. I'm hoping to have the update out by the end of this month. I really appreciated everyone's patience and understanding throughout the development of this update.
     
  5. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    If you are packing in better logic and more features, I am good with that! At least we know you are working on it and you are communicating that! Thanks for your work!
     
  6. ZenWayne

    ZenWayne

    Joined:
    May 8, 2020
    Posts:
    18
    Hi,the AI doesn't actually collide with the collider. Which means sometimes it goes through the wall. Now this can only be avoided with navmensh. However, this is not reliable in game. I hope that, like other character controllers, at least the AI cann't walk through walls. How to solve this problem?
     
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    NavMesh is needed in order for an AI to navigate. If you want dynamic objects to be avoided, then you need to add a NavMesh Obstacle to your dynamic objects.

    Building NavMesh: https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html
    NavMesh Obstacles: https://docs.unity3d.com/Manual/class-NavMeshObstacle.html
     
    ZenWayne likes this.
  8. olive157

    olive157

    Joined:
    Jun 4, 2013
    Posts:
    3
    Hey @BHS
    I am having trouble triggering the SetPlayerRelation event via a Unity event, it doesn't exist in the list.

    upload_2023-6-9_5-7-33.png

    I've checked the EmeraldAIEventsManager script and I can see the method exists and is public.

    upload_2023-6-9_5-8-53.png

    Any ideas?
     
    Last edited: Jun 11, 2023
  9. mroshaw

    mroshaw

    Joined:
    Oct 11, 2020
    Posts:
    47
    Unity won't show methods with enum arguments in the event methods list. I've also found this to be annoying on occasion!
     
  10. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey everyone, here’s more information regarding the next update.

    New Inverse Kinematics System
    While Emerald AI 3.0's IK system works well, it has limitations. It requires AI with aimable weapons to use Emerald AI's custom IK System and Unity's built-in IK system for everything else. It also had to have an additional system for the hands. This made the editor more cluttered, the setup process longer, and the code more difficult to manage.

    The new IK system will use Unity's new Animation Rigging package. This will allow any AI, including those using generic rigs, to use a single IK system. It will be fully customizable and allow users to control various bones that will be responsible for aiming (arms, head, spines, etc.) as well as positioning hands to weapons. The AI Duplicator Manager supports the duplication of Rigs and will even match bones, hints, and targets to those that have been setup (requires identically named bones/rigging). I also have plans on implementing Feet IK so an AI's feet and legs will align to surfaces and slopes. However, this will not be done in time for the initial release.

    Generic Animation Type support (Note: This AI's attack disabled for this example)
    Aiming (Final 2).gif
    Support for keeping hand on two handed weapons

    The new (optional) IK Component



    Multi-hand and Weapon Transform Improvements
    Users have long requested the ability for AI to have multiple weapon or attack transform points. These have been added allowing users to customize which points an AI uses through the Emerald Attack Event when setting up Animation Events. For example, a Mage can shoot a spell out of its left hand, right hand, or both, even if using just a single animation. This feature can also be used for Boss-like AI to have something like an impact effect play where their fist is at the time of a large attack or have an AI shoot from the barrel of the gun and throw a grenade from their hand.

    This works by having a list of attack transforms that are assigned through the Combat component and matching the names that are assigned from the EmeraldAttackEvent.




    Switchable Weapon Types
    AI are no longer restricted to either ranged or melee weapon types. They can use both ranged and melee attacks within 1 weapon type. This also allows AI to have two states, for models that support it. With the below example, this AI has a flying set of animations as well as a set of ground based animations. The AI can switch between both and use melee attacks. (Note: The AI with the gun has had its attack disabled for this example)
    WeaponTypes.gif


    Modular Combat Actions
    Emerald AI's combat actions are modular actions an AI can use while in combat. Dodge, block, strafe, switch target, and more were all created using Combat Actions. These use Scriptable Objects to allow each action to have its own editor. Users can create their own by creating a script that derives from the CombatAction class. Any custom variables, that are added to a users derived class, will appear within the center foldout. The CombatAction class has a virtual UpdateAction function (that acts like an update function) that users can override to create their custom actions. The Default Settings has conditions which control when actions can be entered and exited based on various default states.





    SwitchTargetAction.png


    Reworked Behaviors
    The behavior script has been rewritten and minimized to only include the code that controls each behavior. Behaviors have been reworked to each be in their own function. Each function is listed as virtual so users can override or build upon them by deriving from the EmeraldAIBehavior class. Any additional variables that are created through custom scripts, will automatically be added to the Custom Settings section within the behavior script and users will retain the Emerald AI styled editor. By default, Emerald AI has 5 preset behaviors; these include Passive, Coward, Aggressive, Companion, and Pet. The cautious functionality is now a part of both the Aggressive and Coward behaviors and is no longer its own behavior. Instead, it is a variable that will control the delay an AI will take before reacting according to its behavior. If an AI has a warning animation, this will automatically play within this delay.

    The default behavior script

    An example custom behavior script (derived from EmeraldAIBehavior) with its custom variables added to the custom foldout section.



    Reworked Factions
    Factions now work like Unity’s tags and layers do with a list of strings that can be edited at any time. These changes will be updated across all AI and their editors.
    FactionManager.png
     
    Last edited: Jun 21, 2023
  11. ImminentWaffle

    ImminentWaffle

    Joined:
    Oct 19, 2013
    Posts:
    7
  12. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Looks awesome!
     
  13. ZenWayne

    ZenWayne

    Joined:
    May 8, 2020
    Posts:
    18
    Hi,is it appropriate to apply faction to non-AI targets. I don't know if this will affect performance. But it seems easier to edit and manage.
     
  14. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Are you saying this in regards to the new version? Yes, it is much easier to manage and it does not affect performance.
     
  15. SickaGames1

    SickaGames1

    Joined:
    Jan 15, 2018
    Posts:
    1,270
    Any other features?!
     
  16. BDSmith62

    BDSmith62

    Joined:
    Dec 5, 2020
    Posts:
    1
    My AI's nameplates aren't rotating. When behind a character, you can read the name fine, but if you look at them from the front, the name is backwards. Any ideas?

    Latest EAI
    Unity 2021.3.16f1
     
  17. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, there's a few more and the new modular abilities system. I will go into specifics with the next status update.
     
    iChuy likes this.
  18. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    I cannot recreate this issue. Does your camera have the MainCamera tag?
     
  19. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Hello,

    is there an option to make an AI play a being blocked animation? I mean: AI attacks, player blocks, attack does not connect so AI player stagger or being deflect animation.
     
  20. BHS

    BHS

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

    This isn't possible with the version 3 of Emerald AI, but it will be with the upcoming version. See my status update post to see this feature in action.
     
    DrInternet likes this.
  21. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Indeed, it looks a like an impressive update. Two questions:
    1) What's the ETA? I read something about end of May, but I guess you haven't made it. Is the delay caused by something serious or will it be so called soon™?
    2) Will new Emerald be backward compatible? I mean: will all the progress I made in 3.2 carry over to the next version?
     
    nordegraph likes this.
  22. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    1) There’s no set ETA. I’m working hard to get it done as fast as possible. There’s nothing serious causing the delay, just polishing up some of the features and working on the modular abilities system.
    2) No, the new version is not compatible with the previous version. It has been completely rewritten. However, the new version is much easier to use. Once an Animation Profile and other settings are set up on one AI, users can use the AI Duplicator to create new AI in a matter of seconds. They can also share the Animation Profile between multiple AI so animations don’t have to be reapplied like they do with the current version.
     
    nordegraph and DrInternet like this.
  23. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    27
    @BHS 1. is it possible to play some specific hit animations with some specific attacks in the upcoming version? Attack and hit I'd- it will be helpful to play a whole sequence.

    2. Can please make an integration between hap (animal controller and Emerald upcoming version) as animal controller has been improved significantly from last couple of updates.
     
    Last edited: Jun 29, 2023
    Blackghost and nordegraph like this.
  24. dragonstar

    dragonstar

    Joined:
    Sep 27, 2010
    Posts:
    222
    I have a question I need to make a boss ho can change is attacks when is hurts, where I mean depending on is Healt I will play a different animation can be do that ?
     
  25. curwen_corey

    curwen_corey

    Joined:
    Jan 27, 2021
    Posts:
    2
    Hello, @BHS! I have one question regarding the planned 2023 version of Emerald AI.

    Your annotation says that the updated IK system should be solving all the cases without need to combine Emerald IK with other IK systems, and it will use Unity built-in IK system. However, it's not clear to me if I'll be able to use Final IK asset I'm using currently in combination with the updated Emerald. Would it be possible to combine Final IK with new Emerald logic? Or maybe it will not be required due to new Emerald IK being faster and more convenient rather than default Unity IK it's based on? I'll be glad if you can clarify this a bit.

    Thanks in advance.
     
  26. christougher

    christougher

    Joined:
    Mar 6, 2015
    Posts:
    558
  27. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    1) Not yet, but it is certainly something I could add with an update.

    2) Emerald AI agents are required to use the Emerald Animator Controller. What kind of integration are you wanting with HAP and Animal Controller and Emerald AI? If the player is the only one using these systems than I can certainly add support when I get the chance.
     
    Blackghost likes this.
  28. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    41
    Hey @BHS! So I have the latest version of Emerald AI 3. I'm trying to set up AI that are spawned outside of a room yet rush in in waves and attack the player. The issues I'm running into is them not detecting the player, even with a detection trigger field large enough and all that.
    I solved this by calling
    Code (CSharp):
    1. eventManager.SetDestination(player);
    2. eventManager.SetCombatTarget(player);
    . Now the issue I'm facing is that if the player runs around a bit, the enemy will give up and wander, even though I have it set to Stationary (until I SetDestination). How can I make an AI that will only attack the player until it wins or dies? It's a super powerful asset, but doesn't seem to be able to just have attacking and nothing else, is this true?
     
  29. timerace

    timerace

    Joined:
    Feb 27, 2019
    Posts:
    27
    Hello,
    Regarding emerald ai Integration with animal controller and hap.

    1 Animal controller is a complete kit like Invector, same setup like dealing damage and detection features.

    2 if you can add support for riding horses and dragons.
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    No, there's no easy way to do that with the current version.
     
  31. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there, the new Emerald IK system is a standalone component that is optional. If you are using Final IK, that should be fine and you can use your own implantation for that, similar to what was done with the new IK component and Unity's Animation Rigging package.
     
    curwen_corey and nordegraph like this.
  32. mario_code4ever

    mario_code4ever

    Joined:
    Jan 9, 2020
    Posts:
    36
    Hello there i was wondering do we have flock behaviour? I set the same faction for monsters and they stand next to each other. I attack one monster from range and only that mob chases me. Can we have if i attack one from group everyone from that flock or faction chase me? Its that available?
     
  33. curwen_corey

    curwen_corey

    Joined:
    Jan 27, 2021
    Posts:
    2
    Oh, got it, thank you!

    Hope you'll successfully deal with your upcoming update BTW, looks very promising.
     
  34. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    christougher and nordegraph like this.
  35. ZenWayne

    ZenWayne

    Joined:
    May 8, 2020
    Posts:
    18
    Hi, although it's highly likely that these functionalities are already available, I still wanted to mention them. I hope there are sufficient APIs to make the following features easier to implement:

    1,The ability to interact with AI and instruct them to perform specific tasks at particular locations, such as with pets or soldiers.

    2,The capability to use custom code to command AIs, like soldiers, to move or fight in formations.

    3,I previously developed an AI system where I used a dynamic threat level to determine AI behavior. For example, the threat level for a fox and a tiger towards humans would be different, and if a tiger is severely injured, its threat level would also change. Similarly, player characters would have similar threat levels. I noticed in your description that AI behavior is currently modular, and I'm wondering if it's possible to achieve similar functionality using custom module easily.

    Thank you!
     
  36. Alex_Prapas

    Alex_Prapas

    Joined:
    Jan 1, 2020
    Posts:
    2
    Hi all, I have some trouble with animations not playing but I think it might be that I use the generic rig instead of the humanoid. Do you think this is the problem or is it already supported?
     
  37. mroshaw

    mroshaw

    Joined:
    Oct 11, 2020
    Posts:
    47
    I use Emerald AI for animals and creatures, not had any particular problems with animations.
     
  38. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    1) I plan on adding non-combat related tasks/schedules with an update after the initial release of the new version. You can currently send an AI to a location and have them wander. You can also use the needs system to generate waypoints to items like food and water.

    2 & 3) With the new version, you will be able to override behavior functions so you can use your own code to create custom mechanics or behaviors so both of these should be possible.
     
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Both generic and humanoid animations are support. Just make sure an AI's Animation Type matches the rig type of the animations.
     
  40. Tang-Bo

    Tang-Bo

    Joined:
    Oct 24, 2015
    Posts:
    4
    Will the new version be available next month?? I can't wait to purchase it.
     
    julianr, curwen_corey and nordegraph like this.
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, it should be available sometime next month. I’m still working on the modular ability system, but it’s the last major task I have to do.
     
  42. Stigym

    Stigym

    Joined:
    Mar 31, 2022
    Posts:
    7
    Hi! I'm really curious about the new Emerald, it looks wonderful. I am writing here to solve a problem I've encountered (the only one, at the moment, Emerald is a very intuitive and powerful tool) in the current version: when I add a turning animation (with root motion) the characters in the attack phase continue to rotate their head by restarting the turning animation over and over again, in a rapid and unnatural way (instead of turning smoothly, rotating their head without restarting the animation every second). What could it be about? Everything else seems to work perfectly, but this has already happened to me with 3 different AI characters
     
  43. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Hey there! I'd need to see a clip of the issue to see exactly what's happening, but it sounds like your turning animation has its rotations locked. Ensure that the Root Transform Rotation's Baked Into Pose is disabled.

    TurnAnimationFix.png
     
  44. Stigym

    Stigym

    Joined:
    Mar 31, 2022
    Posts:
    7
    Thank you for your quick answer, the Root Transform Rotation is disabled, unfortunately it must be something else. Here is a video if it helps to understand. This sort of headbanging happens only during the attack phase, turning towards the player. In the animator and during the normal roaming it looks perfectly smooth and without animation glitches
     
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Interesting, are you using the head look/IK feature? If so, can you try disabling it to see if it resolves the issue?
     
    Stigym likes this.
  46. Stigym

    Stigym

    Joined:
    Mar 31, 2022
    Posts:
    7
    thanks, unfortunately it doesn't seem to depend on the head look feature, even if it seems almost due to that. Would it be possible to privately send you the project file (with only what is needed) so that you can evaluate the settings? it would help me a lot
     
  47. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, just send it to my email: Support@BlackHorizonStudios.com and I’ll see if I can figure out what’s going on.
     
  48. Stigym

    Stigym

    Joined:
    Mar 31, 2022
    Posts:
    7
    Thank you! And my compliments for your amazing AI system, it's really intuitive and powerful
     
  49. Loki18000

    Loki18000

    Joined:
    Apr 1, 2015
    Posts:
    75
    Having an issue with the ranged AI not "shooting" at the target when it's high up. The AI will move to within range but will just look at the enemy target. Is There anyway to make them shoot at the target when it's up high?

    Thank you.
     
    Last edited: Aug 2, 2023
  50. GameRevenant

    GameRevenant

    Joined:
    Sep 7, 2018
    Posts:
    2
    This asset looks incredible! Very seriously considering purchasing it for a prototype I want to build. Here's my question: has anyone used this for a stealth game? How does the AI do when it comes to detecting the player based on how much light is in the Scene / how well lit the player is? Obviously this is a more difficult feature and there's probably a hack I can do with vision cones in low light settings but I figured it can't hurt to ask.

    For context: in my prototype, you're trying to sneak around and guards have flashlights. The environment is usually pitch black, so I would like them to see you if their flashlight sees you. But if you're completely in shadow and their flashlight isn't on or isn't pointing at you, you would be hidden.