Real-time destruction with Houdini and Unreal || Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello in this video i want to talk about real-time destruction with houdini unreal so here in houdini let's start with a simple shape like a bottleneck shape this can be quite interesting shape to start with and we're going to change here to type to this one here because this one looks pretty cool now next we want to bring this already in game engine so i'm going to do this by an fbx node so type in fbx and then we have here to rob fbx out so then we can fill in our pad to save out the file and then press save so here in unreal we then load in the model and we can drag and drop this in our scene so what we can notice as well is that this might be a very small model so between houdini and unreal there are always 100 units difference so to be correct we should multiply this by 100 to have a better scaling between hooding and real so now we just re-import it and we should see a now proper scanning in unreal here as well now next up let's start making this destructible so first of all we would actually need to enable a plug-in so we're going to go here to our plugins and we're going to search for something called apex destruction so this is what i'm going to use in this video later on unreal has announced they will do a new chaos destruction system but for now let's just stick with apex this is something that everyone can access right now now with our model here we can right click on it and there should be an option to create a destructible mesh or version so we will create a new item and we will have this extra menu here so we will have the extra item and then we can here start defining or destruction of the model so here we can start fracturing our mesh then we have different pieces so these are the breaking parts so let's save this and try this out in our viewport so first of all we need to swap out the geometry with our destruction mesh so here destruction mesh and i'm gonna here to also a simulation and nothing is actually happening and that is because we also need to enable our physics so in the setting of our geometry let's also enable simulate physics it will actually fall down so now the model is falling down but it is still not being destroyed so we have to go back to our settings of our destructible mesh and we're going to enable here impact damage so there are further more settings here to do things more specifically but in this case we press play now and we have a destructible mesh so this is a real-time calculation of this mesh being destroyed so what is also interesting is that we can import custom fbx files or chunks so these strings you see here are generated by real but i want to have something more specific or something generated by houdini and houdini is pretty good at generating that so here in houdini let's make use of some of the fracturing we have so the node that i'm going to use is called material fracture this is a one node that can easily fracture or model quickly so there are definitely other ways and other tutorials you can check out now what i also want to do before i plug in my model is i also need to fix actually the scaling so i scale this up 100 times but if i want to do a certain fracturing simulation i want to actually keep the scale to 1. so i'm going to go here to the platonic shape and set the scale back to 1 and i'm going to use now a transform node to then define our final scale before exporting so whenever i want to export something i'm just going to say scale this up render time so in unreal we don't have any issues there or it's the same skill there so now we can plug in our model here so we have the fractured mesh and then it will automatically generate a fractured version of our model so you can plug in any model that you want so i'm here just using some basic shapes and we can also use an explode view to explode these pieces just like you saw in real so you can see the distant distance and strings so here there are a lot of different settings but i'm not going to go over each one of them so at the top here we can for example choose a type so i'm going to stick to concrete here and then here for example we have then our fractured levels so currently we have two fracturing levels we can for example remove one if we don't need one and here we can also increase the amount so currently we have five pieces so if i want for example more like 30 you can fill in a number here to actually have more pieces so you can fill in any number you want there is also some seed variations and some more settings you can play around here now what is also interesting here what we didn't is that we have automatically here some more details so we can have edge detailing so this will basically break up the edges so you can see here the edges are broken up they're not like perfectly a geometry cut but they are more like a natural good as you can see here but we can have a more natural breakup of pieces like you would see with real debris now one of the downside this might bring is that currently it's adding a lot of extra geometry as you can see here geometry is increased so what we could do is we could go to our detail size at the top here and start increasing this so if you increase this it will actually increase the size of the polygons and this can be more better for game engines to increase this a bit so then i want to bring this into the game engine and we're going to use the fbx note here again but what is special here is that we actually need to make sure that each piece is seen as a separate part in the hierarchy of the fbx so that's something that is special when you import these fps strings so what we can check here is a attribute so first of all we need an attribute that defines each piece so you can see here by default it will generate the piece 0 1 2 and so forward so we have access to each individual individual piece by an attribute so if this attribute is not there we can also use a connectivity node to check on the geometry is connected or not so this will then automatically also if you switch to primitive create an attribute here and you can see that we have done a number going from zero to how many pieces we have so we can access again here these pieces so if we set this to string you can basically have the same result as we had before with the name so now let's use that in our fbx node so let's set the proper location to save and we're gonna now enable build hierarchy from a attribute so we're gonna use that attribute for example name or class that this is the separate piece so here let's use class and let's let's now render so that's done also don't forget the scale i forgot it almost here so make sure we also scan that up 100 times back again so now i'm going to test my fbx file by here importing the file so import fbx and we're going to search for our fbx file make sure you choose the fractured one and then we can just go to the bottom we don't have to change any settings and click on import so here we have our geometry and what is special if i open this the nodes we see our individual nodes for each piece so that's exactly what i wanted is that each piece has an individual node or as or is seen as an individual geometry so they are not merged together they are all separated so here again for unreal let's import fbx strings and we're going to choose the fractured file and then click accept and it should automatically detect this and import these fractured pieces so you can see that this is the same result as houdini so you can see it from the edges so my edges are not a straight geometry cut but a more like jacked or noised version so it's a bit more natural so that's perfectly working so here or now you can do a very specific cut in houdini and bring it in in real so if i now would simulate we will have the same effect as before but now with like cooler looking pieces so once you get the concept of that now we can start playing around with these fractured pieces and i made a small game here i'm still working on this project um and this is basically shooting the debris pieces here like you could see i could shoot a pillar and a pillar would break and this is the exact same workflow as i just shown you by using houdini and unreal to create this effect so i'm just shooting off these rocks and these pieces will all break apart now one thing i did not talk about is when we press simulate it's all uh immediately collapsing into the ground but that's not really realistic or i don't want that so we're going to have to change a few settings here in our destructible mesh to make it a bit better so we're going to mainly talk about destruction threshold and impact but first of all what is also interesting is going to the hierarchy depth and we're going to increase this level here to actually have a better or higher detailed version of our simulation so if i increase this to one it will sort of look at the different depths we have so zero is the basic model and then one is our fraction model so once we have that to one it will can give some better results but it will also cost a bit more so here you can see we have actually the same result still but if i would also now play around with my damage threshold and impact so damage stress means how much damage it takes to actually break parts of the object damage spread is basically when a certain got damage or impact damage how quickly that damage spread to the nearby church so let's set this to 100 and press play and not much is happening and it is because of the damage spread so for example if i would just fill in zero which means no spread and if i would press play now it will only destroy objects that are being damaged on impact so it doesn't really spread to nearby pieces so you can see only the pieces that actually hit the floor now sort of like broke off so you can play around with that so maybe you can instead of zero give it like a small value and then it will actually destroy a bit more as you see here like a few more pieces are falling off so often this can be like a very low value based on your model of course in this case it's quite low value to play around with so these are quite interesting settings to play around with there are definitely a lot more settings you can play rendered and test out there's so much stuff in here but these are sort of like the main settings i would try to adjust to find already like a bit more interesting destruction effect like you could see here like it's not fully breaking anymore so here's a great industry example from borderlands 3 by caitlyn so she made some awesome destruction uh with unreal and houdini where did a lot of simulation with within unreal to make destruction look really cool and awesome and interactable so here are some shots so they would build custom fracture methods in in houdini so so every debris drink has a specific size so they are not too small or too big and they built like then this custom setup so they can easily make this and import this in unreal to make some cool destruction effects using here and that was basically it for this video so this video showed off a bit of the power of houdini and unreal for real-time destruction so i hope you enjoyed this video feel free to like and subscribe and thank you for watching
Info
Channel: Simon Houdini
Views: 17,690
Rating: 4.9695816 out of 5
Keywords: Houdini, procedural, game, art, real-time, destruction, Unreal engine, game engine, fracturing, game dev, debris, simulation, tutorial, overview
Id: 9-cQTA30J1I
Channel Id: undefined
Length: 12min 42sec (762 seconds)
Published: Mon Mar 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.