Unreal Engine Procedural Content Optimization: Boost Performance with These 3 Tips!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello in this video I'm going to be showing you three tips for optimizing procedural content generation in Unreal Engine these are things that I do on every project that I use PCG for and it really helps my computer run more smoothly and render faster these are not the only things you can do for optimization but they're things that I find that I keep doing over and over again so I wanted to share them let's get into it so I have this medieval town here which I'll be using as an example if you want to know how to build that I have a video on it which I'll link below in the description tip number one make sure that all of your assets are taking advantage of nanite in more recent updates in nonre engine in most cases it's best to use nanite when possible especially when you have a very large scene like a procedural content generated scene with a lot of meshes you want to take advantage of that nanite technology in order to render all of those polygons the way to check if nanite is on all of your meshes here to come up to the lit button at the top and come to nanite visualization and choose triangle and this will show you all the nanite meshes in your viewport very quickly because ones that are not Nite meshes are going to come up black this building is one of the meshes that my procedural content generation volume is simulating and so it's actually placed a bunch of different places around my town so I know if I just optimize this building it's going to have a huge impact so I can come over here to this building here which is the building that I know is being used here and I'm going to right click on it and come over to nanite here and choose enable nanite on one mesh it says one mesh here because you can as well go and select multiple meshes and do this at once which is super helpful but I'm just going to do it to this building here so I'm going to right click on it come to nanite and choose Ena and now these meshes are all nanite and fun fact you can actually switch your landscape over to nanite which I'm going to go ahead and show you how to do so if you come to the landscape in your content browser here and under the search bar I'm going to actually just going to go ahead and search nanite and choose enable nanite on my landscape and then choose build data here which is going to switch my landscape over to Nite now if I switch back it looks absolutely the same but it's running a bit smoother so step number two is to make sure that your meshes in your mesh spawner are instanced you can open your PCG graphs here and come to the static mesh spawner and under instance data Packer type you use the drop down and switch it to PCG instance data Packer by attribute this will help if there's multiple of the same mesh being simulated at once in your environment which it definitely is if you're using PCG this will help that be more efficient you can come and do that to every static mesh spawner that you have in your ground one note on that if you do end up using the instance option in the static mesh spawner and you do end up changing the meshes themselves because it's basically making a package version of the asset in order to make it run more smoothly you will need to switch it off to none again make the changes to your meshes and then switch it back to the packer in order for it to display correctly otherwise you'll make changes to the meshes and then it will just not display in your graph so this is something to do once you have the meshes in that you are happy with and then you can switch it over to be instance tip number three is actually to stop simulating your PCG graph at some point and just use the meshes this seems obvious and simple once you know that it's there it took me some time to realize that I could even do this and this does make your level run way smoother so coming back over to my PCG Town asset here if I scroll down under PCG here we have the these three buttons which you remember if you're making a PCG graph in the beginning you hit generate and it continues to generate and make adjustments every time you make a change in the graph but what if you basically have the placement that you want and you're ready to render do other things in your environment you want it to run smoother anyway now you should come up here to clear PCG link what this will do and pay attention here to the content browser when I hit clear PCG link it makes a PCG stamp up here now you'll notice if I hide the town itself it stays there because what it's basically doing is packing all of that data into the stamp which is a much more efficient version of PCG that doesn't have any logic that we were messing around with it's just baked all that data into a stamp of meshes on your level and it will run way smoother and if you you know need to go back into your graph and make changes go ahead and delete that stamp there come back to your original PCG graph and then hit generate again and you're back to where you started and you can make changes and then make a stamp by clearing the PCG link again when you have something you like if you found this video helpful shoot me a thumbs up I also have a bunch of other videos on PCG which you'll find right here or on the channel and if you happen to be new to Unreal Engine and you kind of want to use it to make films and animation I have a free training which I have also linked below this video for you all right I will see you in the next one
Info
Channel: Aziel Arts
Views: 27,286
Rating: undefined out of 5
Keywords:
Id: _t55i17_7qE
Channel Id: undefined
Length: 4min 51sec (291 seconds)
Published: Mon Oct 09 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.