LIGHT PROBES in Unity (URP Version)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone in this video we will talk about light probes and unity's new adaptive probe volumes or in short APV in my previous videos we discussed the real-time lighting and bake lighting but at this point we can't really merged the two of them for example if we have moving objects in a baked environment then the dynamic objects won't have shadows by the baked light sources in Erp we have two options to fix it or we can use both at the same time the two options is Shadow mask or light probes so what are these light mode types because so far we haven't discussed it yet so we have three options baked in direct subtractive and Shadow mask debate in direct is only based in direct lights the dialect lights and the Shadows are still real time this saves the list performance because we're still calculating the lighting in real time with subtractive option the static objects are fully baked and the dynamic objects are casting Shadows on top of them for a long time and urp these two was the only selectable option but in the recent uip versions We have a third one the shadow mask this is where static objects are fully baked but Dynamic objects Shadows are merged with the baked ones this gives the best result and also there's the light probes light probes bridge the gap between static Bay Lighting and dynamic rear time lighting as we did before with light baking we pre-computed the lighting data for the static or non-moving objects and then we projected it to the textures however Dynamic objects like moving characters or vehicles cannot utilize this pre-computed information directly as the positions and orientation changes over time so with this in mind let's get started first if you check out the directional light at the mode option we have real time baked and mixed option so this time we will use mixed lighting this will enable us to use the slide both at the baking on static objects and in real time with dynamic object so I set up this simple scene where I placed two block for a flow with different colors this will show us how the Reflection from the floor works as you can see right now with the rate I'm lighting there are no bounce light I also set the directional light to mixed mode and set these environmental objects to static first I'll just pick the lighting in the same with subtractive mode the problem will be much more visible once it's done you can see that if I move the character into the Shadows it does not apply to it this is because we don't have an emerging between the two types of lighting this one's only baked and this one's only real time so what can we do we can try light probes first let's head to the hierarchy right click Right light probe group reset its transform and if you click the edit light probe position you can see the props you can move it anywhere you want so just general rule position them in the corners first do not position them inside an object because it will make all kinds of artifacts then select the ones on the side and duplicate them and move it to the Middle where it changes color duplicate it again and move it to the other side then select these and also duplicate them move it close where the shadow hits the floor and duplicate it again and place it behind it also we can follow this angled Shadow as well if we want and at the top just position it at the height of our blocks now all we need to do is rebake our scene and voila it works as you can see there are reflections from the floor and when I move it to the shadow it changes as you can see it's not perfect it doesn't have that straight line at the shadow it just kinda Blends in depending on your game how far you see your character it might be good enough but if you need more accurate one then we have to use the shadow mask option at the lighting mode just change the option to Shadow mask at the lighting Tab and for demonstration I disable the light probes and rebake our scene as you can see it works much better you can see that straight line at the Shadows but no Reflections from the flow now that we have the best result we need to use both of them so I just enable them and bake the scene once again and it works perfectly you can see at the Shadows it does not blend together the engine lets the shadow mask work but on the reflections it does takes its effect great but you could ask too I really need to place every light probe in my scene one by one not until the latest version of unity the answer would be yes but recently Unity introduced the APV or adaptive probe volume which enable us to place these probes automatically all we need to do we have the lighting tab to select the Pro volume option at the top we need to enable it in the settings so select this open Button select the inspector Tab and the lighting the light probe system needs to be changed to probe volumes now head back to the lighting Tab and here we can set the minimum spacing the maximum spacing and the most important thing make sure you enable the virtual offset this will help if the probe is in the geometry it will offset its sampling position and you won't have these artifacts make sure you disable real-time Global illumination for some reason it does not work together and will give you an error now all you need to do is hit the generate lighting it will ask to create a Pro volume to the scene and select yes option and let it bake so at this point we can't see any probes but it does works to visualize the probes we need to enable it in the rendering debugger you can find it at window analysis rendering debugger select the Pro volume and enable the display probes and voila there they are in my opinion it is a big Hub with an open word scene but for small scenes I think you can get a better result with the traditional light probes so if you don't need the accurate one just Reflections automatically this is a great feature unfortunately you can't move them as you wish to make it more accurate but maybe in the future who knows we'll see so that's it for this video I hope you liked it and found it helpful if so hit the like button and subscribe to make sure you won't miss my future videos and see you in the next one [Music]
Info
Channel: GameDev Blueprint
Views: 4,322
Rating: undefined out of 5
Keywords: unity, unity3d, lighting, APV, adaptive probe volume, game development, indie, URP, rendering
Id: 3J9FpXqRoos
Channel Id: undefined
Length: 6min 41sec (401 seconds)
Published: Sun Sep 24 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.