Download

Training Stream - Complex AI Interactions and Optimization - Sept 29th, 2015

WHAT
Ian Shadden shows you how to setup interactions between Behavior Trees and AnimBlueprints to perform complex moves such as mantling over objects in the world. He will also cover general optimization techniques you can use to reduce the cost of your AI.

WHEN
Tuesday, Sept 29th @ 2:00PM-3:00PM ET - Countdown]

WHERE
www.twitch.tv/unrealengine

WHO
Ian Shadden - Sr Training Content Creator

Feel free to ask any questions on the topic in the thread below, and remember, while we try to give attention to all inquiries, it’s not always possible to answer everyone’s questions as they come up. This is especially true for off-topic requests, as it’s rather likely that we don’t have the appropriate person around to answer. Thanks for understanding!

Edit: The YouTube archive is now available here](https://www.youtube.com/watch?v=cFYk1tEgyGI)

Awesome stream topic, specifically optimizations.

[Question 1:]
I’m using alot of NULL Nav Modifier volumes to cull out alot of areas that I don’t want navmesh generated. I also place several “OBSTACLE” Nav modifiers to steer navigation from high cost areas. Is there a downfall to using many Nav modifier volumes? I figured the NULL volumes are helpful to reduce navmesh size.

[Question 2:]
Why can I rotate & shape Nav Modifier volumes to affect navmesh generation and not the Nav Mesh Bounds Volume itself? After developing with these volumes, it would be simplier to just change the shape and rotation of the Nav Mesh Bounds Volume to better fit my landscapes.

Thanks, can’t wait for the stream! =)

this may be out of scope, but say our AI is controlling a bunch of character enemies in a open world - how would EPIC optimize enemies that are far away? do you destroy them and re-create if you get close? do you hide them? I assume its not jsut the AI that consumes CPU - its the actual character

sounds great, we’ll be there :wink:

How do we use Gameplay Tasks and is it safe to use them or are they still in development?

Are you still planing on implementing navmeshes on moving platforms? Trello
or
Would it be possible to “bake” navmeshes offline and attach them to an actor as a component?
Thats more of a feature request

Thanks for the stream. Always love getting more AI insight.

[QUESTION 1]
Is it possible to time slice large numbers of AI through an AI manager and if so how would you do this?

[Question 2]
There is a performance cost of working in blueprints because of moving from the VM to code and back. Does this also apply to Behavior Trees?

Thanks for the nice stream, so here a few more question which were not answered in the stream (for Ian or anyone else who wants to answer them):

  1. I saw this in Trello:

I guess it will be in 4.10? How does it compare to the old RVO avoidance and to the detour crowd avoidance? What are the benefits of the new RVO2? When to use which one?

  1. Question from Hag_Nasty which was not answered on the stream:
  1. And maybe this one too from HeadClot:

Heya John,

  1. Unknown release time, or changes being made to the system, Lukasz may know I’ll ping him and get back to you.

  2. I think it’d all be manual. Like trace down along the character’s side, if nothing there then turn off avoidance, they’ll then plow straight toward their goal. I was hoping you could set the RVO weight in BP, but you can only get it. Or you create a new nav modifier that increases the cost to enter it, then place volumes around the cliff sides. That way they can still move towards the edge if they are told to do so, but won’t move through it unless they have to.

  3. I’d use a “Command AI” actor + AI controller that would store the over all health of the horde and general direction of the horde. Then it’s all about passing data up to it so it can make choices for the horde. It could be as simple as “Command AI’s health is = to the number of zombies in it’s horde. So just store an array of zombies it controls, length of array = health,” or you could give it an actual health = total zombie health, and when the zombies take damage they call up to their “Command AI” reducing it’s health. In either system, when a zombie dies it removes itself from the array of controlled zombies from the “Command AI”. And remember, you can plug an array of Actors into an Interface Message node, so no need to manually “for each” a message to the controlled zombies. Ultimately, it depends on what you want the “Command AI” to handle.

Heard back from Lukasz: Core stuff will remain the same, however the algorithm is changing to ORCA, and they’d like to do nav mesh edge detection.

Hi Ian,
Sry I am late, but due to my slow internet connection I cannot participate in the livestreams, and I have to watch the YouTube replay.
I’ve just watched the AI stream, great job!
I have a small question I was hoping you might help me with.
I would like to know how can I do the following in blueprints and the Behavior Tree.
The player has different states that are placed in an enumeration :
states
{
walking
running
attacking
attacked
sleeping
}
I want a classical switch-case scenario in the behavior tree, where each case corresponds to a state and has its corresponding Tasks.
The way I was implementing this, is having for each state a bool value in the blackboard, and each time I change the AI state I have to set all the other bool variables to false, except for the one I am using. Then select the corresponding task by using a blackboard based condition decorator.
Is there a switch decorator?
I know there is a simpler way to implement this, and I would appreciate your help.
Thank you

Hi Jeff,

would it be possible to make the project available to have a deeper look at that first behavior three(it’s huge :slight_smile: )?

Hi Epic,

It would be really cool if we could get this project, it’s years old now. At the very least could we see the behavior tree? I think this should be in the learning tab by now. Please, it would be helpful.

I’m still hoping this project can be made available for others to learn from. Advanced AI training is quite sparse so please! If you can release it that would be awesome!