How Good is Nanite in Unreal Engine 5? - UE5 Game Development #5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'm going to be taking a look at nanite the new virtualized geometry system inside of unreal engine 5. along with lumen the new global illumination system nanite brings some major advantages to how rendering now works it's not just a boost in performance compared to ue4 it also fundamentally changes the 3d modeling workflow and what you can bring directly into the engine for example let's say you spend hours or even days creating high quality 3d assets for your world kinda like the snowball here with 120 000 triangles without nanite you'd have to create a low triangle version bake all those details into maps to use them in your materials and then create a bunch of lods to use at various distances while unreal engine 4 helped make this process easier it's still a bunch of work and it's not going to look nearly as good as your original high detailed mesh but with nanite you can just skip these steps and use your high detailed mesh as is let's give it a little test first let's import that high poly snowball mesh i'm going to uncheck the build nanite box to make sure it does not enable nanite for this mesh next let's create a simple white material and assign it to the mesh let's place a snowball into the world and then enable the fps and unit stats the unit stats are useful because it shows you where the time is being spent as your fps drops with one snowball we can see we're getting about 70 fps and the draw thread is taking around 14 milliseconds if we create 10 snowballs you'll see the fps drops slightly and the draw thread increases by one or two milliseconds if we increase to 100 snowballs you'll see the frames start dropping even more and the draw thread gets all the way up to 20 milliseconds this is about as far as we'd want to push it for a normal game since we've dropped below 60 fps keep in mind this is going to vary quite a bit depending on what type of hardware it's running on let's see what happens when we push it even further with 500 snowballs as you can see the frames drop down to around 30 and the draw thread goes up to around 30 milliseconds if we go up to 2 000 snowballs it starts getting pretty choppy and then going up to 4000 it's definitely not playable so let's see what happens when we turn on nanite it's pretty easy to do just go into the mesh click this box and apply changes now if you go back to the 3d viewport you'll see we're back to around 50 to 60 fps and around 16 or 17 milliseconds on our draw thread this is pretty amazing this is 4 000 objects with almost half a billion triangles if we double this to 8 000 snowballs you see performance pretty much stays the same if you want to dig deeper on how nanite does this check out the visualization modes that it provides you can show them all at once with smaller windows or you can choose just one for example here i'll select the triangles now it shows every triangle being drawn another interesting visualization is the clusters view i don't understand all the details but it seems to use the clusters as a dynamic and finer grained level of detail once it knows what clusters are visible then it fills in these with the triangles needed to make a good looking image you can see this here when you're close you have smaller clusters but as you move farther away the clusters are replaced with larger ones you can see the same thing happening with the triangle view each cluster of triangles is getting replaced with a larger cluster of triangles so the obvious question now is how far can you push nanite before it starts to get slow let's find out after locking up the editor a few times and reworking how i'm adding the snowballs to the world i was able to get up to 1 million snowballs as you can see the performance still is not dipping it actually got a little bit better because i'm using instant static mesh components instead of regular static mesh components i'm sure this is faster and more efficient since each static mesh is the same compared to if each one was different but this is still very impressive we're looking at 120 billion triangles over 1 million meshes i found some more interesting information by running nanite stats in the console this shows some extra stats as nanite processes the geometry for every single frame at the bottom you'll see the total clusters and triangles being drawn no matter what i tried doing flying around the world i couldn't get this to drop under 60 frames per second and there were a few views that got really high up there in the triangle and cluster count like this one here that has four hundred thousand clusters and fifty million triangles all in one frame so i ended up stopping at one million snowballs not because nanite was getting slow but because it was taking a while to create these inside the editor also i feel like a million is probably going to be more than enough for the game i'm going to be working on maybe another time i'll try pushing it more than a million but for now i'm going to say that nanite does a pretty amazing job at rendering anything i throw at it in the next video i'm going to begin modeling and texturing some structures that i'll be using in my game and then write a custom actor in c plus to use these models and build up much larger structures inside the world if you have any questions be sure to leave them in the comments below thanks for watching you
Info
Channel: Lively Geek
Views: 72,470
Rating: undefined out of 5
Keywords:
Id: JLUzi3y_uvM
Channel Id: undefined
Length: 4min 49sec (289 seconds)
Published: Fri Aug 27 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.