Lumen Lighting From Scratch | Exploring Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up everybody welcome back to the hive and welcome back to another unreal engine 5 tutorial in this video we're going to take a look at the new global illumination and reflections technologies for unreal engine 5 named lumen we're going to take a look at the settings and how to activate them for your own project we're going to take a look at how to set up lighting for a brand new scene as well as take a little dive into the documentation to understand lumen more and see what the limitations are so let's jump right in here we are in the project that we made in the previous tutorial it is just a third-person blueprint project i didn't change anything so let's first take a look at the settings to understand how lumen is activated so here in the project settings under engine and rendering if we go back there's a global illumination section in here this should be set to lumen and there's the reflection method that should be set to lumen also these are by default for any new unreal engine 5 project but if you are migrating an unreal engine 4 project these will not be set so you need to set them yourself there are also some other interesting settings in here that we will go over there's the software ray tracing mode by default it's the detail tracing it is the highest higher quality tracing that is done in the mesh's individual distance field and there's the global tracing that is done in the global distance field and that is less performance consuming there's the shadow map method the virtual shadow maps beta are the new ones and the shadow maps are the old one we will see how these work and what they do we have the support hardware tracing uh here if you have hardware that supports hardware tracing you can check this and then you can check the use hardware tracing when and when available and the unreal engine 5 will use hardware retracing when available and if not it will default back to software ray tracing we have the generate mesh distance field here that should be checked if you use the reflection method lumen it should be checked by default with the reflection method but if not pay attention to this and then we have the low static lighting that is checked by default and lumen does not use static lighting so if you want to just be sure that there are no static lights in your project you can just uncheck this be aware that if you uncheck it you will have to restart the project and it will recompile shaders and as all of us unreal engine developers know recompiling shaders can take a lot of time so maybe do that when you are about to take a coffee or take a break and that is all for for the settings let's now jump into a new scene and see how we can light a scene from scratch so let's create an empty level so there are nothing here in this level no lights no objects let's start by creating a shape we create a plane put this at zero and let's make this 100 by 100 let's create a cube in here put this at zero let's make this 10 by 10 by 10. take this out let's create a sphere so our scene has some objects but there are no lights in here so the way we used to do it before was uh in the button that was like this create button here in engine 4 we used to do create and lights and add our light same for visual effects and for our volumes but i discovered a hidden menu in unreal engine 5 that makes this process so much easier so if you go under window and environment light mixer in here you can just create everything that you need so let's start by creating a skylight let's create an atmospheric light let's create a sky atmosphere let's create a volumetric cloud and here we have the details of all our lights so of course they are still selectable here in the world outliner and we have the details in here but here we have access to all the lights uh one under the other we have this setting set to minimal i move it to normal to have a little bit more settings and when you create all your lights there is a little bug so if you come to the directional light and just click this and hit ok it will reload the directional light and there is one other thing that i like to do is to go to my skylight and click the real time capture which is going to make the lighting a lot better and as you can see we have this black area in here that normally in a real game level we would have outskirts and we will not see this but an easy way to remove it is to go to create visual effects and add an exponential hate fog and that's all we need to do to have a great lighting for our scene so now let's start playing with these and before i do that let's add a another object to our scene let's add this put it in here so this is just an object that is used to calibrate colors and it gives us some reflections and some things to look at so let's start going over our options in here so the directional light the first option we have is the source angle and the source angle is actually the size of the light so if you look at the sun in here if i move this up the sun gets bigger and we can get a little bit crazy with that and what this does is it actually as in real world photography or filming when you want soft shadows you need a bigger source of light and if you have a small light source your shadows are going to be very harsh so if we look at the shadows in here if i make the source angle bigger you can see that the edges of the shadows get more and more soft which is really nice and makes the shadows really realistic and these are the new shadow maps so if we go to the settings in here under rendering we have our virtual shadow maps in here so if i change this to the shadow maps we had before you can see that the shadows do not look really good these are the shadows that we are used to have in video games but if we put virtual shadow maps the new ones they look a lot better they line up with the objects a lot better and they just look awesome overall so if you want to make the shadow edges a little bit more soft you can play with the source angle in here so we can really get crazy with this and have some very very diffused shadows and a sun that is a size of the universe so let's take this back to let's say three under that we have color temperature so we can check this and we can play with the color temperature if we want a really cold scene or really warm scene we have the light intensity of course that we can play with to make the light more intense we have the light color that we can change a little bit to a color that we like and then we have our effect world that uh just deactivates the light if we want to test things and cast shadows that remove the shadows if anyone would like to use that for some reason and atmosphere and cloud here we can completely deactivate sunlight if we want and we can also have shadows cast clouds so it gives a little bit more depth to the shadows and to the atmosphere and it makes the entire world a little bit more shadowy that makes sense and that's everything we will cover for uh directional light let's move on to the skylight so skylight we already activated real time capture which makes light a lot better um here we have the cube map resolution that we can augment a little bit uh intensity it's the intensity of the skylight light color the same we can play with this there are many many uh properties where we can change the colors of different things in our lighting to really get the lighting that we want and of course effect worlds the same if you want to deactivate the light and cast shadows for the skylight doesn't do anything um we have indirect lighting intensity uh it doesn't do anything for skylight but it's actually useful here in directional light so if we look at these areas that do not have direct lighting so if we augment the indirect lighting intensity we can see that we are making them a lot lighter and if i take that down we can make them a lot darker so this is the intensity of the indirect lighting so that's all for skylight that we're going to cover for now sky atmosphere is where we can tweak our atmosphere to really have the atmosphere that we want so we can tweak the atmosphere height we can tweak the different colors in our atmosphere there are different spots that we can change around the sun the color of the atmosphere behind the clouds and all that so we can play with this to really get the effect that we want and in the end in here we have um the volumetric cloud so the volumetric cloud are the new cloud system so you can tweak the altitude of the clouds you can tweak the height of the cloud layer and you can change the material in here to have clouds that you want the last thing we're going to see is the exponential height fog that we added in here so here we can play with the fog density if you want some really dense fog and we can play with the falloff and with some other different uh the color and some other different properties to really make that the way we want so let's open our example map that we have in here and let's um this is lit with the old way of doing things so let's just remove all this and light it with the new way of doing things and see how it looks so let's just play for reference well it does look like unreal engine 4 the way we remember it there is no indirect lighting the scene looks like it's lit the same way everywhere so let's just start deleting this so leave the light source post process skylight atmospheric fog sphere reflection capture sky sphere blueprint and we have deleted all the lights so now we can start creating our skylight our atmospheric light our sky atmosphere our volumetric clouds let's go in here and just hit ok to reload the light in let's go to our skylight and check the real time capture and it already looks a lot better and if we go here we can see that there's still this dark area so let's add exponential height fog and will you look at this so let's go to our directional light make the source angle a little bit bigger to get softer shadows and hit play and this to me looks 100 times better than what we had before and we haven't tweaked anything we just clicked in five spots and this is how good the new lighting engine is in our new engine five all right so now let's take a look at the documentation and understand a little bit how lumen works and the limitations of it so they start by explaining how to activate lumen in the settings so we've already went over that so here with lumen global illumination light bouncing off diffusely of a surface picks up the color of that surface and reflects the colored light onto the nearby surfaces this is called color bleeding meshes in the scene also block indirect lighting which also produces indirect shadowing so let's take a look at color bleeding if we go back to our test light map in here so let's take this object and let's put an emissive material on it so let's put this here you can see that the light that is bouncing of the object and to the ground you can see that it's changing the color of the ground so this is what they mean by color bleeding and if i hit play and go next to it you can see the reflections on my character that also change color let's take something else for example let's take this cold and put it in here and it should do the same so i don't know if you can see this through the youtube compression but there's actually a little bit of golden and yellow in here so indirect light in doesn't only bounce light but it also takes into consideration the color of the surface that it's bouncing on let's keep going lumen with the sky lighting so sky lighting is solved as part of lumen's final gather this includes sky shadowing which also which allows indoor spaces to be much darker than outdoor this is really awesome actually it makes the lighting a lot more a lot like real life actually so if we go back to our example map in here let's hit play so here we are it's we are completely away from the uh the direct lighting so it's like if we were in indoor space so when i will go outside this area light is going to soften so if you see uh in front of me like the shapes are really completely white in here so if i go out of this you can see that the light softens and dampens a little bit to adapt to the lighting so if i come here it lights up and if i go here it dampens the light for a more realistic effect i think this is really good this makes uh makes it look a lot more realistic all right let's keep going uh lumen and emissive material so emissive materials propagate light through lumens final gather with no additional performance cost this is awesome so uh as i just did so if you have an emissive material on an object it's gonna propagate and it's gonna bounce that light and it will not cost anything more in terms of performance a very good point supported light types and other features so all light types are supported this includes directional sky point spot and rectangular light light functions are supported on directional lights only and lights with the mobility set to static as are not supported because static lights are stored completely in light maps and their contribution is disabled by lumen so as we said before static lights are not supported or your lights need to be stationary or movable and you can also completely deactivate the static lights from the settings so here they go over the settings we already seen all those lumen is compatible with post process so you can have a post process volume that is going to override your project settings in term of global illumination and reflections so in your past process you can set your global illumination method to lumen and your reflection method to lumen as you do in your project settings and you can also fine tune uh the quality so the fine final gather quality you can fine tune it and the quality of your reflections you can tune it so final gather quality increases the quality of lumen global illumination and reduces noise being rendered but will increase the gpu cost of rendering it and the same thing for the quality of the reflections and some additional notes so lumen lighting update speed so lumen uses a number of caches to achieve real-time performance while local lighting changes propagate quickly global lighting changes like disabling the sun can take multiple seconds to propagate so let's take a look at this so here we are in our scene if we take our directional light and we completely deactivate the sun you can see that it takes some time to update the lighting in here let's reactivate it and it takes like a second or two to uh to completely change that so this is something that you should avoid doing in in real time and that is all we're going to go through for this documentation let's jump into the detail uh the technical details and see what we can find in here so lumen rate racing as we said there are there is a software ray tracing and hardware ray tracing the here they give a little bit more detail about the detail tracing and the global tracing so the detailed tracing actually traces against the individual meshes distance field for the highest quality using the first two meters for accuracy and then the global distance field for the rest of each ray global tracing is just the global distance field for the fastest traces let's look at some limitations so in terms of geometry it only supports static meshes instant static message and hierarchical instant static meshes it does not support landscape but it will be supported in a future release of the engine so for now lumen and also nanite they do not support landscape but i saw actually on reddit that a guy just converted his landscape to uh to a mesh to a static mesh and put it in the engine and it actually works well with lumen and with nanite so that might be a workaround uh waiting while waiting for the next release of the engine some workflow limitations so software rate racing requires levels to be made out of modular pieces walls floors and ceilings should be separate meshes large message like mountains will have poor representations and may cause self-occlusion artifacts and walls should be no thinner than 10 centimeters to avoid light leaking and for large worlds i will not read all this but basically lumen does not need nanite to operate on large world but if you have a large world with very with a lot of high poly objects lumen will be a lot slower than normal so you should either have a look at nanite or have lods that are set up correctly if you want to use lumen for large words fast camera movement will cause lumen scene updating to fall behind when the camera is looking uh when the where the camera is looking causing indirect lighting to pop in as it catches up uh lumen surface cache covers up to 200 meters from the camera position past this only screen traces are active for the global illumination so if you are moving really fast past the those 200 meters limit your global illumination is going to lag a little bit behind and some other limitations in here um so lumen doesn't cannot be used with static lighting we already seen that foliage is not well supported in this early access build because of the heavy reliance on down samples rendering and temporal filters lumens final gather can add significant noise around moving objects and is still under active development translucent materials are not yet supported for lumen reflections and will not have high quality dynamic global illumination and for the platforms lumen does not support current gen platforms uh ps4 and xbox one they give some alternatives in here and lumen does not support mobile platform and there are no plans to develop a dynamic global illumination system for the mobile renderer games using dynamic lighting need to use unshadowed skylight on mobile and that's it guys for the documentation so i hope you guys enjoyed this tutorial if that's the case please hit that like button helps the channel a lot if you're not subscribed yet please consider subscribing if you're interested in game dev game design and unreal engine 5 we will be doing a lot more tutorials and as usual my name is anis thank you very much for watching and i'll see you guys in the next one
Info
Channel: Polygon Hive
Views: 2,206
Rating: undefined out of 5
Keywords: exploring unreal engine 5, Lumen Lighting From Scratch, polygon hive, Unreal Engine 5 Lumen, Lumen Lighting Tutorial, Unreal Engine 5 Lighting Tutorial, unreal engine 5 basic tutorial, unreal engine 5, unreal engine 5 lumen, unreal engine lumen, unreal 5 lumen, ue5 lumen, unreal engine 5 lighting, unreal 5 lighting, lumen ue5, ue5 lighting, lumen unreal, ue5 lighting tutorial, unreal engine 5 lighting tutorial, unreal engine 5 tutorial, ue5 lumen tutorial, unreal lumen
Id: 2aVGAtEVtcI
Channel Id: undefined
Length: 20min 39sec (1239 seconds)
Published: Sun May 30 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.