Basics of Unreal Engine 5 Chaos || Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome to another video and this time we're going to use unreal and its new chaos system to make some destructible things i already made destructible videos this one is focused for unreal and will be very basic setup here now i want to give you a breakdown of what's happening first so we have a geometry this can be anything you have available grab a basic cube here and we're going to fracture that geometry into pieces now with gales we can actually do this in game engine so we can create all of these pieces inside of the game engine but of course make sure you're not going too high in the count so keep that on the lower side so when we simulate this it will fall down so within real chaos what is special here or what is new here will be a field system so otherwise the pieces will just fall down but what we can do is we can create different fields to this to say what needs to happen in that area so either in that area pieces need to break they need to explode or they can also need to stop simulating or be seen as an anchor point directly summarizing some pros and cons or first impressions about geos here so we have a internet or workflow we can do everything in unreal we have flexible field systems so we can really make all of these cool fields and define what's happening we have multiple fracturing levels all models to make them more look complex we also have pretty big options or cache options to cache a simulation heels is also support for niagara and also other features so it can really talk to different aspects of unreal engine then a few cons here traction controls can sometimes feel lacking for example especially to houdini where i can do a lot of specific fracturing and do double checks if pieces are too small and things like that and also the field systems are also a small downside is that we need to create them from scratch and we need to set them up by hand and there is also a learning curve to this which you will see in a moment at the recording of this video enduro 5 is in early access and also chaos is probably in development still so in the new five now we're gonna make sure first our plugins are all installed so make sure chaos is all enabled and also the kiosk field system is enabled so that's very important to have that all enabled so we're gonna start out by a basic shape so you can grab any model i'm just going to grab a cube here and we're going to fracture that cube into pieces so we're going to go here to the fracturing option and we want to create a new fracturing object so we will have a file containing all of the fractured pieces so we can now go to our fracturing methods and we can see how many pieces we want so all the way at the bottom here we can say the minimum and maximum pieces we would like to have so of course keep this on the lower sides so here it's quite low so 39 and we can actually do another level of fraction so we can have multiple levels of fracturing which can make the models look way more interesting than just one level so keep it on the low and you can have quite interesting effects so when i press simulate now this will happen so it's not super interesting and it looks a bit weird so we're gonna go here to our file and we want to edit properties so right now what is actually happening is we have a box collision so when i simulate each piece will actually have a box collider so either we change that or what we can do is we can also change that size of that object there is a setting for that it might not be obvious immediately but you need to here go to collision object reduce percentage and if we for example set this to 50 and save and we press now simulate you will actually now have a more proper simulation on that that is very interesting to know and it might not be obvious at the first time but definitely play around with this value to tweak it until you have a good result now if you want to have something a bit more as accurate collision so as you could see you have for example a sphere so each piece will contain a sphere collider but we can also use level set which is basically a more accurate version so the levels that volumes is a sample of a rich body using a voxelized grid and generate assigned distant fields for the geometry so this basically means that we will have a higher accuracy but at the cost of performance with a higher memory footprint so we're gonna have to be careful with that of course when we set this to level set we can also use the level set minimum maximum resolution the maximum clustering minimum clustering so we can play around with some of these values to sort of like tweak it a bit more you'll actually see that this is way more interesting and a bit more realistic if you use level set it's also recommended to use the particle implicit so this is here where we define the collision behavior on how it sort of like calculates in the background so you can choose between these those two types there are some more settings you could play around with like certain mass settings uh having certain max collision particles things like that so those are the settings you you want to definitely tweak also interesting if you have multiple levels of destruction we can also add multiple damaged thresholds so basically here i have a main damage threshold so this is the when the object should break and then i have another damage threshold when for example the smaller pieces should trick so when i press play we will have the main breakage of the object but now we also have a smaller breaking of all of every object so now let's go into the next topic and talking about creating the field systems so we have a fractured object but i want to control how it should behave so first of all let's just grab my box and i'm going to just place it on the plane so right now if i simulate it's not doing anything because it's just sitting there so i'm going to create a blueprint here and we're going to say a specific blueprint from the field component system so we're going to use that we're going to just say that this is like a basic impact or simulation and we're going to open the blueprint we're going to add a collision sphere so this is where i want my impact to be happening or the simulation now we also want something else which is a radial falloff so this will then also contain some interesting data now in the blueprint itself we only need to begin and in the beginning we want to set or create a certain field so we want to add a field to that blueprint and we have multiple options here to setting or in our field so make sure you also enable it to enable fields and you can have for example velocity different forces different angular forces but in this case we're going to just use the external string now we want to create a field so we're going to use our radial falloff we're going to add a of follow-up or set the already falloff and we want to give it to certain properties so we want the first of all this to be at the same location of my sphere so we're going to grab the road position and we're also going to get the scale or the radius of that sphere so they are exactly the same size so i can visualize that inside of a game engine so now we set the field sphere we're gonna press save and compile and now let's test it in game so here we're gonna grab my sphere make it bigger and when we press play nothing is happening so why is nothing happening is because we need to set a certain force or magnitude so when i increase that value we will now actually have an effect so this is also reflecting to our damage threshold so if i go under my damaged threshold like 200 or lower nothing will actually happen so if i go above my 250 damage threshold like for example 260 it will actually now start to add damage to that effect so this is very interesting to have different objects having different damage thresholds and effects based on what you're doing now let's also quickly here improve our graph by adding some force so we mainly here did a external strain which is basically saying that the pieces needs to break but we don't necessarily say give it a certain velocity or move the pieces to a certain direction so let's add another field so we can just for example copy paste this here and we can connect our field components and connect the other ones as well and we're going to now change our type to for example something with more of a velocity uh so maybe use let's use the linear force so we're actually going to add a force to that and we can also now add a new component here which is then a radial vector so as it's a sort of like in the name is the radial vector so it will be a vector that goes in all all directions from one position so let's grab that here and now we're going to have to set the radial vectors to give it some values so first of all we can set the force the magnitude so we're going to set this quite high the moment and we also need to set the position where to spawn this so and i want to spawn this in the middle of my sphere so my sphere is reflected to this placeholder and so let's use that position here so at the so at the middle of my sphere we will actually emit a source of force so let's plug that in here in the field oh hi so let's give it a quite high number uh let's say 10 000 which is pretty high but we should probably then see a good result so let's press save and let's go into our editor and as you could saw it sort of like completely destroyed the whole object the pieces destroyed each other so the pieces that would fly and touch the other pieces will actually sort of like break them so if i now for example with my sphere here you will now have that force so you can play around with that so based on that force we can say how much we want it this field system really has a lot of flexibility and it can make so much more than doing these basic things another field is for example anchor field so let's say i want this object in the air or i want an object to attach to a wall or something else we can have a anchor field so when i press the simulation button the object actually stays in the middle of the air without like falling down so how do we create something like this so let me quickly go for that so again this will be your blueprints we're going to make a new blueprint and we're going to do very similar steps as we actually did with the force fields so one of the first things that is actually done here or sort of like recommended doing is removing the construction field so this will removes all few components uh from kills in the world so we sort of like start with the clean fields and then we're going to add a new field which is just a dynamic state so just as before we're going to have to say what we want to do so basically the dynamic state is saying what needs to happen to the the physics type or what needs to happen to in the simulation so on our object here we have for example a multiple dynamic state so either for example something can be sleeping kinematic or static so if i put this on static actually my whole simulation will not work anymore so with an anchor field what we want to do is we want to specifically say that everything in the field needs to be a static component so it that means that it won't be seen as a simulation object so further how do we do that so first again we're going to make a fall-off region or a fields in this case we're going to use the box so very similar on how we set up the sphere we're just gonna place a box in our scene i just took a normal geometry box with a opacity material you can also just use the box collider then we also need to create the follow for that box so we're gonna link the follow-up to the position of this box you also need a curling field which i will talk about in a moment and we also need a uniform integer which i'm just going to talk in a moment so when we create our box so this is the area where i'm going to check what pieces needs to be static then in the cooling field i'm going to combine my falloff box with actually a uniform integer so in the cutting fields we will sort of like combine multiple values so the box will say this is the region and the value of the fields will actually be here my uniform integer so our field value or the result of our field needs to be this uniform integer and what is special here is this thing over here so we're going to create here a new variable and this variable is a special uh e object state so you can pick this one so state type inum and this will actually return the multiple states that we can apply on chaos objects so for example i want my object to be static when it's inside of the box so then we just grab here that value we say get then we need to convert this to an integer so convert to integer and then we can plug that in over here so we have that value so when we combine the cooling field and set the current field this is ready to go now to setup in editor you will need to grab here your blueprints with that setup and you will need to scale it to for example like so or i can choose that and we're going to make sure of course that we are capturing that this region now if i would now press simulate nothing will happen and the reason of that is here we need to actually initialize a anchor field here so we need actually to specify in this case so we need to click here on the plus icon and add our anchor fields and now when i press simulate it will now be seen as an anchor field and only the part where i have my impact here will actually be seen a simulation object so this is now only simulating and this is how you can get more and more control with these fields and here's where i'm gonna finish off the video so i showed you some very basic concepts on how to make something restrictable how to set up some of the fields give you some explanation on that so i hope you enjoyed this video feel free to like subscribe and hope to see you in the next one
Info
Channel: Simon Houdini
Views: 7,954
Rating: 4.9844961 out of 5
Keywords: 3d, 3D art, game art, modelling, beginner, tutorial, destruction, Unreal engine 5, Chaos, real-time, simulation
Id: GJ1wdKwoSmQ
Channel Id: undefined
Length: 13min 46sec (826 seconds)
Published: Sat Sep 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.