The Nanite Revolution | Exploring Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up everybody welcome back to the channel and welcome back to another unreal engine 5 tutorial in this video we're going to talk about nanite we're going to see what it brings to unreal engine 5. we're going to see how to use it and enable it for your project we're going to see how to visualize it and debug it as well as take a little dive into the documentation to further understand the technology and have a look at some limitations and some technical details so let's jump right in so here we are in the project that we created before this is a simple third-person blueprint i haven't modified anything so let's take a look at how we can enable nanite um there are basically three ways of enabling nanite the first one is when you import a a mesh into your project so when you import it you have here a build nanite checkbox you can just check this and it's going to build nanite and enable it for your static mesh you do not have to do anything more than this the second way is for your meshes it is just to right click and do nanite and enable and actually this is something you can do on a batch so you can select multiple items and enable disable nanite from here and the third way is from the static mesh editor so if you get in here and you type in nanite you have the flag to enable nanite all right so this is the only thing you need to do to enable nanite on your mesh just when you import it you hit build nanite and in your in your editor you just right click and enable nanite okay so let's now let's see how nanite affects our project so we create a new scene let's light it real quick like we know how to do that bank let me get my skylight bang and let me create an exponential height fog and perfect our scene is lit let's move on let's create a plane let's put this at 0 0 0 and let's make it 100 by 100 perfect let's take it up a little bit all right so now i have these two meshes that i imported from the kwix omega mega scans from the bridge that you can access from here let me place one of them okay so i have this asset placed um i will just type in the command to have the fps shown in here so i am running at approximately 30 fps in here if i right click the object and disable nanite it takes a little second we can see that just even for a single item i dropped like from 30 fps to something like 20 fps okay not that a big deal right so let let's enable it back okay we're back at 30 fps now let's duplicate this asset so i hit i hold alt and i drag my asset to duplicate it let's make five of those let's make 10. let's make 20. let's make 40. let's make 80 and 320. so we have 320 very detailed assets as you can see and we are still running at 30 fps great now let's disable nanite and please bear with me because i think my pc is going to struggle through this and the recording might lag a little bit so just bury me let's disable nanite let's give the pc a minute to answer or write to respond and here we are we are at 1 fps when the editor is able to display the fps because he's not even able to display the fps so we're under a frame a second so it is completely unusable with this amount of assets that are this detailed without nanite so now let me just right click nanite and abracadabra boom back this is how revolutionary nanite is it's not just hype it's unbelievable technology so now we see what nanai does we see how it works let's see how we can visualize it and how we can debug it so to visualize nanite the things you can do is go here into the view mode and you have the nanite visualization and if you do the first one which is mask mask actually shows in green everything that is nanite and in red everything that is not nanite so if i do if i bring in another item for example like this statue in here and this one i will disable nanite for it and if i do lit and masks you can see that it's everything in red even the statue is in red so we do not even see it and everything here is in green because it is nanite so let's just let me just delete the plane you can see that the statue here is red and everything else is green let's hit ctrl c bring it back and let's go to the second visualization mode and the second one is actually triangles and triangles would only display the nanite meshes and it will actually display the level of detail so the closer i get the more triangles there are the further back i go less triangles are displayed on the object so this is the dynamic automatic lod system that nanite brings you do not need when you make your mesh you do not need to make lods anymore you just enable nanite and lods are handled automatically and you do not need to care about polycons either you can make your items as detailed as possible and when you're gonna get really close you're gonna display the item at the highest level of detail and when we go back the automatic lod takes care of everything so this is the second useful visualization mode there are many other ones that are detailed in the documentation we are going to have a look at them and there is overview which basically displays all of them at the same time if you just want a quick view of everything nanite in your project now let's really understand how we can debug night and how we can work with it on different hardware so what happens if you open your project on a pc that doesn't support nanite is your project usable well yes because if we just go into the command line so basically i'm hitting the tilde key to focus the command line in here okay or i can just click it and we have a console command that is r nanite and i can do zero or one so if i do r nanite zero knight is disabled it looks like nothing happened but actually look at these ugly meshes and let me do arna knight one and boom nine night is good okay so this is a way if you are on a computer that doesn't support nanite you can just disable nanite rendering and this is actually not disabling nanite on the meshes because if you disable nanite on the meshes they are still very high quality meshes this is disabling nanite on an engine level so basically it does not render the dynamic lods anymore it just shows the lowest quality the ugliest mesh it can with the lowest number of triangles what happens if you in your game not only you have very detailed assets which use nanite but you have a lot of them in your scene and even if you disable nanite with with our nanites zero you still have a huge number of items and your computer or your hardware cannot handle that so there is an r that nanite that proxy render mode and this can have a value of zero one or two so zero is the one we are in right now so basically it says render the proxy mesh and the proxy mesh if i select the if i select the statue here i will hit ctrl b to focus it on the content browser and then i will open this so let me just re-enable nanite so this is our original mesh that you can see in here and if i hit show and nanite proxy this is what is going to show uh to be displayed rendered if your platform if your hardware does not support nanite proxy render mode 0 basically when when it is activated and when nanite is disabled it says display the proxy mesh but maybe on your hardware you still cannot handle these many instances of your mesh so what can you do well you can go into proxy render mode one which is basically do not show me your nanites it doesn't matter where i do not want to see your nanites anywhere and when you do proxy render mode 1 it's basically does not display does not render any nanite mesh even in here and even if you select nanite proxy it will not be displayed but this can be a little bit annoying because maybe you do not want to have all your instances in here but you would still want to see what the item looks like in here and that's where you can go into render proxy mode 2 which still isn't going to show anything in here but if you come back here and do show proxy you can still see what your item looks like at the lowest quality so i think uh we're good for um trying out nanite and playing with it so now let's jump into the documentation so here we are in the uh nanite documentation so let's just jump in so the benefits of nanite multiple orders of magnitude increase in geometry complexity higher triangles and object counts than had ever been before in real time so you can have items that have millions of polygons that are as detailed as possible and read engine 5 isn't going to care he's going to render them great frame budget are no longer constraints by polycounts draw calls or mesh memory usage amazing now possible to directly import film quality source arts such as zbrush sculpts and photogrammetry scans like mega scans amazing use high poly detailing rather than bacon detail into normal map textures so now when you're making your your asset your your model and you want to make the very tiny small details you can really just do them on the mesh and you do not have to bake them into your normal maps great better workflow level of detail is automatically handled and no longer requires manual setup for individual meshes lods this is absolutely amazing when you make an asset you do not need to make the different lods for your asset you can just make it the highest detail possible the best level of detail you can put it in the engine lods are automatic loss of quality is rare or non-existent especially with lod transition so this is also great in traditional games when when you have the lod switch the lod transition when you are getting closer or further away from an object and you are paying attention to that object you can see the level of detail pop like the transition from lod 3 to 2 to 1 to 0 you can really see the difference now you almost can't like it is really not perceivable how a nanite mesh is different from a static mesh and now night mesh is still essentially a triangle mesh at its core with a lot of level of detail and compression applied to its data all that is required for a static mesh to take advantage of nanite is a flag to enable it authoring content for nanite is no different than traditional mesh except that nanite can handle orders of magnitude more triangles and instances that is possible for traditionally rendered geometry move the camera close enough and nanite will draw the original source triangles that were important so basically when you are making your static mesh there is nothing different from before you when you are making your static mesh to be usable with nanite there's nothing different you can just make your mesh as you used to make it and you can make it as detailed as possible so that when you import it and you get very close to it it is very detailed and then you get far from it and nanai takes care of reducing the number of triangles virtual textures are not required to be used with nanite but they are they are highly recommended so virtual textures are basically nanite but for textures so it is an automatic system you can put the texture that is as detailed as possible in unreal engine 5 and you can make it a virtual texture and uh unreal engine 5 is going to take care of reducing the quality the further you are from the object how does nanite work well during import meshes are analyzed and broken down into hierarchical clusters of triangle groups during rendering clusters are swept on the fly at varying levels of detail based on the camera view and connect perfectly without cracks to neighboring clusters within the same object based on the camera view is really important which means that even if you are very close to an object but it is not in your camera view well it is not going to be rendered as the ones that are in your camera view and this is a lot better than traditional level of detail since nanite relies on the ability to rapidly stream mesh data from disk on demand solid state drives or ssds are recommended for runtime storage ssds are becoming the standard so this shouldn't be an issue in the future what types of meshes should nanite be used for nanite should generally be enabled whenever possible any static mesh that has it enabled will typically render faster and takes up less memory and disk space so this was a question for a lot of people because they were saying that since we are going to be able to use film quality assets our game sizes will explode but we are going to see a little bit down that actually it is not the case our project file sizes will explode but the packaged game is still going to be even smaller than what we used to have before more specifically a mesh is a good candidate for nanite if it contains many triangles or has triangles that will be very small on screen has many instances in the scene acts as a major occluder of adonai geometry enabling nanat support on meshes so when you are importing a mesh you can just check the build nanite it is recommended to disable generate light map uv's property when not using precomputed lighting with light mass there is no need for either cost if your project doesn't require big lighting so if basically you are using lumen you can just disable generate light map uvs because it is not going to be useful and it's going to make your assets later batch selection and individual assets so the other way we you can enable nanite is by selecting all your meshes that you want to enable nanite for right click enable nanite and for static meshes you can go into the static mesh editor and enable it and for geometry collections for example for chaos you can just get into the editor and same thing check the nanite box so nanite really to us all it is is a checkbox but to the guys who made it it is a masterpiece thank you guys you are really revolutionizing game dev with nanite and with lumen lumen is also absolutely extraordinary before we used to bake light in so every time you move a rock in your world and you have to bake everything again now you just don't care about that and now you make assets and you do not need to care about lods and you not need to care about polycount so this is really really awesome this is really a revolution in the world of game dev supported features of nanite a mesh with nanite enabled can be used with the following component type static mesh instant static mesh hierarchical instant static mesh and geometry collection like chaos for example nanite is currently limited to rigid meshes nanite supports dynamic translation rotation and non-uniform scaling of rigid meshes but does not support general mesh deformation whereas whether it is dynamic or static deformation not supported includes but is not limited to skeletal animation morph targets world position offset in materials spline meshes so nanite is limited to rigid meshes but it does support uh translation rotation and non-uniform scaling dynamically so if you have your nanite meshes in your world you still can move them you still can translate them you can still even non-uniformly scaled them so we can scale them differently on the x on the y in real time and nanite is still going to work it does not support uh skeletal meshes some people saw in the valley of the ancient demo that the boss was using nanite and they were like nanite supports skeletal meshes but actually it doesn't if you have a look at the project the boss is actually a like a skeletal mesh and all the items that are stuck on him are static meshes that use nanite but the skeletal mess himself doesn't does not use nanite probably it will be in the future here we have some details on the materials and on the rendering so two important things for the rendering uh the following rendering features are not currently supported if you are making a game for vr or a split screen uh couch co-op or something it is not supported you cannot use nanite supported platforms nanite is currently supported on playstation 5 xbox series sx and pcs with graphic cards meeting these specifications maxwell uh generation cards are nowhere for nvidia gcn generation cards are nowhere for amd using the latest drivers directx 11 or 12. let's just take a look at some size comparison so here we have a comparison between a very high polystatic mesh that is a million and a half triangles with four lods and with nanite disabled and the nanite mesh with the same number of triangles same number of vertices of course no lods because they are handled automatically and with nanite enabled and we can see that the normal mesh is 149 megabytes and the nanite mesh is 19.6 megabytes so there is a huge difference there is like a one to eight ratio something like this for games for packaged games size is not going to be a problem for project sizes it's going to be a problem if you use film quality assets but once you package your game it's not a problem the value of the ancient demo is actually over 100 gigabytes but if you package it i did package it it is um around 24 or 25 gigabytes so it is one-fifth of the size of the project even less than one-fifth of the size of the project and let's keep going here we have the visualization modes so we saw these we saw the mask and the triangles which to me are the most important ones and then you have things to visualize your clusters and to visualize the different instances of your static meshes i encourage you to go through the documentation for yourself and find the visualizations that will help you in your workflow and here we have some console variable commands so r nanite 0 1 to disable and enable nanite so nanite rendering can be enabled and disabled globally at runtime using the console variable r.nanite zero or when to activate it disabling the knight is a good way to emulate platforms where nanite is unsupported and then we have the r that nanite that proxy render mode which is uh 0 1 or 2. and we have one last command that is here nanite stats let me focus this so i click something and i hit f to focus it again very useful shortcut so let me type in nanite stats and nanite stats will display some stats in here you can see the number of triangles that are being rendered so here we are at like two million eight something triangles and if i start going back you can see that the number of triangles is diminishing and if i start getting close again you can see that we are at three four even five so this is a very useful command you can use it with with some arguments so if you type in nanite stats with primary or vsm directional or vsm perspective or this it will display a different set of stats depending on what you need and here you have the detail of all those stats and what they mean actually i do recommend that you guys go check the documentations for yourself for nanite for lumen and for all the other features that that we have in here documentations are very synthesized they are small you can read the documentation for nanite in about five minutes and it really gives you a complete overview of or of how the technology works how to use it how to enable it how to debug it how to visualize it everything they really done a great job with the documentation and they didn't make it too technical so that people would get bored of it so i do recommend that you guys check the documentations for yourself and that's it guys for this for this video i hope you enjoyed it if you have any questions about nanite about lumen about all the things that we have seen up until now you can let me know in the comments below i will make sure to answer them uh to the best of my knowledge i do and answer every single comment here on my channel if you enjoyed this video please hit that like button it helps the channel a lot uh if you are not subscribed yet please consider subscribing if you are interested in game dev and game design unreal engine 5 there are still some tutorials coming in for all these new features and right after the tutorials we will jump into making some small projects and having some fun and seeing what we can really do with nanite and with lumen in terms of game dev aside from just explaining the tech and understanding it and being astonished by how amazing these new technologies are so as usual my name is annas thank you very much for watching guys and i'll see you guys in the next one
Info
Channel: Polygon Hive
Views: 1,503
Rating: undefined out of 5
Keywords: exploring unreal engine 5, polygon hive, Unreal Engine 5 Tutorial, Unreal Engine 5 Beginner Tutorial, unreal engine 5 nanite, unreal engine 5 nanite tutorial, unreal engine 5 nanite beginner tutorial, unreal engine 5 nanite explained, nanite beginners guide, ue5 nanite tutorial, ue5 nanite documentation, ue5 nanite explained, ue5 nanite technology, nanite revolution, unreal engine 5 polygon count, unreal nanite, nanite unreal engine 5, ue5 nanite, unreal 5 nanite, nanite ue5
Id: Ldk9SnUHLjg
Channel Id: undefined
Length: 22min 24sec (1344 seconds)
Published: Wed Jun 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.