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

    ebizcraftsman

    Joined:
    Dec 10, 2015
    Posts:
    20
    Question..

    I just purchased Emerald AI after I read what the new update contained and I must say, I LOVE IT! I easily integrated UFPS with it and it works FLAWLESSLY!

    Amazing JOB, but I have one question:

    I see you have the option to adjust the speed of animations for the Walk, Idle, Attack, BUT how do I adjust the speed of lets say, my die animation or more importantly, the graze animations. All my animations work GREAT, but my graze animations are playing way too fast.

    Can you please tell what I need to do to adjust the speed on the other animations.

    Once again, GREAT JOB and thanks!
     
  2. IvanAF

    IvanAF

    Joined:
    Jan 23, 2015
    Posts:
    15

    Thanks for your answer, I wait the new update while I enjoy this new version. :)

    Thank you for all the work you do

    Best regards
     
    BHS likes this.
  3. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    I have Emerald setup and working with RFPS and Legacy animation. Thank you for the detailed tutorials on the Wiki; they were very easy to follow. The setup works really well except for a couple glitches.

    I noticed that the walk animation was not completing the cycle. The walk animation gets near the end of the cycle and suddenly jumps back to frame 1 before the previous cycle had completed. I checked the animation in the preview and it looks great. Then I noticed that it was not just the walk cycle but run cycle as well (and presumably all cycles). The jump is very noticeable and takes away from an otherwise great experience.

    Can you help me to understand how I can modify this so the walk and run cycle shows every frame of the animation before returning back to the first frame? Thanks!
     
  4. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86

    I was able to track down the problem. In the "Emerald_Animal_AI.cs" script, I added a floating point value as a second argument to the "anim.CrossFade()" method. The walk and run animations cycle perfectly and look AMAZING now!!

    Line 1331
    anim.CrossFade (walkAnimation.name, 0.0f);

    Line 2428
    anim.CrossFade(runAnimation.name, 0.0f);
     
    Last edited: Dec 10, 2016
  5. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    I have been playing around with the "Stopping Distance" value under "Range Options." Initially I thought this would only impact how close the animal was visually; too close and you can't see the animal attack. Even closer and you end up inside the animal! But too far away and it looks silly because it is obvious that the animal is not hitting you.

    But there is a second by-product and that is that if you don't set a small enough value, the animal will get close to you but not attack. It will stand in front of you but cannot get close enough to attack. If the "Stopping Distance" value is reduced then the animal can attack, but it is visually too close. So I am trying to figure out how to make it look good visually, while ensuring that the animal can still get close enough to attack properly!

    I tried increasing the size of the animal's collider, but that just allows the animal to push me backwards around the scene!
     
  6. BHS

    BHS

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

    Great to hear you're liking Emerald.

    We are submitting an update today that will add the option to adjust the death and graze animation speeds from within the Emerald Editor.
     
  7. BHS

    BHS

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

    Thanks for letting us know about these issues. We are submitting an update today that addresses them both.

    The stopping distance issue was because Unity's NavMesh Agent's stopping distance is slightly off (by about -0.5) compared to Unity's Vector3.Distance. So we adjusted it to make up the difference.
     
    Locky likes this.
  8. BHS

    BHS

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

    Emerald AI 1.3.1 has been submitted. This update addresses a few issues introduced with the 1.3 update as well as a few improvements.

    Emerald 1.3.1
    • Added Graze Animation Speed to the Emerald Editor
    • Added Death Animation Speed to the Emerald Editor
    • Added option to customize the amount of deactivation seconds to the Emerald Editor. This gives users control over the amount of seconds when an AI will be deactivated after being culled.
    • Added UFPS and RFPS tutorials to Emerald Window Menu.
    • Alphas will now better communicate with herd when sending and receiving fleeing messages
    • AI's colliders are now automatically calculated based on AI's Mesh Renderer bounds.
    • Fixed the Flee Options not being available for Cowardly NPC
    • Fixed an issue that didn't allow Cowardly AI to flee when hit while using the Emerald AI Player Controller
    • Fixed an animation hiccup with run and walk
    • Fixed an issue that made the Death Animation not play consistently for AI using Mecanim
    • Fixed an issue with the Stopping Distance calculations
     
    Last edited: Dec 11, 2016
    Locky likes this.
  9. ebizcraftsman

    ebizcraftsman

    Joined:
    Dec 10, 2015
    Posts:
    20
    Any chance on getting ahold of this now, instead of waiting for Unity's long approval process ???
     
  10. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    We can send you a copy sometime tomorrow. Just PM me your invoice number for Emerald.
     
  11. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
  12. ebizcraftsman

    ebizcraftsman

    Joined:
    Dec 10, 2015
    Posts:
    20
    I have a question.. What about hit boxes?? Is that a thought in the future with Emerald AI.. Like if I want to get more damage from shooting a animal in the head than in I hit them in the body..
     
  13. BHS

    BHS

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

    Yes, this is something that is planned with a future update.
     
  14. BHS

    BHS

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

    BHS

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

    Emerald AI 1.3.1 has been accepted and is now live. This update addresses a few issues introduced with the 1.3 update as well as a few improvements.

    Emerald 1.3.1
    • Added Graze Animation Speed to the Emerald Editor
    • Added Death Animation Speed to the Emerald Editor
    • Added option to customize the amount of deactivation seconds to the Emerald Editor. This gives users control over the amount of seconds when an AI will be deactivated after being culled.
    • Added UFPS and RFPS tutorials to Emerald Window Menu.
    • Alphas will now better communicate with herd when sending and receiving fleeing messages
    • AI's colliders are now automatically calculated based on AI's Mesh Renderer bounds.
    • Fixed the Flee Options not being available for Cowardly NPC
    • Fixed an issue that didn't allow Cowardly AI to flee when hit while using the Emerald AI Player Controller
    • Fixed an animation hiccup with run and walk
    • Fixed an issue that made the Death Animation not play consistently for AI using Mecanim
    • Fixed an issue with the Stopping Distance calculations
     
    99thmonkey and llJIMBOBll like this.
  16. llJIMBOBll

    llJIMBOBll

    Joined:
    Aug 23, 2014
    Posts:
    578
    YEEESSS! AWESOME UPDATE :D
     
    99thmonkey likes this.
  17. _invalidusername

    _invalidusername

    Joined:
    Jul 1, 2014
    Posts:
    35
    I'm having an issue with v1.3. I'm using the mecanim animation system. My AI has 3 attack animations, all setup in the animator controller

    Around line 2863 in Emerald_Animal-AI.cs, for stationary attack animations there is:

    Code (CSharp):
    1. if (useMecanim) {
    2.     if (useAnimations && attackTimer >= attackTime + AnimatorComponent.GetCurrentAnimatorClipInfo(0)[0].clip.length / AnimatorComponent.GetCurrentAnimatorStateInfo(0).speed){
    3. ...
    I'm getting an index out of range error for:

    Code (CSharp):
    1. AnimatorComponent.GetCurrentAnimatorClipInfo(0)[0]
     
  18. BHS

    BHS

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

    This usually happens when you forget to apply an animation such as the hit animation or battle idle animation. It doesn't have to be the attack animations. Unfortunately, Unity doesn't have API to check if animation slots are empty or we would have messages stating which ones need to be applied.
     
    _invalidusername likes this.
  19. IvanAF

    IvanAF

    Joined:
    Jan 23, 2015
    Posts:
    15
    I have a problem

    I downloaded the new update 1.3.1

    When i import in my project, the version of Emerald is 1.2.

    It has no mechanim functions or anything like that.

    I use unity 5.2.0

    I try to delete and download again, but ever is the same version

    In the asset store (within the unity engine) appears as version 1.3.1, but when importing is version 1.2

    Sorry for my english

    best regards
     
  20. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    The minimum version required for Emerald 1.3 is Unity 5.2.2. The Asset Store hides this information for some reason. Updating to at least Unity 5.2.2 will allow you to use the newest version of Emerald.
     
    IvanAF likes this.
  21. _invalidusername

    _invalidusername

    Joined:
    Jul 1, 2014
    Posts:
    35
    Great, thank you for the quick reply! The update is really good
     
    BHS likes this.
  22. IvanAF

    IvanAF

    Joined:
    Jan 23, 2015
    Posts:
    15
    thank you =), in asset store the minimum version are 5.0.2

    PD: grenade script dont use the same method than arrow script (or so I think).I cant have to work :S.

    Thanks for all

    Best regards
     
    Last edited: Dec 17, 2016
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Yes, the minimum version for Emerald is 5.0.2. However, the newest update requires a minimum version of 5.2.2.

    We will work on updating the RFPS tutorial with a guide to make the grenade script compatible with Emerald within the next few days.
     
  24. GamePowerNetwork

    GamePowerNetwork

    Joined:
    Sep 23, 2012
    Posts:
    257
    Hello! I'm interested in this asset! But I have a few questions.

    1. Will this work well with multiplayer games? I'd have the AI running on the server side and the client side get those updates.

    2. Is there an enemy aggro system? For example If one player hits the enemy and then another player with stronger attacks hits the enemy... can I make the enemy turn it's attention to the more powerful player? I would also like to give players abilities that grab the enemy attention off other players. Is this possible?
     
  25. BHS

    BHS

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

    Thanks for your interest.

    1) We have not tested it ourselves, but we have had customers get Emerald working with network based multiplayer games.

    2) There isn't an aggro system. However, it shouldn't be hard to implement one. Everything can be altered through code. So, you can change targets using external scripts as needed. By default, if an AI's target dies, they will pick the next closest target.
     
  26. MahaGaming

    MahaGaming

    Joined:
    Feb 25, 2014
    Posts:
    82
    cant import package, its only letting me select certain things on import. scripts are not being imported and other sections. I have deleted and downloaded it now more than 5 times and its doing the same thing.
     
  27. BHS

    BHS

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

    This is Unity or the Asset Store, not Emerald. You can try one thing though that may fix this. Note: You should backup your project just in case this causes any issues.

    Go to "AppData\Roaming\Unity\Asset Store-5.x" and removed/delete the Emerald package. After doing this, go into the assetstore and redownloaded it.

    If this doesn't work, there's an issues with the Asset Store and you should contact Unity.
     
  28. MahaGaming

    MahaGaming

    Joined:
    Feb 25, 2014
    Posts:
    82
    Thanks this fixed the issue.
     
  29. MithosKuu

    MithosKuu

    Joined:
    May 12, 2010
    Posts:
    34
    Is there a way to add more size categories? Like Ultra large prey or something? And can larger predators prey on smaller predators?
     
  30. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    Think terms of behaviors rather than size. For example a pack of wolves can bring down a water buffalo even though the water buffalo is much larger. It really has to do with the behavior (aggressive, defensive, passive, etc).

    But to answer your question; Yes, larger predators can attack smaller animals.

    What are you trying to achieve?
     
  31. MithosKuu

    MithosKuu

    Joined:
    May 12, 2010
    Posts:
    34
    I'm trying to set up an environment with a variety of dinosaurs, which means carnivores ranging in size from a turkey to a bus, and herbivores ranging in size between a dog and a blue whale. I don't really need anything super realistic, just stuff like Rexs will prey on Raptors but leave Brontosaurs alone. I guess I can always just not tag the brontos as huntable and if I can't get predator on predator hunting that's fine, but it would be nice to have.

    Edit- Or its not an a\issue, serves me right for looking at an outdated version instead of the new version, that being said, I'm getting an exception when I try to make a new AI on a model

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Emerald_Animal_AI.SystemOptimizerUpdater () (at Assets/Emerald AI/Scripts/Emerald AI/Emerald_Animal_AI.cs:1171)
    3. Emerald_Animal_AI.Update () (at Assets/Emerald AI/Scripts/Emerald AI/Emerald_Animal_AI.cs:1698)
    I assume its somehow related to a lack of animations? Right now I'm only using test models that only have a mesh and nothing else, and the example AI are all working just fine.
     
    Last edited: Jan 11, 2017
  32. universus

    universus

    Joined:
    Jan 20, 2015
    Posts:
    5
    Hi
    I like to know if the code for the movement of the Animal/NPC works without NAVmesh, Like having a mesh with collider those the Animals/NPC move normaly over it?
    Im developing a procedural game and would like to buy and implement Emerald into the game if it do not need navmesh.
     
  33. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    From what it looks like, your object doesn't have a Mesh Renderer. How are you creating a new AI? Are you using Window>Emerald AI> Create New AI (On selected object)? We have tested a wide range of models and have never encountered that error.


    As of right now, NavMesh is required. However, with the release of Unity 5.6, we will be adding pathfinding support allowing Emerald to be used without the need for baked NavMesh. This will allow Emerald to be usable procedural terrains.
     
  34. Pho3niX90

    Pho3niX90

    Joined:
    Mar 26, 2014
    Posts:
    10
    Hi,

    Will there be an update to separate animals into male and female?
     
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Possibly, right now, male and female are determined by who is triggered to breed first. We can possibly make an option for users to choose this manually, or even have it generated automatically.
     
  36. Pho3niX90

    Pho3niX90

    Joined:
    Mar 26, 2014
    Posts:
    10
    Hi,

    Yes this would be great, to just select a male and female prefab for example and generate it automatically.
    This would also be great if all animal behavior types could breed in the "wild", to give it a more dynamic wildlife ecosystem, so that being said think of lions, where a male and female are easily visually distinguishable, if 2 females breed that would just be weird.
     
  37. Pho3niX90

    Pho3niX90

    Joined:
    Mar 26, 2014
    Posts:
    10
    Oh and lastly, how up to date is http://emerald-animal-ai.wikia.com/wiki/Documentation
    That is the only documentation I can find, specifically how up to date is the UFPS implementation ?

    Also if we can assign different skins/prefabs for rarity types, think of a hunting game / deer with different horn lengths etc.

    PS: Currently this is my favorite asset, haven't seen A class games that have these features.
     
  38. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    When animals are attacking each other in the far distance, the sounds play as though they are right next to the player. Is there a sound setting that can be adjusted to reduce the sound to simulate the distance? Thanks.
     
  39. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    The UFPS tutorial can be found here: http://emerald-animal-ai.wikia.com/wiki/Tutorials#Implement_UFPS_with_Emerald_AI

    It is up to date with the most recent version of Emerald and UFPS.

    Great suggestions, we will see what we can do. Glad to hear you're enjoying Emerald


    Hey there!

    You can fix this by adjusting the 3D sound setting in the Audio Source's options. Make sure the slider is set all the way to 3D.
     
    Locky likes this.
  40. Locky

    Locky

    Joined:
    May 14, 2015
    Posts:
    86
    Thanks, I guess I should have known that!! It sounds great!
     
  41. BHS

    BHS

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

    Here's a video with multiple AI fights using Emerald AI and RFPS. The AI are spawned using our newest system, Crux.
     
  42. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Hi, for the breeding how do you handle male and female animals. This is to avoid two cows making a baby without a bull being involved.

    Thanks
     
  43. BHS

    BHS

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

    The female is determined by who is triggered to breed first. With our next update, we will add the ability to choose male and female from within the Emerald Editor.
     
  44. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    First, I must say, this is one very well done asset. It delivers everything that it says it will. I have been developing my little game using multiple AI systems, suffering from FPS-loss, because nothing available seems to do what I need. This one is oh, so close! I bought it last week, and had my first animal AI and NPC AI up and running in about 2 hours. Most of that was spent reading and reviewing. Thank you for the written guidance. I appreciate the mecanim support. That was the show-stopper for my purchase delay. Works like a charm. Right now I have 30 active E-AI characters in my test level, and maintain a 40 - 45 FPS stat. (woohoo!) I posted a request for video instruction that would really clarify the initial setup and reduce the learning curve further.

    Rather than spam up multiple messages, my observations and issues are here. Any help or suggestions are welcome:
    1) When using a legacy setup, I get errors after killing the AI. (MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.) Haven't seen it yet on the same model with mecanim setup. Doesn't crash, performs as normal, but concerning, as it really fills up the console.

    2) I must still be unclear on Unity vs Emerald tags. I set all my Emerald AI units to the same Unity tag for "Emerald System Tag" in tag options. Player is on separate layer enabled, "LocalPlayer" selected. "Enemy" layer for "Emerald Layer" consistent across AIs. I created a hostile animal with animal name "Zombie". I gave it the AI Tag "Zombie" as well. Target Tags include "Player", and "Friendly". It has a Hunt radius of 30. I then created a cowardly NPC, same Unity tag/layers. Tag Options - AI Tag is "Friendly". Flee tag is set to "Zombie" and Flee radius is 10.

    The friendly detects the zombie when he strolls into range, and bolts, as expected. The zombie just walks on by, doesn't enter the run state, and follows his path. Where did I go wrong?

    3) Is there a way to make the zombies seek out and only "graze" when there is a GameObject tagged "food" in their stopping distance? My intention is to have NPC's drop ragdolls, and to have those ragdolls tagged as "food". Not afraid to code this, if anyone has some suggestions or guidance.

    4) Any plans/ETA for a player follower NPC? One that moves along with the player, kills hostiles, and can maybe take simple directions, like "collect food", "get water", "hold your fire", and "open fire"?

    5) Does anyone have any videos or examples of what steps need to be taken to use Emerald AI in a UFPS multiplayer setup? I have UFPS, UFPS-MP / Photon kit. Played with it and got it working before I bought Emerald AI. After I get the first 2 questions answered I will be looking to take it online.

    Thanks again. Back into the fray!
    Mark
     
  45. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,764
    Thank you! Great to hear you like Emerald and thank you for the feedback.

    Video tutorials should be coming sometime this week. We have been a little busy with our UniStorm system, but our newest update is finished and it's time to get Emerald 1.4 finished.

    1) Strange, Emerald should disable all components on an AI when their health reaches 0. I will take a look at it to see what's going on. What version of Unity are you using?

    2) Are you using the same animation for running as you are for walking? If you are, Emerald sets the animation speeds on start. If you are using the same animation for walking and running, its run may not properly triggering.

    3) This could possibly be done by altering an AI's start position. An AI will wander and graze within their start position. When a food tag is found, you could move their start position to the transform of the food tag.

    4) Follower NPCs are planned for our next version, Emerald 1.4. We are still working on what actions a follower NCP will have. Starting behaviors will most likely start with Aggressive and Defensive. Suggestions are more than welcome.
     
  46. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    I'm using Unity 5.5.0f3.

    Hmmm, I will have to check that. I know a couple of AI's are, as they didn't have a run anim. Test, test, test... I will go through each one and see which one(s) barf.

    I will have to give this some thought. N00B programmer, still struggling my way out of this wet paper bag...

    Wicked. I threw you a few already. Others might include a "harness" to ensure they position right (ie: single file if space is tight, a unit or two away from player so not up in his grill or right on his six, attack closest target.

    Got the zombies to target the NPC and chase her until they brought her down. Might want to think about a closest target, as they were so focused on her, they ignored me completely until she was toast. Works though, and for my simple game, it will do for now. Thanks! I will have to look at Crux. It looks interesting.
    Cheers!
    Mark
     
  47. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Hi! Does this system work for runtime generated scenes?
     
  48. XOA_Productions

    XOA_Productions

    Joined:
    Nov 27, 2016
    Posts:
    24
    Hey,

    your Asset is absolutely amazing and works like a charm for the most parts. We really like how easy it is to set up!

    However we have a couple of questions, because some of the settings seem a bit weird to us.
    We've got a small animal that we set up as defensive. As we attack it, it starts chasing the player, which is exactly what we want. If the player manages to get away far enough, it stops. However, only once he reenters the stopping range, the ai will start chasing him again. Shouldn't that be the hunting-radius instead?
    Increasing the stopping range leads to the ai attacking from far away, which looks odd from our player's perspective.

    Also, with the example ai's, as the player that is being chased runs off the navmesh, the ai properly walks away again. The ai that we set up however just stops at the edge of the navmesh.

    Regads,
    Ben
     
  49. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    This is a post from 2015. Is LoS implemented? I ask as I have dropped 5 big blocks, re-baked my NavMesh, and don't seem to be able to get the pursuing AI to disengage when the target goes in amongst the blocks. They are very tenacious, and will continue to pursue way past their attack/detection/wander ranges and continue to pursue relentlessly. I have lowered the ranges, set the chase time to 3, but can't get them to drop the pursuit.

    Sound triggers would be great too.

    If you are still looking for LoS suggestions, player enters detection range, pursuit starts. Raycast out from head (eye-level if possible) and once the ray is broken, mark the last sighting spot. Have the AI continue to that spot, and cast a radius to search in for a dev-defined period of time. No see, no target, return AI to where it was, in walk mode until it acquires another target. Node-AI has a pretty cool feature where the player leaves a trail of invisible spheres for the AI to follow if it loses direct sight of the target. Keeps them moving towards the player, at a reduced speed. They are pooled objects to keep them "inexpensive", and they disappear after a dev-defined period of time as the trail grows "cold".

    Mark
     
  50. Mighto360

    Mighto360

    Joined:
    Sep 15, 2016
    Posts:
    69
    Hi. Is there any way that damage can be done to an AI when a certain object collides with it? I want this to happen when my arrow hits the AI.