The PURE NODES part, starting at 32:23, is inaccurate. Pure node functions will be called once for each callable (not pure) node that uses them, directly or indirectly. Not exactly for each connection. Example 1: You call a `SET` on a vector variable, splitting it to set X, Y and Z individually. And you want to set each of those to a random float. If you use a single pure node `Get Random Float in Range` connected to all 3, they will all have the same value. The pure node has 3 connections, but all of it goes into one single callable node, the `SET`. So, the pure function is only called once. You need 3 `Get Random float in Range` nodes to actually have different values for X, Y and Z. Example 2: You have pure nodes that result on a `bool`. You use it on a `Branch` node (callable) and then, after the `Branch`, you use the same `bool` result from the pure nodes to pass it to a `SET`. All those pure nodes that result on that `bool` will be evaluated twice. Once for each callable node they're connected to. You don't have to trust me. Do a simple test: Create a pure function that calls `Print String` and returns a random float. Then use this pure function when setting X, Y and Z on a Vector. See how many times it prints your string. Then use the result from that same pure function node to add to some float variable after setting the vector. Single node, first used 3 times on X, Y and Z from a single SET Vector node, then used again to set another variable. You'll see it's not called 4 times (once for each connection), but only 2 times: once for each connection (direct or indirect) into a callable node.
With the FOR LOOP, he's accurate. Because the FOR LOOP is a macro with a sequence of callable nodes inside it. And every time it needs to get the next element to iterate on, it goes through a callable node again and again. So, even though the pure is connected to seemingly a single callable node, it's actually connected to callables that will be called several times. So the pure that returns the array will be evaluated each of those times.
Its probably not done because the variable itself could be "volatile" I guess, I am not sure if thats the right word but similar I think. I could be wrong but I think if that variable was replicated for instance and you didn't cache that value, it could possible be NULL and break your array. Assuming you aren't doing an "is valid" of course, but I could also just be totally wrong in the first place. EDIT: My bad I thought you were talking about the Pure Nodes/For Loops section. Maybe it could still apply idk type thang
Undo the woke coding bullshit. How do you expect people to refer to one character as they, you seriously can’t even even use the words blacklist or white list anymore. I mean, how messed up can your train of thought be why are you doing this to coders and programmers and game developers, all around the world?
@@ls.c.5682 look it up, its in their code of conduct or "coding policy" . everyone is talking about it, of course they're not going to say something so stupid out loud
Finally, a video where somebody actually explains what things are in Unreal Insights, coherently and easy to follow.
A brilliant idea - all training should take place on this channel (ue)
Absolutely! This makes it less confusing to find resources to learn
U can enable Task channel in Insights and it will actually show u how Tasks are jumping between each other.
The PURE NODES part, starting at 32:23, is inaccurate.
Pure node functions will be called once for each callable (not pure) node that uses them, directly or indirectly. Not exactly for each connection.
Example 1:
You call a `SET` on a vector variable, splitting it to set X, Y and Z individually. And you want to set each of those to a random float. If you use a single pure node `Get Random Float in Range` connected to all 3, they will all have the same value. The pure node has 3 connections, but all of it goes into one single callable node, the `SET`. So, the pure function is only called once. You need 3 `Get Random float in Range` nodes to actually have different values for X, Y and Z.
Example 2:
You have pure nodes that result on a `bool`. You use it on a `Branch` node (callable) and then, after the `Branch`, you use the same `bool` result from the pure nodes to pass it to a `SET`. All those pure nodes that result on that `bool` will be evaluated twice. Once for each callable node they're connected to.
You don't have to trust me. Do a simple test:
Create a pure function that calls `Print String` and returns a random float. Then use this pure function when setting X, Y and Z on a Vector. See how many times it prints your string. Then use the result from that same pure function node to add to some float variable after setting the vector. Single node, first used 3 times on X, Y and Z from a single SET Vector node, then used again to set another variable. You'll see it's not called 4 times (once for each connection), but only 2 times: once for each connection (direct or indirect) into a callable node.
With the FOR LOOP, he's accurate. Because the FOR LOOP is a macro with a sequence of callable nodes inside it. And every time it needs to get the next element to iterate on, it goes through a callable node again and again. So, even though the pure is connected to seemingly a single callable node, it's actually connected to callables that will be called several times. So the pure that returns the array will be evaluated each of those times.
So much good advice. I am going to review my select statements.... 😊
28:33 can anyone explain the distance squared thing?
Amazing talk and really helpful. Thanks!
Could use more of this in game design goals.
One of the best topics in game Dev
I was looking for a video about optimization for UE right now xD
That's why it showed you this...always listening...
There is one thing I don't understand, it says it uses overlays instead of canvas panel, but what happens when you change the screen resolution?
Can't seem to find the cache simulator tool - if you have a link please share - thanks!
Thanks!
Les Get iT!
Engine could cache the value of a function automatically if you have multiple outputs. Great thing to improve the engine!
Its probably not done because the variable itself could be "volatile" I guess, I am not sure if thats the right word but similar I think. I could be wrong but I think if that variable was replicated for instance and you didn't cache that value, it could possible be NULL and break your array. Assuming you aren't doing an "is valid" of course, but I could also just be totally wrong in the first place.
EDIT: My bad I thought you were talking about the Pure Nodes/For Loops section. Maybe it could still apply idk type thang
Undo the woke coding bullshit. How do you expect people to refer to one character as they, you seriously can’t even even use the words blacklist or white list anymore. I mean, how messed up can your train of thought be why are you doing this to coders and programmers and game developers, all around the world?
Lol wut. When in the talk does that happen?
@@ls.c.5682 look it up, its in their code of conduct or "coding policy" . everyone is talking about it, of course they're not going to say something so stupid out loud