Thanks for the video. I've been diving in to the StateTree/SmartObject/GameplayInteractions source to get an understanding of what's going on. Your's and UnrealDevOp's videos have been helpful in getting a feel for how all the stuff works together. You might have already fixed this, but you have a typo at 19:11 for UMRKStateTreeComponent meta specifier BlueprintSpawnableComponent.
@@MrKosiej ah fair enough. noob mistake :D I assumed all specifiers weren't statically checked. While reading the StateTree code, I noticed the use of HasMetaData to check for specifiers. I guess they must be custom, but I'm not sure how a typo in BlueprintSpawnableComponent could be differentiated from a custom specifier unless they were registered somewhere.
Thank you so much for this, got me started. One question I have. I want to make an actor (a controllable region/province/state) that is created when the spline loops. With it I will have modules attached to the parent. What BPP's will I use to make the parent as when I type in spline there are lots of options. Thank you
Hello Commenter, firstly, it's not about just interaction but additional ways we can utilize it through this plugin, like using state tree assets as behaviors in smart objects. I covered simple interaction in my other video.
Hi MrKosiej, great video as usual! I haven't had the chance to test 5.4 yet as several of the plugins I used are still not compatible, but I'm excited about the things you showed in your recent videos, specially the ability to have the controller like you showed. I will definitely experiment with the approach you suggested, since my approach with blackboards work, but it's a bit cumbersome and requires a lot of boilerplate. Also, one thing that I'd like to highlight and I really hope Epic address in future updates, is the amount of state tree related things that are C++ only. Even though I'm very familiar with C++, there are several things I prefer to do with blueprints and currently state trees are still a bit limited in that sense. One example are state tree events. I found the need to send data along with the event, and I was surprised to realize state tree events actually support payloads along with the tag that acts as the event name, but you can't use event payload in blueprints.
Yeah, i noticed some things exposed to blueprints that suggest something more should be possible but there's no way to use it without going to c++ :v or at least it seems not possible :P maybe ill find something later
State Tree definitely needs some system implemented for data management, either through adding official support for Blackboard or by creating some scratch pad system that allows you to store and read variables from it. There's also a lot of interesting and good changes to State Tree in the release version of 5.4. The new state tree AI component schema comes with a new Move To task, hopefully in new versions they will add a lot of the default tasks you can find for Behavior Trees. Another interesting change is the addition of states having their own parameters. Speaking of parameters there's also a really great change with them, in 5.3 and older if you changed the value of a parameter in the state tree asset, state tree would ignore that and only take the values set from the state tree component class defaults from the blueprint. Now, it will take the values for the parameters from the state tree asset by default and if you want to override them from the component blueprint class defaults you need to check a bool. This is far better because now this will allow you to set default data to change AI behaviors from the state tree asset itself without the need to modify it from the blueprint component class defaults. Makes things more modular. I still have a list of things I'd like to see them change or add, but they're slowly getting there! Hopefully Epic continues to make great changes to state tree!
Been watching articles about this sort of setup elsewhere, but never attempted it. Appreciate this tutorial, but have not been able to get it to work. Not sure why but my Shader spits out a "Gradient instruction in a loop with varying interation, attempting to unroll the loop".
@@MrKosiej Thanks, I am going to still try it out, but I was pretty determined to get something in over the weekend, so I eventually I did the Canvas Render target which worked great. My map is about 16,000 individual hexagons that can be revealed, and the render target has them all tracked. I posted a video on my channel of what the end result looks like.
Texture can be animated, lol. You animate the textures in the materials. It makes no sense to animate a png file or similiar because its simply mot possible
I'm planning on revisiting this topic in the future cuz i'm still not happy with how it works :v So yeah, and i might even split it into parts because it might get long.
I think Slot Linking is broken, I've been stuck on this for about a week now and just stumbled across your video, have you figured out what's up with those? In that GDC video he sets them up to be linked but I don't think they were working in that one either....I find it odd too how he did that entire video in 5.4 a year ago lol Also: I noticed that in both the GDC video and in mine the Looping animation starts blending out between loops, this causes a visual Jerking as the animations loop back around....but maybe something else is causing it.
Yeah i was playing around other SO related stuff like slot linking, wanted to make a video but didn't figure out how to make it work yet ¯\_(ツ)_/¯ . Will make one tho if i'm able to use it for something, but i'll come back to it after full 5.4 release.
Nice video again, thx. The transition event trigger is a very nice way to abort some action or npc behaviour. I was wondering how I would do that in a state tree, now I know. :)
@@MrKosiej Ye, I have no clue what "AI Behaviors" brings to the table, but I'm learning UE and in my notes I put it as necessary XD. Great videos btw, thx. :3
Great Tutorial! and I have a quest for [global view model collection]. I print they in Game Instance, My [Viewmodel Engine Subsystem] is Valid, [Viewmodel Binding Subsystem] is Vald, but the [Viewmodel Game Subsystem] is not valid, when i use node [add view model instance] retrn value is always [false]. I can use [ manual ], but I cannot use [ Global View model Collection], I need manual open [Viewmodel Game substyem]?
Logic driver is too much like the animation blueprint graph and doing everything in a single asset can lead to a bunch of major issues when the project becomes big and complex later down the road. The graph being like animBP graph can lead to hugely messy and hard to read graphs, everything done in a single asset can become massive and hard to maintain, hard for new team members to read and understand how is it working, and less modular because the code isn’t separated into different tasks that can be reused. Logic driver is a cool plug-in, and has its uses but it’s not ideal for a big complex AAA projects. State Tree is specifically designed to avoid this mess. That’s why it’s a tree and not a graph.
Note: State Tree parameters actually work, you just can't add them from the parent State Tree, you have to do that from child State Tree and it will show when selected in the parent, then you can change them. Also, you can go back to the parent state tree by executing Tree Succeeded/ Tree Failed on the child State Tree.
I don't think it's meant to be a replacement of material graphs, because material are multiple textures. This new graph is to generate what would essentially be the equivalent of single maps in memory.
It's promising! I like your content since you cover less usual areas of the engine, I found a new plugin that might interest you in 5.4: "Geometry Mask". I’ve never heard of it before stumbling on it while looking through the plugin list
The geometry mask is most likely connected to (or is an expansion of) new Motion Design plugin, there's already a coverage of Motion Design so i'll let others talk about it :v
Thanks for letting me know. I'm currently going over new features and a lot of them are not getting covered anywhere, so i guess more content for me :V
Maybe you could take the player's name and generate a PBR material with textures from the texture graph. Can you get a text input? Make a black and white map, then normal from height map.
True, it would be cool to just plug in a graph like a texture sample, but my guess is that there's a solid chance it will come in the future, it's still experimental after all. Maybe they have plans to integrate it with strata. State trees started pretty bare bones and are constantly getting just the right features i need at the moment xd
this is absolutely amazing. It's a shame that AI is trying to erase material authoring, it was my favorite thing. Btw, do we know if Quixel guys are behind this project?
Excellent video and very useful information about StateTrees, specially given how very little documentation is available about it. @MrKosiej, one thing that I couldn't figure out is how to store state in between tasks (for example a given task sets the value of a variable that is used by that same task again the next time it runs, or maybe by another task in the three). I know I can probably use the actor associated with the context and store everything in it, but I think it would be cleaner to keep these variables inside the tree itself. I've tried using bindings, but for some reason I can only read from bound variables, never write to them. Do you have any advices in that regard?
Sure. Make a new class of type object and use it as a place to store your variables. Make a new class of type state tree task that will construct and save that object to a variable, change its category to Output. Put this task in global tasks in your state tree. Now you can bind that object to any task in your tree and from any task you can access this object and change the stored variables. This will run per instance so every tree will have its own "store", and you can have multiple stores of multiple types if you want. That's probably the closest we can get without an official data management system in state trees from epic.
Oh, that's a good idea! I was hoping epic would have provided a proper way to do something like that, like the blackboard in behavior trees, but I think your suggestion will work pretty well for what I need (and is kind of a blackboard anyway). Thanks @MrKosiej !
@@MrKosiej I had an idea about this topic that seems to work (although I haven't done extensive testing yet) and I though of sharing it with you. Here's what I did: - I moved my StateTreeComponent to the AiController as the BrainComponent (previously it was on my characters) - I subclassed AiController and exposed a UProperty of type UBlackboardData so I can configure it in the details panel of my AIControllers - Then, in the OnPossess method of my controller, I call the method UseBlackboard and pass the asset. That will automatically instantiate a BlackboardComponent on my AIController - Finally, I changed the context of my StateTrees to be my custom AIController. That way, I have access to both the character itself if I need (through the controlled pawn), as well as the BlackboardComponent, so I can read/write any variables I need I know someone may ask why not storing the variables (or the blackboard data) directy in the actor or whatever, but I like to keep AI related variables in AI related components, and I think keeping everything in the AIController makes the character slightly less coupled to the AI.
xd yeah, it's a bit advanced, but the idea is pretty simple. We basically use textures as arrays and store up to 4 floats in a pixel (rgba). Since we're creating the texture, we can make it whatever size we want. If the size changes, we need to make another texture. Once we store data in pixels we pass it to a material and use a loop in hlsl to work on that data. Hope that little summary helps. Let me know what needs further explanation and i might even do an update video.
So i've been messing around with those +1; *2 places and yeah, i was right on the video that i made an error somewhere and this was just a poor patch. You should just plug actor's length straight into Create Redner Target width (10:10) and in the second place (16:55) it can't be *2 or it will break later. But here you can't leave 0 because it doesn't grab the first index, but adding even 0.1 here (instead of *2) will work with any number of elements (tested with 8). I guess that's the remaining mystery. Logic says it should be 0,0 but probably low level code says otherwise. Comment if you solve it :)