Using Physics to Improve your Shots in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today you're going to learn how to use physics to Aid you in your level design and environment art process to add convincing and realistic detail to your shots for anything like pebbles or broken rock sediments to General piles of rubble this tool helps you get really good results the physical layout plugin is free easy to use a little bit buggy but totally worth adding to your toolbox anyway so let's jump straight into it in the Epic Marketplace just type in physical layout tool download it and install it to your engine version of choice once you open your project make sure you go to settings plugins and make sure you enable the physical layout plug-in in the list once you've enabled your plugin you should find it in the list right here now before we get into the critical things you need to set up beforehand I just want to take a brief moment to let you know that once again easy mapper is 50% off on the Epic Marketplace for the next week easy mapper is a master material setup that supports tripler texture project ction combined with nanite tessellation and displacement and advanced vertex blending in one elegant package for easy texture blending on all of your assets it is quick to set up and provides a great starting point for getting your levels flushed out the ground in this shot here was made with easy mapper so you can easily add puddles and tons of detail in just a few moments so as you bit on the fence now is the time to get it because it is so cheap you'll find the link down below okay so moving on before we get started with scattering rocks everywhere we need to ensure that all of the models in question both the Target Model that we want to scatter things on and the object that we want to scatter these all need to have Collision set up by default most models will not have any Collision so we need to create it so here I am in the default scene right here and I'm just going to go ahead and create uh just the the base ground that I want to scatter my rocks on so we're going to go and drag and drop a q primitive here and I'm just going to scale it like this and I'm going to give it a darker gray material so I can see what I'm doing next I need to find some object that I want to scatter on this ground here right so using the quickel bridge I have a whole bunch of rocks here that I'm going to scatter on this ground but to set up Collision on these rocks we're going to open up the static mesh editor by double clicking on it and you'll see up here we have a collision tab we're going to click on that and we want to click on autoc convex collision and on the bottom here you should see a new tab open up all we need to do is hit the apply button right here and you'll see we have kind of this greenish wireframe showing up on our Rock here that is our new Collision mesh that we just created now you'll see it kind of loosely followed the shape of the Rock and for now this is going to be okay so we're just going to hit the save button here close this and now we also need to make sure that the ground has Collision on it too so whatever you want to scatter The Rock onto that also needs need to have Collision but the Primitive shape like the cube in unreal already have Collision enabled so I don't need to do it if you want to visualize whether or not there is Collision on a mesh let just drag and drop two rocks here and in the lit tab up here we can click on player collision and you'll see we already do have Collision here so now that we have Collision on our rocks we are now ready to go ahead and Scatter rocks on this floor here by going up here and going to the physical layout mode the first thing we're going to do is we're going to go to paint place right here and we're going to drag and drop our Rock right here in the mesh if you want to add multiple different kinds of rocks you can go ahead and add them right here like so just going to add two variance here now there are a few things you really need to be aware of when you're using this so I'm going to go through with you with my preferred settings that just pretty much work all the time so first thing minimum distance here that is going to control the spacing between the object that you paint and for my own sake I like to drag this down to minimum for reason you'll see soon next is min position and Max position I usually like to set the z-axis to something like 150 for reasons you're going to see soon Max rotation I always tend to crank this up to 360 360 and 360 because that will make it so each rock that we place will be oriented in a different angle every single time and lastly Min and Max scale random is pretty self-explanatory I'm going to set this to 2 and maybe 6 something like that the last thing we need to do is you're going to want to place this with gravity okay because otherwise your rocks are going to go floating across universe and this is probably not what you want and now we're ready to go ahead and click on our rocks here and you'll see we are placing a whole bunch of rocks into a nice pile here and the great thing about this tool is that it makes the result extremely convincing because placing a pile of rocks like this by hand would be a huge pain in the butt A total nightmare but with physics we kind of get all the hard work done for us right so that is the beauty of this tool now let's say I want to scatter some additional smaller Pebbles so I'm going to change the Min scale like 0.1 and let's say 2 and you'll see how the rocks are kind of spawning about a meter and a half above my mouse cursor here that is what the minimum position random does because I'll show you what happens if you set this to zero if you leave it at default I'm going to reset this like that I'm going to reset the scale as well just for demonstration purposes you'll notice they kind of the rocks will kind of go flying all over the place and the end result may actually end up being very similar but for my own sake I don't really like rock spawning from underneath I like them spawning above and falling down onto my ground I just feel like it gives me more control and a better result but really it it's up to you once you have placed your rocks here do not switch back to the selection mode here that is going to crash unreal that is one of the bugs I was telling you about at the beginning of the video what you need to do beforehand is you need to select all placed actors and then we're going to hit bake selected actors into static mesh and that is going to create a new actor here once you have done that now we can go ahead and switch back to selection mode without crashing okay and now once we've baked everything you'll see we can still select each and every one of the individual rocks but in the outliner will'll have a new actor zero if we select that we can now move the whole thing around like this okay and it really is as simple as that but now let's say that I want this actor to be a aesthetic mesh that I can save in my content browser I want to save that as an asset that I can reuse in other levels the way to do that if we're going to go up here to actor we're going to go to merge actors and click on merge we're going to call this rock pile 01 hit save and this will create a whole new asset for you that you can now use in any level that you want the merging process can take a little while sometimes so you're going to have to be a little patient and now you see we can place our Rock pile that we just created in our scene like this so it's a very powerful tool for creating all kinds of rubble that like I said would be tremendously tricky to do this by hand so now that we kind of learned the basics I'm going to show you a few little things that are good to know about when using the physical layout tool and there's a few things that you really should be aware of when it comes to Collision as well okay so first and foremost let's go back to our physical layout mode here and you'll see we lost all of our settings we lost the static that we had placed when you toggle between selection mode and the physical layout mode the plugin doesn't remember any of your settings so I found this to be extremely tedious and really annoying when you're trying to go back and forth between art directing your level versus placing your stuff um not ideal But ultimately not a deal breaker either sometimes when you select all your placed actors this kind of thing might happen uh it tends to happen pretty randomly really all that's happening is that the gravity got deactivated on your meshes here so the way to fix that is to just select all placed actors and enable gravity for selected and they'll fall back to the ground like this if you want to start over again just select all Place actors and hit the delete key and that will give you a fresh start and lastly I want to talk a little bit about Collision on open meshes okay so let's go ahead and drag and drop this Mega scan rock formation here and let's say I want to scatter some rocks in inside the crevices here you'll see these rocks here are kind of low red I wish I really want to add some detail and Scatter some additional rocks that we just had in here so what we need to do I'm going to open up this mesh here once again I'm going to up generate a collision like we just did before and you'll see we got our green wireframe but you'll see the green wireframe does not really match the shape of our rock formation here right it's very low resed we can increase the hle count and the max ho verts here for slightly more accurate shapes and results but the problem with that is that it can only go so far right so now we we do have a slightly better matching shape uh but it it's still like we can see here it's just not very good and you'll see when we start placing rocks here they're just kind of floaty right obviously not what we want we want them to fall in the cracks it's just the Collision measure is not accurate enough one thing we can do is we're going to go open up the static mesh editor again and in the Collision section here we can set the Ed complex Collision as simple now what this is going to do is it's going to use the high resolution mesh as the Collision mesh this is a lot heavier so I'm going to try and paint my rocks again hey you'll see this is working a whole lot better than it was right we're actually getting the rocks to fall into those crevices and this can work very well sometimes like I'm going to go ahead and fill in this whole cavity in with rocks but the reason the complex Collision is simp simp Le doesn't always work that well it's because if we go underneath the mesh and we kind of rotate the sun here you'll see a lot of the Rocks begin falling through the ground and that is because the mesh itself is an what we call an open mesh meaning it's all open on the bottom side of the mesh and so as a result the Collision is very thin so if the Rocks kind of poke through the Collision mesh they can fall through so if you need a collision mesh that really matches the High Fidelity detail of such a model but you don't want your rocks falling through it the solution to this is to export the model into another abade blender or zbrush and you can give your mesure some thickness and when you do have thickness like this when it becomes a closed mesh we can then export that mesh again from zbrush or blender Maya whatever import that into unre and you can load it as your complex Collision mesh right here you can use a custom mesh as the Collision so that is one thing that might be handy for you to know about so guys I hope you found this video helpful thank you so much for watching and as always folks happy rendering
Info
Channel: William Faucher
Views: 206,088
Rating: undefined out of 5
Keywords: Unreal Engine 4, Unreal Engine, Cinematics, UE4 4.26, UE5, Realtime, realtime rendering, rendering, CGI, 3D, 3D Artist, UE4, Unreal Engine 5
Id: bn3aDOA1JXA
Channel Id: undefined
Length: 11min 35sec (695 seconds)
Published: Thu Mar 14 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.