Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[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. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Awesome news! I've kinda been pulled out of my project for the past week but will be digging back in this weekend. I'll have to fix up some den areas and meadows in my terrain to get them ready for when you guys have an update in the coming weeks!!
     
  2. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    We are getting close to submitting the new update for Emerald Animal AI. We were able to add a lot of really cool features. You can look forward to the update most likely by this coming Monday. Once this update is accepted, the price will be increased. This is the last chance to get it for the introductory price. Here's a list of what we have gotten done since our last update.

    We're using our UniStorm Weather System for the sky, clouds, and lighting.

    Status Update #3:
    * Properly calculated radii so that they are accurate to that of the visual radio set within the editor. This will also stop animals from wandering out of their Wander Radius.
    * Greatly improved performance by utilizing Unity's LOD system. This is done be deactivating Emerald and its components when not in view. This allows Emerald to have 1,000's of animals within 1 scene at a time. Animals are then activated when within view when they become unculled. This process is seamless and fast. We tested this with 3,200 animals spread across 13 square miles and maintained 60+ frames per second.
    * Further optimized Pathfinding Options to better accommodate large amounts of animals
    * Implemented the first part of Dynamic Herds and Packs. This is done dynamically by randomly generating an alpha on start. There is a 1 in 5 chance that an animal will be an alpha. If an animal that is not an alpha comes within range of an alpha, that is also the same animal type (that is set within the Editor), and it isn't ready in a herd, it will become apart of that alpha's herd. Animals within a herd will follow the alpha (in herd mode) to its generated waypoints.
    * If an predator is within range and the alpha flees, all of its herd will follow in a herd formation.
    * This is all done efficiently and is only done when the animals are not being culled. This information is still accessed if a player were to leave the area and come back to it. The animals would simply start where they left off after they were culled and deactivated. This allows 100's of animals to be in packs and roam freely, graze, and hunt without impacting performance.
    * If an alpha animal dies, and it is leading a herd, it will generate a new alpha within its herd to become the new alpha.
    * Added Animal Category to Editor so similar animals can herd or pack up with each other.
    * Added Max Herd Capacity for each Animal Category. This is to help animal herds from getting too big and dominating your artificial ecosystem.
    * Added Frozen system that will allow animals to freeze for a randomly generated amount of time, when a predator or player comes within range. This randomly generated amount is based off of a min and max set within the editor. This is regenerated each time an animal has exited its predator encounter. This allows it to seem a lot more natural with each freeze time always being different.
    * After an animal has given up on its chase. It will return back to its starting position and continue to wander within its Wander Range.
    * Categorized most of the code into functions. So you can all things like Damage(damageAmount) to damage an animal or ReturnBackToStartingPoint() for the animal to return back to its starting position.

    Here's some screenshots of some of the herds. We will post a video tomorrow sometime.
    Emerald_AI_Grazing_Herd.png Emerald_AI_Grazing_Herd_2.png Emerald_AI_Grazing_Herd_3.png Emerald_AI_Grazing_Herd_4.png
     
    Last edited: Jul 17, 2015
    AdamGoodrich and BackwoodsGaming like this.
  3. MadMapp

    MadMapp

    Joined:
    Nov 15, 2012
    Posts:
    49
    hey guys great news on the packs/herds/preds etc, i an looking forward to this update, im making a hunting game, and this should be perfect, i notice others are using flock and school ad ons, are you guys planning on implementing your own fish and bird system?
    you say in the next update we will have access to apply damage functions etc, you will be providing fps type examples? and providing a fuller documentation?

    now i havent fully looked at this asset, im waiting on the updates to fully implement it, so im working on all the other stuff before i dig in to this properly, i would like the ability to shoot various parts of the animal, so i would ad colliders to the head lungs heart etc, will these colliders cause issues with the nave mesh/rigidbody colider of the ai controller, could you set up a simple scene for the update showing a head and body colider with varing amounts of damage (adjustable in the inspector),

    also on death, i would like the option to use a ragdoll, so on death rather than play a death animation i would like to add a small force on point of impact to a rag doll, can you ad this option please?

    lastly, multiple flee tags, certain animals will only run from certain animals, other animals are much lower on the food chain and will run from more than one animal, im guessing this is already included in pred/prey logic, but not seen it directly mentioned yet
     
    Last edited: Jul 17, 2015
  4. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Wow I just found this asset nice
    Could you generate spawns at run time?
     
  5. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    Bought the asset, cause I feel there will be a couple of price increases with so many awesome features planned :)
    Ragdoll support would indeed be nice!
     
  6. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    Do you have any plan to make Human AI In a completely different asset?
     
  7. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    We're not sure about a fish and bird system. We will see what we can do.

    Yes, we are providing a FPS example demonstrating how to apply damage. This is done using RayCasts and delays so you should be able to match the collision with any animation. It will also show a blood particle effect exactly where you struck the animal. If you want to use range attacks you would simply call a referenced Damage(damageAmount) to the animal you hit.

    Colliders shouldn't cause any issues. We use triggers to detect hits. So what you could do is have a custom tag or damage for each collider. So head or heart could be a one shot kill. Then have everywhere else be 2 or 3 shots. It should all be possible with our functions.

    We have a dead gameObject replacement for death. So, when the animal dies, you can spawn a ragdoll of that animal. This is customizable within the Editor. Is this what you're looking for?

    For the prey logic, we use size. So a deer (Large) isn't going to flee from a fox (Medium). So the Prey and Predator Size handles the logic. We can add a could more tags if that's highly requested though.



    Yes, waypoints are generated at runtime. Each time a generated waypoint is reached, it will graze for a randomly generated amount of time (based on the min and max within the Editor) then generate a new waypoint. This is all done within the animal's Wander Range.


    Great to hear.

    We have a dead gameObject replacement for death. So, when the animal dies, you can spawn a ragdoll of that animal. This is customizable within the Editor. Is this what you're looking for?



    If customers like our Animal AI, we can definitely make an Human AI system. We do have plans to do this in the near future.
     
    MadMapp likes this.
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    I think this was mentioned before, but it would be nice to also account for numbers. So a deer wouldn't flee from a single fox, but it might flee from a pack of 10 foxes.
     
    BackwoodsGaming likes this.
  9. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    And also an accounting of totals to API to enable dynamic quest generation. This brings another question to mind. With the culling, will spawns still be generated and processing happen behind the scenes for out of range areas within the scene? I know in the update you indicated that the culling will happen to turn off Emerald generated spawns that are outside of the player's range. But if we set up logic to spawn more predators based on a high deer population, will that still be able to take into account the entire deer population in the scene?

    Also, now I'm starting to wonder about the predator vs prey system. Do the predators still hunt prey if they are within the culled area?
     
  10. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    So....is the combat all physics based? Will it be difficult to change that part? Also, can we turn off the blood, please? :) Not all of us want that much realism.
     
  11. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Could you also add maybe a flying ai for birds?
     
  12. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Fox do not hunt deer. :) But a good idea nonetheless.
     
    BackwoodsGaming likes this.
  13. MadMapp

    MadMapp

    Joined:
    Nov 15, 2012
    Posts:
    49
    probably ment wolves, but ya a pack hunt mechanic would be welcomed, like 1 wolf wouldnt attack the player, but if there were a pack they would become braver, and the player becomes a viable target
     
    Teila likes this.
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,670
    No, it bugged me at the time to suggest that foxes would hunt deer (well, maybe they would in some alternate MMO world:)), but I figured it would get the point across anyway that pack size should affect aggression.
     
    Teila likes this.
  15. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Yeah, that is what I thought you were doing. :) I like the idea a lot. As a human, I might be intimidated if a pack of fox started chasing me, even if I knew they wouldn't eat me. lol
     
  16. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Or a swarm of rats.
     
    Teila likes this.
  17. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Or snakes!!! Actually, one snake chasing me...or even looking at me through the window, is enough to make me climb on the highest table. Trust...me I did that in my office once when I was working as a geologist. Very embarrassing when my colleagues came running down the hall to see why I was screaming. :oops:
     
  18. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, this will be handled based on the animal's type. This is create some balance so one type of animal isn't going to dominate an entire ecosystem.


    Our spawn generation system will spawn both within the editor and at runtime. If they are spawned, they would be disabled until they come within view. If a player comes withing unculling distance, the animal will act as it should. If a prey comes within distance of a predator, it will still flee and the predator will still chase it.

    If it is highly requested, maybe we can make some type of system that generates animals as the player is walking. Then, when the animal is culled, it is deleted. This would still allow for dynamic animal generation, but would be happening in real-time, dynamically. If this is sometime that our customers want, we can surely add it.

    This system will come after version 1.1.
     
  19. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    This video shows off some of the herd and pack system that will come with the next version of Emerald. Emerald will generate dynamic characteristics for each animal. Emerald will then get an animal's type and generate if it's an alpha. If it's an alpha, and it's not already in a herd/pack, Emerald will pair up identical animals with it and add them to its herd/pack. If an alpha dies, it will pick a new alpha within its herd/pack. This is all done dynamically so every time the simulation is different. New packs and herds will form at different locations every time its regenerated. This is all done efficiently and has been stressed test with 3,200 animals on 13 square miles of terrain with great 60+ frames per second.

    This video uses our UniStorm Weather System for all of its lighting, clouds, and skies. It has 1,000+ animals wandering around all dynamically forming herds and packs as well as hunting and fleeing.

     
    Last edited: Jul 20, 2015
  20. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    Hopefully this is optional. I wouldn't think it would work well in multiplayer environments.
     
  21. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, this would definitely be optional. We would have 3 different, optional, ways of spawning.
     
  22. MadMapp

    MadMapp

    Joined:
    Nov 15, 2012
    Posts:
    49
    looking great, are you guys using ufps in the demo?
     
  23. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, but we're using our custom weapon system, that will come with Emerald, for the attack calculations though. We use UFPS for the animations.
     
    Last edited: Jul 20, 2015
    MadMapp and John-G like this.
  24. MadMapp

    MadMapp

    Joined:
    Nov 15, 2012
    Posts:
    49
    should release with ufps compatibility if you already have it set up, for those who already have or wish to use with UFPS
     
    Xenonus and John-G like this.
  25. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    It will be released to be compatible with UFPS. With the way we designed the damage system, it should work with any system or plugin. Raycasts are used to detect hits. These hits have adjustable distance, delays, and attacks speeds. So, it should match up with any animation or system. You can then call Emerald's Damage() function or call a custom one like UFPS.

    We will post a little tutorial of how to set Emerald up with UFPS on our wiki after we have submitted the update.
     
  26. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I am not sure I asked this before, but can we use this with different kind of combat system? Our game will not use action/physics combat. Also, can we turn off the blood? :)

    I must admit..that movie was a bit disturbing. :eek:
     
  27. 3dFoin

    3dFoin

    Joined:
    May 30, 2011
    Posts:
    631
    This is really cool and great idea, a combat system for it will be awesome :D
     
  28. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Yes, we have just added an option that will disable the blood, for those who don't want it that realistic.

    What exactly did you find disturbing? It's very similar to Skyrim's combat system and blood.


    We have a combat system that will be usable with the next version of Emerald. The one you saw in the video was ours. We used UFPS for the swing animations.
     
    3dFoin likes this.
  29. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I am sure I would find that disturbing as well! LOL I turn off blood..but that is a personal preference. :)

    You have not yet answered my question about using other combat systems. We are making a game where combat is not the main focus. We will want the ability to kill animals but not using physics based combat. Instead, we are using your typical targeting combat with dice rolls. Will we be able to easily implement this with Emerald or will it be a pain to tear out your combat system and add ours? I do not expect you to provide us with our combat system..we have that already. I just want to know if there will be a problem.

    The type of game we are making will not do well with "twitch" combat that depends on player skill. If it is extremely difficult to do, then can we completely turn off your combat system or better yet, remove it from the asset? I wish I had asked this question before I purchased it but that is my problem. :)
     
  30. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Sorry I missed your question.

    Any combat system is incredibly easy to implement. We have categorized most of the code into functions. So, for example, if you had your own combat system and you wanted to damage an animal, you would need a reference to it, then you would call Damage(yourPlayersAttackOrDamageHere); this would damage the referenced animal with the amount of the variable within that function. You don't need to use physics based combat. You simply need a reference to the current animal you're attacking. Then call the explained function above.
     
    BackwoodsGaming and Teila like this.
  31. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Okay, thank you for your patience. :) My programmer says he already knew that...LOL Not sure why he didn't tell me.

    Sounds good.
     
  32. Xenonus

    Xenonus

    Joined:
    Jun 26, 2014
    Posts:
    53
    So Unity is still reviewing the update? Cant wait to play with it ;)
     
  33. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    There's a few finishing touches we have to put in the system before we can submit it. We're trying to finish up the dynamic pack/herd system. So far, it's looking great. It will all be well worth the wait. It shouldn't be more than a few days.
     
    Pandur1982 likes this.
  34. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    Hmm, for some reason I missed this asset before. Just saw your post in the UniStorm thread. Think I'll pick this up when I get home, it sounds like just what I need.

    Question, apologies if it's been asked and answered already. Can I define the animal "wander" locations in script by other things? Like say, make a deer stay within a cluster of trees usually (as a low priority of course, so to get water or flee it can leave).

    Another one. I'm a bit confused by all the animal culling talk here. Is it possible to have the animals generated but not necessarily rendered or something? I want the ecosystem to exist separate from the player. I also intend for there to be human NPCs who can hunt away from the player.

    And while I'm asking...how does each animal detect others? Is it a simple boundary like distance, or is it something like a raycast, or sound? And does it vary by animal? A wolf ought to be able to sneak up on/stalk a deer, I'd imagine.
     
    Last edited: Jul 27, 2015
  35. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Animals can wander within their wander range. This wander range is defined while in scene. Animals will not go out of their wander distance, unless their flee range is greater. When an animal is out of flee mode, and they are out of their wander range, they will return to their starting position. We will be working on zones for the update after this new update.

    Animals will render based on if the camera is within range. If the camera is out of range, the animals will stop simulating. We have an option to disable this if our customers want the animals to continue working out side of the player's view. Having NPCs hint animals should totally be possible. You would just make sure their tag triggers the animal to flee. This is set within the animal's editor.

    They detect others by tag name within their flee or hunt radius. After the new update is released, we will further enhance the system to detect things like look angle and sound detection.
     
  36. EternalAmbiguity

    EternalAmbiguity

    Joined:
    Dec 27, 2014
    Posts:
    3,144
    For the first question, perhaps I wasn't clear enough. Is there a way to define the wander zone by another object, like say a cluster of trees? Or do you have to do it manually? Can I automate that, basically, so at runtime the animals will automatically stay in zones that fit the defined parameters. I want to be able to tell the "deer" animal type, in the editor or code or whatever, to stay within say 10 meters of a tree, and thus at runtime they could wander at will as long as they fulfill that criteria (more complex than that of course but it's the gist of it).

    As for the other stuff, sounds great.
     
    Last edited: Jul 28, 2015
  37. Endzone

    Endzone

    Joined:
    Dec 18, 2014
    Posts:
    119
    Hello, Currently i have not purchased Emerald AI ive been wanting to but i just have a quick question before i do..
    Im currently working on a Voxel Project so everything is made from cubes..
    Is the AI compatible with different terrains such as voxels ? just thought i would ask before i went ahead and bought it just incase for some reason the AI dosent work on anything other than the standard unity terrain at the moment! - Thanks
     
  38. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    i guess you will have two problem:
    -can enemy climb cubes with pathfinding? if you setup the climb height yes
    -if your map is generated / modified at run time you cannot bake pathfinding. so it does not work with unity navmesh
     
  39. Endzone

    Endzone

    Joined:
    Dec 18, 2014
    Posts:
    119
    yea thats what i thought damn .... oh well thanks for the reply!!
     
  40. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    If your terrain isn't created at runtime, you'll be fine. You will just need bake the NavMesh and set your slope limit to 90°.

    We are working on support for terrains created at runtime with a future update.
     
  41. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    Sorry for the delay.

    There were many tweaks we needed to make to the core system to get all of the calculations perfect. We are very close to submitting, now that we have got the system working perfectly. We're hoping to have Emerald Animal AI v1.1 submitted the Friday.

    We will continue to release new updates with new features and tools. Emerald v1.2 will include an ecosystem generator. This will allow you to place hundreds of animals within a scene with the click of a button. You will be able to adjust factors like terrain altitude (for wolfs and bears in higher altitudes and other animals at lower altitudes), min and max distance between animals and across the terrain, collision avoidance (to avoid animals being placed where they cannot walk), steepness, and more.

    Status Update #4
    * Various tweaks and rewrites to the core system.
    * The flee calculations have been rewritten to allow for more realistic fleeing. Animals will now pause (even while in motion from grazing) for a randomly generated amount of seconds (this can be adjusted via the editor) before fleeing away from the player.
    * Tweaks and optimizations to the pack and herd system. Herds and packs now from and move more realistically than they did with our last status update.
    * Alphas now function and lead more realistically and intelligently.
    * Added options to the Emerald Editor to adjust pack settings such as herd/pack distribution.
    * Added flee sound (This can be enabled or disabled via the Emerald Editor)
    * Added footstep sound system with adjustable seconds.
     
    BackwoodsGaming and Teila like this.
  42. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Say your a hiker and you come across a bear and it attacks you can you have a non-lethal weapon like pepper spray to cause the animal to flee?
     
  43. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    It's something that could be added with a custom script, or it's something we can certainly add.
     
    Licarell likes this.
  44. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Fabulous! Can't wait. :)
     
  45. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    I'm trying to make a non-lethal... as much as possible game so I think this would be a cool addition...
     
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Would pepper spray work on a bear? Maybe a better non-lethal tactic would be a dance-off. ;)
     
  47. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    They say to make yourself look big by holding a long stick or something, hold it over your head. :) If you are bigger than the bear, they might flee. Otherwise...the player should flee. lol
     
  48. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    434
    Hey man... anythings possible in a game...:eek:
     
  49. BackwoodsGaming

    BackwoodsGaming

    Joined:
    Jan 2, 2014
    Posts:
    2,229
    I can see the game dialog already....

    You raise your magical wand of tickling feathers and point it towards the bear....
    Angry bear falls to the ground laughing histerically... Flee, you fool!

    :p
     
    BHS, Licarell and Teila like this.
  50. BHS

    BHS

    Joined:
    Dec 21, 2009
    Posts:
    4,760
    We will add a flee function that will allow an animal to flee regardless if they're a predator or not.
     
    Licarell likes this.