Chaos Fundamentals | Live from HQ | Inside Unreal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
>>Amanda: Hey, all, we have got a lot of exciting news for you. SIGGRAPH 2019 may have wrapped up, but there is still a lot to take away from the many wonderful presenters who joined us over the course of the event. Our Unreal Engine User Group kicked things off with a lineup of special guests, discussing their trail-blazing, real-time projects, topped off by a fireside chat with director, producer, actor, and writer, Jon Favreau. The theater presentations, featuring more great talks from industry luminaries, together with demos of the latest Unreal and Twinmotion features and workflows, will be available to view online soon, but you can dive into our in-depth tech talks in the meantime. Animator and tech artist Gwen Frey, creator of narrative-driven puzzle game Kine, shared how she near single-handedly developed the game with virtually no coding experience. In our discussion, she talks about the challenges of designing a game for the first time, details of some of the skills she picked up along on the way, elaborates on how she leaned on narrative elements when creating puzzles, and talks about how she created the game's sketch-inspired comic art style. Check out the full interview to hear her lessons learned, favorite UE4 tools, and advice to aspiring solo developers. Perhaps best known for its Darksiders series, Gunfire Games' Remnant: from the Ashes incorporates fantasy elements into its post-apocalyptic world, to deliver a refreshing take on a third person co-op shooter. To learn more about how a roughly 30-person team managed to nail their unique vision, we spoke with Gunfire, who shared more about the process behind balancing hero archetypes, and creating a randomly generated world that is equal parts dangerous and original. It is time to reveal the Twinmotion Community Challenge. We have seen our community creating great images and videos, now share your art with the world and have a chance to win some great prizes from Epic. For this first challenge, "The Best Sunset," we want to see the most stunning sunset-related image you can create with Twinmotion. Get more details on how you can enter for the $500 prize below. And now it is time for our weekly Karma earners. Many, many thanks to ClockworkOcean, Syxr, DonBusso, SpynderMK, Orfeas El., kevinottawa, Jezcentral, KristofMorva, Shadowriver, and EvilCleric. These fine folks have supported devs over on AnswerHub. Head over and answer questions, and you, too, could see your name up here. And onto our weekly spotlights: This beauty here is Ghostrunner, an action FPP game set in a grim world, blending cyberpunk and post-apocalyptic themes. High mobility of the main character, one-hit-one-kill and bullet-time-mechanics are the bases of the game play, which focuses on fast-paced, high-adrenaline combat. Next up we have a Dreamscraper, three veteran game developers who have gone rogue, created this surreal Binding of Isaac-style hack and slash, where players battle a nightmarish depression that lives in a young woman's subconscious. And last, but not least, for this week's spotlights, we have Regina Esteva, who created this gorgeous moody scene titled Old Rusty's Bar. It is based off a concept piece by Juhani Jokinen. Wonderful work, Regina, we cannot wait to see more on your ArtStation from this. Thanks for joining us for our News and Community Spotlight. >>Jack: I cannot hear anything. I cannot hear a thing. >>Victor: All right. I believe we are back. Back live. As always, there are things that happen when we do this live. >>Wes: A little bit of chaos, if you will. >>Victor: A little bit of chaos for the Chaos Fundamental stream. I guess, the fundamentals of live streaming is that things can go wrong. Alright, so to start off with this, let's see if we can get Jack back up. Is he there? Alright, he is just reconnecting. So to start off with this -- Chaos. Our new Destruction and Physics System in UE4, we are releasing it in beta, coming out now with 4.23? >>Wes: Right. Yeah, I think we can point people to the forum post, if they have not seen it already, where they can download it, and the instructions on how to get it up and running, as you can't use this with the preview version off of the launcher. You are going to have to build this from source. So Victor has the forum post up, has some steps that are outlined how to get it up and running, the Plugins that you need to enable so you can start working with it. Again, this also will be covered on our documentation pages, which I am currently writing right now. So I am working with Jack to bring the documentation up to speed, so that we have it ready to go with 4.23 as well. >>Victor: Yep. And all you have got to do is follow those steps and then everything we talk about here today should get you -- >>Wes: You can start playing with it right now. >>Victor: Yeah, cool. And we have got Jack back on the line. All right. >>Jack: All right, yeah. It would not be a good debut into livestreams if it did not go completely wrong. >>Wes: Of course. >>Jack: Hi. How are you doing? >>Victor: Oh, we are all good. >>Wes: Thanks for coming on, Jack, we appreciate it. >>Jack: No problem at all. >>Victor: Yeah, especially since you have prepared a lot of really amazing content that you are about to show us. >>Jack: Yeah. So obviously, we are introducing Chaos properly in 4.23. Essentially, at this stage, we are really looking at a destruction system. There is quite a lot of new paradigms that come with that, and so what we are going to try to do today is, we are going to just roll right back to super simple and work our way up. And hopefully what that his going to do is, it is going to give people a pretty good grounding, so that they can then sort of comfortably go off and start doing their own experimentation with the system. So whenever you are ready, we can start looking at that. >>Victor: I think we are ready. Let's go. >>Jack: Alrighty. So first thing to consider, when we are working with Chaos Assets, is the Geometry Collection. That is a pretty good place to start. So let's start with the simplest of the simple, and we will just bring a cube out here. At the moment, it is a Static Mesh. Even though there is just one of it, we can still turn that into a Geometry Collection. And to do that, what we are going to do is, we are going to move over here into the Fracture Editor tab. We are just simply going to generate that Asset, just put it in this folder for now, like so. And you can see we have already swapped out the type. This is our Rest Collection here, this is what we are pointing to. You can see here in this outline that we have just got a cube, obviously, and that is what we would expect. And if I bring up Draw Diagram here, now we can see what the current settings are going to apply to that, if I am to fracture it. So here we have got quite a lot of cells. Let's reduce that a little bit, and hit Fracture. And you can see immediately, the hierarchy has updated to reflect that. Up here, we have our hierarchy. At the moment, we are showing all. Basically, what that is saying is, I want to see every leaf node. And the leaf nodes are effectively where every piece of geometry terminates, the smallest it gets to. And those can all inhabit different levels. So this allows us to see them all in one place. But if we work down the hierarchy, we have our root -- this is the original cube that we started with -- and then we can step down to Level One. We have got some shortcuts to be able to do this. So if I do shift + W, I move up, and if I do shift + S, I move down, like so. And I can also expand these out, as well. Again, we have a slider over here, but we can also use shift + E to do that, and shift + Q to close that back in. So we can really see what is going on there. So there we have a very simple hierarchy. Let's do something pretty similar. And this time, let's work with a few Objects, because there is a couple of useful things to know, doing that. We have got three cubes here. We are going to turn that into a Geometry Collection as well. And it is worth taking note of the fact that if you take the first selected, and then add to that selection -- when we convert this to a Geometry Collection, we are going to pick up that pivot point. And that is really useful if you are creating buildings and so on; you want to make sure you know where the footprint is. And that allows you to target that. If these are all nested into a Blueprint, for example, we will pick up the root pivot sort of naturally from that. So let's convert that, and we will call this "Cube Stack Geometry Collection," or whatever we like, really. And you can see here that we have, again, created this hierarchy. But you will note that rather than just having this single stack, we automatically have three new bones for the three initial cubes that we built this from. So if I deselect that for the moment, we can walk the hierarchy -- so there we are at Level One and then up to Level Zero, where that is, right? So then we can obviously fracture that, and we can walk down the stack and start to see what that does. So that's, again, a very simple approach to a Geometry Collection. If you want to do it with something -- >>Victor: Do you want to share the key bindings you are using to go back and forth in the hierarchy? >>Jack: Yeah, so basically, just as a reminder, it is shift + Q and E to spread apart and to close down, and then shift + W and shift + S will help you just walk back and forth. So let's take a Blueprint module, something simple, I think. Columns are pretty good. So here we have something which is more like a proper Asset. We have got UVs and Textures applied to that. And this is built from two Static Meshes. We are going to convert that right now to a Geometry Collection as well. We will put that in the same folder; we will just call this something simple, "CG Column." There we go. Bring that up to that -- right. Now, I am going to save this straight off the bat. We are looking at this Rest Collection now, and you can see one of the things that has happened -- we had Materials on the outside -- I am just going to deselect that -- and here is another useful shortcut. If you do shift + B, you can actually access through the icon here. You can turn off those bone colors, so you can see what is going on. And automatically, of course, we are going to have a hierarchy there. So we can see the two pieces that they started from. But you will note, what this has done, when we have created the Geometry Collection, is it has looked for the Materials that we are displaying on the outside of this. In this case, we have a block of concrete and a block of stonework, say, and it has duplicated those Material IDs underneath them. And this is where we are going to be able to put sort of tiled Materials, once we fracture. Of course, we are going to be starting to generate new geometry there, so we are going to want to display something. So even these are sharing Textures, because I intend them to show a different Material, I apply a different Material Instance. If we were to build a full building of that -- and I am going to just jump over here to the Geometry Collection's content example which we will be releasing -- you will be able to see that we have got a lot of shared Textures on here. But you can see that the Material definition is different. So we have got glass on glass, metal on metal -- just so that we know what to put inside. And this example kind of shows that when we break that open, we can see how the concrete and the stonework have been separated. It is worth noting as well, when we are working on creating Geometry Collections, it is a really good idea to be using water-tight Meshes; you have got to use water-tight Meshes for the fracturing. Try and keep things non-intersecting. We actually can handle a bit of intersection, but it is generally good practice to avoid that, and also, yeah, we recommend that you sort of obey the gridding system as well, as that is going to make building this stuff up a lot easier. So let's just jump back over to here. And let's do a bit of fracturing on this. We will do something pretty straight-forward. Fracturing is kind of one of those things that is sort of best experimented with. You have got quite a few tools here at your disposal, and again, we have a content example kind of walking through the different options that are currently available. So here we can see the many pieces that we have generated. And at the moment, if we were to simulate this Object, we are going to see that this is going to -- well, actually, let's just do it. See what we get. I am just going to turn the bone colors off there a second. This is going to be dynamic by default. It is going to have a Collision Type, which is also default, which is -- if I just close this down, this Box -- effectively what we are doing with Box is we are going to be wrapping a cuboid around each of these rigid bodies. And we can see here, this is also particle to implicit, the implicit surface is the box that we are going to check against. And the particles are basically a sort of a spread of the vertices, which we are going to check against those boxes. Now, Box is a very cheap approach to doing this. But what it does mean is, because these cuboids open up, there is what we term as a bit of "push out" that happens. Let's go and actually have a look at an example of that through here. You can see, this is the kind of thing it is doing. If we use Sphere, we are going to insert spheres inside of each rigid body, so we get less intersection between those collisions. But also, there are others that are sort of downsides to that. So here we have Box and Sphere next to each other. And you can see how immediately, with these default settings, those boxes just really pushed each other apart. The spheres didn't so much; they kind of sink into each other a little bit. We can actually modify the size of those boxes through what is called a "collision reduction percentage," and here we have the same thing happening twice, but in the right hand side, we are going to see that reduced. You can see they are not fighting with each other nearly as much. So that is kind of the default collision behavior. >>Wes: And that's set on the Geometry Collection, right? In the settings there? >>Jack: That is correct, yeah. Right, exactly. So we have all kinds of fun stuff here to try. The other thing I should note is that one of the main things you are always focusing on is trying to keep things really performant. So there is this setting down here called "Maximum Collision Particles," and what that is basically saying is, it is saying for any one entity inside of this Geometry Collection, whether it is a cluster or a single body, you can have a maximum of 60 particles to check collisions against. And in some cases, for example, if I had a cluster which contains 500 rigid bodies, that is less than one particle per one of those. So at that point, we want to start dialing up the number until we arrive at something that is visually good. So let's just start super simple, and we are going to see what we get. I am not expecting that this first result is going to be too amazing, but not too bad. Immediately we see the breakup of the base from the column, right, and then that thing starts stomping on it. And the problem there is, I didn't really, in terms of this, I didn't really want to treat them too separately in that way. And so what I want to do is, I want to work on a way to just flatten that out. I do not really care sometimes how I got to the leaf node result that I have got, right? I just care that I got there. And at this point, I can use the Flatten function. And we are going to remove that, I am just going to refresh the bone colors by walking through the levels there. And we can see now we immediately go from one whole column to a bunch of leaf nodes, right? So now the simulation will be, the column is going to hit the floor, and it is going to break into little, tiny pieces. So the next thing we want to do is, we want to try and moderate that process. We are going to be releasing a lot of rigid bodies. And of course, if we were doing that throughout an entire structure, we are looking at thousands of pieces all being released at once. So to do that, we are going to work with clustering. So we are going down to Level One here. I am going to show you a nice little trick. Eventually, this will be consolidated into the UI, but for now we are going to use a command called "Geometry Collection Print Detailed Statistics Summary," and hopefully, that is going to have a think -- yeah, we can see it here. I am just going to clear that log and just run that again. There we go, that is clearer. Right. So here we can see, Level One, we have 313 pieces, right? So now I have got my number. I am going to try and bring that down to a fraction of that. So let's drop that to, say, 100, right? I am going to hit Auto Cluster. What that is going to do is, it is going to search through those, and it is going to bind them together. So now we are starting to stick all of those Voronoi cells together. Now at this state, we can release 100 pieces rather than 300. And again -- let's do that again. Let's drop down a bit more, half that. Start binding those together a bit more, and then let's say 15, let's go with that. There we go. So now we can walk down through those. I am just going to close them in a bit, and you can see this is effectively our breakup pattern. >>Wes: Then each time you do that out of a cluster, it is also creating a new Level for it, correct? >>Jack: Correct, yeah. That is basically now building that into the hierarchy. If I was to go in and fracture sub-pieces at this point, it would always insert an extra Level to allow for that. Again, that is why we have the All Levels ability, so that we can be able to see everything at once. But this is obviously going to be pretty crucial in terms of how we simulate this Object. So let's close this down, and let's work with this Object. I am just going to save that real quick. There are a couple of things that we can look at. First of all, we can look at the way it is going to collide, and we can also look at the way it is going to break up. And what we are going to do is, we are going to switch to a Level Set Collision. Before we do that, let's just describe what Level Set Collisions actually are. Rather than wrapping this analytic shape around the Object, what we are doing is, we are rasterizing it. We are going to apply effectively a box or a grid, and we are going to sample the shape within, and we are going to come up with a kind of a virtual representation, which looks something like this. We are going to look at a live example in a little while. The resolution on that really determines the accuracy of it. It is going to scale cubically in memory as well, so there is a footprint to account for here, but it does allow for some really cool stuff to happen. You can see here in this example, we have different resolutions, 4 by 4, 8 by 8, and you can see at 8 by 8 in the middle there, we are not actually picking up the whole of this taller shape. Then by the time we get to 16 by 16, we are getting it loud and clear, right? So the Level Sets allow us to control and tune the quality of the collision that we are going to work with. And typically, we get a much better response between the pieces. There is a lot less intersection, and this is generally how we get the really pretty Sims. But there is a cost to that, so I would say that generally, in most game examples, you are probably going to want to try and lean towards simpler things. But when you absolutely are going for pristine quality, say for a cached simulation, this would be the solution. So let's do that to this one here, and that is pretty easy. The other thing I am going to do is, I am going to just change the mass of this. We are going to use Mass as Density; let's put this up so that it behaves like rock. Twenty-three hundred kilograms per meter cubed, I believe, should get us where we want to. Now you will notice I have done all this before I have swapped this to a Level Set. And the reason for that is because every time we change a property at the moment on one of these Objects, we are going to rebuild the Level Sets. And there is a build cost to that. Level Sets are going to be stored inside of your derived data cache, and there is a time sync to that. So for the first time you load up a map, you will notice this with the content examples, the Geometry Collection map in particular is very heavy. There is a lot of stuff going on there, so it will take a while to load up for the first time while it builds those Level Sets into a derived data cache. So let's do that here. This one is not too complex, so I would not think it will take too long. We will just change that now, and wait for that to pop in. There we go, and we will save that, so we do not have to do that again. Now we are going to simulate that and see what happens. Okay. So right now, it is all kind of collapsing under its own weight. You will note that there was not really any strength to that breakup. And the way that we control that is, we are going to use this Damage Threshold setting here. And we can have a look again, using our output log on how many levels we have got, or we can have a look over here. We can see that we have got five levels in total, right? I can control how many of those levels I can release any one time, through using Max Cluster Level. So if I put in 1, you remember we clustered this back to 15 pieces -- that is all this should be able to release. And there they are. And you can also see another thing that is happening here, which I alluded to earlier -- did you notice how those started rolling through the floor? Kind of obvious, right? Again -- that is what I was saying where we have all of those pieces together right now. But they have only got 60 particles to test with right now. So let's ramp that up. That is probably going to cause the Level Set to rebuild, but hopefully it will not take too long. Save that, and let's see how that affects our result. That looks a lot better, right? So effectively, what we are going to do is, we are going to look for a way to control the point at which these Objects break up. And this Damage Threshold setting is where we do this. If I set this to something really, really high, like say five million -- that should do it -- I would expect this not to break at all. So it is really a case of trying to tune this Object and control the point at which it releases all of these rigid bodies. So let's start doing a bit of guesstimation. I am going to allow two level breaks here. I am going to start with something like this. Now, this number is determined effectively by the weight of this thing, the mass of it, like if this is a lighter weight thing, it will crack under lower numbers, so generally you are tuning the resistance to make sure that these heavy pieces do not exert enough strain on themselves to break apart. And so that is really just a tuning thing, there is no sort of perfect number for that. But you see how that sort of -- it caused a connection to break between some of the rigid bodies on the way down there? It managed to hold its force, or its form, rather, and then when it hit the floor, it was just enough to push it over that. So that is really the key to kind of controlling how this stuff works. So I am going to try and dial in something that we like. Let's see how this feels. Yeah, that feels pretty good. Okay. Now the dynamic state of this is what we currently have this set to. Bear with me one sec while I find this -- yeah, okay. So here in the Object type, you can see, by default, we have this to dynamic. And that means it is going to fall, no matter what. If I wanted this to stay still, I would switch it to Static, and then when I hit Play, it stays exactly where it is. But it is not doing anything at all. What we want to do is, we want to create the ability for this thing to stand up, but also be kind of dynamic, too. The way that we do that is, we start applying what is known as an anchor. It is actually possible for me to wrap a Field around this Object, and just physically just say, you are not static, you are dynamic now. But in order to get some of the more important destructive behaviors that we are looking for, i.e., if I punch a hole through the middle of this column, the top of the column knows to fall down. We are going to use anchoring to do that, and we are going to build a connection graph, and effectively create some kind of world support logic that is going to allow us to do that. So this is where we move into the realm of Fields, which is the other really important paradigm that we will be looking at here. So in order to work with the Field, we go into the Physics here, and we add ourselves a Field System. >>Wes: You also need to enable this Plugin, if you have downloaded the source build and followed the steps online. I do not think it is covered in there to Enable Field. Some people have picked up on it, but we should update the forum post, if you want to work with Field, or Niagara as well, enable those plugins. >>Victor: Yep. They all need to be on. >>Jack: Absolutely. So yeah, okay, so a Field -- what is a Field? I am going to drag that out into the World. At the moment, what this is, a Field is a region of space, and we sample in that region, and we can affect a physical property, right? So by default, by throwing that in there, what I have actually done is, I have introduced it into the World. And it is telling absolutely everything, absolutely nothing at this point. What we are going to do is, we are going to set this up as a Blueprint. I am just going to add a Blueprint here, and turn it to that. And we are going to tell this Field, okay, where, exactly, are we going to affect, and what, exactly, are we going to do? Let's just drag this Component out here. Now we are going to be building an Anchor Field. One key distinction here -- the anchoring process happens before the sim starts going. So we are going to do the Anchor Field inside of the construction script. What we are basically saying is, we want you to build these before the sim is going, and then we are going to affect the connections that it creates. You know, on Tick, or begin play, or whatever. So the first thing I am going to do is, I am going to quickly add a Reset Field System, and that is just going to mean, every time I move this thing, it is just going to refresh the connections inside of it, and it is going to resample the geometry that it is overlapping. And then I am going to do, Add Field Command. Now, the Add Field Command is, again, a construction based statement. Typically, what we would usually use is an Apply Physics Field like this, and you will see that they look very similar. I am drawing attention to this, because it is very easy to get very used to using the Apply Physics Field, and then come and try to do it in the anchors. I am not saying I have ever done that and made that mistake before. But, yeah. So yeah, so an Apply Physics Field is going to do that during the sim, and the Field Command is going to stack that up beforehand. And you will see that they look very, very similar, and they can affect all the same kinds of fun stuff. So we are going to do that, and we are going to enable that. So all we are saying right now is, okay, Field System, you are going to affect Dynamic State. But right now we are not telling it how or where. So let's start doing that. For this, I am going to make a cube, and I am going to borrow the transform of this. This is so I can visualize where the Field is. And now we are going to add a bunch of Fields together, okay, and we are going to start adding these Field components. The first one I am going to load in is a box falloff, and drag that out there. Then what I am going to do is, I am going to type "Set Field," and we are going to add that there. So here is the box. I am going to borrow the transform from this Static Mesh, which is a meter cube, so perfect for my needs here. And that is an area I am going to work with. But the thing I actually want to do is, I want to change the Dynamic State. What I am going to be doing is, I am going to be overlapping some of the rigid bodies inside of that Geometry Collection, and I am going to tell those ones to be static, and all of the other ones above it are going to still be dynamic, and so they are going to know that they are statically anchored. And they are going to know that when we break any connections to them from that Static Anchor, they can fall down. So to do that, I am going to add a Uniform Integer, and again, Set Field. Now I could actually just type in a number into this. In this case, 3 would be static. But what we are going to do, just to make it a little bit tidier, is we are going to make ourselves a variable, and we will call this "Static State." And then we are going to change the type of that, and we are going to be looking for Object State. I am going to compile that. We will get a warning, because at this point, it is not set. So let's set that to Static, compile again, and we can drop that out there. Then I am going to use a ToInt to be able to convert that, and put that in there. Now I could actually plug that straight into this Field. And the other thing I would need to do with an anchor is, I would need to tell this Object that it is connected, that it needs to use this to initialize itself, right? Because we are going to have a lot of anchors in the World, so we do not want them all affecting everything. So the way we do that, you will notice we have initialization Fields here, and we are going to look for that anchor, and connect that. Actually, let's lift this off the ground so that we can see that clear distinction. And I am going to hit Play. You can see immediately, it is not falling down, which is good, because, yay, that means it is anchored. But you can see the problem is, I am not overlapping it. And that is where a Culling Field is going to come in. So we are going to add that now. Bring out a Culling Field, Set Field, Save. I am going to drag that in now. So what I am going to do is, I am going to use the box. I am going to say, I want you to cull outside of here. By default, we are actually saying the opposite, we are saying I want you to forget everything that happens inside this box, and only deal with the outside. So let's swap that around. Then I am going to push this through here. Now, inside of the box we are saying, you change your static state, right? Now Culling Fields are super important, in a bunch of different ways. Even if we were to create a Field event through a normal box falloff, typically we will be dealing with the magnitude on the inside, and then everything on the outside is this default value here. We also have falloff abilities here, like Linear Falloff, and so on, so that we will be blending from whatever the magnitude is to that outside value. In something like this, I want to basically limit leakage from this Field, of it saying -- I mean, it could basically be saying zero, it can be saying absolutely nothing at all. But it is saying it to everything. There is a computational cost to even saying nothing to all of these rigid bodies in this World. So by Culling it, I am just telling this Field, I just want you to consider what happens inside of the box. Everything outside of it, forget about it, do not compute it. So there is that. And what we are at it, let's perch something a bit more see-through on here. Let's try that. Okay. So here is our Anchor Volume, and let's give it 3 meters by 3 meters -- we will make it a cube, why not? Just bring that in. I am going to overlap that. Now it is important to note that what we need to be doing is, we need to be overlapping the center of mass of something, and by that I mean the leaf nodes. So if I bring that down, we can see that is happily going to be grabbing these lower pieces here. So those all switch to static, like so. And then when we hit Play, it does not fall down, which is good. But hopefully -- no, it is too strong for this gun, hang on. We should be able to destroy it, right? That gun is actually tuned for a different example, which I will be talking through in a bit. So okay, so now that this is standing up, we want to be able to force it to break. But also, we want to have a sense that other modules are sort of part of that same structure, yeah? At the moment, they do not know about each other; in fact, if we just bring them out here and hit Play, you will see they will -- oh, hang on, oh, I am an imbecile, I am still on Static. Let's set that to dynamic -- there we go. So you can see how they slid off of each other, right there. They do not know about each other. So what we can do to combat that is, we can use the Cluster Group Index, right? And what that does is, it just gives them a shared idea, and it tells them, yeah, you guys are all part of one construction. So build connections between each other and behave as one thing. And to see that happen really, we will ramp this value up so that they will not break. And you can see that they are all behaving like they are one thing now. And that is really the key to how we put these modular things together, so we can build up to something along this line, where everything is being anchored, it is all bonding together, and then we are applying these Fields to force things to break apart in whichever ways we decide to set up. >>Wes: On the Cluster Group Index too, I guess you could also mention that the damage thresholds can be tuned for individual pieces within that Index. So the top piece could have a different damage threshold than the bottom piece, so you could get that trickle-down type of effect. >>Jack: Right. Exactly. And in a way, what we have kind of got here is really a destructible LODing system. Because you can see, like if I just remove that relationship in the Cluster Group Index, I have the same Geometry Collection, altered the same way. But you know, for my purposes, I may never get close to that one. So there is not a lot of point in me releasing 300 rigid bodies, because I am not going to be able to really draw all that, you know what I mean? Especially once we start adding particles, and stuff like that. So why do I not just reduce what that is able to release, you know? And then I can tune that a little bit, although of course, I have got to set that number back down. Five million is quite high, isn't? You see what I mean? And it is, like, I did not really notice that this one has the potential to break more than this one does, because of the distances involved. So being able to tune that stuff is one of the really cool ways to being in control of what the physics thread is doing. And it is -- actually, while we are mentioning that, it is worth noting that when you are tuning these things, it is the physics thread that we are interested in. So I am going to come here, and I am going to put "Stat Chaos Thread," and this is our physics thread. At the moment, the FPS there is, like, somewhere in the region of 30,000 frames a second, which I am going to say is not true. But it is because we are paused. So let's resume that. And that is settled now to about 100 frames a second. And the more that stuff happens, the more that that number is going to start coming down. In this other room, we have actually got the same sim, but this one is cached, and then run through a Level sequence. And you can see, it is not really affecting the physics sim now. You know, we have taken the load off of the physics thread, so the FPS stays pretty consistent. But if we spin this one up again, it is going to take a little while, because in this initialization stage, we are just going to be building up all of those connections. So the game thread typically will kick off first. What we will see is the physics thread will be busy for a bit, and then suddenly, you will see it stabilize. So here we go. So that is now settled out to 180 frames a second at the moment, which is basically saying, I am not really doing anything at this point. And as we start causing physical calculations, we will start to see that number drop a little bit. With something like this, we are going to start to see it drop quite a lot. And the key is trying to tune those damage thresholds to control what we release, how much we are colliding in one State. And we can see here, the worst case, we dropped down to 48 frames a second before returning and stabilizing back out at 150, roughly. And you know, that, in this case, is not really an issue for me, because the purpose of this sim is to cache it. But in terms of gameplay stuff, you know, we are going to be watching that, and tuning all of those values to work with that as best as we can. So yeah, we have got an Object there, and we can stack it, and then we can tell it to be part of a single Object. Put that there, or something. And we will grab those, and we will set that cluster group index to 2. And actually, these ones I do not need to worry about initializing through that anchor; I have duplicated from that, so they will probably be looking at it. I do not really need to worry, because they are not overlapping with it. This is the one that cares. And now I hit Play, and everything stands up. So there we have a unified structure. So what do you want to do now? Shall we make it fall down? [LAUGHTER] >>Victor: That is all right here for -- >>Wes: Apply some strain to it, using a Strain Field, maybe? >>Jack: Exactly. Exactly. So what we are going to do is, we are going to add a Strain Field. Now this one, I have prepared already. We can have a look at what this is doing. It is worth noting that we have got, in the content examples, a whole bunch of fun Field setups for you to try. These ones kind of walk through the principles of various different ways of exerting forces, and so on. Then we have got these slightly all dressed up ones, with a few bells and whistles thrown in for good measure. And this one is a Strain Field. And I am just going to place that where we can see those values. Actually, let's set that up -- it has been set up so I can see exactly, as an artist, where this Field is going to influence. And you will notice I have set the magnitude of this thing to, like, 4 million. And in effect, what I am doing there is, I am saying, you are going to break, no matter what. If I am overlapping this, you are breaking, right? And let's go in and have a look and see how we are doing that. Okay, and again, all of these are going to be nicely annotated so that people can follow through how they are constructed. And the place that we are doing that -- and remember, this is now a physics sim part of Fields, so this one is going off of Begin Play, and then we are running a delay. And we are going to be working and applying a Physics Field here, and we are going to be bringing in an External Cluster Strain influence onto that Geometry Collection. The way that we are doing that, it is very similar to how we built up the anchor. In this case, we have got a sphere, the Strain Volume, which I have got the location of, and the radius of. So I am using that Object, which I am using to visualize, to drive what this is doing. And again, we have got a Culling Field here, right? Here is a radial falloff; I have added these extra names so I can tell them apart over here. But you will notice that I have not made a radial falloff and then plugged it into this one as well, and it is because they are doing two different jobs. I am evaluating them all together. So each time I am setting a Field, I am going to give it a Field Asset to set. Then we are going to combine those things together. We are using exactly the same radius for both. In this case, I am just saying I do not want you to calculate that you are not applying strain outside of this, so just forget about the outside, and apply a magnitude in here of External Cluster Strain inside of this sphere. And then what we are doing is, we are also setting up an explosion. And the way that that is happening is, again, we are using that same radius -- this time we are using a bit of falloff, right? And we are multiplying that through an Operator Field, together with a bit of noise, just to put a bit of variation into what that is. That is just defining that region. It is kind of a starburst, but a bit of noise in it. But it does not actually explicitly determine direction. We use a radial vector for that. Again, we are going from the same position, so now we are using a vector to drive through that same region that we have defined, multiplying that result together -- again, culling it just to keep it contained. Then we are applying that to linear force. And we are using linear force rather than velocity, because we want to take into account how massive something is. So you saw earlier when I was shooting my gun against that, it was not exerting enough force to break that thing apart. And we were also just connecting to Angular Torque, just to try and get a bit of random spin variation in that. So that is really what that is doing. And you will see it is very, very similar to how we set up the Anchor Field, and we are just applying a Physics Field, and just choosing what, exactly, we are going to target. So let's see what that does. Actually, hang on. Give me a second. Let's debug this one, turn it on and we can watch it. I will just reduce the delay to about three seconds. Okay, so after about three seconds, boom. There it goes. And it all comes down. Actually, it is probably breaking up a little bit aggressively, so what I would probably do in that circumstance is, I would start tuning those damage thresholds until I am releasing -- seeing more interesting breakups; I want to see large pieces cracking off to begin with, and then as they cause extra collision, start releasing more and more small pieces. Basically, a controlled descent. But one of the interesting things, while we are releasing a lot of pieces here we could look at is, we, at this current point, are not telling this thing to settle down yet, right? So what we can do is, we can create a disable plane. Now, how are we doing on time? Have we got time to walk through one of them? >>Wes: I think so. >>Victor: Yeah, we've got time. >>Jack: Okay, because we have got ones we have made, and we can build a new one. So let's build a new one. Okay. So this is -- we are going to call this "Disable Field," right, or "Field Disable." And I am just going to save these, just in case. Okay. Again, drag that one out, put that in there. And for this one, we are going to use a plane. We are going to check against a plane to determine whereabouts we are going to start setting our threshold. So I am double clicking, it is over here. [LAUGHS] Now this one is going to run throughout the sim. So obviously, I need it to constantly be evaluating, so we are going to run this one off of Event Tick. And what we are going to do is, we are going to play our Physics Field. And we are going to bring ourselves in a plane that we can borrow. And what I am interested in with this one is, I want to get its location. Actually -- give me that, thank you. I also am interested in getting its Up Vector as well, see which way it is facing. All right, and then we are going to add a Plane Falloff Field to that, because this is what is actually going to be doing it, this is how we are going to visualize it, right? We are going to -- there we go. So here I can put in that position Up Vector. Now, the threshold that we are going to be checking against we'll determine through this magnitude value here. You will also notice that we have a distance setting on the plane, and this is basically where you are going to check to, because obviously if it is an infinite plane spreading off laterally, we also kind of need to know where it stops. And that is useful, because then we can multiply things like radiance in, using that distance. So yeah, we may as well set ourselves a distance variable here. And we will make that one editable and expose that, so that we can tune it inside the World. Then again, what do you reckon we are going to add next? We are going to throw in a Culling Field as well, because effectively, what this is going to be doing is, it is going to be setting everything below the plane, set to the distance that we specify. It is going to be checking for that threshold. Then above the plane, it is going to not be doing that. It is important, again, to cull this, because if there are other disabled boxes and Fields in other parts of the map at higher levels, we could be telling them not to check. So we want to make sure this one, particularly, does not leak. So I am going to use that again. I want another -- what am I doing? Sorry. Looking for a Plane Falloff Field. So we use exactly the same settings, yeah, to determine that culling. And we are going to cull the outside, and route that in. Now, this is going to be a disable threshold that we will be checking against, but let's see it first, and check whether it is working by using Kill. Kill is far more aggressive, it is instant. Basically, what it is going to say is, if the center of mass travels through me, immediately just drag this out of the sim. There is no threshold, it is just -- stop. So we are going to see whether this is working, using that, right? So we have got our height here. It is going to be infinitely spreading off at this level. One thing I want to just check real quick is the distance -- I am going to give it 5 meters below it. I am going to bring this up real high, because some of the things we are going to be bringing down here are going to have the center of mass. The center of mass is for that current rigid body, so if it is the full cluster of this thing, the center of mass will be here somewhere, right? So only once we start releasing those smaller pieces, that we are going to -- and you see immediately, all of those pieces is, they are released and falling through that plane. They are just stopping. And those are out of the sim now. So we can just switch that behavior to be a disable threshold. And it is going to look for basically a certain speed that we define, and then it is going to slowly move things out of the sim. So we are going to want to set a variable there for that, which we will call "Threshold," and we can tune it to see what feels good. So to start with, on that threshold, let's set it super high, and we can bring it down a bit lower now, see what we get. Okay, so you can see things are stopping quite suddenly, some of them not quite into the threshold yet. And there it goes, it stopped. Looks like it. Does not seem to have, actually, that is quite goofy. I think maybe I have got it too high off the floor. Okay. So yeah, so that is disabling. And that is another way for us to pull things out of the simulation. Disabling them means I can wake them again, with more Field interaction. But it means that collisions are not going to constantly keep waking them up. If you want collisions to be able to reactivate things, then you would use a Sleep Field for that. We will have an example of that in a moment. But basically, I think that is pretty much the basics of this. I think if you have got a grounding in those essential things, that should set you kind of where you need to be to start experimenting with many different combinations of Fields and behaviors. Those principles are pretty much what are going to govern how you do that. So playing with those strain values, affecting them in different ways, applying velocities, forces, and so on. And yeah, and just learning how to gather these pieces together in this way means you can start building all kinds of structures. So that was really what I wanted to convey primarily today, and hopefully that will set people getting started. >>Wes: And Jack, also, I think it is covered in the content examples as well, the performance implications of Kill, Sleep, and Disabled, if you can touch on those really quickly. I think it is covered in the content examples, isn't it? >>Jack: Yeah, it is. It should be, yeah. I mean, basically, as I say, the performance implications are, I mean, Kill is -- >>Wes: Kill is just going to just kill it, so that is going to be -- >>Jack:they are just gone, they're never to return. Sleep would be the more expensive of them, because, as I say, any collision -- and it's also a little bit more erratic in terms of you can have collisions going on, you know, micro ones. So it just settles things over time. But it also means that you can wake them up with other Objects falling onto them. And it also means that things will stack up more, that kind of thing. But it is definitely more expensive. And Disable basically says, okay, I have gone out of the sim temporarily. The collisions are not going to affect me at this point. But if I apply a Field and say wake up, you are actually being exploded at the moment, it will wake up, and off it will go. So yeah, typically, you are going to work based upon what it is you want it to do. In this case, you can say, I have got a disabled plane right here, and it is just because as this stuff starts to stack up, you are going to have a whole load of things being released. You have also noticed that there is a disabled box inside of this thing, and that is because inside the building, we have got floors. So there is going to be a bunch of rubble landing on those, and sort of quietly battling and colliding against each other. So we settle that down nice and quickly, until I need it again. And that just, yeah, that just helps keep that separate. You can also do things like, for example, I think over here -- yeah. So you see here, we have got a Collision Group ID of 1. And I am thinking that this one over here is probably a different one. No, at the moment it is still using the same one. But, okay. What we could do here is, if we want to, if I am saying, well, look, the Geometry Collections over here are going to release pieces that on this side of the building, we are never going to bounce against. There is no point in checking to see whether they will. So by putting them into a different Collision Group, they will never try and do those checks. These are the sorts of little refinements that we can do. And another thing that is important about this one is, we have here a solver. And the solver is where we are going to start dealing with the iterations on testing for collisions, correcting pushout, which is to say when things are intersecting, and it cannot resolve a collision, generally it is going to try to push those apart until it can. You know, how vigorously our clusters are being connected, because sometimes it is possible when you are building that connection graph, you will see that it has managed to sample a few things that -- and it thinks they are together, but they should not be, so we can start weighing those values down until we get the behavior that we want. By default, actually, the cluster connections, which you can also set within the Geometry Collections here, we use quite a lightweight solution default, which is the point implicit one. We have got a few other options here which you can try, which just basically attempts to kind of filter and remove redundant connections, if needed. So those are always worth working with, to try and tune to the best result that you can get. But yeah, it is a fairly involved process, trying to get things to work absolutely as you want them to. But everything is within your remit to do so, because you are able to sample literally anything anywhere, anytime, and tell it what to do. And that is a level of control we just have not had here before, you know, so it is huge. >>Victor: That is great. Thank you so much for showing us a little sneak peek at the content examples, and going through some of the fundamentals there. >>Jack: Oh, you are welcome. >>Victor: We have a lot of questions. >>Wes: As you can expect. >>Jack: Oh, okay. >>Victor: But a lot of them are really good, though, so we are going to try to walk through them here, one at a time. First off, I wanted to -- so there were a lot of questions, just in general, about the content examples, and regarding 4.23 and Chaos. "Will 4.23 Chaos Assets and Saves going to be usable in future UE4 builds?" >>Jack: I do not know. I mean, I would say so. >>Wes: I would expect so. >>Jack: Yeah, that is kind of a Lentine one, that one. >>Victor:: I would expect that it is future-proof. I do not think we would -- >>Jack: I would expect so. I mean, yeah, I mean, early stages, you know, we would have to sort of re-author Geometry Collections, and so on. But I have not had to do that for a long time. Generally, we have been able to just march forward and evolve. So it has been a while since that has ever had to be a problem. So I do not foresee that, but I cannot promise not. Yeah, it is fairly robust, I think, at this point. But it is really worth reiterating what Lentine said in the 4.23 livestream, that we do not consider this to be production-ready right now. Chaos is our Physics System of the future. But right now, it is a destruction system, primarily. And all that other foundational stuff is being worked on and implemented. This is just a really good place to start, getting all those collisions working as we want them to, making sure that Fields are reacting as we want them to. So part of the reason this is out as an early access is because there are so many use cases. And as you have seen, there is a lot of Field options for you. So the possibilities and the combinations of those is just, we are not going to hit them all. And so, you know, this is why the community is so great, because they are going to have all kinds of things they want to do, and they are going to try. And sometimes you are going to hit brick walls there. But tell us. >>Victor: Yeah, that is the only -- >>Jack: Because that data we want, you know? That is exactly what we want to do, and we will evolve it together. And I think this is going to be super powerful. We have got a load of really cool things coming down the line, which are not in yet, and it is going to be wicked. Really, really good. >>Victor: They were wondering about when the content examples will be released. And as far as I know, it will be released when 4.23 goes out of preview, right? >>Wes: It is scheduled to go with that. I think we will have some documentation on that regarding that as well, because you will have to build that project off of sources. >>Victor: That was another one of the questions was, when 4.23 gets released, are they still required to build the project from source? Chaos will not exist in the binary build until it comes out of beta. >>Wes: As far as I know, yeah. >>Jack: We have got a bunch of really good content example maps here, covering as many topics as we could hit in one thing. You know, so we have got some nice examples of different ways of fracturing. We have got examples on different Fields. You have also got all those Field Blueprints, so yeah, by all means, take them, you know, Frankenstein them, turn them into whatever you like. That would be great. I am really interested to see the things that people come up with in that respect. We have also got some pretty good paired-back examples of things like the gameplay map, is a good one, to check -- to show you some of the logic that is involved. I am going to just turn this Chaos thread off. So ways of detecting things like we have Break and Collision Events, so you can see here we have got this little Actor over here, who is monitoring this Geometry Collection. And I am going to just fire a Field at it and break it, and you will see how that thing saw that that happened. So it noticed there was a Break Event in that, and picked up on that. You know, we are able to do things like, we are able to generate mass through that, and figure out what those numbers actually are, you know what I mean, by testing what these Objects are doing. Then similarly, you know, like the key, you will notice in the Chaos demo that we put out, you know, there was all kinds of dust and explosions and fun stuff going on there. And that was leveraged through a similar way, by talking to Niagara, using these systems to basically say, well look, I am going to look for break events, and I am going to spawn particles where those occur. So there they go. And then let's throw into the mix -- let's throw some collision events into that. So there is the collisions in green, and the break events in red. Then, you know, I have got something traveling, it could leave a trail behind it, right? So we have got Trailing Events as well. So let's see those blue ones start to appear, as velocity happens. So you can visualize that those could be pieces of rubble falling away, they could be pieces of dust, and smoke clouds, and all kinds of good stuff. So the Geometry Collections map and the Fields maps and stuff, we are just really showing you what you can do with the Geometry Collections. It is just a very honest -- this is just rigid bodies falling apart, here. You augment it using all this other stuff, and we have added examples there to help you get started with that. And also, there is, I think, like at the end of the gameplay one, we have got an example of a line trace against a Geometry Collection here, which is being used to spawn a Field, like so, so we can check against them and start making weapon type effects as well. Again, the sort of the weapon aspect of Chaos is pretty early at this point, you know, that is going to improve as we work into it. But I had seen that some people were asking about that. >>Victor: Yeah. Another question-- there were several, actually, around sort of multi-layering, doing rebars inside the concrete. Is there a way to handle that? >>Jack: Well, I mean, we have done that ourselves. Yeah, there is quite a few ways you could go about that. I mean, if you had a Geometry Collection with something built into it, you know, it is going to start off with those un-fractured, so there is no reason why you should have to apply the same fracture pattern to the outside as the inside. But, I mean, you know, you also could just use separate Geometry Collections. I think in the GDC demo we did that in those first kiosks, where we had concrete pillars with rebar on the inside, and then we had tiles on the outside of them. Keeping things as -- you know, there is a cost to having more Geometry Collections, but the thing about that is that it means that we can tune their strengths independently from one another, right? So if I have got, for example, a glass window, I do not want that to be as strong as the rest of the stone around it. So I would generally keep that separated and give it its own damage tolerance, which is exactly what has happened inside of that Geometry Collections map that we were looking at a moment ago. But you know, they can all still belong to the same Cluster Group Index, so they can all still be connected the same way, but just behave differently. So yeah, so that is what is going on here. Like, if we-- sorry to wiz at light speed through there. But you can see, this has its own damage thresholds, you know. I have actually set these really super high to begin with, because I do not want to bring the whole building down. There is actually, you know, like when I cause an explosion, if we tune all these things to fall apart nicely, you know, the chances are they are going to fall from above and land on one just like it. And that is going to be enough to bring it all down, and you get this cascade. There are actually really cool ways of actually using Fields to augment the internal strain strengths of these things. But I think that is probably for a later podcast. But you will see there, that is really strong, and the glass isn't, you know? So, you know, I expect that to break pretty instantaneously, yeah? You know, keeping things separate in that way just keeps things fluid. And to be honest, it does not take long, if you kind of think of a better thing to do, it does not take long to test it and tour through it. The tools are pretty fluid that way. >>Victor: That is great. We got a question from the forums, and I would like to take the opportunity to let everyone know that if you have questions before the stream, you can always go ahead and announce them on the announcement thread. This one reads, "If you make a large, rounded wall surface, or a hollow tunnel to walk in, can a new collision be made to be closer to their complex collision? This is a limitation with the Apex destruction Meshes. >>Jack: It is almost like I was telepathic and knew you would ask me that one. Yeah, no, I saw that question. What I have done here is, it is actually a really good question, and it really does lead onto another useful thing I really want to show you, because of course we are dealing with Level Sets, right? And Level Sets are a kind of a mysterious esoteric kind of term, that these -- you know, what are these Level Set Volumes? What do they look like, right? So just start this off here, and you can see these are Level Set Objects here, they are set to be static. They are not broken up. They just have Level Set surfaces on them. So the answer is yeah, yes you can. But let's look at what that actually looks like. Now I am going to pause that, and I am going to eject out of the Character. Actually, what I am going to do, I am going to deselect everything, and I am going to do that. I don't know why, I am quite OCD when I am in the Editor, so apologies for that. Right. So you can see here, during the sim, and these need to be checked while we are simming; we cannot do this just in edit time. You will notice we spawned a few things here. And the one we are interested in here is this Geometry Collection Debug Draw Actor. Now it is important to note in order to see what a Level Set is doing, we are going to add a command, which is "ShowFlag.PostProcess," and then we are going to put space 2. That is just so we can display the Material we used to render what a Level Set is. But I have got the Debug Draw Actor selected here. What I am going to do is, I am going to come down here, and I am going to get the IDs for these Objects. At the moment, you can see I was testing this earlier on, so I am going to remove that back. And we can see there is a number on each one of these now. I am interested in checking out number 1. So what I am going to do is, I am going to show a rigid body collision, they are all going to disappear. The thing about Level Sets is, we take these one at a time. Not so for cubes and spheres, they will show up. But let's put the ID in. And you can see here we have a visualization of the result that is actually being returned to this one. And that allows us to walk through our Geometry Collections. If you have got something that is behaving a little bit weirdly, you know, you might be able to identify why that is by being able to go into that cluster ID, just as I did there, and see what that is. I can turn off Hide with Collision there. And I can see, this is where it sort of falls in terms of the actual piece of geometry that it is representing. Just like I said before, with how we are sampling these, the resolution will determine how accurate that is. So you are trying to tune it until you are happy with the result that you get, right? And that is going to be a good way to do that. So hopefully that answers your question. >>Victor: Yeah, it certainly does. And you would be able to make a cable, or something similar as well, and just tune out a solution. >>Jack: Totally. Yeah. I mean, this is pretty much behaving the same way each time. And yeah, it seems quite happy to roll around that thing, you know? Sorry, anyway. >>Victor: There was another question, which is sort of in general around the calculations, or the simulations that we are doing. "Is any of this based on real-world physics, or is it all video game to the point of abstraction? Like, can you do simulations for any kind of scientific study?" >>Jack: I would want Lentine to probably answer that one. It is a good question. I am not sure if we are at scientific study levels just yet. I do not know, but maybe we are. That is probably one to follow up with Lentine. >>Victor: We'll see if he-- he has been answering some questions in chat, so he might be able to get that. That one, I think, happened a little bit before -- >>Jack: He is hearing us. >>Victor: Let's keep going. We had another question. "Is all of this tremendously resource-heavy? Do I need to upgrade to a Watson-level computer?" That is what they are asking. Let's know what you are running it on. >>Jack: Right. Well, I mean, it's as resource-heavy as you make it, right? Like, I mean, yeah, if you are going to release 500,000 rigid bodies all in one moment, I would expect that to chug a bit, right? But this is kind of what I have been trying to show you here. It is very much about how you tune it. Remember, I showed you the solver as well, earlier. This thing here. These Objects can be attached to one of these, so you can spread the load between different solvers, if you want, as well. That is another good way of tuning that. For example, the iterations on how many collisions I am checking for to make sure that is super accurate. Here I have pushed up to four for that, because I want to make sure that I get a really nice sim. But I might move into another room where I do not really need it to be that accurate. So I might as well just put all the stuff in there onto a separate solver, and separate it from this. That means they are never going to try and talk to these pieces that I just left behind. You know what I mean? It just kind of ring fences them into their own little place there. It is really down to the user to try and find the most performant way in to work with the system, that way. But it is pretty flexible in terms of what you can do. And as I say, we were -- yeah, we had a pretty pokey machine at GDC. But it was totally purchasable at the moment. You know, it was a high-end gaming rig. And we were playing it live, you know? We keep doing it, we are playing it live. It is fun. >>Victor: That is good. >>Jack: Anything else? >>Victor:Yes. Yes. We got more. >>Jack: Okay, I'll settle in. >>Victor: "When is the Culling Field populated? Which moment of execution?" >>Jack: Well, I guess once the -- yeah, I do not know. Like, specifically, the color -- I mean, it is all going to be evaluated and stacked up as the same Event, as to quite what it is doing under the hood in a finer grain than that. I'm not sure. But yeah, effectively, the Culling Field is -- it is all part of that same combination. And then it is applying a Physics Event, based upon all of that information. So it is all happening, you know, at that point, depending on what we set it to do it on, you know, whether it is Begin Play with a delay, or if it is on Tick, then it is going to do it on that. Obviously, on Tick, things can be quite expensive, like if you start applying forces on Tick, that is going to be a lot of forces. But you know, you might do that for things like -- there is a really good example in Jim's map on Fields, I believe, where he recreates sort of strain over time, and starts feeding a noise pattern of just breaking connections over time. Effectively, what it is doing is, it is decrementing from threshold until things start to fall down. So there are ways of doing that. But typically, the culling is necessary just to know that we are not going outside of that area. I do not know if that answered the question at all, but that one is a bit uphill for me, I am afraid. I am an art monkey, so -- >>Victor: "Is it possible to bond cluster groups to different indexes? Like, 1, 2, 1, 2?" >>Jack: Not at the moment, as far as I know. Not at the moment. >>Victor: Alright. And here is an easy one -- oh, continue. >>Jack: No, I just think at the moment, yeah. I mean, I am hoping that may be possible down the line. I think the same needs to happen with Collision Groups too, because I think, you know, then it is a little bit like how we treat Smoothing Groups, where you can kind of go this one over here is one, and this one is two, and this one is one and two, because I want this to collide here, but I do not want it to collide over here, you know what I mean? So you can kind of set that to collision blends happening. I think we will probably have to add that at some point, but not right now. >>Victor: Here is an easy one. "How did you change the color of your folders?" [LAUGHTER] >>Jack: Oh yeah, well I told you, I am quite OCD, and I am sorry for the color splash. But basically, yeah, all I do is just up in here, Set Color, add yourself a new color, and you start having yourself a little palette here. And I have been applying the same things inside of these. Just such a visual thinker, do you know what I mean? I just need -- it just helps. It helps. It is useful. I think Wyatt's a color [INAUDIBLE] as well, he does it, too. >>Wes: Yeah, I was going to say on that same topic, with Fields, setting a thumbnail just to give you a visual representation of where it is in the Level is super helpful, too. I actually cover that in the docs as kind of like a best practice thing. >>Jack: For sure. And also with maps as well. It is interesting -- I wonder if we have got the -- hmm, I do not know. It would be nice if we have the existing maps for the building maps. Typically, I think I might to have a few examples kicking around here. Yeah, you can see in some of these other things -- this is in a just a sort of personal version of this, where some of this stuff is not checked in. But yeah, often it is nice to kind of keep -- for example, if I have got a Cached Sim State, right, to keep that on a separate Level from the same exact thing, which is set not to play back a cache. What I mean by that is, this here is the version I am going to cache. At the moment, there are limitation. The cache system is a real baby system at the moment. But in order to play it back, like I said, we typically use a Level sequence to line all the caches up inside of. I can show you those here. It is certainly something to factor in when you determine how many separate Geometry Collections you have got in any one building, because obviously the more you have, the more of these you have got to manage. But basically, when we are playing back a cache, we are going to use a Kinematic State to determine that, right? Because it is going to basically -- we are saying, you are not dynamic anymore, you are kinematic. You are going to look at those bone transforms in the cache that you have associated with you, which is here, and you are going to play those transforms back to us now. The fun part of that down the line, we have not done a lot of experimentation just yet, but guaranteed we are going to see a lot of it -- is that because we have taken a load off of the physics thread when we are playing back a kinematic playback, what we can do is, we can apply Fields to, say, to rigid bodies. So if I fire an explosion into all of that mess, I can have that Field say, all right, all of you kinematic rigid bodies inside of this, you can be dynamic and just fall down now, right? And from an end user perspective, they are not going to know, or be able to see, that that is not a dynamic simulation just happening in real-time right now, because they are able to actually interact with that, right? I think that is going to be a seriously powerful part of this feature, that is where a lot of the fun is going to be had. But the caching system is pretty early stage right now, so by all means, experiment with it. But I think it is going to have a fairly big overhaul at some point. >>Wes: Continuing on that real quick, Jack, where do you actually set that? Where can you actually kick off a cache? How do you actually do that? Not that we actually have to run through the process, but how do you actually -- you have your setup, how do you actually start caching it? >>Jack: Oh, sure, sure. Well that was, as I said, that was this. One limitation I will point out is that the caches are currently picking up World base transforms, rather than local ones, right? So pretty much, if you want to play it back, you have got to play it back where you recorded it at the moment. But what we do is, we would basically -- this can be dynamic, it is behaving exactly the same. But down here, we have Cache Mode. And initially, we will not have anything in here, but we will the moment we tell it to record. Then when we record, it is going to store that cache when we hit the end of the sim, and then we lay those caches that it has generated up into the Level sequence and trick that to play them back. You will notice this quite peculiar one here called Record and Play, and that is basically kind of like, okay, I have got a cache, I am going to play my cache. And the idea behind that is, but I could still do things to that, right? Then I might want to rewind that playback at some point. I do not think Rewind is up and running just yet, but the idea being, although you are playing the cache, record new information, so that we can spin that back at some point. So that is what that is. Then Play is kind of what you would expect. But at the moment, I think there are some hiccups in the Play command on just the Geometry Collection with the cache in it, whereas, as I say, if you trigger that through a Level sequence, which is what we did for the GDC presentation, that will run super smooth. And you can also set things like -- you can set the play rate for that as well, you can reduce that, and it will play in nice, slow motion, and so on. So yeah, that is pretty much what caches are. Again, we will be documenting that to get people -- >>Wes: Yes, That was my own personal question there, because I had not done it yet. So I will be documenting that. >>Victor: That is cool. Yeah, we did have a question that was around -- they actually asked that it seems like it is more for pre-written destruction, and not emergent random situation. But the system is designed to work for both, right? And in junction. So similar to the GDC demo, you know, we have some pre-cached elements, sort of larger buildings and several hundreds of rigid bodies that we would not really be able to afford without caching them. But then you can also affect them at runtime as well. So it is definitely -- >>Jack: Yeah, literally the last scene was a pre-cached one. That was really early iteration of that tech as well. But the rest of it was all dynamic, yeah, yeah. There is definitely -- you know, there is definitely an up-front cost, especially if you are using Level Sets for everything, you know, in terms of building up all the connections and stuff. So obviously, the more complex things get, the longer it is going to take to spin up. But typically, it is within an acceptable timeframe. I am sure at a certain point there will be ways for us to check against Events, and kind of consolidate when the game thread and the Physics thread are ready. Like I say, beta. We are in beta -- it is easy. It is all going to get sorted. But right now, there are a few -- yeah, there are a few things that need ironing out. >>Victor: I was pretty impressed with what we were able to do so far, and how far some of the paradigms had come. They can actually start learning them right now. >>Jack: Yeah, I mean also, it has come a long way in the time since we did GDC. I mean, really, the tools that we were working with back then were real raw, they really, really were. What we have done is, we have aimed to try and take what we had there and just sort of finesse that a little bit, clean that up, and get that so we can get it out to everyone as soon as possible and get people used to these new paradigms or light Fields, and reflections, and balancing all this stuff. So I guess the main mission, really, for people like myself and Wes now, is just to try and make sure that everyone gets all of the settings, what all those dials are doing, you know what I mean? So, yeah, very keen to the sort of feeding back and giving that information as much as possible. >>Victor: You ready for a couple more questions? >>Wes: Sure. >>Jack: Of course. >>Victor: Okay. "Will there be a more convenient way to clustering than using numeric indices? Is there a way to visualize what is clustered?" >>Jack: I showed how visual clusters work? >>Wes: You should be able to see that in the Fracture Editor. >>Jack: Right. And the Fracture Editor, you can do. Again, I mean, on that one, I am going to bounce back to the whole case of, yeah, these are early stages. I mean, technically, it will be possible for us to do cluster -- you could do a Geometry Collection that has no clustering. And you could potentially use a Field to determine the strength between the rigid bodies, if you so wished. You know what I mean? You could do it that way, too. I think the options for doing that at this stage are somewhat limited. But you know, as it sort evolves, I think we will get a lot of that. But yeah, the clusters are broken up through the Outliner, and as I was saying, if you just walk through them, you can see what they are going to be. I guess is it -- I seem to have saved something here -- I was just going to use this one for just these purposes, but we will worry about that later. But yeah, I mean, I guess maybe the question is potentially they might be asking, can we see the bone color for each rigid body at this stage, in kind of the same way that we see them all when we are in the All State, you know? Because the All State does not play the transforms of the clusters, because obviously it is showing everything on its own merits and on its own terms. So it might be something we could factor in to show what that spread is. That would be pretty cool, actually. It would be nice if we had that toggle. I will bear that one in mind, and push for that. >>Victor: They are wondering, "how do you make your ball bullet collide with your Geo collision? In my Project, my body and my bullet pass through." >>Jack: Okay. So there are a couple of ways we can do things like that. Part of -- so the first thing I did with that ball bullet is to -- this is a very Chaos-centric solution I came up with on this one. Effectively, what I am doing is, I am spawning a Field, and also a Geometry Collection. And I am using the collision of a Geometry Collection with fracturing on it. And when it fractures, at that point, I check for a Break Event and add that Break Event. We just spawn a Field like any other, and cause an explosion. So the ball can spherical. However, it is also possible to apply things to Static Meshes as well. We have this thing called Static Mesh Simulation, and it is somewhat in its infancy here. But you have a kind of a lightweight set of options that also the Geometry Collections have. In this case, obviously, I am using Box Collision. But it allows these things to respond to Fields and Geometry Collections walloping against them as well, so that is potentially one option. So yeah, I guess hopefully that would answer the question. >>Victor: I think so. Yeah, the answer is using -- so that Static Mesh Simulation is an Actor-Component, right, that you attach to the Mesh? >>Jack: Exactly. And then at that point you would choose the Collision type, and you would check Sphere. I guess give that a whirl, see of that works. I did not have to do that personally myself, but yeah, give that a whirl. Otherwise, you might try a Geometry Collection right now, or a line trace, or something like that. >>Victor: Let's see, "I can migrate this easily to other projects, right? For example, I make a sim in a project, and then I will migrate it to another." And that should just be using the normal migrate tool, right? >>Wes: I believe so. >>Jack: As long as you were heading up -- yeah, well, I did. So, yeah. >>Victor: Check! >>Jack: I would say yeah. We got an RTL, the branch that we have, of SIGGRAPH, and yeah, we just migrated stuff out of this one over to that, no problem. Yeah. >>Victor: That is awesome. "Would it be wise to wait until the new fall Physics System is out to integrate Chaos destruction into our game? Or could we use physics and Chaos in parallel?" >>Jack: I would wait until we say production ready. >>Victor: That does not mean that you could not make a little test game and then sort of work with the tools to see what it is capable of right now and what you might be able to plan for the future. >>Jack: Oh, for sure, yeah. Yeah, yeah. >>Victor: But switching is not the state it is at right now. So if you already have a Project, this is not the time to switch. >>Jack: Right. Yeah, I am pretty sure Mike would agree with that. He has probably answered that. [LAUGHTER] >>Wes: No! [LAUGHTER] >>Victor: "What do the colors on the Level Set Collisions mean, if anything?" >>Jack: No, they are just -- it is just a random spread. It is just really for visualization. As I said, if you use shift + B, you can toggle them off. I mean, every single one of -- you know, this Geometry Collection here has no lower settings. But if I do shift + B, you can see if I get switched between Root and All, it still just assigns a color just so you can see what is what. But shift + B turns it off, and you will just be dealing with specifically working with -- which, of course, is very useful for something like this, where I might actually be looking to see what is going on inside, and checking on my Textures that I have applied to those interior IDs are doing. So being able to expand and then tune those to this model, that is an easy way of doing that. So, yeah, at that point, bone colors would kind of get in my way. >>Victor: "Can you animate the culling Fields? For example, drag it along the player?" Can it be a movable Actor, I guess is what they are wondering. >>Jack: That is an interesting one. I want to say you probably can, but I feel like Bryce will probably reach his foot over from San Francisco and kick me. Try it, is what I would say to that. I do not think I have ever -- yeah, no, you can. Of course you can. >>Wes: It is just a Component attached to an Actor. >>Jack: Yeah, we are doing it in this one. So this strain decay that climbs the building, it has got culling all around it. This is actually using a Culling Field to make it hemispherical, because I am only interesting in this force riding upwards. And as the ball expands, I do not want to be catching stuff below. So this is being culled, and then the thing is just moving. >>Wes: Climbing up, really. >>Jack: Yeah. And it could move super, super quick, and release a whole bunch of stuff really, really fast, or you control the -- in this case, I would control the rate of rise and expansion on that. So yeah, it sounds like you can. >>Victor: Awesome. "Does Chaos use data-oriented design to optimize memory layouts?" >>Jack: Wow. You really fired that at the right guy. >>Wes: I was just going to say that. >>Victor: Well, me reading them out loud, we will maybe make Michael or Bryce go ahead and give us some information, if possible. >>Jack: Yeah. >>Victor: It sound like a smart question, so -- >>Wes: It is keeping you on your toes. >>Jack: It is a very smart question, definitely smarter than I am. >>Victor: Well, we will leave that. I was going to mention that the questions that Michael and Bryce already answered, I am going to go ahead and post them on the announcement thread, since we are not asking them live. We have got almost too many questions to be able to do that, so I want to go through the ones that have not already been answered. But they will be on the announcement thread once we are done here. Let's see, "does Chaos work with Sequencer?" And the answer is yes, right? >>Jack: Yeah. >>Victor: That is how we are caching the simulations. >>Jack: Yep. Exactly. Actually, and also -- yeah, yeah. Yeah. Yes. No point on expanding on that, yeah. >>Victor:Answer is yes. "Can you talk about how Skeletal Meshes come into play with this system?" >>Jack: I cannot talk about it that much, because I have not done a lot. What I can say, there was a point where Jim, my colleague and another senior artist dropped a house on a robot's head while it was moving. To do that, he was using the Skeletal Mesh Simulation Component. I personally have not had any experience doing that with this just yet, so I will not expand more than that. But there is a Skeletal Mesh Simulation Component that you can attach and play with, and you might get some success there. I am not quite sure what state that is in at this point. But yeah, give it a whirl. >>Victor: Yeah, it is good to know that it is coming. They were curious, "can you show what the collision view looks like?" I think they are curious to see what the collision view looks like with the collections -- Just the View mode. >>Jack: Yeah, I would not think we are going to see an awful lot. It looks like we are picking up some bounds there. >>Victor: Is there a way to -- >>Jack: This is not typically how I would check collisions. Actually, the collision you are picking up there are actually invisible Objects which I am using to stop this thing filling the entire hole with rubble. So, yeah. You would use the Debug Draw thing that I showed earlier. It will show you boxes and spheres too; in fact, if we just real quick do that again. Or, really slowly do that again. Here we go, thank you. Yeah, so the Debug Draw Actor here, if we show rigid body IDs -- where are ya? Where has it gone? That is one -- oh, Hide with Collision, there we go. What number is that guy up there right now? There we go. If I just turn them off. So yeah, there is the spherical collision, for example. If we had something with box on it, let's see if I can dig out an example of a box collision Geometry Collection. I am sure I've got some. "GC Collision Example Box" sounds quite promising. [LAUGHTER] I will actually make that Static -- well, I guess it does matter. Let's play. Yeah, there they are, a whole bunch of numbers in boxes rolling around the floor. You know, so the analytic shapes are showing up, nice and clear. It is just Level Sets because they are, you know, virtualized, that we have to take a slightly different approach to showing what they are doing. Hopefully that answers that. >>Victor: Yeah, yeah. I definitely think it does. >>Jack: Yep. >>Victor: And you can also look at it in the -- when you are actually fracturing as well, right? Because that is how you will visualize each chunk, if you want to see what they look like back and forth, like -- >>Jack: You would visualize but you do need to run the Debug Draw -- well, actually, yeah, I wonder if that is just for Level Sets, though, the Debug Draw Actor. Typically I run it during sim time, you know, to excel up during play, rather than while I am in the Editor. That said, I do not know if it is possible -- it might be possible to drag one into the scene and maybe visualize some of it outside of play, I am not 100 percent sure on that. But I think it does require play to do it now. >>Victor: Okay. I think we had a question here I just want to reiterate on, someone probably came in late, but they were wondering if Chaos is all procedural destruction, or if I can prioritize certain areas? So the Mesh, for example, have a place, or one piece of it stay stable or following a certain axis? I just wanted to reiterate that we went over that in the second part of Jack's demonstration, so you can go back and view that using Anchor Fields. >>Jack: Yep, that is the key to [INAUDIBLE] buildings. So definitely go back and watch how we did that. Again, there were going to be examples of all of these Fields, and a lot more, inside of the content examples. But feel free to just migrate those out and play with those, and modify them and come out with your own interesting combinations. There is going to be a lot, so guaranteed, we have not hit all of them. >>Victor: All right. Then I wanted to-- because we had a couple of questions regarding multiplayer, which is common, because of course we want to get together and destroy things. >>Wes: Mm-hmm. >>Jack: Right. >>Victor: And there were a couple of questions around it, so I think we can just touch on it a little bit. And that is that currently, there is no special system to either optimize or make server authoritative physics working in Chaos. Is that correct? >>Wes: I still think it would be a good technical Physics Chaos destruction stream, I think, because it is still in its infancy. I have not done anything with the network Physics yet. >>Jack: I mean, like I say, right now, I guess the more fundamental things that are happening, I do not think it requires sort of special support at this particular point. That is not to say it will not be. Like say, Chaos is going to be the Physics System of Unreal's future. So that stuff is going to get solved. And they will talk about it when they are ready to talk about it, and when it is in a position where people should really be looking at that. Right now, what we have is, we are just introducing this stuff to the user base, and getting feedback on that so that we can develop that aspect of it. But it is coming. It is coming. >>Victor: Then I think we will do a final question here, which is, "what do you think is the game changer with Chaos destruction? Maybe not now, but the vision of Chaos for dynamic artists for game Dev?" >>Jack: The game -- right. So I have been working with Unreal destruction stuff for a while, and the thing for me that is fundamentally cool about what Fields bring into play is just the amount of control we have over when things do what they do. We can be very, very explicit about how things decide to break, when they decide to break. Using Fields, we can force the issue, whenever we like. So if I am a designer and I am saying, I definitely need that thing to fall down right now, you know, I can do that. Or if I am a designer, and I say, I really need to know when that is going to fall down, so I can trigger something -- we can tell it that. All of these things are just really, really -- that is really, really cool. And I think the other thing is, the potential of the Kinematic Cached State stuff is just awesome. You know, the idea that I could simulate something which would take an absolute monster computer to run in real-time, and I can pre-cache that, and then I can say, I want it to feel like this thing is still dynamic. I want to hold up my shield, and see the pieces bouncing off of it, right? And just those pieces will, you know what I mean? Everything else is just running on its little pre-authored track. But as a user, as a game player, I am not going to notice the difference. It is all going to feel like -- you know what I mean -- those sorts of levels of control, I think, are going to be massively cool, and a big, big game changer, you know. The simulations that we are getting now are pretty early stage. There is a whole bunch of other cool stuff that is going to feed into how those things start to collapse, the shape that they take when those masses start to break. This is just iteration one, this is just beta. We have got more to do, and it is coming. >>Victor: It is good, it is exciting. Thank you, Wes and Jack, for taking time out of your day to come here and talk to us all. >>Jack: No, it is a pleasure. >>Victor: Yeah. I think we will have you both back at some point. >>Wes: At some point. >>Victor: Probably around the same subject. Well, maybe not fundamentals, but maybe we will go in a little bit more in-depth. >>Wes: Maybe some gameplay stuff. >>Victor: Yeah, that is what I was thinking. >>Jack: I think we should get Jim and I back later to do a bit of some of the advanced fracturing type stuff, and some of the advanced Field stuff. We can kind of pick up from this. I am hoping we are going to start seeing some really cool examples coming in, where we kind of see some other things that we did not even think of. You know, we are experimenting at the moment, and coming up with all kinds of quite fun stuff. But we have just scratched the surface at this stage. So definitely watch this space, and we will be back for more, at some point, maybe later in the year. >>Victor: That is great. And I would like to take this opportunity to mention that we have been -- we do captions for the livestreams. And we get a transcript out of that. And we have started posting that in the YouTube description for the videos. What that means is that if you are looking for a particular part of the livestream, you can actually go ahead and open up the transcript and search for key terms, like "Physics" or "Chaos" or "Material" -- or what it would be. That is a really good way to -- because we know that during this hour and 45 minutes that we have been here talking about this, there is quite a bit of information to digest. So a good way to be able to go back and figure out where we mentioned things, so maybe where we answered a question, you can use the transcript to search for that, which I think is really neat. It usually goes up a couple of days after the lecture is up, because we actually need to caption these entire -- the entire stream first. But I want to go ahead and mention that. Then let's know what you thought of this stream. We have a survey link that I think Amanda will be pasting in chat. Go ahead and let's know what we did well, how it went, if you liked the topic. Then make sure that you go ahead and fill out what you would like to see on the stream. It is a good way for us to know what you would like to see in the future. We have got a lot planned, but there is a lot of future. And if you go ahead and enter -- >>Jack: We are really hoping we covered all of those fundamental things. I think we did, but there may be a few holes, it is possible. So definitely, hit us up with some of those. >>Victor: Yeah. Well, like we mentioned earlier, and it is worth mentioning again, is that the examples will be available for download when 4.23 comes out of -- >>Wes: Along with the documentation and the streams. A whole bunch of information for you guys to digest and kind of experiment. >>Victor: It is great. And then as always, if you have Meetups and user groups in your area, go ahead and go do them. It is a great place where you can bring your projects and talk to other developers about what you are doing in your area, get a little sense of the community, other than just online. You can go ahead and go to UnrealEngine.com/User-Groups, and you can see where they are in the World. If you do not have one in your town or anywhere nearby, you can go ahead and contact us if you would be interested in organizing one. And will make sure to help you out with what that involves. And in some of our online communities, we have our forums, the Discord, we have a good Facebook group. And the Discord is an unofficial -- sorry, it used to be a Slack channel, it is now a Discord server called "Unreal Slackers" where everyone is helping out now. I think we are about to hit the 26,000 member mark, which is really amazing. So thanks to our community members that are running that, they are doing a great job. Then if you would like for us to spotlight your game, your game or your project, it could be either-or, it could be something that involves Unreal Engine that is not necessarily a game as well. Make sure you let's know about that. On the forums we have a thread, Work in Progress, as well as Releases -- just go ahead and post and let's know what you are doing there. Then we might be able to go ahead and show the world what you are working on. And if you have seen the countdown video that we have at the start of the stream, that is a 30-minute recorded segment of you working in your project -- go ahead and fast-forward that up to five minutes and send that to us with your logo to Community@UnrealEngine.com, and we will be able to show a nice little countdown of what you are working on. And as always, if you are streaming on Twitch, make sure that you use the Unreal Engine tag so that we can join you and see what is going on, and say "hi." And as always, follow us on social media. And special thanks to Wes and Jack for taking time out of their day. And I believe we will see you all next week, when we are doing Unreal Insights, with some of the people from our team in Sweden, which will be great. So until then, we will say thanks, and see you next week!
Info
Channel: Unreal Engine
Views: 65,355
Rating: 4.9108529 out of 5
Keywords: Game Development
Id: hx9dHgcN0bE
Channel Id: undefined
Length: 111min 43sec (6703 seconds)
Published: Fri Aug 23 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.