#gameplay-ai
1 messages Β· Page 161 of 1
Yeah man, classic voice to
yeah pebkac, its sorta like pb&j
crazy how he was in Gang's of New York
it usually is
Indeed, also, I see what you did there π
Exactly what Manny would say if he had some I to his A
i have a question. by default unreal sets inaccessible nav mesh areas to the class "null" (i believe) and basically removes them. is there a way to change this default inaccessible area class to something else without modifying the source code?
basically i want areas like this to be on the nav mesh just with an increased cost.
i think thats determined by agent height or something height
no sorry my bad , that's just an example, i want ALL areas to be accessible, e.g. right here i want the empty area instead to be red.
Not sure but maybe you can instead use a nav modifier on it
There are some nav area related settings on primitives, those could affect it - if it doesn't give the result you want, set the primitive to cannot affect navigation, then add a nav area modifier component which sets the area to the type you want
That might do it but as said not sure
i have tried out stuff with nav modifiers, i can get it to do this, the problem is now i have lost the generation on top of the block but i need that.
Ah- yeah that might be a problem π€
yeah i'm just compiling the engine from source now. i wonder how that will turn out.
Multi level navmesh isnt really a thing and sounds rather error prone
Death Stranding did it for their dynamic building scenarios but they toggled one off for the other during it
You probablu want to increase navmesh step hieght buy you will have to solve vertical traversal somehow
Or else use another nav generation method like a* or voxels
can unreal not handle multiple levels? seems fine to me with limited testing
That looks fine but i think youre limited on layering distance by agent height
idk it seems to work fine for my purpose, i just wish i could override that default null area
then maybe for this situation, you modify the collision to only by the top wall area, so visually this is the mesh box, but collision wise it's just along the top
we're getting into #level-design topics though
hmmmm... this could actually work. not optimal but if rewriting the engine will fail(probably) then i could stick to this. it does require me to make the nav agent height really tiny though. does this have any negative side effects?
How would one usually separate the navmesh of the "landscape" vs the navmesh of something like the "ocean" or a "lake" ?
Doesnt seem to blend very well directly using regular Plane as the mesh atleast
Do i really need to make a custom mesh for each water area?
maybe its possible to generate another navmesh - like they generate based on a nav mesh volume, but maybe you can write some code to generate a custom one
that makes alot of sense suddenly
thanks!
Water is always below a given Z level
so i can just have an upper and a lower navmesh
Or perhaps make it very high cost,
and just use a filter on the pawns
excluding water needs be excluded
you'd normally use nav modifiers to mark up different types of navigable terrain
with custom shaped ocean then? otherwise the regions overlap and the entire plane's area (despite underground) becomes that nav type
maybe dont do navmesh if water is at a relatively similar elevation and solve water pathing differently
I'm certain this gets asked a lot, and I've done my own research into it; If I'm making a zombie game and want to have more than abt 30 ai at a time would it be best to just write my own navmesh and movement from scratch? The CharacterMovement is definitely too expensive
i would argue that navmesh is relatively cheap, but you should make your own movement logic yes
if you find after making movement logic that the navmesh is too expensive, optimize/write your own, but start with movement
im using cmc and navmesh from unreal with about 60+ AI roaming around without issue
they can even jump π
though i should make my own cmc π
Sweet, I've been noticing that my GPU tanks after about 30 are spawned, and that the game frame time and GPU game time are the exact same. Is some of the pathfinding or something done on the GPU instead of CPU?
not sure, might be in how they are spawned - all at once?
expensive shaders? high res textures?
abt 3 at a time and continues to suffer after all have finished
I've been looking at the textures, they are 2048x2048 which seems excessive, and the models themselves are relatively low poly
Yeah I am
currently they all do a lot of thinking i.e. checking every .40 seconds for a way to reach the player etc etc. I'm planning to divy them up into squads and only have leaders do that as well
It does seem weird that CMC would be quite so bad on things.. anyone ever dig into that?
What the hell is it doing that makes it so expensive?
floor checks?
FindFloor() function and other functions tracing/sweeping against geometry to correct position and simulate psuedo physics
For 50 moving pawns, with CMC it's almost 3ms, with custom FloatingPawnMovement it's 0.3ms
There is a gigantic amount of difference
So it's best to write something smaller than CMC if you have a lot of moving pawns imo, though Kaos went hardcore mode and managed to replicate +100 of them on a 8 players game
I don't think so
CMC is written by one of the besties in Epic iirc
What was his name? π€ Steve
Yeah Steve Polge or something very similar
It's just carrying the legacy of UE3 being a shooter engine
Ah right, wasn't SP from UT?
SP?
Steve Polge
Yeah
He was in Epic since ~2000 i guess, he was working at IBM first then moved to Epic
He is writing Fortnite's code now if I'm not wrong
Pretty much everyone at Epic is aren't they? π
Haha yeah π
does using NavMeshWalking improve this at all?
@ocean wren I use navmesh walking, i reduce tick rates for AI that are not visible to the player (inside FOW in RS2 for example), like CMC, Pawn, etc, when they are in optimized state, we do simple moving (disable collision checks with sweeps, etc). Before optimizing it was around 0.06ms per pawn in the CMC
with these changes it went to around .024ms per pawn
which equates to about 2.4ms, then i did some other tweaks, and 100 pawns outside of player vis, still moving, costs .8ms which is about .008ms per pawn
on the cmc of course
one other thing i suggest is reducing the amount of scene components the AI have
the more scene comps, the longer it takes the transforms to update, again increasing cost
non tick reduced moving out of player vis:
tick reduced out of player vis
as you can see they teleporting, but it doesn't matter, not visible to player at this point
http://thegames.dev/snaps/cF2vU3zUbv.mp4 video towards end shows them transitioning from optimized tick (and optimized nav movement) to normal
Gotcha, nice explaination, thanks for that
I take it that when they're out of view they're not actually doing skeletal updates and animating right?
they do skeletal updates
as you can see the animation plays
but URO kicks in
tbh with animation sharing, they don't cost that much
seems a bit redundant is all
How come an actor with disabled collision affects navigation?
getting weird spikes while moving it
like... pretty bad ones
Guess ill just change it so its not allowed to affect navigation, and dynamically add a nav modifier to it when placed
but it still has the collider right? I think it has to do with explicitly setting the navmesh type (normal, obstacle, null, etc)
that'd be my guess
i have some objects that affect navmesh but they dont collide, only overlap, but i remember turning them off by code and they still affected the area as red
Turning it off and adding the nav modifier component at runtime solved the issue atleast so that's well and good! :;P
did they stop having perception being showing in the viewport with the latest unreals?
Not quite sure what you mean. I don't think perception info ever showed in the viewport unless you're using the gameplay debugger
never mind i got it working
Sorry if this is really basic, but i just started using Unreal a few days ago and am having some issues with ai. I followed the tutorial on the Unreal youtube channel for having an ai follow the player, but my problem is that it never stops following the player after it initially gets sight of them. Any help would be appreciated!
well it probably always has the targetactor once it happens
the thing is that it also reports you the actor in the perception update if the actor gets out of a sense, so on the update you have to check if the player is still perceived by the sense (before setting the actor, otherwise you would have to null the actor on the blackboard)
@warped snow
@spring inlet Thank you for the response, it definitely makes sense that once it gets the actor once theres nothing to break it, but ive tried quite a few different things but i have no idea how to redo that blueprint in order to check if the pawn is still sensed or not. Any ideas? thanks again!
i can't recall the actual nodes, but theres stuff to check what a sense is currently perceiving
when the actor isn't on that list you can null it on the BB
break your stimulus, there's an output called SenseSuccessful (or whatever) use a branch on that - on true, it sensed something, on false it lost sight of it. Be sure to have all affiliations checked. And check what actor is being sensed - ie, cast or check that its the player.
Tried this setup, but still no luck.
move to will continue moving to the target until it reaches them. The decorator HasTarget is never false because TargetActor is never cleared. With your branch, on false, you need to clear the same bb key to make that condition false in your tree
Thank you so much for the help! Ended with exactly what you said and it works flawlessly now.
Why doesn't GameplayTag EQS test work for me? I have IGameplayTagAssetInterface implemented on my context actor but for some reason the test doesn't filter out actors without required tag on level π€
Ok so I've read this post a while ago so filter isn't even supposed to be working, right? But the scoring doesn't work for me either. In fact, not a single breakpoint except for getting description is triggered in the test when I'm moving the EQS dummy π
what am I doing wrong here???
Ok event after doing a complete copy of EQS GameplayTag test (except for removing everything commented as Obsolete) the RunTest is still not called. What can be the reason?
Ok so changing ValidItemType to VectorBase helped me to get the test run, but the ItemActor is always null because default Actor's CDO is never set π’
well ofcourse
now I think that I am doing something wrong here... why would I even expect the GameplayTag test work on something like this if the generated query items are just some points and not actors... π€
well fck. it works, nevermind. Just had to pick the right generator >_<
@warped snow you need to set a bool not an object.
set a blackboard key to a bool, and connect it to successfully sense, then add a blackboard decorator on chase player sequence and set it to the blackboard boolean you made for it to say if it sense it or not
cause as he said setting a object to target actor will always have the actor.
Do I understand it right that
void UBehaviorTreeComponent::SetDynamicSubtree(FGameplayTag InjectTag, UBehaviorTree* BehaviorAsset)
only injects BTs for RBD tasks that are in the main BT and it won't set dynamic subtree inside of an another dynamically set subtree? Like I have a BT hierarchy where the main BT has an RBD with tag .Anxiery and inside of an injected tree I have another RBDs .Anxiety.Average, .Anxiety.Mild, etc, and the latter don't seem to be injected
Never tried nested dynamic trees, seems like an annoying limitation if it indeed is like that
as far as i understood the source code it just goes through all RBD tasks in all composites in the main BT but I was hoping I got it wrong
I've there a way I can have the AI Reverse
I want it to detect obstruction and move back some distance but instead of turn to move in forward direct I prefer it to reverse
anyone have any ideas
you can use a movement node but not have the checkbox that aligns it with its movement direction checked
?? i don't think I have seen this option
might be another node like set focus now I think about it.. can't remember, I might have coded my own move node too..
But basically you don't have to point in the direction of movement if you don't want to
well the AIMove to node seems to rotate AI in direction of travel
There's definitely a way to tell it not to somewhere. Take a look at the code and you'll find it
@river pulsar in order for that (and various other builtin gameplay tag related things) to work, the actor class must implement IGameplayTagAssetInterface, which afaik is only possible in C++
So it turns out that Microsoft Cognitive services are pretty easy to use.. I can generate the voices ok. Just need to figure out the UE side of things. Like pipeing the audio into the UE sound system etc.
Don't suppose anyone's braved that stuff?
could be anything, you need to show your implementation of it
what about the interface implementation?
Yeah that looks like it should be correct then
fwiw, you only need to implement GetOwnedGameplayTags for the interface - the other functions have a default implementation which makes use of that function :)
the problem could be in the EQS query itself if it isn't working - I would perhaps try using some prints or such to check whether the actor has the expected tag on it when you try to do the EQS query
just to make sure it's behaving as expected otherwise
ah :)
Goddam it.. why doesn't this goddam particle system stop bloody rendering when I tell it! π
Goddam unreal engine
If it's a niagara particle probably you're doing something wrong with it's lifetime properties
Could be literally anything though π It's a huge system
Naah, got it.. i was calling Activate and Deactivate on tick and it seems to not like that
i.e. based on a bool
Calling activate every tick with the reset set to true obviously nuked it π
I'm having trouble with a behavior tree EQS task. I have a task to find an actor of a certain type, then a task to move to that actor. I've verified in the AI debugger that my EQS is finding an actor to move to. The issue is that my behavior tree never seems to leave my EQS node
I have the EQS and MoveTo under the same Sequence node.
I tried a Selector as an experiment and got the same result - the behavior tree entered the EQS node and never left it. This tells me that the EQS node is neither succeeding nor failing - it's not returning anything
Is there anything obvious I should check for? Would yalls like screenshots of my behavior tree nodes and their Details?
Does anyone have any idea how I can create a system similar to this? I thought of maybe a spline system and then get the length and multiply it the navigable area but it didnβt work too well
I guess you could do something like described there and check distance to navmesh polys
Woah how do I access nav mesh polys??
I think there's a way to get them from the NavigationSystem but only in C++
Hm I see
Might be the time for me to get into C++
I assume I could access it in c++ and maybe expose it to blueprints or something
Yeah
Thanks for that help
Ok, I got it. It is in RecastActor
Create trigger boxes to perform conditionals down certain hallways
Combine the trigger boxes with some trace checks aiming towards the player.
If you trip the box in hallway 1. Monsters in hallway 2 do a line check and if you cannot see them they despawn.
That would be a good start to it, Iβll give it a shot thanks
Just gotta figure out on a per-encounter basis where your point of no returns are. Cuz even on Valves nav mesh. The lines inbetween gradients are still points of no return in theory.
I'd just write a djykstra's into the navmesh system to be honest. The number of navpolies is pretty low.
do the navmesh can be rotated for lets say a side scroller game and work?
L4D and the rest of Valve 1.5 games uses a mesh alike navigation grid, you can cut areas etc and define each area as different influence zone
Maybe no the best idea since you cannot set logics per area in UE4, but rather use volumes.
Actually the UE4 navmesh gets generated each time you load the map so isn't stored even if you force to π
I think for the most part the nav areas are generated automatically when dragged in, but you use multiple nav areas to fill in the map
It should work for sidescrollers although not sure what you mean by rotated
say to rotate the navmesh to a face
as a "side" scroller
cuz is on a side
say a swim game
I need all the vertical nav
Ahh I see
Yeah not sure, that might need different kind of navigation since swimming is more like flight
true
Maybe you could kinda cheat it, if the background "wall" of the game is actually the floor
so the characters are "walking" on the wall :D
mmm seems like the navmesh always generate in z
so the only solution that comes to my mind is to make the game topdown
and apply the gravity in alternative direction
yeah that's kinda what I meant :)
it might be possible in world settings or something but I also recall a bunch of logic in places like CMC just assume it's on Z axis always
so you might get better results by just ticking the gravity manually in the direction you want
there's a directional gravity plugin on the marketplace which is free that might be worth checking as that works around those issues somewhat
yeah it seems like will need to edit it per actor
feels bad man, Epic could just added a global direction vector
I wonder what would happen if you gave the navigation stuff a really really big step height or such
yeah I wrote it and then saw your comment XD
sorry*
no worries :)
well technically that shouldn't be hard to calculate if that vector is static always and calculate all in that direction
idk feels like a really useful feature missing here
Yeah
the directional gravity plugin has a customized CMC
but iirc things like control rotation and such in first person view are incredibly fucky if you rotate the character (not an issue with the plugin but just epic's code which assumes the character roll is always 0) so you have to write a lot of workarounds - but that shouldn't be an issue in a sidescroller anyway
na don't want First person view here on 2D
The first person view game me a lot of problems specially with say the spring arm
on rotations
I worked on a first person spaceflight game for a bit so I ran into all kinds of fun issues when your character was upside down etc. lol
bet the IK works fine
2d is so much easier than 3d when it comes to nav mesh and proxes im so salty π«
Hey guys, I have a problem: after placing AI actors on level they made holes in nav mesh and they cant get out. How I can fix it? I use VisAI framework.
btw, dear @silent ivy , I cant get to yourVisAI discord server, I'm stuck on verification step
turn off "can affect navigation" on the colliders
@misty wharf thanks, untick can ever affect navigation on mesh solved this problem
i have this seemingly nice nav mesh that reaches all the way to my character location, yet the pathfinding system insists it doesn't for a particular AI pawn.. ive tried messing with all the AI nav settings quite a bit(i use navwalking), disabled sweeping, set absurd values for step height, walkable slope, etc(do those even matter in navwalking?), yet the only thing that lets the AI path up to my location is increasing the Cell Height, and sometimes the Cell Size(width) of the nav mesh
are there any kind of guaranteed settings that will let a pawn definitely traverse all of the visible navmesh?(the navmesh is made on complex geometry, but that cant be helped)
Quick one βπΌ, how can i make ai approach the Player quick, now if i stand behind a table foe example the ai stops in the middle of the table and try to attack out of reachβ¦
Heya folks, looking for some pointers on pathfinding, I'm using the built in AI detour crowd controller here and it's working great, but I'd like to give the AI some option for increasing it's path selection choice. Here's a video illustrating the current issue and what I'm trying to avoid:
You can see each agent takes exactly the same path and it looks pretty obviously artificial
They also sort of detour strangely when they're about to take the nav link proxy to jump which looks a bit odd. Any advice on ways to fix these two issues, being agents following the exact same pathing and the detour moment when they change direction to move toward the proxy?
Birds eye view of the pathing, it seems to be a selectivity problem
How should I set the max walk speed of an AI that is spawned from an enemy spawner? I'm using Event Receive Activation and casting the Owner Actor to my enemy class, and from that I'm getting the actor variable (Get MyEnemyPawn) and then I'm getting the Character Movement. then I'm setting the max walk speed. This isn't working as I'm getting an Accessed None when doing it. This works fine if I place my enemy in the level, but I want an enemy spawner to manage him.
this is the only part of the pawn and his BT that's not working when I spawn him with my spawner.
Fix why you're getting a none reference?
One way I could imagine doing it is to increase the nav cost of navmesh links as they're being used for a path, so as each agent paths, they increase the cost of a given path by altering the link cost temporarily?
How bad for performance is it to be constantly using a MoveTo node in behaviour trees?
Profile it in your game and see?
For context, I'm thinking of Total War scale for number of characters all acting together.
You probably wouldn't use a straight BT setup for a total war style game
Then how do you propose setting up squads so all units are following orders correctly?
Current setup is an invisible squad-pawn that has the orders given to it. Squad-pawn keeps a list of all characters it controls and propagates commands to them when given.
Yeah, that part works, but you will have to think about pathing differently for things like squads
you can't have the cost of pathing every single unit seperately
and you can't rely on the path being able to fit the whole squad as a "corridor" really either
Right now the individual characters have a vector for their own offset (for formations) as well as a vector for squad destination. When either changes it recalculates their destination and uses MoveTo to that point.
Problem is right now they're kinda going into weird lines for further away destinations/.
This is an idea. Is their a built in mechanism or would I need to use a smart link for this?
Coincidentally I'm using BT with move to and 100's of units and it's quite fast
probably smart link, I can't recall because I built my own, but pretty sure there was one where the cost was associated with a navmesh edge
Could make it so the agent for the squad-pawn is much larger, accommodating the entire group's formation? The width of agents can be changed dynamically right?
Hmm, I don't think I'd do it that way.. I'm sure the CA guys have done talks at GDC about this kind of thing
Anyways my thought for preventing that line thing happening would be to just keep giving the characters MoveTo commands to their offset + squad-pawn's position. Problem is I have no idea how performant that would be.
Right, I'll take a look for any GDC talks on the matter then. Cheers.
I've seen like half a dozen talks on this stuff π
Talks are all well and good but I've found trying to do stuff in Unreal that the engine wasn't designed for is generally a bad idea.
Behaviour Trees and Blackboards seem to be key to more advanced Unreal AI... I'd rather not deviate from that if possible.
Well, it does depend on the gameplay you're going for
True.
Total War games have quite different requirements, so the more traditional FPS style AI in UE4 doesn't really shine imho
Tommy's videos on Total War series is pretty good: https://youtu.be/XBzTJOYgW0M
AI and Games is a crowdfunded show and needs your support.
You can support this series on Paypal, KoFi and Patreon:
http://www.paypal.me/AIandGames
http://www.ko-fi.com/AIandGames
http://www.patreon.com/ai_and_games
You can follow AI and Games on Facebook and Twitter:
http://www.facebook.com/AIandGames
http://www.twitter.com/AIandGames
Learn m...
I'll give it a watch π
The GDC talks from CA are also useful though. Got a bit more depth
The CA guys are pretty good about discussing their different AI architectures.. and they do change them a lot over time π
If your units are moving in formation you could take a look at using some type of flocking/avoidance algorithm like is present in the detour crowd controller
Flock/avoidance like boids?
There's an avoidance architecture which you can sort of interact with natively https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/ArtificialIntelligence/NavigationSystem/Avoidance/
yeah I think there's some degree of boids style movement going on in their system
which is good for groups of units pathfinding more cheaply
From my understanding of boids I'm not too sure if that would be of much help. They're typically for things like birds/fish who sort of average out their movement together, not so much of a "formation" rather a clump that moves in one direction.
At least from my understanding. I'll open the link though and take a look after I'm done with these videos.
It depends on what you're doing, but squadron movement like you see in RTS games like Age of Empires and the like can be achieved using flocking style algo
it might break down in tight spaces though, but it's suprisingly stable movement strategy
Personally, I like this continuum crowds based approach: https://youtu.be/iHuFCnYnP9A
This video, narrated by Gas Powered Games' Chris Taylor, highlights Supreme Commander 2's new Flowfield pathfinding system. Flowfield greatly improves upon the standard RTS pathfinding used in most games, which is based upon A-star algorithms. The Flowfield system is instead based upon the University of Washington's Crowd Continuum Research and ...
Which is based off of this research work: https://youtu.be/lGOvYyJ6r1c
Adrien Treuille, Seth Cooper and Zoran PopoviΔ
Human crowds are ubiquitous in the real world, making their simulation a necessity for realistic interactive environments. We present a real-time crowd model based on continuum dynamics. In our model, a dynamic potential field simultaneously integrates global navigation with moving obstacles such...
The point here, is that you use world space data to influence the pathing, its more a sort of directed local optima/minima search
Man that stuff is oooold though π
There's something weirdly unsettling about a whole bunch of humans walking in random directions like that, not sure why
Also just noticed there's actual dialogue to that. Adding to the list.
It does actually happen though, that sort of vortex formation, I've seen videos of it from japan/korea where they did it π
Oh yeah sure, Shibuya Crossing or something like that?
Yeah, it was somewhere like that. I think it might have been a korean version
Just so you know, whoever wrote the code for UE4 nav movement was a bit of a novice and kind of set it up weirdly
Here's the result.. not great: https://youtu.be/8BB1-S4Uqo0?list=PL4C3D55CA4EF8578B
Quick demonstration of some Unreal Engine Crowd setups.
There's no way they should stop like they do in my video.. I was just curious about it
Here's the original RVO paper for comparison: https://youtu.be/1Fn3Mz6f5xA?list=PL4C3D55CA4EF8578B
We propose the reciprocal velocity obstacle (RVO) concept for real-time multi-agent navigation in which each agent navigates independently without explicit communication with other agents. RVO is an extension of the velocity obstacle (VO) that takes into account the reactive behavior of the other agents by implicitly assuming that they make simi...
Just to be sure, are you aware UE4 will fight you with it's everything when you want to scale up the number of actors, characters and agents in your project?
ah I managed to dig up the example I was thinking of for RTS style flocking:
https://gdcvault.com/play/1014514/AI-Navigation-It-s-Not
You can' even render animating 200 skeletal meshes at once without some very low-level changes in the engine
And you need to break everything into pieces, rewrite most of the things, simply get rid of UObject system
Because there is only one guy who accomplished Total War scale and that's how he did it
Course you can, just don't use CMC for em
Only a high-end PC can render 200 characters barely at ~80fps
Worth noting that they've made a "MassAI" system and will release it soon-ish
Mr. Hibbits (Official Epic programmer) gave hints about that system a while ago, from my understanding it's just an ECS wrapper
Helps the CPU, but does nothing for rendering, at least not yet
I specifically asked about rendering part, s/he said they don't know anything yet
Well, they used it for the AI characters in that recent matrix experience thingy
Mikko suggested it would be available along with some of the content from that demo sometime early this year
Yeah Mr. Hibbits confirmed that
But even on that fancy Matrix thingy they were using a system similar to AC's system for crowd managing
Sadly we wont get any massive rendering features soon π₯² (this fact makes me depressive sometimes)
I'm guessing that massive rendering is higher on their priority list than anything AI π
In a slideshow they mentioned nanite might be able to render SKs on the future
Is this an actual hard cap by the engine or are you just talking about pushing the engine too hard?
Not hard cap, you can place millions of meshes to the scene but it won't be able to run at sensible framerate
True, but I think that would apply to anything no?
No
You can have thousands of non-ticking actors, objects
Have sensible amount of hunders of ticking actors and objects
Also replicated actors
But rendering is really not for massive counts
That's how UE designed
Wonderful.
Wonder at what point I can start telling people to stop suggesting Unreal as the "best game engine" because its starting to seem like it has a lot of limitations.
Every other engine has its own limitations and I'm pretty sure many other AAA engines has weirder limitations compared to UE
Not a dig btw, just met way too many folk at Uni and during work that insisted on using Unreal because they didn't want to go near code... despite the fact they were hiring me to do the code.
Aye that's probably true, but it does seem like Unreal has a very specific use-case that people don't want to acknowledge.
Its only got limitations if you're not willing to rewrite stuff
UE gives you a great flexibility to alter the source code and gives you a really but reaaaally nice tooling and a fancy reflection system that is very designer friendly
Exactly π
It's just not RTS friendly, that's all
I kind of get the same vibe about the Bioware Frostbite for Mass Effect Andromeda debacle ya know?
I'm kinda curious to see if there's any engine that is that isn't an inhouse.
Unreal provides tons of stuff that takes absolute ages to write from scratch
I mean, you're taking an engine that's known for FPS and you're bitching about needing to develop it for RPG? welll duuuuuh π
I know that Coffee.
But games have sort of an infinite use case so it's hard to make it a swiss army engine
Tbf I've seen dumber genres being proposed to run on it.
Which is why you have the source code
If you want to implement modern rendering features yourself and make a decentful editor Spring Engine is awesome for RTS
Multiplayer comes out of box
The sea of thieves guys gutted the renderer out of it for SOT
My point was more it seems to be standard for everyone to go for Unreal because its "easiest".
Unreal is not easiest imo, it's the most flexible one
I've heard of Spring, never really touched it before though.
kind of comes with the territory. But lets face it, not that many people have really the skill of UE knowledge to achieve the high-end stuff like a total war game etc.
Honestly, my students choose Unity because its the "easiest" too π
Just have a team of experienced people and manage your project well, you can do everything with UE, for low-budget indies and solo devs it's more difficult
True true. Tbf I think most of the people I met who preach it as the best thing ever were those who lacked the creativity to need to change the engine.
Every chooses everything because its the easiest.. then moan about it not doing what they want and not being easy π
A lot of programming students do, but design and art I find go for Unreal.
Epic is like "art people is king and programmers should suffer" π
Well, to be fair, artists love unreal because it looks better by default than Unity
and the art pipeline is pretty solid
and I can't disagree.. material graphs are kinda nice in UE
Oh yeah the art pipeline is incredible no doubt.
Idk I enjoy programming in unreal significantly more than I did in unity
There's no invisible red tape so to speak
I think a big issue though is that there's far more tutorials and documentation for Unreal and Unity than anything else. So for people starting out with no experience, they don't really want to touch things that require them to "understand".
I used to use my own engine, then the Tribes (V12) engine, then Unity then Unreal.. honestly I've learnt to never think of it as anyone's problem but mine that a feature doesn't exist
I just remembered, last Star Wars game made with UE because developer team didn't want to work with clunky FrostBite π
Very different than when I started
Again not a dig at anyone here, just a lot of students I went to Uni with showed their complete lack of understanding when I spoke to them about it. Heck, met a girl who didn't even understand how functions worked but insisted she was a better programmer than anyone.
Oh lord no haha
Programming is an unnatural skill π
But yeah it was awful seeing so many people in design/indie courses who generally didn't understand the need for programmers because "Unreal does everything for us"
Are you studying game dev in university?
Used to, graduated a few years back.
Had a few jobs in the industry, mostly good people though had a few who were just as clueless as some students were.
I was going to study game dev, did not. And no regrets at all π I have friends at 2nd grade and they're still gonna learn OOP methods one day. And they are being educated as 'programmers', while teachers wasting students time with unrelated things
Oh god... are they studying computer science or is this an actual game dev course?
It's actual 'game developing' course in an official university
They learn level design, Blender, C# etc.
God. Like if you're doing back-end engine then I could maybe understand but if its front-end then learning what OOP is should be the start.
sounds more like a design course
Tbf it sounds like the "indie" course I had, a jack-of-all-trades one.
'Programming' is a lesson, but has lesser credit compared to design lessons. Still, their teachers claim they can work at Ubisoft etc.
Well, maybe as designers
Or QA.
I mean designers who can script
Yeah I do honestly think that's what most educational places train you as now π¦
That makes more sense
You want to learn how to really program and understand what you're doing, you need a computing course.
Nah, I teach C++ and low level game dev to our second years
they write an engine from scratch in second year
Dang. Is this a masters course or under-grad?
Might have to go to whatever Uni you teach at then
There's a few that do the low level stuff, ours is very much a CS course in GC skin π
I'd like to study at zoombapup's university if I had a chance
I did computer science at a much lower education level before going into game dev and I don't think I ever saw a teacher touch on what's happening under the hood, only "how to make the game do thing".
although, I don't think its as low level as I've taught previously. We used to do stuff with playstation dev kits and the like, these days we do more Unreal Engine stuff
Yeah, there's definitely a move towards less low level stuff. but thats becuase there's like 1000 "designer who can script" jobs for every C++ optimization nerd π
I recently interviewed a graduate student who was fresh out of a computer science game design degree who had never heard of assembly and didin't know what a debugger was
God.
Different things being taught these days I guess
Nah, he might well be taught it, but didn't learn it.. different things
I'm sure some of my students have failed interviews on stuff I've 100% taught em, but they've not internalized
I had one guy fail interviews because he couldn't write ye-olde-linked-lists and thats where we start in second year (actually, they're taught it in first year C++)
they're taught it, but then kind of forget or ignore or don't practice and so at the interview they don't know it
oof.
he did spend a year after that and re-learnt it all. Ended up he was a whizz at shader programming but lousy at C++ π
Funnily enough the modern shader pipelines are using linked lists to chain together rendering components xD
That's not to say there aren't shitty programmes too though
it's a big pool of knowledge for sure, but there's some things you just sort of expect people to known I guess
One day I'll learn about shader programming π₯²
Honestly, there's a lot wrong with education. I've been doing it for... a long time. I'd be the first to agree some stuff is just bad.
it's really not hard, shadertoy makes it really approachable these days
if you already write C++ you're not far off
I want to write an instanced skeletal mesh feature to Unreal Engine, and want to learn just because of this
very similar
if you learn simple 3D maths you've got most shader programming π
I'm not sure why no one else tries this, is it just too hard?
there's a lot of code in there for skeletons
animation sharing, control rigs, etc etc
it might be hard to make it work with the rest of the unreal eco
I guess its non trivial to extracate just the skeleton code to refactor
But thats why you get paid the big bucks right?
How difficult is it when you exclude those optional tools?
Only get anim bp and skeletal meshes
Here's a funny one for you guys.. I wrote some text-to-speech code on Saturday.. and realized I'd forgotten most of the syntax for using std:: stuff π
With the ECS thingy they're releasing it'd be a really attractive feature to have instanced meshes for ECS though π
just floundering round looking for UE4 syntax stuff.. it was brutal
I can't with the std:: stuff anymore, I use using statements like the terrible person I am
I realized I'd been doing too much python π
I was trying to declare a std::vector<int,int> and it wasn't happy π
forgot the std::pair π
quite embarassing
yeah it's absolutely painful, I had to switch from c-style pointers for a project and man declaring a modern C++ pointer
like why
it's like fourty lines for one pointer
smh
That's why I stay away from non C-like syntax programming languages
Never tried Python, C# or anything else before
Just C/C++
If only C# was non microsoft and native code only... sigh π
Python is a goddam travesty, but its literally the only language for ML work
If you think games students can't program, you should see CS students using python π
What CS students learn?
Well, python stuff for ML classes
But honestly python doesn't imbue good programming practices
Honestly, I don't even understand how Python programmers understand if
x = 1.2313
x is a float or int without looking to declaration π
Things went to quantum so easily π
there's actually a really interesting conversation around that, C style languages are generally based in type theory whereas python is an example of a language using group theory
Even while searching for ML tutorials I was looking for C++ ones
Gave up when I couldnt find
Don't bother
There's actually two options for it.. Pytorch C++ and Dark..... something or other π
The dark... somethingorother was what the original Yolo guy used.. so search for YOLO and you'll find it
I want to say DarkBasic but that's not right π
sod it.. I'll google it or it'll keep me awake tonight
You only look once (YOLO) is a state-of-the-art, real-time object detection system. On a Pascal Titan X it processes images at 30 FPS and has a mAP of 57.9% on COCO test-dev.
darknet
Yeah ./darknet detector train cfg/voc.data cfg/yolov3-voc.cfg darknet53.conv.74
Everything about Python looks ugly from my perspective
I guess I can't get use to any of that options
And.. probably no one is going to develop a ML framework for C++.. Damn π
Well, Pytorch has a C++ version
so you write your ML in python, then instrument it for C++ for inference
So your saying I should get the dimensions of each nav mash poly and draw a volume over it
I bet it's better if you do navmesh modificayion volumes or domething
don't think you can do that on ue4 as source
Make sure to go down to the rules-and-roles channel and react to the
or
emoji if you've already reacted to the β
in verification π
Due to the amount of packs, we try to keep it organized based on what people are actually using.
also nice seein you here 
Ay nice seeing you as well
I was looking into nav mod volumes but didnβt get much out of the documentation
hey all, is there a way in bp for a custom decorator to abort a running branch?
essentially run some logic on tick? i think in C++ its possible but I can't see a BP version
mm, but once im in the middle of the branch, how is that decorator reevaluated?
it only runs when trying to enter branch I think
it depends on what the notify observer is set to, in my case On Result Changed notifies the observer to abort
i think notify observer is for the blackboard decorator
I essentially want that, but instead of monitoring a key change it runs some logic on tick
oh, I read blackboard for some reason lol
np
the Keep in cone decorator does it like so:
{
TNodeInstanceMemory* DecoratorMemory = CastInstanceNodeMemory<TNodeInstanceMemory>(NodeMemory);
FVector CurrentDir(1.0f, 0, 0);
if (CalculateCurrentDirection(OwnerComp, CurrentDir))
{
const float Angle = DecoratorMemory->InitialDirection.CosineAngle2D(CurrentDir);
if (Angle < ConeHalfAngleDot || (IsInversed() && Angle > ConeHalfAngleDot))
{
OwnerComp.RequestExecution(this);
}
}
} ```
but I dont think I can call RequestExecution in BP
i was think also maybe an EQS querie could do it as well, some how make the higher scores go in the flow direction
I could run an EQS query inside of an actor use a volume box as the querier, and then set a direction for it to query in, only thing is itd be a bit more manual work
is it bad to store a TArray of arbitrary size in BTNode's node memory? can it lead to memory leaks?
if so, should I avoid storing FStrings and FNames in BT node memory as well?
FNames are just ints, so they're no trouble
Also since TArray/FString store pointers to a block memory not the memory directly, it shouldn't be an issue.
and what if I wanted to store FGameplayTag this way? Can I put it in FName and store it in node memory and then get the FGameplayTag back?
There is a virtual CleanupMemory
You can but tbh you'd be better off just storing the tag, going from Name->Tag isn't cheap because you have to search through the tag dictionary
yeah but how can I be sure that nothing overwrites the memory the TArray points to?
as far as I understand since it's the TArray isn't UPROPERTY'ied unreal`s GC doesnt track it in any way
yeah, shouldn't be a problem
TArray doesn't need UPROP to work properly
You only need UPROP if you want to expose it to reflection, or if you're storing raw UObject ptrs or something
so I can store an arbitrary size TArray in my node memory?
i'm just storing 1 plain cpp struct with value types in one of nodes memories
You should be able to yeah, TArray allocates it's own block elsewhere
All a TArray is is another pointer, then two ints for count/max
and I can also store FGameplayTag in node memory just as well and don't bother overriding virtual CleanupMemory?
yeah, gameplay tag is just an FName, which is just an int... it's POD
what's POD?
ok, thanks. then I must have a problem somewhere else -_-
But yeah I feel like if you have an array or string etc. embedded in there, you probably do need to implement the CleanupMemory func to nuke it first
It'd be similar to having a pointer in there that you never clean up
When I report noise event I can add a tag to filter when perception updated event happens. I have an actor with perception stimuli component and I cant figure out how to add a tag to it...basically when my perception updated happens it fires all delegate function, vision and hearing and i want to separate them
use Get Sense Class on the stimulus value
That's the easiest way to separate them. You can't tag sight, at least not the default one. If you want to separate by tag, you can probably just assume no tag = sight, any other tag = whatever you assigned the tag to
I have a problem with navmesh generation - in one of my levels the navmesh does not get generated on the Landscape.. or really it generates only on certain world partitions, but not on others... I have no idea what to try next
I found one issue on the forums that seems to be the same problem, but nobody has answered
Hello Firstly I am using UE5, and World Partition. Iβm trying to add a Nav Mesh Bounds Volume to my level so that it will generate on my landscape. The odd thing is that the generation just doesnβt happen on two of the landscape sections specifically. You can see from that picture that the mesh is being generated on all the landscape surro...
is it possible this is an UE5-EA bug?
I think it has something to do with world partitioning. It has to - the nav mesh works on some partitions and not others
currently downloading UE5-EA2 to test if it is a bug or not (I am on EA1)
Nobody is supposed to be using UE5 EA.
tell that to Stalker 2 developers. I just tested it with UE5-EA2, it's not an engine bug.
but still no luck. Spent almost 5 hours on it already.
Hoping I could get some help. My AI seems to be affecting each other. I have disabled ALL collision, and all navigation affection. I must be missing some checkbox somewhere.
https://imgur.com/a/BYoztVR
if anyone has an idea I'd greatly appreciate it
The Chinese monkey game (I don't remember it's name) also uses 5EA but both Stalker and they have an army of professional programmers
While people like us (solo devs - indies) waste days or even weeks to solve bugs they just create a task in Jira and get it fixed to programming team in hours with a fancy workaround π€·ββοΈ
well I am not indie anymore - I am a part of a professional team, just happened to run out of ideas what to do. Currently stuck with this nav mesh thing π
Gotcha, sadly I don't know the root of the issue, but if you're still not sure if it's either UE5EA bug or not, you can ask in #ue5-engine-source or #ue5-general, probably they know about it more
check if area class of the AI actor is not set to Obstacle
also try using Visual Logger to see what's really going on
(Tools - Debug - Visual Logger, start recording and then backtrack through the timeline of events)
Thank you Jan, will check out visual logger! is this what you're referring to?
yeah, that's what I meant. Seems ok.
if you are using the navmesh, try turning it on in the debug view (Show - Navigation; or press P) and see if the actors are carving holes in it.
I'm gonna have to learn the visual debugger as I've never used it, appreciate the tip
yeah now pause it, along with the game, and just hover on the timeline and see what's in the "strips".
During this log, first image is the only AI that made it to end, meanwhile the rest are stuck bumping into each other with the same log.
Its called Black Myth: Wukong
Ah yes
They moved to a completely new world partition schema in UE5, so its likely that some of these systems like Navmesh haven't been updated yet. Are you building from the absolute latest source??
I have the 08/21 source
08.22.21
and I tried the EA2 binary on the store
same problem
I'd probably build from the bleeding edge source and just have a look at the code executing
They've moved to this "one file per actor" thing and have a completely different world composition setup. Probably not conducive to navmesh updates. You can always fix it to work though.. although I suspect that streaming itself is probably a bit buggy too.
Thats why we get paid the big bucks π
weirdly, I saw a bunch of jobs at a UK company the other night.. animation programmers getting 60k, but AI programmers getting 50k. Seemed a bit weird π
yeah π well, I am a junior AI dev at best, everything in UE feels like having to hold on to a 300km/h train
especially in an AAA job position
so yeah, that's we get paid this much
The issue was I had RVO avoidance enabled -.- went through the checkboxes one by one, forget I had checked it to see what it does /facepalm
damn. Yeah, clear away from the RVO, I heard only bad stuff about it anyway (from the guy who made AI in Mafia 2)
RVO isn't a good fit for character avoidance imho.. the detour crowd thing is slightly better, but needs some tweaking
Wait until you have to start learning reinforcement/machine learning too π
It looks like my Uni will be the first to run a specific Game AI degree at least in the UK, I don't know if that's good or bad π
eh, not worried about that. I did my bachelor thesis in 2016 on convolutional neural networks π and my diploma thesis on EEG mind controlled games, that used some pytorch ML too
good because AI = fun, bad because I have to teach more of it π
ah nice.. I was looking at GDC summits just today and there's both the Game AI summit and the Machine Learning summit on this year
Been writing some briefing docs on why Game AI is a thing to learn.. just showing all of the ML and AI content at GDC etc.
but yeah, the ML nowadays is insane, with the StyleGANs and everything. Insane stuff.
like this (OT) https://creator.nightcafe.studio/
you enter a sentence and it generates an image based on it
that's way out of my league
Yeah, I like Nvidia's GauGan 2 (Canvas), using semantic labels to define half decent looking art π
I've never seen any talks about ML in AI. Can it do something like "this NPC guard died from a headshot when he was crouching at this corner, in his next life he will not crouch there thanks to the ML"?
always wanted to try to code something like that
yeah, thats the area I'm working on right now.. its called demonstration learning
mostly comes from ideas from robotics ML where they're trying to get robots to learn human behaviours
I'm training mine from videos π
noice! I think I've seen a game years ago where the AI learns how you killed it and it makes it progressively more difficult to kill it
Part of the downside to ML/RL stuff, is that they're literally too much of it and a good amount of it is.. kinda crap
Yeah, that kind of thing is pretty easy even with simple ANN's
They used those in Total War series
really early example was the game Black and White, which used a single perceptron to train a creature to do/not do actions
back in 2001 π
this is the game I meant. It learns from your playstyle
so gradually you are fighting against yourself
Yeah, think I've seen a presentation about it..
I definitely remember the art style
But I think I saw the devs present about it at AI conf in vienna
memory is fuzzy since covid π
yeah I also saw a video back in the 2017 and only remembered it now π
eat some omega-3s π
neuroprotective
so I tracked my original problem with navmesh not being generated on certain LandscapeStreamingProxy's to this (edited in mspaint for NDA reasons)
the violet part is nav mesh
the black part is where it is not generated
and the frame is the landscapeStreamingProxy
there are no nav modifier volumes inside it and the NavMeshBounds volume obviously large enough because it generated everywhere else
on the whole level map, only the black part is not generated in the navmesh at all. It's like the terrain is not visible to the Navigation system when building it
or I don't know. 6 hours spent on this already π
can this be a memory issue?
but it consistently fails only on this one half of one specific world partition
WTF
pls help π
Just to be sure, are you entirely sure same problem does not occur on 4.27?
Either way, this issue looks uncommon and probably some low-level thing involved and we lack too much data to predict what is going wrong exactly
At least if you can guarantee it's not a 5EA bug, you can build a strategy to identify the bug, maybe even if you can extract some more info from debugger you can contact Miezsko from Twitter?
What I see is just a cube, can't even have a guess why it's specifically that 'area' is not being generated on navigation
Is it because of a shape? Is it because of the world coordinates navigation being generated on? Does this happen with other levels? What happens when you replace landscape proxy with a simple mesh?
it's offtopic but no, absolutely nobody who knows what they are doing is using UE5 EA, that would be stupid. the few people who are still silly/daring enough to use UE5 are at least using 5.0 branch
Unless they mention 5.0 branch as "early access" they really use 5EA (Black Myth: Wukong)
Still it's a terrible idea though π€·ββοΈ
yeah but when was that written, 6 months ago?
(could also argue that anyone simply saying "UE5 Early Access" doesn't necessarily mean they're using the launcher version too... the whole engine is early access right now, in any branch)
Yeah ngl if they were using launcher version that would be funny π
I never tried it but world partition seemed like it was one of the more broken components of UE5 EA, so I would have to chalk up the issue as simply a case of: alpha engine alpha problems
anyone care to help a fellow gamedev?
pls @ me if so
i have followed this
β Come join the Team Beard Discord: https://discord.com/invite/hhv4qBs β
β Check out my Marketplace Asset: https://www.unrealengine.com/marketplace/en-US/product/flexible-combat-system β
β
Ways to Support The Channel β
Patreon: https://www.patreon.com/JonBeardsell?fan_landing=true
Buy Me A Coffee: https://www.buymeacoffee.com/JonBeardsell
All...
using als v4
but my guy is just moving forward every loop, its not following the spline
I would get familiar with Visual Logger if you're not already it's a great tool, you can see data and a visual representation of what's going on what your AI. I would start by checking the Blackboard key for the goal it's running too and making sure it's getting updated properly https://www.unrealengine.com/en-US/blog/using-the-ue4-visual-logger
Thereβs a class of gameplay bugs that are hard to track down just via user reports. These types of bugs typically involve complicated steps where the AI has made a decision based upon the state of the game at the time. UE4 has a tool to help in this regard; we call it Visual Logger, and here's how to use it.
I don't think its unreasonable for a commercial game company to use UE5 as long as they're happy to deal with the cost of bugs and development. Its a risk for sure, but imagine you've got lots of really great UE experienced devs on board, why not? There's nothing magically good or bad about Unreal Engine. Its just a codebase like any other, if you licensed any other engine you'd be in similar boat. You just have to accept responsibility for fixing things yourself and not waiting for Epic to do it.
The Black Myth guys clearly know what they're doing
Now if you're a tiny indie developer, with say Unity experience and wanted to go with UE5? that'd be a different thing π
is there any way of preventing nav mesh generation inside collision?
ie something like 'fill collision underneath', but only inside the mesh, not below it
Not sure if I fully understand what you're after, but it sounds like "can ever affect navigation" should do the trick
well, imagine a landscape with a huge cliff mesh on it... i want nav mesh on top of the cliff, and near the base of the cliff, but not on the landscape part thats inside the cliff(assuming a closed mesh)
fill collision underneath would solve it in that particular case, but does not work if you have stacked Z layers of traversable areas, since it prevents nav generation at any Z level below the mesh
can ever affect navigation just by itself sounds like it should do that
since it basically makes it so that the colliding area won't get navigation generated in it but allows generating navigation on top of the object
hmm that does sound like what i want, but when i try turning on that option it generates nav as if the mesh actor wasnt even there
sorry, turning off
Yes it needs to be on
its on by default, and thats whats giving me the behavior where it creates navmesh on top of the static mesh, but also on the landscape inside the mesh
π€
maybe ive messed up the generation settings somehow...
I guess you could add a collision box inside it which prevents the generation
yeah, considered that, but does sound tedious to do for every large static mesh in the game
ill try messing around with the generation settings a bit and see if those could be causing this
What effects does it have if there exists island navmesh inside the cliff somehow? Id guess there'd be none?
Like, does it matter if it exist really?
Or perhaps i didnt understand the problem π
there's a couple of cases where it does matter.. one is when youre projecting a location; if there's nav mesh beneath the surface of the object, it could accidentally project the point to that part of the nav mesh(which is inaccessible)
a second case is when doing navmesh walking without sweeping for collision, where it can overshoot the current navmesh, go through teh sides of the object, and end up on the nav mesh region inside the mesh
Ah, i see. Alright was just curious^^
when parenting blackboards with synced variables, does it sync with the child or the parent values?
I mean when a parent blackboard has an instance synced entry and there are two inheriting child blackboards, will they have the same values as the parent or as the other children of same type?
random question is there a way to set angle limits for SetFocus? I want it so that the AI can look down at its focus actor for example but not go past 45 degrees.
That seems you would do that in your animation logic
so i found this picture of what im trying to do with my navmesh in ue4, and figures i cant read the article but I noticed "recast navmesh" is this a c++ function?
When you place down a navmesh in the world then check the world outliner you should see one with the type recastnavmesh. I assume it's referring to that?
as these are all options in here
i dont think it would be π€ as my problem is not directly with the animation, just the rotation of the actual actor when SetFocus is on
Actually after digging i'll overwrite the UpdateControlRotation in my Enemy Base
Before I was in Unreal, I was in Source. UE4β²s about a bazillion times better than Source, but thereβre a few things that I think Source still does better. One of those things is navigation mesh editing.
In Source, nav mesh editingβs done in-game, in a pretty janky way - you execute a script that rebinds all your keys to various nav mesh comma...
I wish i could edit the nav like in source, are there any plugins that allow nav editing or at least expand on the navmesh?
None I'm aware of. Most plugins I know of replace navmesh entirely and/or are expensive.
may i know the names of a couple if you wouldnt mind, i need a lot more flexibility even if i have to replace the navmesh entirely
A couple I know of:
https://mercuna.com/
https://www.kythera.ai/kythera-unreal-engine-4
thank you
In C++ you can do whatever you want with navmesh
UT customised it pretty heavily, for e.g.
yes ik, im in the process of learning c++, which is a lot to learn lol
yeah and NavMesh definitely isn't "my first C++ project" kind of material
exactly
i mean i could probably expose some navmesh c++ to blueprints but even then
still confusing
im kind of stuck because I essential want to use my nav mesh for procedural spawning, but in playable areas. And im also trying to keep track of players progress through out the level, essentially how source does it they do it all in one on the nav mesh
im sure theres probably another way to do it without using the nav mesh, but i cant wrap my head around it
thx! I actually fixed it, it was the transform on get location, but i will remember to try this out for debugging!
You know you could just model a navmesh in blender/max/maya right? that's what we used to do before runtime generation π
Would be easy enough to code a new editor mode to add that sort of halflife 2 style navmesh editing if you really wanted to
there's even a plugin template for adding an editor mode
I'm curious - has anyone made a plugin that has more BTT than what comes with UE? I've thought about doing it. Like, Tasks Enhanced or somethin' like that, lol
Such as?
What can I do to make my AI character to look at some FVector? Rotate and face BB entry just stuck in In Progress, custom task that calls Set Focus in BB also does nothing. I think I've tried all possible combination of rotation flags in character, AI controller and CMC
ok nvm I had orient rotation to movement set during runtime
now how do I make turning smooth with Rotate to face BB entry or SetFocus?
i didnt know that actually
can i use this node to run eqs in a regular actor, not AI?
With a AIPerception component, and a behavior tree, what is the standard pipeline for updating a blackboard based on the sensing component?
Should that be a service that polls the Controller and the AIPerception component?
Or should the AIPerception component update the BB directly?
got it, im using a combination of basic pathing from navmesh, and EQS queries to generate a path. a bit unoptimized and barebones but its starting to look sort of how i want it to
What's the correct way to trigger an event based on a value? For example, how would a boss change attacks after a specific health threshold?
Are you using a behavior tree?
Yeah
Does someone know some common reason which cause NavMeshBoundsVolume does not work on landscape? I checked many discussion online but they all dont work. Appreciate for the help!
behavior trees are brain components
You can have a selector, then one of the children tasks fail if the HP is larger than certain amount.
Selectors stop at the first successful task, and won't go to the next task.
Is there a way to understand when RVO avoidance starts working π€ ? I'd like to disable AI's orient rotation to movement so that character strafes when it avoids something or another npc
Hey, im trying to figure out the best solution for an ai charge ability that can destroy playerplaced objects. the ai charge is similar to the first part of the solution here :
https://answers.unrealengine.com/questions/717864/view.html
except im using the node in the image with pathfinding disabled so the charge is in a straight line.
my question is if this is the best approach or if there is a better approach for this types of things where an object should block pathing "sometimes" (block normal walking, dont block charging)
So I would do it in reverse order, sort of? Like, if there are multiple health thresholds the selector would check the lowest one first
Out of curiosity ... how many people are using the built-in behaviour trees versus some form of a custom AI framework? π§ for BTs and π¨ for Custom
The BT's are very nice in my opinion. One of the better implementations out there. But that's just me. I am interested in using the HTN planner from the marketplace though. But currently, my game doesn't need that kind of stuff.
I have a mix of FSM, BT and very simple utility
It's an AI framework soup with tons of sphagettis
I like BT's but my main issue with it atm is that making it savegame compatible is a major pain
Eg. if you save and load and want AI to pick up from where it left off you have to jump through so many hoops to make the BT work in that fashion, making the design of the BT much much more complicated purely for the reason that it doesn't let you save that information anywhere...
It's not really an issue for my project for the moment as I can limit saving so that it doesn't become a problem :P but I feel like I might want to change it at some point so remains to be seen
Probably none of the BT editors around the industry is savegame compatible too
I guess thats why in games like Resident Evil you have specific save locations
I'm currently using Enable/DisableInput to talk to my interactable actors in the game. They can individually bind keys using the new enhanced input system, and once I start hovering an object, it'll call EnableInput so I can trigger input binds in these actors. Now, I also wanna make an AI-controlled pawn interactable, but it turns out you can't call Enable/Disable input on AIControllers, it'll error "EnableInput can only be specified on a Pawn for its Controller"
Posssing the AI pawn is not a good idea because it'll completely switch perspectives. Is there a way to enable input just as you'd do with normal actors on AI pawns?
I can't figure out why Navmesh is not filling whole terrain. I played with Agent settings and stuff like cellsize but get same results
hi. there is any way to drop a decal to locations who our pawn sensing can see?
ha, i tried to create a custom AI framework on top of BTs
Interesting ... how did that go? π
Yeah I mean honestly most games don't let you save at all points, and that can be made to work
pretty meh. I still refactor it as I go. It's something close to what Intax described - a mix of BT and a tiny fork of community BT Utility plugin, but I tried to add some polymorphism and state to it by wrapping logic in some base UObject class and various implementing classes which store state. Then I made some generic BT tasks, services and decorators that get an instance of a running activity (UObject descendant) from a component on the AI controller and execute some implementation
I see yeah, from my end BTs just weren't a good fit for the project that I'm currently working on. We need AI functionality that's way more modular and interchangable than you'd get from BTs. So we're essentially now using a stack-based FSM that extends AI functionality modules through Blueprint ( much like a BTT ) for designers to play with. And even though we won't use it for saves, it could technically be extended to be savegame compatible, so that's nice I guess?
I don't get how a stack of blueprints are better than a stack of blueprint tasks π
Hey guys. Working on a multiplayer and I want to add an AI but I dont want it having a PlayerState. Without one though animations are not replicated to the clients. I can see the AI moving on the client but no animation is playing whatsoever. Must I set bWantsPlayerState=true for animations to be replicated or am I missing something?
my AI is a ACharacter
if I do set bWantsPlayerState=true only some animations are playing. the move animations from anim blueprint are not
I am using FindPathToLocationSynchronously to get a path for an Enemy to reach the Player. My goal is for the END of the path to be NEXT TO the player since the enemy cannot collide with the player.
The player has
SetCanAffectNavigationGeneration(true, true);
being run on it and if I use the console command show Navigation I can see the player is affecting the nav mesh. But for some reason the last PathPoint generated by FindPathToLocationSynchronously is always on top of the player instead of next to it (the closest reachable point).
I am not using a custom FilterClass so I believe the default behavior should be respecting NavArea_Obstacle areas (which my player is). Any thoughts on why this is behaving this way?
Why not just calculate a location next to the player? not on the player?
Even so, most moveto actions would stop given an acceptance radius wont they
yarp
Zoombapup, do you think blackboards also a good fit for FSMs?
Blackboards in general work with pretty much any architecture
They're just places to store data really
Is there any alternative architectures? (just to learn)
For blackboards?
Yeah
Hmm, there's some articles on them in the AIWisdom books, those are online and free now
But really they're so simple you don't really need much knowledge to make one
just.. stick some data in an array and you've got a blackboard π
now you can get nifty and make the data shareable, or have it be variant etc..
Yeah, blackboards are just whatever data you want to be able to store
UE has some issues because it doesn't do that properly π
I can understand why you always trigger about that junior guy who wrote the BBs π
FGameplayTag + FProperty combo would be awesome for blackboards
Yeah, they didn't have those things when it was written I guess
Maybe not gameplaytags but they had fproperty (as Uproperty back then)
Or maybe the blueprint interface stuff wasn't complete, I dont know.
It definitely feels like they didn't specify the functionality right
most of the BB seems focussed on memory and not on usability and readability, but that could be my bias
Does memory blocks (bInstanced thing) really helps that much?
Whats the catch of optimizing a few variables
Even 10k floats does not cost at all in the memory
I think it was mainly all stuff for serialization or something, I cant quite get what they were going for to be honest
But it sure wasn't usability
I keep thinking why they didn't just have a blueprint hold the data
But have that blueprint have shared and per-instance private values
Blackboards are really useful if you can have shared values between many blackboards and then individual blackboard values for each instance too
I wish they would hire you tbh, maybe you could convince them about some changes π
Nah, pretty sure Mieszko's tried π
Isnt Miezsko is the boss?
Although, now Mikko is there and John Abercrombie, so maybe there's enough
Mieszko is/was their only real AI guy for years
He had another guy working with him, but I don't know if he's still around. I think Mieszko is still on fortnite
But he was doing the AI for paragon
Now Mikko is at Epic, just did that MassAI thing for the Matrix experience, so there's probably half a dozen AI guys there now
I suspect they'll have some machine learning people there too, given there's some of that in experimental
But Mieszko is the only AI guy I've seen publically from Epic I believe
Epic have a bit of a hate/hate relationship with AI I guess π
They value their partners more than their users I guess, it looks like their motivation is determined by marketing team
Assuming from this fact
Well, PR for new features probably beats usability π
Hey, how is your actor AI going on? π
Alright, bit busy with marking right now, but I managed to get a decent GPU at least
just ordered the parts for a new PC
then it'll be slowly melted doing ML training π
Nice
Been busy putting a bid together for an ML project for the UK military.. so things are hectic
Wow.. UK military.. that looks like raising the bar π
Well, they use a variant of the game engine used for Arma called VBS so this is pretty typical game behaviour tree stuff
We're doing a project about learning to co-author behaviour trees
My research in general is about co-creative systems
usually generating behaviours from video, so you could see how that'd be useful
I heard about VBS, I guess a new version of it (or its new successor) about to be released
yeah, thats the one
We're hoping to get some more military simulation consultancy going, cos they need the help in the MOD π
And its basically typical games stuff in reality
So all the crap that everyone here goes through trying to create behaviour trees, all these military guys go through too
and they're not trained for that
so... you can imagine its a bit of a mess π
Yeah
I'm going to maybe commercialize it as a product at some point, but we need to prove the benefit first
Are you working with a team?
When exactly you decided to drift away from Game AI and work on more ML?
I'm still doing game AI really. I'm just using ML as a tool
But I decided on that approach when I first saw pose estimation working
I had been doing some experiments on players views of behavioural motion and came across a crude pose estimator
You know what pose estimation is?
Never heard of it before
Lemme do a quick google search
Ah, yeah, I saw that a lot, but didn't know its name
Human pose estimation is about figuring out how to detect human keypoints
and given my main thing is the holodeck concept, I figured using pose estimators to reason about acting would be useful
and it kind of went from there
I think its pretty inevitable that we'll get better at understanding information from films
and given the holodeck is sort of like being immersed in a film.. seems like a nice fit
but its quite a challenge still. I'm working on how to infer unseen content from films currently (a bunch of patterns you see in films where you don't see stuff but you expect to)
Maybe short films could be a better option π€
Well, in films you do it shot by shot anyway
so I split films into shots and do my learning on shots
then recombine into the whole timeline
its fun to work on, but nobody is really doing it π
Well, ok, thats not true.. google and facebook definitely are
but not publically
and I think NVIDIA might be.. but only as a side issue. Pretty sure Facebook are doing it for analyzing their video content. Google too.
I'm pretty sure China also working on something similar
Yeah
They're doing more action recognition/activity recognition
Well, essentially I'm trying to use the findpathtolocation to do just that. I guess I could get the second to last path point and find the location between the player and that point, get look at rotation, forward vector and multiply it by a player radius to get a point n units away from the player. But it seems like the parhfinding should recognize the character as an obstruction and do it already
No, you don't want it to be an obstruction
you want to stop just short of it
which there's a value on the move node to do
"acceptance radius" I think its called?
basically get near enough and stop
If the character is an obstruction then the pathing should recognize that next to the character is the closest point. My problem with the accepable radius is I'm trying to be accurate with how many units the AI is moving
Hmm, I'm not sure I'd try and do it that way
I guess I can just deal with the inaccuracy, I was just trying to do it "right"
Obstruction isn't really what you want is it.. you're sort of abusing the system π
I guess I don't follow you there. An obstruction should prevent pathing, right?
You could always manage the path following yourself and stop at the right place
Well, obstructions usually affect the navigation cost
if you want it to basically not allow any navigation at all, you'd be cutting a hole in the navmesh, which would have to happen dynamically
and that's not too easy to do
well, performance wise
Its not really meant to be doing stuff every frame
its more for like a tree falling down or a door opening
so can have a bit of a delay
yeah my spike was during extreme testing , not a likely scenario
i dodged it entirely tho
clearly wasnt needed in my case anyways
UNavigationSystemV1::GetRandomReachablePointInRadius(GetActorLocation(), 10000.0f, spawnLocation);
GetWorld()->GetNavigationSystem()
How do I get the navigation system?
Getting an illegal call of non static member
Been a while, isn't there a getter on the UNavigationSystemV1?
Yea buts the function is not static
I see it now, I need to cast to it
yessir
Thxs
Yeah, I have no problem with that. I'm doing something like that already. It's a turn based combat situation and units can only move, say, 1000 units. So I get the path from the unit to the player then I iterate through the path points and add up total units moved. If it exceeds the 1000 unit limit, I grab the last path point that WASN'T exceeding the limit and add the difference faxing the NEXT path point. It works well.
But my problem with the player is that the collision around the player isn't circular. I have decreased the nav mesh shape simplification a bit to try to improve accuracy but it's a circle made of rectangles. And what happens is the AI finds a corner they can walk into that's SLIGHTLY closer to the players location. The end result is they kind of try to circle around the player in weird ways to hit that corner.
So now I'm thinking.. I'm gonna disable collision on the players when it's an AI turn, let the AI just navigate towards the player without trying to find those corners. Then just use the acceptable radius to stop it. I don't recall being able to use the accepable radius in c++ though
Sorry for wall of text
Yeah, not having collision is how I usually do AI stuff to be honest. It fixes a lot of problems with movement.
I use avoidance algorithms instead, so I don't have to use rigid bodies to keep things apart
If you're doing the path processing yourself, acceptable radius is just a distance check
Someone knows why the AI controller moves the FloatingPawn without taking in account the movement values ?
Also someone knows how internally in the controller change the rotation rate ?
Say tried to use the Set Control Rotation but does nothing on AI controller
i use a custom rotation tick with interp to control rotation speed
where you set it ?
My issue is I'm using the FloatPawn so some of the tools in the net about check and uncheck element in the movementcomponent aren't a thing on the float movement
sorry, not a tick, its a timer that i call and clear - it use to be a tick with a gate and two event calls
As for where, its called from the BT. One area would be to turn to player when they attack.
Turns off when attack completes
In C++ it's FaceRotation function
Which "movement values"?
// Only if we actually are going to use any component of rotation.
if (bUseControllerRotationPitch || bUseControllerRotationYaw || bUseControllerRotationRoll)
{
const FRotator CurrentRotation = GetActorRotation();
if (!bUseControllerRotationPitch)
{
NewControlRotation.Pitch = CurrentRotation.Pitch;
}
if (!bUseControllerRotationYaw)
{
NewControlRotation.Yaw = CurrentRotation.Yaw;
}
if (!bUseControllerRotationRoll)
{
NewControlRotation.Roll = CurrentRotation.Roll;
}
#if ENABLE_NAN_DIAGNOSTIC
if (NewControlRotation.ContainsNaN())
{
logOrEnsureNanError(TEXT("APawn::FaceRotation about to apply NaN-containing rotation to actor! New:(%s), Current:(%s)"), *NewControlRotation.ToString(), *CurrentRotation.ToString());
}
#endif
if(bSmoothControllerYaw)
{
const FRotator SmoothRotation = FMath::RInterpTo(CurrentRotation, NewControlRotation, DeltaTime, SmoothnessRate);
SetActorRotation(SmoothRotation);
}
else
{
SetActorRotation(NewControlRotation);
}
}
Override it in Pawn and copy paste this exactly, you'll have a smooth rotation like CMC
oh thank you, where looking at the Movement Component from character but it was a nightmare of dependences
Hmm, so it turns out that Github are doing subscriptions now
i.e. you can have subscribers
Which might not be a bad idea to do for some AI tooling for UE
would make it worthwhile if I didn't feel like I was staring into the void π
And you could have feature requests etc..
Today I had a motivation to update that FSM plugin in the marketplace to a multi-threaded one, with some other fancy utils. But I realized whole system relies on the property system of UE to make it more accessible in BPs and tons of overhead comes with it
It's difficult to stay away from BTs sometimes π₯²
:P
this seems to be a bit of a common theme with a lot of marketplace tools
it's hard to use something from there unless it's something that's at the "edge" of your system so to speak
when it's at the edge it just is there to do its own thing without affecting the rest of your architecture much, so if it stops being what you need you can just replace it without having to redo a million things
I used it for a while, liked a lot.. Especially the editor and some fancy improvements to make it a modern FSM was really impressive
But looks like they wanted to make the editor features more fancy but they sacrificed a lot of performance
Seems like it should be possible without big perf impact too π€
For example 'begin/end/update' nodes of states are dynamic multicast delegates
But probably harder than a more straightforward integration
That doesn't seem like a major performance concession to me, you probably wouldn't have a large number of delegates bound to that?
I didn't bind anything but default call to begin node costs 0.15ms with 20 AIs by default, evaluating graph, transition calculating etc. adds 0.15ms more and you just get 0.3ms for nothing because of the reflection based system
Ah
Whaa ? Does a multicast cost .15ms for 20 actors?
Depends, FSM had tons of calls with nodes but a single dynamic multicast searches all the UFUNCTIONs by name so it costs more than anything compared to it's alternatives
I only use them for non frequent things
Guess i should reconsider
Pretty sure i set one up for ui updates
Like.. one singular reciever
Called rarely tho so it probably doesnt matter much
The reason for function bindings in UMG is very expensive, they use dynamic delegates internally. It's best to use a BlueprintImplementableEvent instead for those things and call that event from native C++ base
Yeah if it's not frequent dont even bother
I use it for reload, level-related things etc.
Blueprint implementable is what i've done aswell so its an easy thing to change really
Delete a few c++ lines, add a function call in the bp
I usually like having non dynamic MC delegates and call BIE events from native class
Yeah that manes sense. I try to do that aswell (mostly because my first attempts on delegates failed, and felt unnessesary anyways)
Soon gonna have to deal with my pathfollowers and add some crowd logic to it
I wonder how im gonna be able to keep it light and effective enough...
are you guys using MassAI and stuff?
Is it out?
Some people might be using it on #ue5-general , other categories are still based on UE4
@ocean wren Have you ever used the that FSM plugin in the marketplace? If you haven't, it might interest you since you love researching new AI things. They have some nice features for FSM usage
Which one is that?
Logic Driver
I used one a while ago, that had copied the FSM editor from the animation state machine and used that
This one has more features, you can select properties on FSM similar to conduit logic. Though its totally not worth to buy PRO version for that (199$)
Hmm, a bit more like that Unity FSM thing.. playmaker?
Never saw that before
Used it quite a while back.. seemed ok
Yeah I've been thinking the same. Though DOOM had gigantic amount of nodes but working very well. This one has issues with a few nodes π€·ββοΈ
Mainly because of this fancy system. They are using pure reflection system instead of calling actual C++ methods
Probably more to do with UE than FSM's
Yeah graph evaluating algorithm looks fine, it's just because of UE's reflection flavour
Well, this is mainly for blueprint stuff right? there's always going to be some overhead
It's kinda extreme
You get the source code with it, so you could just ditch some of the worst blueprint sillyness
That's what I wanted to do today, their 'evaluation' system is built around a simple helper struct and it's very coupled to UFunction's
Making editors in UE is a guilty pleasure for me π
Which also prevents multithreading like UE's anim state system π₯²
It's pretty good though, just shouldn't expect half of the BT's performance
You get the source code for it though right?
Btw apologies if I misunderstood, I get that as an argument for my sentence π
Yes you get the source code with plugin
π sounds a tad salty
I was just thinking you could refactor it from the code, but yeah it'd be making your own editor really.. which is what I've done
in fact, I've made a few of em π
well, not finished, but in progress
Aside from the lack of graphics drawing prims (the gits don't implement a triangle fan for the UI) its actually kinda fun
I am always triggered that I can't do proper rounded buttons without a miserable material hack π
rounded buttons are required for modern UI! π no rects!!
I agree!
Perhaps some custom slate can fix that...
Custom round buttons, rounded corners etc etc
I looked, didn't seem like an easy addition, they just don't have a function for submitting a triangle fan to the renderer in the slate code
its got rectangles basically
they do rounded buttons by drawing a rectangle with a rounded texture on it
I heard some engines use javascript instead for UI
Which... you can do anything with it I guess
Well, you can do that in Unreal Engine too
its got a built in chrome webview thingy after all
PlayMaker is scary. The entirety of My Summer Car is built using nothing but PlayMaker and it's a gigantic mess :D
Although to be fair, the inexperience of the guy developing the game might have something to do with the messiness, but some parts of it are just scary still
Its more the visual paradigm that feels messy for the most part, but FSM's don't do anyone any favours for anything complex imho.
Unless you're ultra organised
And are capable of state-charting everything out, which I am not π
You could try using a swept sphere instead of a trace
Whats wrong with a regular trace π€
Hi everyone, still trying to figure out a way I can make the nav mesh tools a bit more advanced, Iβm currently working on getting the nav mesh polys, but how would I be able to bind attributes to them like walkable area spawn area start area etc. is there a function to bind attributes to it?
I think there might be some ways to do this in C++ since you can flag them as different kinds of nav areas using nav area modifiers
In theory couldnβt I get the nav tile and put nav modifiers on each tile in BP?
Iβm not opposed to C++ but for prototyping itβs a bit easier to use bp
Probably, but the nav polys etc. aren't accessible in BP's I think, so you'd need at least some C++ if you want to access the nav data directly