How to get GOOD GRAPHICS - Upgrading to HDRP

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so while back we did a video on how to get good-looking graphics in unity but since then there's been some major changes to how we work with graphics in unity and at the center of these changes is a brand new rendering engine it's called the scriptable render pipeline or SRP for short it's RP allows us to either choose a premade rendering pipeline provided by unity or to write our own c-sharp code to customize how things are rendered because that's our Prius so modular you can both be used for games that should run on lower end devices and for games that target triple-a Hardware in this video we'll be working with HDR P or the high definition render pipeline we use HDR P whenever we want to achieve optimal rendering quality so in this video we'll turn this horrible looking scene into this just using HDR P also this video is sponsored by unity now before we get into it we've been working on some new designs for line of code and they are finally here we've worked together with Blackthorne prod who is just an amazing artist and game developer to create these four cool-looking shirts I think my personal favorite is the hard one it's just so cute but that is not all we also have this really cool new design by thea and a new Game Jam one in collaboration with Mort Mort and on top of that we've gotten a lot of requests to bring these two signs on two female fitted shirts so we've of course gone ahead and done that as well so simply visit line of code Daioh and use the coupon code shirt me up to get 10% off for the first week also if you're like me and absolutely loved everything that Blackthorne pro does he does have his own youtube channel and it's even on udemy with some beginner courses also before we get started special thanks to Jack d'hubert and your K&N co John Shannon and infinity PBR for their support on patreon alright let's jump into the video so as you can see I've gone ahead and set up this cymbal exam machine in here we have some models from the Mayan temple pack I'll of course have a link to where you can download these in the description I've also gone ahead and set up a few lights we have two directional lights as was a few point light scattered around the scene and finally we have this door light which is just an emissive material also if I go ahead and hit play you will notice that the camera what also if we go ahead and hit play you will notice that the camera wrote around our scene that's because I've gone it and created a turntable object here that has a script on it that will simply rotate the camera over time but of course currently our scene is looking really bland so let's go ahead and modify it to make it look better the first thing we want to do is make sure that we have the HDR P package installed so we'll go to window and open up the package manager and as you can see I already have the high-definition render pipeline here if you don't see it on the list make sure to go under advanced and check show preview packages simply find the package and install and update it I'm using version 4.9 and with that we're ready to start setting up HDR P and the first thing that we need to do is creating a render pipeline asset so we'll go to the project and right click will go create let's go under rendering and select high-definition render pipeline asset let's just call this HDR P and with this asset selected we will get a bunch of rendering settings more specifically we get to choose what features we want to include in our render pipeline in here we have options for screen space ambient occlusion subsurface scattering volume metrics and so on for now we'll just leave these as is we then need to assign our render pipeline asset to our project to do that we'll go edit project settings and go under graphics and here you can see we have an empty slot for a rendering pipeline asset so let's go ahead and drag in our new asset and voila our project is now using HDR P however if we look in the game you we can see that we still have a few steps to go the first thing that we need to do is go to player go under other settings and rendering and here we'll change the color space from gamma to Linea the color space determines the math used by unity when mixing colors in lighting calculations or reading values from textures changing the color space can have a drastic effect on the realism of your game a big advantage of using a linear color space is that the color supplied to shaders will brighten linearly as light intensity increases with the alternative gamma color space brightness will quickly begin to turn to wide as values go up which after needs to a very washed out looks so now the voids for more lighting fidelity which you linear color space of course we can't really see this change yet because all of our materials are currently appearing in this weird purple color the reason for this is that we need to update our materials to use an HD RP shader so let's close down our project settings and let's find one of the materials in our scene I have a folder with mine here and I'm just gonna select one of them and as you can see it's currently set to use this standard shader so let's click on this lets go under HD RP let's choose the lit shader and right away we can see that all objects with this material assigned appear in our scene you could of course go through all materials in your project and update them or one by one but if you have hundreds of materials that might take quite a bit of time luckily unity has put in an option for exactly this if we go to edit render pipeline there's an option here to upgrade project materials to high definition materials that simply click that lets it proceed and voila it's gone out and changed the shader for each one of our materials awesome so the next step is to update all lights to look good with HDR P so I'll go ahead and navigate to my lights here and let's go ahead and first disable all lights except our main light if we select this light we get a bunch of settings that allows us to configure it I'm gonna go ahead and set the intensity of the light to 3 lux and I'll leave all the other settings as is now we can re-enable all of our other lights and you'll see that we get this error in the console it says that cascade shadow add listing has failed only one directional light can cast shadows at a time and this is a rule for HDR P but currently I have two directional lights the main light and the rim light and the rim light is also set to cache shadows so I'm gonna select it and go to shadows and simply disable shadow Maps if we then clear our console we can see that the error disappears and we now also have nice-looking shadows in our scene I'll set the intensity of this light to 3 lakhs as well I'm also going to select all of our point lights and set their intensity to 2,000 lumen that definitely helps and brightens up the scene a lot so once we're happy with our lights we are ready to start configuring scene settings and to do this with HDR P we basically create an object with a volume settings component so inside of a hierarchy let's go create that's going to rendering and let's select the scene settings as you can see this creates an object called scene settings with a volume component and this component has a bunch of different settings let's go through this one by one so the first one is our HD shadows settings this is of course responsible for showing high quality shadows the main thing that we can modify here is the max distance which defines how far away we want to draw shadows you can see if I set this to something like 40 it's only going to draw shadows up to 40 units and then stop I'm just going to leave mine at 500 next up we have the visual environment and this is where we choose two key parts about our scene we choose what kind of sky we want to use and what kind of fog we want to use as you can see if I disable this we just get a completely black environment with no fog or sky so for the Skype we have three different types we have a procedural sky this is generated to fit the scene and reacts to lighting changes in our scene this is the one that we are going to be using we also have an HDR eye sky this allows us to specify an HDR eye map which is basically just a very large texture for your sky finally we have gradient sky which allows us to create a sky based on three colors so for now we'll leave this at procedural sky and you'll notice that we also have this procedural sky module here where if we open this we can configure settings for our sky I'm gonna go ahead and disable the Sun disc since I don't want any Sun appearing in my environment we can also adjust the sky tint we're good for example tinted red or any other color that you'd like I'd actually like to tint mine a tiny bit red we can adjust the ground color here let's for example make that blue we also have an option for exposure and so on so once you're happy with your sky we can collapse this and next up is the fog type here we can choose between the default exponential fog we also have a linear park and something exclusive to HDR P which is the volumetric fog this one is super cool let's go ahead and choose this right away you can see that scene becomes black that's because we need to go ahead and remove our exponential fog here and it's that we want to add another component override and he will choose the volumetric fog and for this we'll go ahead and change the base fog distance so I'm gonna select that here and let's go ahead and update it to something like ad we can also go in here and change the base height let's set that to one and the mean height let's set that to four point five and as you can see we are now seeing volumetric lighting in our scene each one of our point lights are now visible from within our scene you can see their origins and if we go into the scene view we can see that really clearly around each point light we are seeing the light react to the fog in our scene and we can even start to see god ray like shadows in our environment really really cool and just like with anything else we can of course change the color of this so if we go to the single scattering albedo here we can even adjust the color of our fog so I'm gonna set mine to this bluish color here I just think that looks really cool so the next thing that we can configure is all quality settings to do this we'll go to edit we'll open up our project settings once again we'll go under quality and here we have some different quality levels let's go ahead and bump this one up to ultra and you can see the most important thing that changed here was that our textures started to look much better that's because our texture quality is now set to full resolution and isotropic textures is now set to forest on which compared to per texture will avoid weird stretching and blurring for your textures so that already looks much better the final big thing that we can add to our scene to really help tie everything together is of course post processing to add post processing to a scene we'll go to the hierarchy let's right-click and create an empty object let's just reset the transform on this and let's call it post processing and here we want to add a post process volume let's set this to global to make it affect our entire scene I'm also go ahead and add a new profile where we can add effects to our volume in all to enable post-processing we also need to find our camera and on here we need to add a post process layer component and on this component we need to choose what layers to search for post processing in so by default this is set to default let's go ahead and add a new layer called post processing let's select our post processing object and assign it this layer and let's go to our main camera and choose this layer also when we already have the main camera selected we can go ahead and add some anti-aliasing so anti-aliasing is the process of reducing jagged edges it adds interpolation to try and smooth out stair-step like lines and we have multiple modes to choose for this which one to choose depends on the result you are after I really recommend you experiment with these for your game in my case here I'm gonna go ahead and select SMA and now if we go to our post-processing objects we can start adding effects so on this volume we can add all kinds of post-processing effects to change the appearance of our game I'm not gonna go in-depth with each of these effects in this video but I'd love to do a dedicated video on it in the future but there is definitely one effect that I would like to add here and that is color grading because one thing that is important to understand is the tone mapper so when using HDR P our cameras are automatically rendering in HDR or high dynamic range HDR allows us to store color data with much greater precision which means that we won't lose detail in very bright or dark areas in other words bright things can be really bright dark things can be really dark and the details can be seen in both however we still have to define how all this extra color data should be displayed on screen this is where tone mapping comes in we can now they choose to configure the tone mapping ourselves or choose from a preset to do that we go under tone mapping here enable that and as you can see there are two presets here and custom the neutral tone mapper as the name suggests gives a very neutral look with minimal impact on color hue and saturation the Asus tone mapper is more filming and will produce a much more contrasted look as you can see here in my case here I'm gonna go ahead and set it to ASIS since I really like look that this gifts are seen I'm also going to go undertone and set the post-exposure to one just to brighten the scene up a bit the next effect that I'd like to add is a bloom so I'm gonna go under here and add a bloom post-processing effect I'm also going to go in here and increase the intensity and as you can see this is going to add glow to bright areas this is especially important for our emissive material if we go under the lights here and select the toy light as you can see I have this glow material applied and under emission here we can configure the intensity of this mission so I'm gonna go ahead and increase this and I'm also going to tend it in a cool color like blue of course this is currently way too strong so let's go to a post-processing and decrease the intensity there we go I think that looks really cool I also think this thing could use a vignette so I'm going to go and add that as well again I'm gonna override the intensity here and increase that a bit and finally because our scene is moving that's going and add some motion blur and I think the default settings will work fine for this so if we now hit play we can see that we have a much much nicer looking scene and it's just by changing a few settings in unity awesome finally a really cool thing that I want to show you is the render pipeline debug window so if you go to window analysis and choose render pipeline debug we get this new separate window and we use this to display all kinds of really cool information about lighting materials and rendering if example we go under lighting here you can see that we have an option called lighting debug mode if I go in here and change this to diffuse lighting it's only going to show the diffused lighting happening in our scene we can do the same thing for specular lighting and many more if we set this to none we can also go in and override properties for our materials we could for example override the albedo for all of our materials which means that we can just give all our materials a single color this is really cool because if we choose a neutral color like grey here we can see how lighting is affecting our scene without having to look at all the textures in fact we can also override other properties like smoothness if we want to see how our scene looks when it's really shiny I don't know when you would use this one but it's really cool so I definitely recommend that you check in with this debug window while you're building your scene to make sure that everything is looking good that's pretty much it for this video of course there's so much more to HD RP number can be crammed into a single video from subsurface scattering to reflections but hopefully you should now have a place to start exploring and if you want to learn more about HD RP will of course have a link for that in the description also make sure to check out line of code and of the new cool designs simply click the link in the description and use the coupon code shoot me up to get 10% off on that thanks for watching and I will see you in the next video thanks to have the awesome patreon supporters who donated in January and special thanks to James P Jax - Bert and you can link Oh John Shannon infinity PPI Sybok mommy Dennis Sullivan Travis Dylan faceverify Lila set Ronan Clinton Vance Kyra Chris Gregory Pierce killed Swedish ki Rathbun Timmer photo park and Rasmus you guys Rock
Info
Channel: Brackeys
Views: 308,830
Rating: undefined out of 5
Keywords: brackeys, unity, unity3d, asset, assets, model, texture, models, textures, material, materials, beginner, easy, how, to, howto, learn, course, tutorial, tutorials, fix, tip, game, development, develop, games, programming, coding, basic, basics, C#, HDRP, graphics, tonemapper, tonemapping, antialiasing, upgrade, render, pipeline, light, color, line of code, intermediate, srp, gfx, improve, good, post processing, lighting, high quality
Id: 12gkcdLc77s
Channel Id: undefined
Length: 16min 33sec (993 seconds)
Published: Sun Feb 24 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.