#gameplay-ai
1 messages ยท Page 163 of 1
blame the gnomes
damn gnomes
[2022.02.15-15.25.05:881][ 0]LogNavigation: Error: Navmesh bounds are too large! Limiting requested tiles count (1318688) to: (1048576)
All My Ai actors use navigation invokers, should I still worry about this?
Well presumably yes, since you've exceeded the maximum possible size for navmesh
There's presumably a hard limit on how many tiles you can have
It's not really an issue with invokers themselves
What should I do then? Are you supposed to have multiple navmeshes in large landscapes?
To my knowledge you can only have one navmesh per world, so unlikely
You probably need to dramatically decrease the density of the tiles, which will result in a more coarse mesh
But IIRC, the Kite Demo didn't have this problem - and it's terrain was something like 100 * 100 km in size.
mmm mine is just 16 km^2, and I haven't touched navmesh settings, I just dropped the volume in the world and modified its size.
Is there any way to force trigger On Target Perception Updated event just like Report Noise event but for AI Sight config? I know that there is Report Perception Event but I cant get it to work
Why do you need for that to happen?
The way it works with sight is that it only triggers an update when it either becomes visible or hidden
I have a character that is crouching in range of sight perception but AI doesnt do anything about it. I want for AI to react if the character stands up in this range
Ah, yeah I guess it would make sense for it to allow it for that kind of usage ๐ค
So I cant do it? Even if I somehow make a wrapper class around AI perception?
I don't know if there's a way to do it in blueprints by default, but there's probably some function to do so in C++
Yea it seems doable in C++, but i wanted to test it in blueprints first
If somebody else knows if it's possible or not, please tell me
Not strictly AI related, but I guess an adjacent area of Blueprints. I can't for the life of me figure out how to get this node to spit out correct points. It's always just registering as Not Valid.
I've got default Nav Mesh settings at the moment, do I need to change those perhaps?
For some context, this should move my player character through the points one by one (removing the 0 index one once it is within X distance of the player) and then perform something at the end of it.
Pretty much what im doing aswell ^ took a while to get it right
So the return value from the find path node is not valid?
And if not are you sure the location(s) are reachable ?
Ahh, glad I'm along the right track (or path ๐คฃ) then!
Yeah, so I'm using a simple example (flat ground, and the actor is only a few meters away, no obstacles. The return node seems to always be invalid, but I have no idea why ๐
๐
Just to get rid of the basic, surely you do have a nav mesh?
Of course ๐
One thing I found, but this was a while ago so my memory might be playing tricks, was that it can fail if your start point is too far off the ground.. I guess it can't project to the navmesh first or something
some people forget that the player position is off the ground.. cos its in the center of the capsule
yeah it doesnt take very far above to make it stop working
you could trace down to get the initial location if you dont care about the initial offset
I just keep messing up my navmesh settings so it becomes very... flat .. annoying
oddly satisfying when they start moving tho ๐
Aha! Thank you both - It turns out it was a height-from-ground issue. I just threw a scene component at the character's feet and used that as the source location. My setup still doesn't work, but it's at least returning points now. ๐
Just need to figure out why no movement input seems to be added now ๐
You gonna simulate some player input movement or straight up interps ?
That was the plan yeah, just Movement Input towards the direction of each point. No idea why that doesn't seem to work so far, but I assume it's either a replication issue, or the direction calculation is wrong ๐
hellooooo it's me again, this time i found a bug, so what is the supposed to do, it's supposed to change the speed for exemple, if it's sees the player the speed is set to 350, if it's patroling then 150, the AI is working normally but when chasing the speed sticks at 150, and i found out that if i start with the 2nd sublevel loaded this doesn't happen, and if just do with level streaming this happens
any ideas?
oh and i've checked the enemy ai, the enemy, the behavior tree, everything, it works, and for some reason this AI is refusing to work
Well, that error showing you have a none seems to suggest that something wasn't spawned or hooked up after spawning
It sounds like you've got something in the world in your second sublevel, which you should probably move to a persistant level
My advice is to always draw debug arrows and lines and such for if you get something like this, at least then you can rule out dodgy maths. So I draw a line in the direction of movement for instance.
That way if my line is pointing in the wrong direction, at least I know it
There is a property debug editor plugin on marketplace
Totally recommended for those things
Its kinda clunky but works
Property debug editor? weird
Seems legit though
blueprint?? whaaat?
Oh, its C++, thank god
Yeah, I saw that
Looks fine, but I'd expect some issues with optimization at first glance
You'd think they'd adress that in the sales pitch
"This doesn't suck performance like the CMC" ๐
So it probably sucks performance like the CMC
Is any event fired when an agent is pushed out of the navmesh (like when pushed out by RVO or similar)?
How do people usually implement "squad sight" sensing?
My AI characters are grouped into "squads" (actor) with commands being sent to squad and delegated to characters.
Characters have vision cones.
If UnitA does not see the Enemy directly (via LOS) unit but UnitB of same squad sees it - I need to somehow propagate "shared" vision in order for example implement things like UnitA throws a bomb towards enemy instead of trying to shoot it
Hey guys does anybody know a way on how to change a bool when the player is out of the pawn sensing ?
Seems you would have some kind of shared source of truth for them which they can access to get that kind of info
I would notify the group actor first and act based on that
@unreal lodge unsure about pawn sensing since it's generally suggested you should use AI Perception instead. With AI Perception and using the Sight sense, it will give you a successfully sensed value of false when a sensed actor becomes hidden
I dont think so
I know some people check if agent is stuck or not on Tick
by incrementing a float by deltatime when agent is stuck. if it reaches a threshold they count ai as stuck
the problem is that i somehow need to integrate it with default sensing system.
currently trying to have a custom sight sense that is aware of squad actor and tries to share data via it
idk if it works
๐ค
I mean when the character makes a decision on what to do you could just grab all the sense data and all the squad data and then make the decision based on those, instead of just based on all the sense data
I would imagine you'd just replace current "last seen data" with the squads data and act on that
As the squad members who are notified and has not seen the "enemy" doesnt actually know where the enemy is beyond being told that the last seen location is X
What I would do:
-> On pawn sensing, just notify the group actor and store the data there
-> Process the data in group, decide what to do and respond back to all group members via tags or enums that drives the state of the AI
Yeah something like that could work depending on how it's intended to work
pretty much final task is: despite not having direct LOS squadee should be able to use some weapons to attack the enemy that another squadee able to see.
i personally don't like it as i feel like AI is cheating but task is task
Hmm
Yeah I think it depends on how it affects gameplay
If it's for occasional support actions it might be okay, eg. if the player is moving a lot and there's a grenade flying in, that shouldn't affect it much
yeah that sounds pretty bad lol
my fps project has hitscanners who react pretty fast, but they have an inaccuracy factor based on player speed so they would miss most of the time if you're not standing still :D
also was playing around GetFocalPointOnActor, trying to build a system for AI to pick where to shoot. otherwise they always aim at head (current setup) and miss a lot
but that is a story for later
was thinking either using sockets to mark aiming spots or smth similar
at least in my fps it feels best when they aim somewhere around the camera, because it makes the tracer effects and such behave in a way that makes sense to the player
yea, mine is 3rd person
ah
center torso would probably make sense then since it won't matter so much for the perspective ๐ค
might need to tweak it if the player is in cover or crouched if it makes them hit the obstacle the player is behind instead
@shadow python I have not tried to set this up yet, but my hope is to build a custom hearing setup that periodically raises events from the position of the AI who sees the target, but with the sense data actually carrying the target's position info. Any other AI might be able to hear these phantom updates from the other AI and get low scoring sound-like updates on the target's position. I don't know if the built in system is flexible enough to do this as-is though...
hm, it looked possible to use UAIPerceptionSystem to send out custom FAISightEvents
and somehow listen to them in squad actor
well, will think of it tomorrow
In my controllerAI class iam overriding the CanBeSeenFrom method from the AISightTargetInterface
virtual bool CanBeSeenFrom(const FVector& ObserverLocation,
FVector& OutSeenLocation,
int32& NumberOfLoSChecksPerformed,
float& OutSightStrength,
const AActor* IgnoreActor = nullptr,
const bool* bWasVisible = nullptr,
int32* UserData = nullptr) const override;
I have implemented the method, but I cannot make it to start executing. My controller uses an AIPerception component, as well as the player an AI Stimuli source. The default AI perception sight works, but not the overridden one. Is this function registered somewhere within the AI perception component or it runs by default ?
I have a squad actor that has references to squadmembers (squadmembercomponent's register themselves with a squad). I use an FMessageEndpoint to transmit messages between squad members and squads and vice versa
When an agent percieves an potential enemy threat, the sensing agent posts to the message queue and the squad actor then propagates that to the squad (imagine the squad member getting on the radio and saying something to that effect)
So the squad members have local memory and the squad actor has the shared memory basically
Ideally most of this would be done via a blackboard (which is really what this is), but UE's version of BB's is a bit.. crap ๐
nice, will think about it / try out
<@&213101288538374145>
:no_entry_sign: clifro#8164 was banned.
โค๏ธ
Huge Update !! List of updates Includes but is not limited to :
Added New Companion, Added New Beast , Completed Zombies, Added New Death FX, Refined Flying added New flying FX, Removed Collision glitches, Added Wing pack and Wings!, Refined spawn Blueprint. Reworked lighting, NEW Outdoor area started .Lots of code cleaning...Yawn.. Re worked w...
Hi, Can anyone help me with this problem please? My AI Character chases the player but when it gets in range it does not do the attack animation.
https://blueprintue.com/blueprint/nonid-yx/ this is the melee attack ai task
and this is the tree
It seems to just stay in the left hand sequence and does not move to the right one when the player is nearer than 110f
I don't know if it matters but you have stop all montages activated? Also I don't know much about AI but have you tried putting the meleeattack in the same sequence, sorry I'm new to this as well and am trying to get hp with my AI as well ๐
how to check if the player did not leave the Nav MeshBounds Volume ?
when the player leaves NavMeshBoundsVolume, the AI โโwill return to e.g. patrol
could anyone help me with solving a problem I am having with my AI?
Guys, there is a way to run the EQS on blueprint? I've tried here to get the point scored, but it just give me all the points instead of the winner one.
like this. I just want to know the winner location, now all locations.
are navlink proxy "smart link" broken?
no matter what i do im not getting the event fired
like this
yeah but this will get the index of the array. So the index 0 will be the winner?
if you search for "the single best item" then yes, i believe it should
as the array should only have one item in it
awesome. Will try that out. Thank you
yeah...smart links are so broken
randomly started to work
stop, play again and it's not triggering again
Have you checked that you're properly setting AttackRange value?
You're best off just asking.. but don't expect a quick response and BE SPECIFIC in your question.. not just "MY AI DOESN'T WORK HELP" ๐
What would cause a spawned enemy behaviour tree not to work? It works when i drag the BP_enemy from the content browser to the world but when i use the Level Blueprint to spawn 20 of them in a 10000 radius from the player they spawn but just stand there instead of walking towards the player. ? :S
Have you tried the AI debugger?
seems like that would tell you
Also, I assume getrandompoint gets a point on the surface of the navmesh, so you want to offset it by half the capsule height of the character to spawn?
Sorry i was being duumb i forgot to set the movement speed of the enemys so they all had 0 movement speed DOH!.
thank you for the help.
Does anyone have an idea how to stack area classes with some control over it? It seems taht the last updated area class counts (I'm not sure about that tough) but what if I need some sort of priorities, like one obstacle is more important than the other one
Doesn't it use a flags based system? I vaguely recall that the classes were OR'd together?
I don't know anything about the flags in area class honestly, but I've just found a solution that works for me
https://forums.unrealengine.com/t/having-problems-with-overlapping-nav-modifiers/395147/2
You can enable ares "sorting" in Project Settings > Navigation Mesh > Sort Navigation Areas by Cost. Once enabled the navmesh generator will sort areas to be applied based on their cost making sure the most expensive areas end up on top. Of course this is not always what you want, so you can override the function that does the actual sorting, AR...
How do I make AI noticing Blueprint ACTORS? ( I am using BP_AI )
My day rate for consultancy is ยฃ800 I'd be happy to help
ยฃ400 for half day, or ยฃ700 a day for contracts greater than 6 months
(I'm only partly kidding)
I'll match that with a 10% discount^
pfft, too cheap
I think my cheapest ever was 600 quid a day, but that was for a 9 month gig
for a court case.. it wasn't fun
Apparently im way to cheap ๐
I should start doing that
Anyone wrote a better version of rotate towards BB target by any chance?
Also how do you make black board blueprint tasks tick?
Better how?
they tick on their own when active?!
They dont seem to be default
seems you need to make them tick in c++
btw anyone used EQS before?
having trouble passing it paramaters
I'm having a problem which I hope I'm overthinking. I am spawning characters in in waves, but with regular navigation movement they all run in a straight line towards to goal. I've added EQS which made things better by defining some conditions and top 5% match, but I still can't think of a way to define my cone of points along the perfect path such that deviation exists and is a little more random (spread out in relation to the perfect path), but still traveling toward the goal.
In other words, EQS is still selecting points that are behind or not along the direction of the path to destination. Not to mention they bunch up, even if I use the crowd ai controller base class
either group formations or RVO?
Hi, so I have an npc that follows a specific path, but I want the npc to walk instead of run when the npc doesn't see the player. I wanted to know if I could get some help with this because a couple of tutorials that I looked up are outdated or don't work. I'm using behavior tree, and in a tutorial, I was following, I wasn't getting the blueprints like the person in the video was getting, so I'm hoping I can get some help with this.
"cast to npc - get character movement component - set max walk speed"?
Doesn't do anything npc still runs when it doesn't see the player.
@remote depot should work... Either "owner actor" isnt the right actor or "npc speed" isnt being set correctly. Use "print string" to try make sure
oh wait Npc speed is just a variable in the bp? it should be blackboard set
It was float because from what I saw it had to be float but ill change it.
what do I do with the second loop?
second loop?
When i changed it to blackboard this happened
@remote depot to use blackboard variables (which is what behavior trees mostly do) you have to use "get blackboard value" and "set blackboard value"
like this
What you can do, is have an actor "AI goal target" that is just an empty actor.. spawn one of those in when you select a point to move to, then in your EQS for the next point selection, you should add filters that score on avoiding nearby "AI goal target" points
And of course you need some logic to clean up the goal target points
That way, you bias away from positions where someone else is already moving to
The AI goal target can just delete itself after a few seconds or something
Part of the problem is that without shared blackboards, you can't feasibly avoid having other world entities to be able to denote where each agent is chosen to move to, if the BB was properly setup, we'd just store our "move to target point" into the shared BB and be good
how is it that even if BT node (be it task or service or decorator) is not instanced it persists its own UPROPERTY parameters across every node in BTs but regular private fields are not guaranteed not to be overwritten by the same BT node in another BT component instance? ๐ค
Does anyone know any good example projects using behavior trees? I've looked at the Action RPG which is nice as it also uses GAS
The more complex the better
First person shooter example?
I mean, its not a great example, but it uses BT's if I recall
how do you implement rotation animations for AI? Not sure how to send the rotation direction to the anim BP
well I have used a rotator in my pawn that was called "desired rotation" and then the anim blueprint handled the rest
I didn't orient pawn to movement or anything
or maybe I did rotate it but the skeletal mesh didn't, can't remember ๐
isn't that more of a question for the animation state machine?
I imagine that AI and player handle animations the same or similar
So I fixed the issue but when I connected it to my bt the ai does chase the player but when it doesn't see the player anymore it goes back to point 0 and stands there instead of walking. But also where do I plug the blueprint in?
Does unreal have a built in faction system? I thought I saw something somewhere
Oh yeah they're called teams
Not really exposed to BP's but it is there yeah
remind me is there a way to run dynamic behavior with a blackboard that doesnt match root BT BB?
or if dynamic BT`s BB is inherited from root BT BB
pretty sure the BB has to match always
i wonder if epics have plans on AI framework improvements in UE5 ๐ค
How do I get sharper nav mesh?
Change the navmesh settings in the project settings and regenerate it
Most of them should be somewhat self-explanatory, I think for example if you reduce polygon size it'll make the mesh more detailed since it can represent the geometry of the level better
Yea fix it, it was on a weird settings
Thxs
Hello guys, I want my enemy look me in all axis (Like Z axis). I use "SetFocus" funciton in blueprint task into behavior tree. But just work in X axis. When I go top of the stairs. Enemy don't look me up in Z axis. Thanks in advance.
You really don't want that though.. better to aim the character yourself.. setfocus is so that the capsule faces the right direction
if you start tilting your collision capsule, you're in for a world of hurt ๐
and possibly gimbal lock ๐
Hey guys, I think Im misundersdtanding how this works
Would anyone know, maybe?
I want the enemy to finish the 500 loops, but instead whenever it reaches the moveto location it quits this branch
I put the simple parallel on delayed
Has anyone used the prediction sense? I can't figure out what its for
I understand that sight, hearing, touch, damage can act as stimuli. Prediction seems like a weird one
I vaguely recall it can predict other actor's movement in some fashion but I haven't used it
I'd imagine it's basically just using the known speed and direction of the actor to predict where it will be after a certain duration
Yeah but how is that a sense. Seems more like a calculation you'd do after sensing an actor
I guess so ๐ค
Yeah, its definitely a velocity predictor, I guess its so you can aim at future positions when losing sight sense of an enemy
Is this the right chat for a lost student to ask what on earth a blackboard is for?
Probably just something they needed for Paragon
its for covering with chalk?
badumtish!
Yes, this is the right place
our teacher is kinda...well...not really good at teaching
awww.. poor guy ๐
and I'm so lost with his assignments
hehehe
go on then, hit us with your question ๐
I have an object that has to follow a path
made from target points
If this were unity I'd have no problem to make this behaviour but I'm completely blank when it comes to making sense of event graphs, blackboards, services, and how they all interact with eachother
what's the difference between a BT Service and a regular Blueprint?
Have you had a look at any one of the thousands of tutorials on this kind of stuff? whats the thing thats confusing you?
Ok, so a BT service is a specific kind of code that is executed at a specified frequency as part of a behaviour tree
its kind of like a blueprint, but its only run within the context of a behaviour tree and can run at different update rates depending on what you set it to on the behaviour tree as you create it
so a BT service might run once every minute for instance
you don't HAVE to have BT services btw..
Haven't been watching tutorials ngl, Unreal Engine is one of my classes and just to show how lost I am I don't even know what to look for
a blueprint is the graph based language used as scripting language in UE
well, you should avail yourself of learn.unrealengine.com at the least.. official Epic tutorials and all
okay
theres like 8 hours of learning path to do ๐
I might just do that
I recommend starting there
if you're new to Unreal Engine in general
there's a lot of dodgy tutorials out there on YouTube
our teacher probably wants to impose his method of doing things but at this point I just want to survive the semester tbh
and some people are kind of screwed because they learn bad habits from poor tutorials by people who don't know better
I'm all for teachers imposing methods ๐ (I teach at a University, so I'm biased)
YouTube is a bit of a mix.. some truly excellent tutorials out there, but some really terrible ones too
several really popular ones are REALLY bad
so I'd start with the Epic ones first
so you can at least start to evaluate the quality for yourself
Yeah, I love programming in C# and Java and I'd have no problem picking up best practices for those applications, but I'm completely lost
nodes lose me
I just can't get them to click
hahaha
Just remember that Unreal Engine is a huuuuuge beast, so you'll not get it without a lot of graft
And yeah, I hear you about nodes, its a bit of a love hate thing ๐
But
Try and think of the node editing as a sort of way to ease people into using C++ ๐
although, Epic did have plans to replace blueprint with a real scripting language.. not sure if that's still happening
shouldn't it be easier? I thought the whole point of them is to make programming more intuitive but I'ts like....really not for me
programmers who've written like language code? not so much
I'm still frustrated about how I can't get them to make sense to me
You could always go the whole hog and learn C++ and come over to the dark side ๐
If you're from Unity, the main thing is to learn the similar patterns of naming.. so for instance onBeginPlay = onStart in Unity, Actor in UE = GameObject in Unity ... that kind of thing
yeah
They're pretty similar once you get that bit
something else I dislike is how specialized everything is
specialized?
in unity, everything is a blank object with stuff attached to it, Unreal has things like the player is a Player, and the enemy is a Pawn
Oh that.. yeah, the gameframework stuff.. is not my cup of tea either ๐
Its basically just sort of prefabs though, whats that Unity one for FPS? FPSsomething...
Pawn is just a special class of actor that can be possessed by players or AI
In Unreal, Actors are basically your GameObject equivalent
Think of Characters as prefab types of Actor
Vehicles are also sort of prefab actors
Now don't get me started on how crappy Unreal Engine naming is.. Actor?? wtf ๐
Uh in unity you have empty game objects and the specialization comes in the form of components like scripts, colliders and FPS Player Controllers
BUT.. Unreal has a huge amount of functionality by default.. its kind of where it differs from Unity.. Unity is like a patchwork of things at this point
Personally, I hate both of them for different reasons ๐
Well, its like 1.5 million lines of code at this point. You're not going to understand it all quickly
I hate Unity because it has a lot of unnecessary libraries that can slow down a game
I know guys at Epic who don't understand most of it and they're writing it
dang
For most game jobs, you don't need to understand everything, that's the reality
Do you mind if I msg or @ you if I run into any questions?
totally fine if you don't want that tho
I'm around here most of the time, so feel free to
just don't expect a response super quick all the time.. and sometimes I'm incognito so my students don't hound me ๐
But the people who hang around here respond well to people who try stuff first ๐
yeah
So if you have an issue, show what you've done and try and be specific about problems if you want a reponse
okay
Most "I can't make AI work" don't get a lot of love
yeah
which to be fair, is like 70% of questions here ๐
Idk most of my questions as of now are very basic "What on earth is this" I don't feel comfortable placing nodes down in the dark
on the subject of blackboards though.. to your original question. They're just places to hold arbitrary data.. in UE they're a bit limited but provide an interface between your blueprint and the behaviour tree code (and are fed by the blueprint)
gosh darn it like when I can't find a node because it's not being spawned from the right output node
kinda like how a...singleton or a static class with an array in it works?
you can use the node pallette on the right hand side of the screen usually.. or turn off "context sensitive" checkbox and type it in search
Its more like.. a sort of big collection of data that you can pass to the behaviour tree,
they're called blackboards because you can just write whatever you want into them (at least traditional implementations), in UE they're a bit more limited to UE types etc.
so say I want to fire at a location in space, I could write an entry to the blackboard and in my behaviour tree, I could refer to that entry and it would have my AI fire at that point
or I could write a floating point value which is say my health into the blackboard and the behavoir would change when that value went below a threshold
so its like a C# dictionary
okay
its actually a little bit weird really.. because the code does lots of strange things to lay the data out in memory.. presumably trying to be efficient
I think it was coded before they had blueprints finished.. because it feels pretty limited in comparison to blueprint variables
hmmm
I've been told they didn't just go with having blueprint variables because they weren't fast enough (due to having to look them up) but I don't buy that ๐
are they still developing blueprints
Anyway, point is, blackboards as a concept are pretty simple, just data container for whatever you want ๐
I see
Well, last I heard they were developing a scripting language replacement for blueprints.. so I guess not much?
But.. there's loads of other editors in the engine that are kind of like blueprints
like the animation graphs
and the sound graphs
and the control rig graphs
so.. learning it can be useful
Yeah, it all looks like substance designer x3
Yep!
graphs are love ๐
most of my work involves graphs of various forms
and Unreal Engine is cool for creating graph editors if you're doing C++ stuff
hence loads of graphs in Unreal ๐
Unity has similar stuff now too, since shadergraph
Can anyone explain MaxActiveAge from the AIPerceptionComponent? I think I understand what it means, but I want a second opinoin
If I remember rightly, its how long to count down before a positive response is forgotten?
I cant remember if it counts down, or counts up.. but a sense is considered as long as its active and a little while after.. presumably to allow for some wiggle room.. so it doesn't spam sight/notsight/sight changes
So you still sense the sense for a while after the sense is not really sensed, which is settable in the config
unless I'm thinking of another value of course, its been a while
Is there a way to even debug blackboards?
yes, use the AI debugger
I'm hitting play but my object keeps moving to the same target point
then it shows you whats in the blackboard and the current behaviour tree
I'll look for that
@ocean wren thanks, that's what I was thinking too.
okay, what on earth is this
I'm going to assume it means bad xDDD
Here's where Im trying to change the blackboard key
The object is a TargetPoint
Right, but what TYPE of thing is that?
Object is different to Actor is different to location ๐
well, you'll have a blueprint somewhere in your project called TargetPoint ๐
and I assume somewhere in your world you've got a bunch of targetpoints ๐
I don't have one, I think I just looked up the object I wanted to access and set the type to that
That's how our teacher's been doing everything
3 points
oh!
lol I'm an idiot
It works now
I wasn't calling the custom event ;m;
๐
I'm quite worried however, your reply suggests this way of doing things isn't what you would call a "Usual" or "Good" practice
Naah, its fine
its probably not what you'd do for real world AI stuff, but for testing its fine
usually we'd have stuff like splines for paths and EQS queries for selecting points and whatnot.. but you have to get the basics first
I normally write my own little custom classes for things like patrol routes so I can write custom editors for making things like different percentage probabilities for taking a route etc.. but its pretty much the same kind of thing, just looking up data on objects
Anyone familiar with creating custom UAISense? This is the reference I've been using, https://www.orfeasel.com/creating-custom-ai-senses/, but I'm getting an error when it goes to register the stimulus since the Stimulus.Type (which is the SenseID) is '2' (something I don't set) but the array MaxActiveAge size is 2, which causes an "index out of array size" error. If anyone has any guides or links that explain the whole Sense & perception system, it would be much appreciated. I'll continue to grub through the class in the meantime.
how do I check if the AI can reach the player using pathfinding? I want to abort movement if it cannot
Do an EQS query and test it?
wait how?
I mean pathfinding
Specifically the pathfinding tests: https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/EQS/EQSNodeReference/EQSNodeReferenceTests/
I know what it is
I the AI to stop trying to chase the player if he is on another platform the AI cannot reach
and resume when back in range
Found it
I have a task with this in it. How do I abort it in this case?
Usually it would not be that hard but I am trying to use continuous goal tracking
Eqs ran async did it not ?
it does I think
I see there's trace options. Would i be able to set a sequence of traces based on a pathresult?
Is it eqs material at all?
I mean if all you need to check is whether the player is reachable, it seems much easier to use the is reachable node or whatever it was called
Its more than just that :p
Its my landscape traces
For 'perfect' interpolated movement
Just wondering if it can be moved to the eqs to utilize more threads / cores instead of the gamethread handling it
is reachable?
yes, there's a node which can check if a point is reachable via navigation
any reference cannot find it
it's called is reachable or something similar I think
or maybe it's called find path to location since the C++ function is called that
I tried to use eqs to do it but it does not seem to be working
how expensive is it to run an eqs every tick?
Nvm I was causing a recursion and not calling finish execute
Quick question about nav mesh.
I have a pretty big open world map, so I am using navigation invokers. I made sure to do all the proper settings i've seen in tutorials like only generate nav meshes around invokers etc.
My navmesh covers my entire map, and doesn't generate anything on it's own. However it still uses up 2gb of memory without any of my invoker actors being in play. Is there a way to make it use less?
I'm confused
so you mean you use invokers but the navmesh is still generated in editor without any runtime generation?
and that it covers the whole level instead of what's around the invokers?
hi all, I think I'm missing something regarding EQS dot test
other tests seem to test in relation from generated items to a selected context
dot test only seems to take params for contexts? im not sure where the generated items play into this test
would appreciate any insight! thanks
"EnvQueryContext_Item" seems to be essentially a placeholder class in c++
ah did some searching and found an answer i think
bool UEnvQueryTest::IsContextPerItem(TSubclassOf<UEnvQueryContext> CheckContext) const
{
return CheckContext == UEnvQueryContext_Item::StaticClass();
} ``` it just does a class check and if its the item class it will do typical EQS item logic
@wary ivy It's not generating the navmesh as there are no highlighted areas around the map when I press P, those only happen when I spawn in an actor with an invoker. However even when none of those actors are present it is using up like 3gb of navigation memory
Make sure you give it the right query context
Thanks! I got it working ok ๐
I've got a struct for actor "knowledge" for things like "is dead" or "name"
My AI stores this struct in a map of actors it sees with the perception system.
I can get this struct when the AI perceives and stops perceiving an actor. But how can I update that information WHILE the AI is perceiving it? Currently my AI can only change their info based on events. So like if it goes to attack an actor that's dead first it checks "is dead?" Then updates its knowledge struct in that context.
But ideally the "die" event would trigger like a perception event that would tell all the AI perceiving the actor that it just died so that they could react accordingly
There's an event you can bind to on death.. you could hook that when you first add to your percieved actors list
I don't understand. The AI can identify a corpse immediately, I can already get the information struct whenever it starts or stops perceiving an actor. I think what I need is a perception-centered event. I could hook up some system where actors that perceive each other add themselves to an array of "ActorsPerceivingMe" but that seems clumsy. Like I'd already expect that functionality to be in the perception system
the perception system just provides "I've begun percieving" "I'm still percieving" and "I've ended percieving" notifications, so you're going to have to grab something else for death
I mean, it'll percieve the body for a bit too ๐
hey all! i'm having a few issues with implementing my AI. specifically, i'm trying to figure out how to properly utilize the perception system.
the first issue i'm running into is that i can't seem to debug the stimulus value in OnTargetPerceptionUpdated
any ideas what i'm doing wrong here? this might not be AI-related either, i'm fairly new to BP debugging, but in this case, neither watching the value nor hovering over the pin give me any useful information. even if i break the struct, i can't seem to debug its value ๐ค
how can I have an optional branch in sequence without forcing success on it? Like if there is a point to execute it - execute, but if the execution failed - abort the parent sequence
I know this is a silly question, but what are those graphs (the state machines) called again in UE? Blackboards or something?
You mean behavior trees?
Blackboard is a data storage method, at most simple level its just a TMap of Fnames and Anonymous datas (void*)
Its used as memory of the AI
are services expected to work on FinishWithResult-InProgress? Mine doesnt trigger breakpoints for some reason ๐ค
yeah for some reason it wasn't working with Simple Parallel
Hi. Is there a way to update navmesh when the AI is dead after ragdoll? so that it creates a barrier where the mesh is and the surrounding area. The alive AI will try to avoid the dead AI mesh that is dead or in ragdoll? Thank you
Maybe try looking into Navmesh Query Filters using modifier volumes
If I have navmesh generation set to dynamic in project settings and generating nav mesh only around navigation invokers, how can I make my NPC (which has navigation invoker component) to move on long distances on a big landscape? Like from one town to another. MoveTo just fails to build a path once the destination point is outside of NPCs navmesh generated around it. The only thing I can think of is generating some sort of waypoints and placing them on the roads but I'd really like something more generic to enable NPC to wander around in midway on some occasions
I dont think you'll get around waypoints in such scenario
Not sure I'd use the navmesh as the "main walk path" part
wdym? how else can I make an AI go to some location?
Well it's more work to get it up and running, but you can move it as you move the character,
Given a waypoint, input movement in relative direction
Following a spline is also an alternative
Nav invoker would still be on the AI, so it could react to external events and move away from the path for some duration/distance
never thought of this, thx
Ive also seen some baked navigation plugins which could be an alternative for long routes between towns
Not mine, never tried it, so dont hold me responsible x)
Anyone got any hot tips/insights for AI character's strafing around the player in a third person melee game?
Been trying out a few different approaches and refining each time by taking bits from each approach, but wondering if someone's got any wisdom to share.
For example, some approaches include
- Using EQS with a donut generated around the player to find a suitable location. (Good awareness of environment and allies)
- Using Add Movement Input to the left or right (issue of not "slowing down" without implementing some sort of "cool off" that interpolates the input value. No awareness of environment or allies).
Yea that would not be a straightforward thing to implement
I'd create a subsystem for that
If you are not in C++, it would be an actor
use EQS + store locations, use a tmap
have a data struct, 'assing/bind' enemy characters to that locations
and hold that 'assignee' data in the struct
if player moves, or if X amount of time passes re calculate the positions and data
also
there is a good 'grid' implementation in for those things
check game ai pro 360 book (its free)
so, UE5 Preview is out and AI notes look interesting
StateTree. A general-purpose hierarchical state machine that combines the Selectors from behavior trees with States and Transitions from state machines. Users can create highly performant logic that stays flexible and organized.
now we just need some training material about how to properly use the new system
This is something Iโm also trying to do. Iโve found that an NPC with an invoker on can move to and generate a path to a town in the distance by spawning or turning on the invoker at the next town as the point. It seems to work ok. Iโm trying to solve the same thing
Can you send a link? I couldnt find it in notes
i've been inventing a fucking wheel for a stateful and polymorphic AI for the last few month and now they just drop this
๐ ๐ซ
Its an old school state machine system
Very old school afaik
Not like the anim bp's state machines
can't be worse than Behavior Trees in UE4 ๐
They mention the high level of performance you get with this. So the intention seems for it to be used when you want lower fidelity simulation.
I would like to clear a blackboard value for CanSeeTarget if the AI can no longer see the target. What is the best way to do this? Setting it when the target is seen is easy, because that is in the AI perception. When do you unset it?
Same way as you set it, when AI perception says it's no longer visible
Yeah and probably reason its 'StateTree' , it will be a nice tool to switch between simulation quality
States would be great for this
should be handy when making Doom clone ๐
So invoking nav gen far away allows it to path to it ? Sounds .. surprising ๐ค
Honesty, Iโm not certain but seems to so far? I mean it shouldnโt because there isnโt a generated navmesh. But mine seems to! Try it too and please do feel free to DM or @ me
Wouldnt it also mean a wsste of resources ?
As in the nav mesh is generated the entire way over to x town, while player has no chance of seeing this anyways
Faking movement with some interpolated waypoints for that duration sounds.. cheaper
Yeah that is true @misty gale . Can do the fake navigation when not near the player and just make the invoker big around the player. I guess if they are travelling far away and its far from the player then they can do the waypoints thing. I was also hoping to do it to generate patrols around that might not necessarily be in the generated mesh
I just imagined 10-15 npcs going in each direction and before you know it you're effectively holding a navpath equal to 10% of the world ^^
Hi people can someone suggets some AI pack for enemies, i mean a good one
I saw a SQEENIX presentation where they basically used a bunch of EQS queries for that, looked pretty good.. just doing rings around player and dot product checks and biasing away from other AI etc.. a mix of EQS shenanigans basically
Great shout, forgot about that book series (I've got them all downloaded from last year, just found out there is a new 4th book too!)
Don't suppose you remember the book/chapter off the top of your head? No worries if not, just a lot of chapters to search through haha
Edit: Nevermind, just found something promising with Chapter 28 of the first book (Beyond the Kung-Fu circle...) initial skim reading talks about the Belgian grid system which sounds like exactly what you mentioned ๐ Cheers for reminding me about this book series!
Ah yeah, not far from what I'm near enough doing already (ring around target, dot product check, distance bias based on querier + target). Just need to add in some bias based on other AI probably.
Don't suppose you remember the presentation? Was it a GDC talk or something?
It was at an aiGameDev.com thing in paris I think
we did manage to track down a japanese version of the same thing in this channel a while ago if anyone remembers it
Unfortunately, its in japanese in that version
It was by Eric Johnson the one I saw
Ah, but Eric did do a thing for GameAIPro 3 ๐
There you go, the japanese version
https://www.youtube.com/watch?v=BV2GTGbSjq8
ในใฏใฆใงใขใปใจใใใฏในใใจใชใใฏใปใธใงใณใฝใณ ๆงใซใใใปใใทใงใณใงใใ
Thanks ๐
It was a cool presentation ๐
Probably a tad more useful if you know japanese ๐
Something like this EQS stack: https://youtu.be/BV2GTGbSjq8?t=2144
ในใฏใฆใงใขใปใจใใใฏในใใจใชใใฏใปใธใงใณใฝใณ ๆงใซใใใปใใทใงใณใงใใ
Yeah, sadly I do not know japanese so I can't understand what he is saying, but luckily the texts can be translated using google lens ๐
it is a very cool talk tho
Many thanks for the links, although I can't understand Japanese I'm sure I can have a quick browse and see if I can pick up a thing or 2 from the visuals!
Funny enough @ocean wren - I've just been doing research into influence maps (I've been meaning to write a system for a while) and came across some old YouTube videos of yours! Were your influence maps you were working on simply 2D grids? I can see the there doesn't appear to be "filling" on the ground below the angled plane in your August 2017 video
I did a bit of both, its mainly just sampling the world as you say in a regular grid
I was mainly just reproducing what they did for dishonored 2
and playing with Unreal
There's lots of fun to be had in influence maps
Yeah I saw - There's a Chapter on Dishonored 2's approach in the latest edition of Game AI Pro (Chapter 6) Which I need to read
My main interest is how the may handle overlapping (from a top down perspective) 2d planes (if at all). For example, an upstairs grid over the top of a downstairs grid. Obviously need to have some concept of Z height in the grid, and not simply give 2D coordinates to cells
There's a good GDC talk by the guys too, worth a watch
I'll definitely see if it's available - one of the free to access GDC talks?
yeah, you can sample the space into the grid. I added layers of grids anyway because its useful for a lot of things, pretty sure I had a layer stack in the end
yeah, its up on youtube
In this 2017 GDC session, Arkane Studios' Laurent Couvidou and Xavier Sadoulet explain how the AI of Dishonored 2 was designed for a variety of systems including coordination of multiple NPCs, spatial reasoning for stealth and search, and a data-driven rule system for dialog and animations.
Register for GDC: https://ubm.io/2yWXW38
Join the GDC...
Bout halfway through is the influence stuff
Awesome ๐ beat me to searching for it, you absolute star โญ
Yeah you definitely mentioned having layers in your maps in your YouTube video (or at least the intention to eventually)
I was experimenting with different ways to represent it, ended up very similar to the Dishonored 2 approach
If I recall, there's a guy on here called glassbeaver that did a really nice influence map system that was multithreaded and whatnot, worth a look
I've seen glass beaver pop up in many a conversation in the past - I'll definitely have a check through the history of this Discord, thanks!
Love this approach btw, looping through the navmesh faces and storing the ID of the face with the XY coordinate of the cell, very clever. I shall continue watching!
what command to crash an game made in UE4 on purpose
theres console command isn't there
Is there a way in C++ to project to a specific layer/tile/set of polys on the Navmesh?
For example, if I know I'm looking at a multi-layer navmesh, can I ensure that (with the layer known in advance) I'm only projecting onto the given layer/polys in that layer/tile (if I know the tile).
Hey, does anyone know how to make the Detour Crowd system work with regular pawns, not Characters?
I notice that with a regular AIController, the nav path is correct, and with the DetourCrowdAIController, it's a straight line.
Normal AIController
DetourCrowdAIController
btw, in case somebody hasn't noticed, you can now have concave nav area modifier volumes
in UE 5
why can it be that scoring doesnt work for EQS distance test? it scores everything to zero ๐ค
wait i got it
I like how BT denies the existence of your custom composite and call it "unknown composite"
Sounds like there's some kind of error in it somewhere if so :P
Hi someone can suggest an AI pack? A good one
Why can it be that the SelectedKeyType is empty for a FBlackboardKeySelector even though the key is selected in BT and it even has an assigned name ๐ค
what do you know. you have to actually override InitializeFromAsset to access that one
i wonder if ue4 AI is the most undocumented and unintuitive part of unreal
Quite possible
Naah, you should see blueprint internals ๐
thar be dragons!
and lots of weird thunking
Sup guys?
someone should make tutorials about new AI stuff in UE5 ๐
pffft, it feels like we should just freestyle it like we always have ๐
I enjoyed watching your AI tutorials though
I might be making some more videos about ML and UE soon
trying to get some free time from other commitments to sort out a recording schedule
SO on that note.. if anyone has any interesting ideas for applying machine learning to Unreal Engine in whatever form.. let me know
Keep us updated!
I'm going to be putting a thing on the marketplace to generate voiceover lines in different languages for localisation soon, might do a tutorial about making that kind of plugin
I figure doing cloud based ML from UE might be a fun little thing
I'll be doing a series about my research (machine learning based co-creative recommender systems for PCG)
UE5 has the new MassAI system in it now right?
I saw Mikko was doing some posts about some path corridor stuff he was working on
I was hoping they'd do a big release of the metahumans with more clothing soon ๐
Got a link for your channel?:)
Would be interesting to see the contents of it
Perhaps there is some cherrys to pick ๐
Hey all!
VFX artist here trying to set up some simple AI behaviors, and I'm hitting a wall I can't seem to pin down.
The short of it is, what I've tried before, and the set up in this pic, doesn't seem to actually be sending the perceived actor to the BB key. I've been following the deer tutorial, for a trial UE5 project I'm working on. The pic, however, was me trying to test this in 4.25 , just in case UE5 was having some hiccups.
But, as much as I've been checking into, debugging, spell checking, etc, I can't seem to see the "target actor" key show up as anything but "none", even though my AI perception is printing the player correctly, which in turn, never triggers the branch.
Wondering if there are some common "gotcha" problems people run into, or something that jumps out at anyone. I also wanted to make sure I'm understanding something correctly, which is if the "Set value as object" key name input, is that looking for a BB key with the same name, and establishing the communication? Or am I misunderstanding something there, and this isn't actually speaking to that key? (I have to step away soon, might not respond immediately, thank you in advance)
Target actor variable contains the string "TargetActor"?
why dont you use set blackboard value as object?
oh, its not in task ,nevermind
And just like that it's working!
Thank you so much Miloslu! I figured it was something obvious I just wasn't seeing. I didn't realize that variable needed to contain a string at all.
And also, this is why I'm the art guy on the team, and not the tech guy hahaha.
No problem ๐
Why would AI struggle so hard to get through a nav link proxy?
he is technically able to get through and sometimes succeeds, but most of the time he acts like there's collision there
I think UE has a game recording feature which leverages the replication system to serialize gameplay. I feel like that could maybe be used to train bot ai from player gameplay?
But that's probably a pretty big undertaking lol. I'm mostly brainstorming not seriously suggesting
Reading ScriptCore.h is fun ๐
Yeah, doing gameplay capture and learning is on my todo list.. as is training RL controllers for movement ala Ark Raiders
We do have a research proposal going in next week for some gameplay capture ML stuff (for a different military simulation engine, but the approach would be the same) so if that gets funded we'll definitely have that
I'm trying to identify some "big win" elements though. Stuff that's generally useful for productivity that might help illuminate ML/RL as a feature of modern development
Admittedly, its going to likely be something a bit left field
input codebases, score based on metacritic, output = game ๐
so like github copilot for games? yeah, seems easy enough ๐
AI pack to do what?
I'm not sure if a drop-in AI for soldiers really exists because how that would work depends 100% on how your game works (eg. type of soldier, weapons, how they are programmed, etc.)
You can look in the UE marketplace, if there are any, that's probably where you can find them
What do I plug into the cast of the enemy?
what are you trying to accomplish?
making an enemy health bar
What is the context of it?
like is it a single healthbar the player sees? How does it know when to show the healthbar?
It's a single bar that hovers over the enemies head, at the moment it's always active
I was just copying the one I made for the player but I'm now thinking I might have to take a different approach
yea maybe
I can't remember if Get Parent would be what you want here
that might just return you the player lmao
why isnt there a decorator that compares two blackboard values with more than/less than operators?
why is it only equals lol
The blackboard decorator can do this for numeric values
The options available on it vary based on the type of key used
Hi everyone. I want a mesh to continue blocking movement and collision as normal, but I want to change it so that for the nav mesh it sets down an obstacle area mesh rather than completely cutting off the nav mesh. Is this possible?
The reason for this is I want the AI to vault over the obstacle, but I don't want to generate loads of nav links if I can help it. I'd rather just have a system where the AI vaults when it hits the obstacle area class
I'm thinking of a long fence, so rather than having a hundred nav links every 50 units, just set down a "vault" area class so the AI knows it can vault over that section of the navmesh
Hello, in my game the player can purchase plots and then hire an AI worker. However I only want the AI to walk on owned plots, so I added a NavMesh modifier component to the plot actor and have it set to Null when the plot is not owned, and default when it is owned. However, as you can see in the video, when I purchase a plot, the navmesh shows properly, however these "artifacts" show up where there is green navmesh in areas there shouldn't be.
Does your navmesh bounds volume cover that area? If so it will be traversable by default -- the fact that it's a little square is probably just related to the way the AI debugger is rendering it (I find this tool generally buggy wrt to navmesh rendering)
I would set your play mode to Active Viewport and eject -- then push P and you can fly around to see the full navmesh state
The navmesh does cover the entire area. What happens is I have a PlotManager actor that on BeginPlay it creates an array of plots in a grid form (As shown by the red squares in the video). When the plots are spawned, they have a navmesh modifier component that is set to null, and then when the plot is "purchased", it sets it to default which is then supposed to show the navmesh.
The picture attached is what I see now when I purchase one grid. You can see where the main grid spot is, however there are the other "spikes" that come out that shouldn't be there.
Ok I follow, and are you expecting your floor, the parts without a plot on it, to be traversable?
Sorry, I currently don't have things set up properly. In the video, the plots are actually there, they are just under the plane. So there are all the plots in the grid shape, and I only want them to be traversable when the plots is owned.
and the rest of the white floor space should not be traversable?
ie you only want your bots to walk on purchased plots, nowhere else
Correct.
Ok, well by default your whole floor will probably be traversable other than the spots that have the null navmodifier
like I said I would debug this in the viewport rather than in standalone mode, because you're not going to see the full navmesh this way
I have the null navmodifier as a component on each plot. So when each plot is spawned in the level, no area can be traversed. Once you purchase a plot, the modifier is set to default allowing it to be traversed.
The problem is that when I purchase a plot as seen in the video, the navmesh above the plot becomes green, but then these sort of spikes of green are also seen, but they shouldn't be, the area should only be a square.
If your PlotManager actor shape is a square, and had no components that would cause this spiked shape, it's probably just debug renderer garbage -- again, I have found this view mode to be inaccurate, viewport is the way to go if you want an accurate representation
I see. However, the latest screenshot I sent is from the active viewport.
Ah, then yeah you probably have a real issue
you're using Dynamic navmesh generation I assume?
Correct.
Does your plot actor have any components that might account for the shape?
Here is the actor, the box is a just a collision for some other testing I was doing. Mind you, the red square, which is what you see in the game, is 90x90, however, the NavModifier component has a Failsafe extent of 100x100x100.
looks pretty square to me
what happens at runtime if you drag the actor around?
when the mesh regenerates does it still have horns?
Wow. Wait a second.
omg. It's due to the fact that the red box is not the same size as the area that they are spawned in. In the level, each grid is a 100x100 cell. However, to make it easier to see, I made each red box a 90x90 square. So the navmodifier was using the 90x90 size. I thought the failsafe would have helped.
Thanks for the help though.
What would be the best way to have an AI know where it needs to stand relative to a chair in order to play the sit animation?
Sockets perhaps?
Anyone knows how we can assign a graphnode to a custom composite?
Some kind of method on the chair actor to retrieve the position, or the chair itself can position the actor where needed
This way you can change the chair later without having to adjust your animation logic
Or create other sittables which have their own things
...what?
neither of the images you posted show any zombies and your question is extremely vague so not quite sure what you expect us to be able to do with this :D
Hi everyone, I didn't get an answer to my question yesterday, so hopefully nobody minds if I post it again. Is there a way to have a static mesh block collision as normal, but instead of creating a hole in the navmesh, it instead marks the area beneath it with an area class? I could place a nav modifier volume there, but was wondering if there was a more efficient way to do it which doesn't involve placing loads of volumes everywhere
My use case is a long fence that the AI can vault over. I'd rather use a custom area class that triggers the AI to vault when it moves across it, rather than placing hundreds of nav links all the way down the fence
did you try adding a nav modifier component on the actor?
Well, the fence is being drawn using a spline component. The game involves large open fields with a lot of fencing, so I have a solution which uses a hierarchical instanced static mesh rather than spline mesh actors. I could add code to place a nav modifier volume down as it adds instances to the HISM, but was just wondering if there was a simpler way to do it that maybe I wasn't aware of
Yes, there is an actor component called nav modifier
The fence can be curved, so presumably I'd need to place one nav volume down per segment of fence
I'm not sure if it'll do what you want though but worth a try
Ok I'll see how that performs
Is there any big problems with using dozens and dozens of nav modifiers? Just before I go ahead and set an entire river as a higher cost
Probably not
But I'm not sure
From what I know what matters is just final result which is calculated editor time
@timid condor I believe that it might slow down nav mesh generation in the editor, but unless you mark them as a dynamic obstacle then it won't affect performance during gameplay. The modified area will just be "baked in" to the navmesh.
how do you differentiate between types of stimuli in the same sense? i have a stimulus source and i dont know how to make it visible when an enemy takes damage and deactivate after a certain amount of time
Could someone please explain to me how an AI could possibly successfully sight sense me through this door here? The door has collision, blocking everything, the walls are BSP so obviously have collision blocking everything - how is it possible that AI could do this? It's only sometimes too
You sure its sight and not another sense doing it?
Honestly it's super hard to say. I shoot my gun, which triggers an 'investigate' response, and then he notices me through sight
but of course I can't reproduce it now 
seriously this makes absolutely no sense - I even made sure the doors slightly overlap through the surrounding meshes and stuff in case there's seams, and that they're set to block all collision types/etc
In C++ can you update the values of the perception component values at run time?
Such as the gain sight/lose sight distance, perception angle?
This is unfortunately a BP-only project ahah
though I can update those on the AIPerception component
this is what his sight properties are
though he still shouldn't be able to see through obstacles at all, right?
I wasn't responding actually haha
oh LMAO
solved it
holy frick lmao
they were detecting each other
those conniving little bitches
What does BlackboardKeySelector::IsSet do? The impl is just return SelectedKeyID != FBlackboard::InvalidKey;, but when I use it as a property IsSet is set to false when SelectedKeyName is set?
When you pick a key in the editor does it only set the key name not the key id or something? very strange.
I've learned a lot about AI for FPS type decision trees, is there a good resource to learn about best practices for making NPCs that involve conversational bartering to get clues / change their behavior? For instance, walking into a bar and having various NPCs you can interact with but only one or two that you can get a quest from or they join you after you do something to complete a quest?
Something like this? https://youtu.be/wtv_043sIrg
0:00 Demo
1:08 Explanation
For my very first project in Unreal Engine 4, I created an NPC with procedurally generated dialogue using OpenAI GPT-3, Replica, and Google Speech Services. The NPC is based on the Guide NPC from Terraria which I used MetaHuman Creator to repl...
Eh, while I'm at it
Hey guys, I'm trying to write a BP that can take mic input, use Google STT, GPT3 and Replica to respond to said mic input. The video I'm watching seems to be a version or two behind, and I'm having trouble with getting the player speech and getting a response. Here's the full code from the video: https://blueprintue.com/blueprint/qr8pj06x/
How would I write that player speech code in 4.27?
That's very cool, thanks for the link!
The basic idea would be to buffer the audio from the microphone and send it as packets to the STT service. Getting the audio buffer isn't too hard, but the STT depends on the API of the service you're using. Usually the API for the service will determine how you transmit data to it. That GPT3 thing basically used VAREST plugin to make REST api calls to the speech service, which is pretty much the standard method.
So first, get a working example with your chosen API working in regular C++ is my advice
usually they come with examples in different languages
things like authenticating the account id etc.
So I'd do it in three parts. first up capture audio buffer and simply print out data stats on it
second part, work on a C++ example that sends data packets to the API
third, get the plugin up and running using the two parts
I'm using the Azure versions of Text to speech and speech to text for my plugin
hm. i seem to have gotten the APIs working and sending data, my only problem now comes from Unreal capturing my mic
Hi everyone. When projecting a point onto a nav mesh, is it possible to also determine which area class the point sits on? I'm working in C++ and never tried it before. I'm currently using UNavigationSystemV1::ProjectPointToNavigation. I can see a filter parameter, is there one from which I can obtain the area class?
Hmm, pretty sure you can.. I'd try looking for GetAreaClass as a first attempt. Seems like that'd be a function call for that
Not sure if it exists or on what API btw.. just my first guess
Figured it out. In case anyone else is interested:
- Project point onto navigation, which populates a FNavLocation struct for you, which contains a NodeRef member
- Get a reference to the nav mesh and cast it to ARecastNavMesh by using Cast<ARecastNavMesh>(NavSystem->GetDefaultNavDataInstance());
- Obtain the area ID by calling ARecastNavMesh->GetPolyAreaID() and passing in the NodeRef you got from the FNavLocation
- Now call NavMesh->GetAreaClass and pass in the Area ID
Example:
const ARecastNavMesh* NavMesh = Cast<ARecastNavMesh>(NavSystem->GetDefaultNavDataInstance());
FNavLocation AgentLoc;
bool bAgentOnNavMesh = NavSystem->ProjectPointToNavigation(GetActorLocation(), AgentLoc, FVector(100.0f, 100.0f, 200.0f), NavSystem->GetNavDataForProps(AgentProperties));
if (NavMesh && bAgentOnNavMesh) {
const UClass* AreaClass = NavMesh->GetAreaClass(NavMesh->GetPolyAreaID(AgentLoc.NodeRef));
if (AreaClass) {
UE_LOG(LogTemp, Warning, TEXT("NavData = %s"), *AreaClass->GetName());
}
else {
UE_LOG(LogTemp, Warning, TEXT("NO AREA CLASS FOUND"));
}
}
Daym
That was not very straightforward
In bp I ended up dividing path to sections, checking their costs and performing math to check the navclass..
Was like 85% accurate, but not ideal methodology
Not sure why point to point cost isnt included in the regular path response..
I think there's a query in C++ you can do for that isn't there? I remember looking at it
it certainly had the cost for crossing an edge
think it summed those values for the whole path once the path had been string-pulled
Hmm, I wonder if I could make a full spectrum warrior style game for the steamdeck
Hi again all. Is there a way to change the default Nav Area Class for the nav mesh? So that by default the nav mesh is generated with a custom class other than UNavArea_Default?
Is it possible to configure AIPerception to "Sense" every stim source in an area regardless of "vision"
I'm trying to have objects kind of broadcast their available actions to AI controllers
in this context it would be every AI on a "lot"
You can create your own sense type and register that, although I'm not sure that offers much more than simply having your own system for registering objects. Also, there's a new smart object system being integrated in the engine (reading the notes on the latest UE5 release)
@ocean wren (sorry for the ping, hope you won't mind)
I'm implementing Valve's dialogue system to UE. So far it's looking pretty nice. I made a component that is very similar to Anim Instances in UE with fully transient properties. It acts like memory of the characters. And dialogue data is completely FProperty based with some templated custom classes to access the actual value of it.
So far I'm only confused about how can I implement hierarchical search for conditions and criterions. Do you have any idea which data structure I should use?
This is how pseudo code looks like: https://pastebin.com/Aw1DAPHe
if you plan to have complex multi branching dialogue flow, perhaps you should consider collapsible nodes similar to the way Bioware dialogues flow, e.g. 50,000 lines of dialogue the visual blueprint way may eventually end up unmanageable. also, what do you mean by hierarchical search? do you mean getters for conditions (e.g. am I ready to make an omelette ? return true if : I have the eggs is true. I have the frypan is true. I have the oil is true. I have the fire is true. return false otherwise)
bool GetDefinedFlag(IsReadyForOmlette)
{
return HasEggs&&HasFrypan&&HasOil&&HasFire;
}
if you plan to have complex multi branching dialogue flow, perhaps you should consider collapsible nodes similar to the way Bioware dialogues flow, e.g. 50,000 lines of dialogue the visual blueprint way may eventually end up unmanageable.
Thanks for the tip, I'll consider it.
what do you mean by hierarchical search? do you mean getters for conditions
Not 'getters' exactly., I dont know how to explain it directly. This is from Valve's GDC and explains what I'm trying to achieve
More like conditions needs to be sorted so iteration count will be reduced to search best dialogue
For example 'who' is always at the beginning, so if event is related with Zoe but not Nick, Nick's criterions wont be iterated
is your current design assuming a single controller for all the dialogues? I think this is how I did it in the past. I think this is just normal event broadcasting with a payload. All your actors/characters listen to events, right? Your event starts with a target which is an FName, and if the actor>GetName() that receives the event matches the payload target name, start processing it, otherwise just discard it. I'm assuming you staggered events, and you are not running it on tick, but as a service. Also maybe async can help. The payload is just arbitrary data, you shove in it whatever relevant data you see fit, such as concept (Action Type?). but, I cannot say with the hand on my heart that is the best way :D
Yeah, you're right. It looks like very similar ๐
Valve says they are polling the relevant data in each few seconds in a single thread, so with proper implementation I guess going with game-thread only won't be an issue. But on the other hand, looping a gigantic table in another thread also solves this problem easily.
it may also be worth investigating how Bethesda did it. For example here is how the robot Butler from third rail bar in good neighbor in fallout 4 evaluated for the correct branch to start when the player interacts with it
Conditions
Condition #0
CTDA - CTDA
Type: Equal to
Comparison Value - Float: 1.000000
Function: GetTalkedToPC
None: 00 00 00 00
None: 00 00 00 00
Run On: Target
Parameter #3: -1
Condition #1
CTDA - CTDA
Type: Equal to
Comparison Value - Float: 1.000000
Function: GetIsID
Referenceable Object: NPC_ - Non-Player Character (Actor) [00022687] <WhitechapelCharlie> "Whitechapel Charlie"
None: 00 00 00 00
Run On: Target
Parameter #3: -1
Condition #2
CTDA - CTDA
Type: Equal to
Comparison Value - Float: 1.000000
Function: GetIsID
Referenceable Object: NPC_ - Non-Player Character (Actor) [00000007] <Player>
None: 00 00 00 00
Run On: Subject
Parameter #3: -1
for your reference here is the plaintext for all the hello conversations in good neighbor
hopefully is plaintext enough to make sense :D
Before I read, you are not violating your NDA and this is publicly shared in somewhere, right? ๐
this is regular modding, I think...
I'm not sure, maybe ask a moderator, just to be safe
Moderators won't care but I just thought about the possibility you worked / working @ bethesda and sharing project files, based on file name
no, just a hardcore modder :D
Haha nice ๐
So do narrative designers write this literally with keyboard?
that text file is a plain text dump of the serialized quest. It's basically converting the ASCII/bytecode into plaintext for easier understanding.
the Creation Kit tool used in prod by Bethesda flows differently. I personally don't like it. I prefer Bioware style, but that's nor here nor there :D
Gotcha, thanks a lot for sharing and putting effort for helping. I'll research about the things you mentioned a little more
sure, my false modesty makes me the selfproclaimed expert in multibranching dialogues :D
Hey, im getting these error messages
Warning: GetSimulationTimeStep() - Max iterations 8 hit while remaining time 0.175864 > MaxSimulationTimeStep (0.050) for 'FlyingAI_C_3', movement 'Walking'
What does this refer too?
it's from CharacterMovementComponent. it's not AI, it's a warning that it consumes too many resources to process said movement Walking
/**
* Max time delta for each discrete simulation step.
* Used primarily in the the more advanced movement modes that break up larger time steps (usually those applying gravity such as falling and walking).
* Lowering this value can address issues with fast-moving objects or complex collision scenarios, at the cost of performance.
*
* WARNING: if (MaxSimulationTimeStep * MaxSimulationIterations) is too low for the min framerate, the last simulation step may exceed MaxSimulationTimeStep to complete the simulation.
* @see MaxSimulationIterations
*/
UPROPERTY(Category="Character Movement (General Settings)", EditAnywhere, BlueprintReadWrite, AdvancedDisplay, meta=(ClampMin="0.0166", ClampMax="0.50", UIMin="0.0166", UIMax="0.50"))
float MaxSimulationTimeStep;
I'm no good with CMC though, more than just the very basics :D
CMC is a known resource hog, and in highend/custom projects peeps tend to roll their own
you can check #cpp, I've seen over the years many references to CMC and lack of performance
I would expect that its just a std::vector of conditions, but that the conditions are sorted based on some scoring value..
the basic idea of that stuff is to quickly match the most specific set of conditions right? so the question would be, what is the most discriminative condition in the set of conditions to match for this particular query
I'd probably hard code an ID value and sort conditions by ID for a first pass
Its very similar to a utility architecture in that sense
the novelty was that the boolean was always a float comparison check.. even for string compares
Luckily UE's reflection system overcomes this
You could brute force just iterate every condition as a first pass I guess
The point is that you can figure out the optimal ordering of conditions later on... once you have enough to optimize for ๐
One way or another, I should make it evaluate the conditions that has less comparisions right?
Well no, you want to select the choice with the MOST "true" conditions right
because by definition more conditions = more specific
I thought Valve had a sorting system like
/// (1)
bValue1 - bValue2
bValue1 - bValue2 - bValue3
bValue1 - bValue2 - bValue3 - bValue4
Prevents it being something like this:
/// (2)
bValue1 - bValue2 - bValue3 - bValue4
bValue1 - bValue2
bValue1 - bValue2 - bValue3
bValue1 - bValue2 - bValue3 - bValue4 - bValue5
So it will always search hierachically
If next element fails, no need to iterate further because we reached the end with this type of sorting (1)
Yeah, that makes sense.. you need to keep checking conditions until there are no more left
so basically, keep checking if there is a more specific response.. general ones will pretty much always match
Its kind of set theory in a way..
It felt like I need nested TMaps for a second
And value will be the response
TMap<TMap<TMap<>>, Value>
Well, yeah, you probably want a UObject type with a Vector of conditions and a payload of some sort ๐
I don't know if you need a map
What was the map going to do?
It would use operator== for TMaps to find 'conditions'
Maybe I needed TSet instead
TMap<TSet<TSet<>>, Value>
Are you using a text base format like valve did, or some kind of blueprint thingy?
Dont mind me though I'm ultimately confused ๐
Both
But it ends up with FProperty setup
The graph I sent above compiles nodes in editor time
Yeah, I'm trying to think how I'd do it ๐
We know we need conditions right.. so I'd have some kind of class for that
And we know that each choice is basically a set of conditions that must be true and then some kind of response payload
so question would be, do we check ALL conditions first.. then check for the most matched choice?
We need to check less conditions as possible but conditions should go first
I guess it depends if the conditions are mutually exclusive etc
If I recall, the valve one did a first check on the character?
as that basically cut out a huge number of responses
Yeah, first check is 'who'
It would be a FName in our case
TMap<FName, TMap<TSet<FConditions>, FResponseData>>
Right, so a TMap on FName as a key sounds reasonable
Not sure why the next part is a map though.. whats that part doing? its matching ALL conditions?
why is it a Tmap though?
It's a map because if we can match a good condition we'll be able to access its reponse easily
What it should be instead? ๐ค
I'm not sure about how we will match though, it was to get your opinion about it
I'd probably brute force iterate everything as a first pass.. so I could figure out whats actually going on before I try and optimize
The TMap FName seems reasonable as the "who"
so what you want is every thing that is in that who map and you want to evaluate all of their conditions
Oh I forgot about context (fact)
TMap<FName, TMap<FName, TMap<FConditions, FResponseData>>
Having another TMap with FName key also reduces the iteration time
Concept stands for event like OnHit etc
I'll do as you said
Gonna brute force and see the results
Yeah, don't forget to add a bunch of debug console spam ๐
If that was a copy+paste, you left off a >
Thanks for warning
The key will be to add the different set of conditions in the correct order eventually right? so brute forcing will be non-optimal but should still work
Feels like a sort of visitor pattern kind of thing
But then really the optimization is more of an insertion ordering rather than the visiting of the conditions
This would be a nice project for your students tbh ๐
Yeah, it really would
But I've got plans to make them code up a node-editor for PCG stuff ๐
PCG?
Well, in this context its a bunch of procedural content algorithms, things like voronoi region generations
But yeah, voxels, subdiv surfaces etc.
I'm going to give them a list of nodes they can code and some unit tests to pass
and they can choose which ones to code up
Will this be UE based?
some will be easier.. like take a list of vertices and spherify them ๐
Probably Unity, but maybe both
both Unity and UE have decent node graph support
But we're doing UE in graphics module, so probably do Unity in PCG one
just because ๐
Unity has a pretty similar node graph framework to the one UE has
since Unity added its shadergraph system
Seeing you guys doing these things makes me jealous tbh ๐
I've got plans to teach them about Houdini, so want them to code a mini-houdini ๐
It sounds like you're already doing the right kinds of things anyway
Yeah, on my own I'm doing something but I'll study on a university outside of the Turkey so I'm hoping I can find a similar university as yours
I did a talk for some turkish indie devs last year, was a fun one
Yea, you mentioned before
Always good to get in some coding practice before starting Uni
you'll probably find Uni a bit too easy ๐
I'm more of concerned about how exams are done (or even will there be exams)
If they request me to pass an exam in Turkey, probably I'll fail
Because we do rote-based exams here
Why?
exams are a pain ๐
We only have a few on our programme.. mainly maths and such
Eh exams after joining a university wont be much problem I guess - or hopefully
I can take that pain ๐
I asked an acamedician in England before how they do accepts student to universities but I couldnt get a proper answer
Seems like English universities dont even do exams because all I see is in their website how much will it cost to study
Hahaha.. yeah, its all about the money
But yes, we do exams.. usually for acceptance, you get points for your current studies in your home country.. it gets complicated because there are lots of countries etc.
So we don't do entrance exams so much as just look at the international equivalence for each study..
we have what is called an "admissions officer" that has the equivalence values for each qualification in each country
and they basically determine what each student has in terms of qualifications (by mapping from the home country version to ours)
Hearing that hurt me a little bit ๐ Exams here suck and honestly last year of high school I didn't even went to school. I just entered exams to pass the grade, not to get high notes
Yeah, I hated exams and school too
It's more about education system here though, for example they teach English but no one leaves the school by knowing how to speak English
If they would teach C++, I would not come this far with their education system too
I learned both myself
Yeah, we learn languages but really don't work unless you speak them a lot and practice
I started learning french and japanese
but couldn't speak them because I didn't know any french or japanese people other than my tutors
Having a colleague helps
Living in the country helps ๐
Yeah that one is better ๐
How would you go about making an ai react to your character starting an attack (going to enable evading)? Asking since there is a lot to consider (letting the enemy know it is in range, how to send the signal, what type of attack is it).
Just cheat about it
Let the enemies in the desired reaction sphere know that the player pressed some attack input
+1 for cheat
hey uhm where's that new cool AI stuff that was mentioned in the preview article?
this thing
oh ok nvm had to enable it in plugins
oh ok nvm had to enable it in plugins
@keen crow ัool stuff man. Did you test this avoidance? How it works
nah, i was only curious about how do state trees and smart objects look like
Do you have a link to this article by any chance? or to any other documentation regarding this statetree system?
https://forums.unrealengine.com/t/unreal-engine-5-0-preview/500950
any other documentation regarding this statetree system?
:))) there aren't even comments on the uproperties
Preview 1 of the upcoming 5.0 release is available now on the Launcher and GitHub. We are making this Preview available so you can try our new features and help us catch issues before the final release. As fixes are implemented, we will release updated previews throughout the development cycle. Please be aware that preview releases are not full...
Oh darn haha looks like this could be a cool solution to a problem my team is having, oh well!
the plugin must be activated
I could handle exams, but dissertations? no. never again. f that
are BT's blackboard decorators broken? or am I doing something wrong?
they are not broken. You are doing something wrong. Decorators are conditions, they work like logical circuits, says me using words and poetry instead of logic and symbols ๐
Any idea why when I place multiple AIs down, that one AI is being overriden by a task decision of another AI? e.g one AI will be chasing me and will suddenly stop and start walking in a different direction when 2+ AI are placed down, which seems to be the Roaming task, a task that only plays out when the AI can't see me
Hi, I'm fairly new to AI but I've been through the whole, AI follows player, AI follows path, AI finds random point in navigable area. I'm now looking at daily planners for AI so that they can follow a day to day schedule so for example 9am got to 'work' where I can set work as a targetLocation on the blackbaord via the ai then at 12 this changes to 'go for lunch' again just setting the targetLocation. This is all cool but I'm getting to the point where I feel like I should know more about the lifecycle of the ai itself in terms of spawning and despawning as well as (I'm not sure if it's called this but) sleep ie a low powered state for when the player isn't near the AI. So I was wondering if anyone could point me in the right direction as I can't seem to find anything beyond those simple initial tutorials.
This can depend on a variety of factors, but if you are using behavior trees or such, then unless you made some major mistake in your AI controller logic, they are not overriding each other. The most likely cause is that the other AIs are for example blocking line of sight to you
I'm trying to implement a sidestep in my AI that wouldn't interrupt whatever's going on in the behaviour tree but I can't figure out how to implement it
since my AI is a hovering enemy I initially made it interp to a random location in a box around it and then back to the middle, except it makes the location of the Actor a little too offset from the Mesh
and rotating the actor makes it do some weird things (even by easing the rotation to avoid teleporting the mesh around)
now I'm thinking about making it simply walk right or left
It's a bit unclear as to what the goal of the sidestep is... is it to dodge or what?
Heyy it seems that was the issue. I placed a wall down and toggled the wireframe mode and placed two ai on each side of the wall - they don't "override". Any idea how I'd fix it though? would I have to define a certain angle of what they can see in terms of ai perception or something?
Easiest solution would probably be to not have them block on the sight channel
The default channel used for sight traces is defined in the project settings, so if you check what it is set to, and change the collision settings on the objects so that they don't block on that channel, it would mean they could see through that then
yes, so that if someone just fires straight forward they wouldn't just stand there
๐ค
I guess you could try setting it up so that it adds some sideways movement input for it or something
That might be possible to do even in middle of other kinds of movement... but not sure
gotcha, it's set to "Visibility", so would I do that by setting the mesh's Visibility trace response from block to ignore/overlap?
Yeah
one thing though is that projectiles rely on tracers being able to hit the mesh
Yeah, depending on how you handle things it may be a good idea to create custom channels for these kinds of purposes
I think the custom projectile channel already exists by default in projects
ohh
so if it makes the usage more clear, you could create a channel called "NpcSight" or whatever you want to call it, and make that the channel used for it
it does seem to work !
nice :)
You could have the raycast check if a friendly is in front of you and send a "move out the way" event to them
or hell, have a raycast fire out the back of them and move out the way if a friendly is behind ๐
I had a forward raycast that lowered the weapons of the agents at the rear of the squad so that only the people with unimpeded access to the target would fire
the others would move to get a shot
all part of eqs updates
How is unscripted AI usually handled in UE? Like e. g. having random NPCs travel along a road in an open world.
Is the road a navmesh and there some destination far away, or are they hooked up to a spline?
And how would realistic movement work?
With a navmesh, the AI would just take the shortest way and not really use the path properly when it comes to curves, while splines would have the disadvantage that AI would follow it like on a track and not naturally (would look especially weird when theres multiple AIs following it).
How do games with big levels handle this, like e. g. having NPCs going through a city: Not on a single track, but also without "hugging corners"?
Splines should work just fine. Get the next node in a spline and add a random point in its radius as next destination, this way each NPC has small variations for realism. Add some crowd avoidance behavior and let them mingle :D
on top of that, make sure that the random point it's always on the right side of the next node or the left side of the next node ( depending on your desired traffic rules ) and this way you have an organized traffic too ๐
There are terms to define 'unscripted', like systemic, authored etc.
I recommend reading game ai pro book, it's free on the web
It also shows some real world examples from AAA games
They tend to bake navigation hints into the environment, so stuff like roads and stop signs and intersections. So maybe take a look at the demo of the Matrix Awakened content when they release it.. it has that traffic in a city thing.
Hey, hope my question is in the right channel, but does anyone tried Mass AI for Unreal 5? any idea where to start?
You might find more people who tried it in #ue5-general
I might have a look today
We're meant to be getting that Matrix demo as a sample at some point IIRC
yeah, at some point
hmm, anyone seen where they've stuck the massai code? is it even in the latest UE5 version or is it only on github?
Search for MassGameplay on plugins
Yeah so ive been looking at the Mass plugins some bit, i cant really find the visualizers they use in the Matrix demo...
Hii ๐ I was wondering how games like "they are billions" are simulating so many different enemies. I was trying out different simple AI's with varied success ๐ a few hundred enemies ran perfectly fine, but when I got into the thousands the performance was dropping massively. I was also trying out Niagara stuff to "fake" enemies and just use some "smart" particles, but after a while of prototyping I'm not sure if a particle has enough ways to do basic "enemy behavior" like good hit collision, stats like ATK, DEF etc... it will probably too much for a simple particle... so has someone more information about this kind of topic? ๐
UE will fight you with its everything on this situation
Your main problem is:
UObject framework
UE is not able to render more than ~150 characters at once
No skeletal mesh instancing in the engine
Other difficult but less pita problems:
Pathfinding is not fast enough for massive amount of agents
Animations are expensive in UE
Default BT system is kinda bloated for this situation
Only person who managed to solve all of this problems is GlassBeaver (hangs out at #cpp )
You can check his game: https://horugame.com/
It took him almost 4 years to come this far so you either need to walk the same way or use another engine
wow ok thanks for the info! ๐ I've seen a mass simulation "tutorial" from Epic Games. they used niagara to fake the enemies and load them in when they are hit, but the demo looked kinda clunky when enemies should have collided with each other.... so yeah i guess thats all near impossible ๐
Its MassGameplay plugin from UE5, its for low fidely simulations
For a game that requires full logic enabled for all of the entities like modern RTS', it's not suitable sadly
I see... I mean just some dots "pathfinding" to the player and colliding with each other would actually be finde for now ๐
They will release that Matrix demo soon
You can check how they implemented it
But basically its just ZoneGraph + StateTree + MassGameplay
A mix of three UE5 plugins
Ok cool, i guess I need to wait for that ๐ ๐
Hello, for some reason my ACharacter based AI Actor (AI controller written on C++) doesnt play running animation when executing MoveTo() from Behavior Tree. But he still changes the direction he faces. Does anybody know what might be a problem?
I've literally gotten 400 animated characters moving around in UE4. Not sure where you're getting the arbitrary 150 limit from.
Stock engine btw
I have a RX570, 16GB RAM and Ryzen 2600
With default mannequin, no anim sharing plugin, I barely get 60fps with 150 characters on shipping build
So its coming from my profiler result
You should determine a budget to render characters and it should not take more than %30-50 of your GPU time
So you can also make environment look good ๐คทโโ๏ธ
Even if you go mad (in a good way) and sacrifice some budget from everything UE just breaks somewhere and starts to eat from your CPU budget* (generally doing a 16/16 ms split for gameplay and GPU is common from what I saw around industry)
I get like 30 and my frames crap out, idk how people are getting a bunch of AIs lol
depends on which features you use I guess
perception can be very expensive if you don't configure it to ignore the majority of actors in your scenes (most blueprint-only implemented sight perceptions tend to see every character, which causes tons of linetraces every frame)
I have a noob question. I'm setting up an AI to run to my location but it's not working. I can see my debug log that sets the location in the blackboard and can see the location in the blackboard itself. the ai is on the navmesh, but still not moving.
figured it out, the RecastNavMesh has a checkbox for "Is World Partitioned?" that was set to true. setting it to false allowed the AI to move.
for that, I'd use the particle system for rendering maybe.. but write the logic and movement code in a seperate system and feed that as texture data to the particle system.
Basically, I'd use compute shaders for most of the calculations
Hmm, so the mass system is basically an ECS subsystem
doing aggregate updates across "fragments", which are basically components (not the usual UE components)
I can see why they'd do it, because to fix the ECS for the whole engine would literally destroy compatability, but still.. fragments? ๐
How do you use "Finish With Result" in your BT's? I'm not quite sure how it's intended to be used tbh ๐ค
Like... I can see you could have it in a Selector to force it to succeed if the other nodes fail... but you could just use Force Success as well
I guess its useful when you use nodes heavily and dont encapsule behaviors into tasks
Hmm, yeah I guess if you have some node produce a result, and you just use a blackboard decorator to check whether it was a good or bad result... but even then just having the blackboard decorator would do the job :D
Facepalm discovery: I found out today that visual logger meshes are displayed in other view modes, like top wireframe. Pretty comfortable.
Somewhat related to the screenshot above, is it a known and normal thing to have a navmesh raycast end on a different nav poly than the path corridor in FNavPath says the target point is on? I'm implementing corridor smoothing and the bottom red poly is being removed from the path. This seems to happen all the time when a path segment goes along a poly edge instead of just touching a vertex.
In the screen the black thick line is the original path, the green is the smoothed one, and red polys are the ones removed from the path as a result of trying to skip a path point with a raycast. The raycast is what the first green segment shows, and it removes the thin poly on the left correctly, but also the bottom one