REALISTIC INTERIOR LIGHTING in Unity HDRP

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we'll learn lighting and rendering and interior scene using GPU light mapper and high definition render pipeline or STRP in unity 2000 nineteen point two so let's begin for this demo I'm gonna use this free living room scene I will give a link in the description from where you can download this 3d model I have exported the scene from 3ds max in FBX file format let's quickly import the FBX file in unity in the import settings since I have also included textures and materials in a fix file so we can extract them here for that click on extract texture make a new folder called textures and click on select folder repeat the same process for the materials as well please note that if your 3d modeling software doesn't allow you to export texture with mesh while then you need to create and apply all the materials again in unity one thing I also want to mention that if you are using 3ds max then you need to convert all the materials to a standard material otherwise unity will not recognize them next simply drag and drop the FBX file into the scene as you can see now we have all the materials with texture applied on it you can select this show grid checkbox to hide the grid next I'm going to position my camera into the scene for that just adjust the view in the scene window and select your camera and press control shift F you can also use this by going game object and select this align with view press ctrl s to save your scene alright next let's implement the high definition enter pipeline I guess you already know this if you have seen my previous video on STRP but if you are watching my videos for the first time then go to package manager and from this drop-down menu choose show preview packages and from this list choose high-definition enter pipeline and wait where is this tall button it used to be right here ok I found it it's here down in the bottom right corner they have updated the UI in unity 2019 great click install and wait until the package is installing next same like before right click create rendering and make a STRP asset next go to edit project settings and choose your HDR PA set here and it will make everything pink it's also giving us a warning about the gamma mode we are using to fix it again go to project setting player and change the color space from gamma to linear okay now let's fix our pinky problem for that go to edit render pipeline and select upgrade project material to High Definition materials and voila we are back to normal now you can see all of our material are using this STR pilot shader which is the base material in high definition under pipeline I also want to mention that if you are using unity 2000 19.1 or newer then you can fix all the above problems in one go using this render pipeline wizard I have explained you both ways alright let's add some lighting in our scene now if I select the duration light then you see that the whole scene has become dark because these glass panels are blocking the light in our room so I hide this glass panel so that we can see some lighting in our scene next first of all right click go to rendering and select scene setting and now we have a nice procedurally sky around our scene but for this theme I'm gonna use an HDR image to illuminate our interior because HDR images provide much better lighting and reflection in both interior and exterior environments I have already downloaded a very nice SGI from a cherry heaven website so let's import that as well in the import settings change the texture shape to cubemap and just hit apply to add this HT era in our scene go to scene setting and as you can see in unity krauser 19 they have made a lot of changes in HT RP which we are also going to cover in this video they have added this new ambient mode which provide a basic ambient light in our scene we will change this later if we need to but for now just keep it static next change the sky type to SGR sky and array SJ our sky component and I will also option and choose your SGI cube map here also in the folk type choose none unless you want a foggy look in your scene next to start beating lighting first in the lighting panel which by the way you can access from windows rendering light setting and first disable this auto-generate lighting because we're gonna manually generate the lighting next select your scene parent and from this drop-down panel enable the contribute J option in the older version you can find this option by the name of flight mem static in this new version they have changed it but to be honest I think that the light nerf static is much better name for this option anyway select the option and choose yes change the children also set all the object to the flashing Prophet static however there are some object in the scene which we don't want to be static for instance this window glass which is completely transparent and it will hardly receive any diffused lighting so I disabled the both option for this object and also hide this object from our scene do the same thing for this railing last object also we don't need this static fire texture image so disable this one also later we will add unity particles to simulate the fire effect and now we are ready to bake the lighting go to lighting panel and turn off real-time GI because after baking lighting we are not going to move or rotate any light in our scene in the light paper I choose progressive GPU which is as you notice says is ten times faster than CPU which is really very great but as you can see it is still in preview mode so it may crash your scene so if you see any problem with this light pepper you can any time switch back to progress with CPU which is much more stable next without changing any parameter just hit generate lighting button here you can see it is using 1.6 million textures or texture pixels which are basically used to store the lighting information for our scene and it took about two minutes to bake three direction light Maps but even after baking light Maps our scene is still looking the same like before so let's check whether it has big any lighting or not to check that in your scene view unable this big light map mode and here you can see we have definitely baked some lighting in our scene but it's very dull so we need to increase the intensity so to do that go to scene setting and change the exposure to two and multiplier to one again these are not fixed setting you can increase or decrease this value according to the lighting in our scene here I want to give you a little tip what you can do or what I actually do is that while baking the lighting I increase the intensity to a higher value and once I bake the Lightning I reduce the intensity back to normal okay next let's take our lighten up setting first set the bounces to four so that we can get better global illumination in our scene right now the default light my resolution is pretty high which we can reduce while we are testing the light you can check this resolution by going bakelite map mode and enable the show light map resolution option these small checker represent our text shells they smaller the checkers the higher the resolution for testing I am changing the resolution to 20 this will bake the light map more quickly next set the Lightroom size 2 to 0 for it and disable the compressed light map option and set the albedo boost to 5 this will basically increase the GI casted by all the object and generate the lighting again initially it will show a very long estimated time but don't worry it won't take that much long so this time it has created point six million textures and render time is also very less but still our scene is not looking very impressive there are a couple of reason for that so let's fix them one by one first I want to tell you that even though we are now using HDR image but we are still using GI from procedurally sky which we have already disabled but why this is happening I did this mistake intentionally because when I was working on this project I made this mistake and it took me a while to figure out what the problem is and I think that you may have this kind of issue so it's better to have the solution already okay so if we go back to scene setting you can see down here in the static lighting script it is still using the procedurally sky so change this to SDR I and generate lighting one more time and this time you can see we are definitely getting some sky light in our scene right now don't worry about the quality we will fix that in a minute when we bake our light map on higher settings ok next I'm going to add a reflection probe to capture the reflection inside the room to add that right click go to light and select reflection probe in the reflection probe setting check use influence volume and in the shape use box projection and increase the size of probe to cover the whole living room then click on bake to bake the reflection probe now you can see that our scene has become dark because now we are not getting those unwanted reflection from outer environment next I'm going to add some artificial lighting in our scene select this coal light object and go to its material option in the emission setting choose use emission intensity and set the color to orange same as the base color and bump the intensity to 10 enables the emission option and use big global illumination and generate the light up again and you see now we are getting some cool Cove lighting around the ceiling next let's add one more light for the central lamp for this light bulb I'm using a point light you can use a spot light if you want but I found that by using point light I can get lighting inside this lamp shape also okay so I go to light and create a point light and place it under the light bulb change the mode to mix so that we can change the color and intensity later for the color I use color temperature and I use a warm color for this light set the intensity to 125 and slightly decrease the radius next click on this plus icons to see the advanced option and I turn off the effect specular option to hide the unwanted reflection on some objects next enable the shadow map and set the resolution to 1 0 to 4 and for this light bulb apply the same Cove light material let's also add a light in the fireplace to simulate the lighting coming from the fire which we will add later for that I'm going to use a tube light you basically just create a point light and then change the type from point to tube and let's big the light map one more time and now you can see that we are getting some good amount of lighting in our scene even though that quality is very low because we haven't increased the setting yet and don't worry about this overexposed area we will fix them in the post-production so right now you only focus on the lighting before moving further I want to fix all the materials because no matter how great lighting you have if your materials are not looking good you will never get a high quality result in your scene so let's start with the floor material for the floor I have already prepared all the necessary texture using materialised software if you don't know about metallized it's basically an awesome tool to quickly generate PBR texture for your materials I have made a complete video about the metallized which you can watch from the eye bar or from the link in the description okay so now the flow is looking fine let's fix other materials for the wall I am choosing a color close to white with little bit least smoothness and using the same material for the ceiling for this side wooden wall I'm gonna use blurry reflections let's also add some reflection on this painting you see that reflection are looking very nice on this painting even though you should add a glass object in front of it but for the performance reasons you can just directly add reflection on your texture and for this border I am choosing a darker color you see that when I fix the color multiplier for the sofa material the fabric texture is now looking very dirty because of the low light map resolution but don't worry about it we will fix it in a minute for this sofa I'm gonna use fabric texture from the unities measured material library which by the way is really very cool for this metal material I also prepared a mask map from the material I softened so let's set up that also let's have some reflectivity in this wood material also right now we can't see reflection of these object onto this table surface because by default the screen space reflections are turned off in s GRP I don't know why but I think there is a reason behind it but don't worry you can turn this on later so to enable that go to your SD RB asset and in the reflection turn on is thin space reflections and now you can see that these object are reflecting in this wood material even though it's not so perfect to fix this I will later at planar reflection to improvise these reflections for this candle base I'm going to use a brass kind of material you see that we are looking through this flower base to fix it go to its material and animal double-sided for the leaves I'm gonna use a subsurface scattering material to use it first I enable the double sided option then simply change the material type from here to subsurface scattering and you also need to assign a diffusion profile in order to see the subsurface scattering results so let's quickly create one right click create rendering and choose diffusion profile and then in your leaf material choose your diffusion profile in this slot and adjust the parameters you can always fine tune these materials once you have properly baked the light map to get the best quality results and I'm also using subsurface scattering for this candle material for this candle flames I am using a flame texture with alpha in it and you can also use an animated texture to make the scene look more interesting and I am also using emission properties so that I can make them glow when we apply post-processing next I'm gonna use subsurface scattering for this curtain as well this will give us a nice backlight effect if you use direct sunlight to light the interior but since we are not using direction light for the scene so this effect will not be so much visible for this rug I have also created normal and height map by using materialised software to use height map first we need to choose the pixel displacement and then apply the height map in this new height maps load and adjust the amplitude to get the desired displacement this map is used to achieve fake depth in our material and if you look at it from a distance this will look like a real displacement let's also fix the railing and window glass material for the window frame I'm using just a dark color with little bit specularity for the glass I am using a transparent surface type and in the diffuse color adjust the Alpha value to control the transparency of the glass and also increase the smoothness to get the reflections all right I think now we have pretty much fixed all the materials in our scene and we are ready to bake the final light map for the final light map I increase the samples to a really high value and obviously it will take longer to bake but it will also provide you much better quality I am also using the open image denoiser to reduce the noise because at this time the optics denizer is only available in CPU mode for this final bake I bump the resolution to 40 you can decrease this resolution if it takes very long to bake I'm also using ambient occlusion to get better contact shadows and I keep the light parameter to medium which is fine for this scene if you have a higher-end PC you can obviously use high but that will drastically increase your render time and for some objects I am increasing the scale in light map value to slightly higher to get better details and to reduce artifacts I think we are all set and let's hit the generate lighting button and wait till it completes one thing I want to tell you that this Lightner process is kind of buggy so if you stuck at baking then you may need to restart unity in order to bake the light map again and now our light map baking process is complete the final lighting is looking very nice even though there are still some noise left which you can remove by using higher resolution but for me I am happy with the results let's also add a planar reflection on this coffee table to fix the reflections to add that right click go to light and choose planar reflection this will basically give you a dummy box object then increase the width and height of this box to cover the whole top part of the coffee table and now you can clearly see a significant difference before and after applying this planar reflection okay however for some reasons if the planar reflection does not work in your project then you can use this screen space reflection override to fix the reflections in the setting just increase the number of rays until the jet ring in the reflection is a smooth out this is very common with planar reflections because whenever unity released a new update they always mess up with other features why unity why you do this let's also import the file prefer which I have created using unity particle effect pack just drag-and-drop this prefab into the scene and it will work just fine because I have exported this from my previous test project lastly I want to add some post effects to further improve the visual quality of the scene if you have seen my previous video on STRP in 2019 then you may have already know that now you can directly add post effects in your scene setting and hey if you are enjoying this video so far then please press the subscribe button and press the bell icon if you really want to help me to make more videos like this okay done let's continue first I'm gonna use tone mapping to generate contrast in my scene and this time I am using a custom tone mapping and manually adjusting the setting next I choose lift gamma game to get a sort of warm plus cool color tone in my scene next to increase the brightness of the scene I'm using indirect lighting controller this is basically directly increase the brightness of the light map finally I add glow to the bright part of the scene such as candle light and cove light to make the candles flame glow you can increase its emission intensity which is very handy if you want to make a specific part of the scene to glow and lastly go to your camera and enable a temporal and collaging this is now directly integrated in the camera if you are using previous version of STRP then please watch my last video about the new features of STRP so that you can have a better understanding of the updated features and the changes they have done in the new version ok that's enough for the lighting and rendering of this interior scene and we have definitely achieved quite a good result you can further work more on post effects and lighting to get better and better results it's up to you it is basically an R&D process if you have any issue with lighting and rendering you can ask me in the comment section or join my discourse server I would be happy to help you and if you really like this video then please support me on patreon so that I can make more videos for you it is basically a platform where you can donate some amount on monthly basis to support this channel and you can also cancel it anytime you want so I hope to see some more patreon support and I would also like to thank diminu for his continuous patron support and finally thank you so much for watching this video I hope this will definitely help you see in the next video bye bye [Music]
Info
Channel: UGuruz
Views: 91,683
Rating: undefined out of 5
Keywords: unityguruz, unity hdrp, unity post processing, archviz, unity 2019 graphics, unity 2019.2, realistic lighting in unity, unity interior lighting, unity architectural visualization tutorial, unity archviz, hdrp unity tutorial, high definition render pipeline unity tutorial, unity hdrp demo, unity hdrp lighting, unity archviz tutorial, hdrp, uguruz, interior lighting unity, unity lighting mobile, lighting in unity 2020, unity lighting tutorial, unity realtime lighting, interior, 2020
Id: zSMzb0iINek
Channel Id: undefined
Length: 19min 7sec (1147 seconds)
Published: Mon May 20 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.