Getting Started with HDRP in Unity (Awesome Graphics!)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to look at the HD RP in unity AGR P stands for the high-definition render pipeline which is one of the default render pipelines that is targeted towards high-end systems with gorgeous visuals for example the latest unity shorty heretic was made using HDR P let's begin [Music] hello and welcome I'm your code monkey and this channel is all about helping you learn how to make your own games with NF tutorials made by a professional indie game developer so if you find the video helpful consider subscribing okay so let's look at HD RP first of all HDR P stands for the high-definition render pipeline it's one of the default render pipelines that are now part of the new SRP system or the scriptable render pipelines the other default one is the universal rendered pipeline so Universal is made with compatibility in mind so it's meant to run on every single device that unity supports and HD RP is meant for high-end systems and consoles with lots of options to produce some excellent visuals okay so there are two ways to get started with HDR P the simplest one is to use the new project HDR P template this video is made possible thanks to these awesome supporters go to patreon.com/scishow to code monkey to get some perks and help keep the videos free for everyone so here on unity hub you can click on new and over here you see the various unity project templates and you can just select high-definition RP then you just hit create and yet pure is the default scene created with a GRP and everything is already perfectly set up now another option is to add HD RP to an existing project so here I am in another project without a GD RP and now in order to use it we need to go into our window and open up the package manager and here we scroll down until we find the high definition RP and just click on install all right it's done so now this project is using HDR beam and these are our two options so he can start from scratch with the template or we have the package and upgrade an existing project into HDR P now if you're upgrading as soon as you have it installed you might see some errors so you can go over onto window render pipeline and over here you have the HD render pipeline wizard so open it up over here you see this window now this is an excellent little tool to help you very easily set up your project to work with a GRP you can see all the various issues contained within your project and you can fix them individually or simply go here click on fix all and wait a bit and yep just like this you can see that all the issues have been fixed so now our project is working perfectly correctly using a GRP great so here we have a fully working scene working with a GRP now the first thing you can do is go into edit and into our project settings and now here if we go under graphics then you should be able to see your default HD render pipeline asset assigned and here on the graphics tab you can set up the various quality presets so by default you have low medium and high then over here you have the a GRP default settings so you can set the various defaults for your camera vector custom reflection and the real-time reflections these events are really useful for defining the baseline settings of your game which you then can override as necessary so you have tons of options for the only web rendering then stuns morte for dealing with lighting and so on again these are just defaults and every single one of these can be overridden then down here you have the default volume settings then down here a bunch more settings for post-processing then still on the project settings over here you have the quality and there underneath you have the a GRP so here you can select the PowerPoint asset and modify a bunch more settings so by clicking on this is the same thing as if you go onto your project files and you select the AG render pipeline asset and there you go this is what is shown now one of the main features about a GRP is something called physical cameras this is essentially camera behave according to actual real-world physics which is a huge help especially if you're going for four realistic visuals so you select your camera so here is the main camera and now here under general you can see some pretty similar settings so you have the background type the sky background color and so on then over here you have the project you so right now as perspective then over here you have the fov settings and you can just modify them okay and then you have this nice little tag on saying link fov to physical camera so you can enable this and then down here you see the physical tab and in here you have a whole bunch of settings for a physical camera now if you're familiar with photography I so share speeds and all of that then this section is for you so here you can set everything according to real-world values so for example you can define the sensor type so let's say I want an eight millimeter yep there you go or a seventy or just make it custom then you can set up your ISO or shutter speed you can set the lens focal lengths so there you go you can modify the aperture and even modify the aperture shape so you can see how you have tons of settings and if you're into photography then you can really go crazy and set up the settings just as you would do in real life so this is great even if all you want to do is just take some really good-looking screenshots of your game world another great feature of a GRP is using msaa msaa stands for multi sampling anti-aliasing so it makes your game look really good with nice smooth edges but naturally it's quite resource intensive now to enable msaa first select the render pipeline asset and then over here you have the unlit shader mode and in order to support MSAA you must set it to either both or for it on a GRP only supports msaa in for rendering once he said it then you won't be able to see this drop-down menu for MSAA and over here you can set the number of symbols obviously the more you go the better it looks but it also becomes more resource intensive so here for example let's choose MSA a times 8 however just by setting this field we do not have MSA enabled just yet so over here is our team view and if we zoom in yep there you go lots of jagged edges so once we enable MSA on our pipeline asset then we also need to enable it either on our global settings or on a per camera basis so for example let's select our main camera so here are our camera settings and down here we have a toggle for setting custom frame settings so this will override the defaults that we saw previously so we some like this and now we can see all of our settings and here we can override anything on one of these by selecting on the check box on the website so for example over here MSA within Ford let's select it in order to override the setting so the default is disabled and now here I can override it and make it enable just for this camera so as I enabled it there you go now you can see MSA being applied so I can zoom out and zoom back in and yep there you go now we no longer have those very harsh edges so again you can enable this on a per camera basis or you can go back into the project settings select the a GRP default and over here you have MSA if you want to enable it by default for all cameras now since we're talking about anti-aliasing let's look at the other types we have so here on the camera we can override MSA down here yep but we also have another field in here for anti-aliasing so if you select you can see a drop down menu for various types of anti-aliasing so you have FX AAT AAA and sm AAA now these are separate from MSA a so right now you can see that over here we have set no anti-aliasing but our scene does have anti-aliasing so we're currently working with MSA a being applied so the way these two are separate is MSA is a point by the hardware as the camera is rendering anyway they're enable or disable it either globally or per camera and then you have these other types of anti-aliasing which are applied as a post-processing effect so you can stack them with MSA a or just use these ones and disable MSA for example FXAA is very fast and produces pretty decent results so you could add an option to your game to disable MSA a and enable FX a inset so here for example disable MSA and there you go very jagged and just enable FX a and there you go the wrong radial looks quite smooth or for example you can enable MSA and stack it with taa and then really increase the sharpness and there you have a interesting effect so as you can see you have tons of options so you can balance looking good or being performed post-processing is also slightly different now in a gr P nu R P so previously you have to install a separate package in order to add post-processing however right now it's built straight into the renders now the reason why it's now built in instead of separate is because while both the hg RP and you RP have pretty much the same effects they are using different algorithms so the AG RP effects are made for excellent visuals and super high quality while the u RP effects are made for compatibility and speed but in terms of usage it's pretty much the same as previously with the v2 stack so you can go into your hierarchy and create a new volume here let's make a global volume so it affects the whole scene and here in the inspector you can inspect the volume so in terms of mode you can have set it to global or an welcome and then you have the weight that you can play around it then you have the priority so the volume with a higher priority won't win out and then you have the profile now here if you remember back into the project settings here on default settings you can already see the volume components for the default volume profile asset so we're here as you create a new volume profile right now you can see that this volume profile apparently does not contain anything but really does not contain any overrides on top of these ones so these are defaults that get applied and then you can either override or not so for example here and let's add an override what's going to post-processing and let's add some color adjustments I just like that now we just applied some simple post-processing so I said this works pretty much the same as the previous v2 post-processing stack you can have any of these types of effects now another thing you can do is also play around with the mode so instead of global let's say we want to make this a local volume and when we do then we also must add a colon either so here we have a Collider for our volume now what this means is that these effects won't be applied but only when we're inside of our volume so right now on the outside you can see that the scene looks pretty normal and as I go in yep there you go now it turns into a different color because it's being applied with our post-processing so this is how for example you would make a global volume for the irregular lighting and effects on your scene and then let's say you have a local volume for any time you have an indoor scene so essentially in terms of usability if you're already familiar with the post-processing v2 stack then you're already familiar with this one as well now the one difference is that the volume is no longer use just for post-processing it can be used for all kinds of settings so here when we click on add override yep there you go you can see all of these settings that are not necessarily related to post-processing so for example we can add some fog so for example we're adding some fog and messing around with distance so there you go our scene appears and dissapears then we could also play around with the exposure so increase it and make our scene much darker then we can also play around with lighting so here add some ambient occlusion and yet there you go it looks just like that so there you go then on top of all these effects you can also play around the d'void so right now the scene looks very different from default and if I go down on the white yep there you go goes back to normal and back in there and there you go so you could for example play around with the way through a script and get some really interesting effects like for example something like a day/night cycle another feature you have is dynamic resolution so this is great and it helps you maintain a stable frame rate by lowering or increasing the resolution dynamically now to enable it you select your AG render pipeline asset and inside our rendering tab we have a dynamic resolution and now in here we just click to enable it then when you do you can see a whole bunch of options specifically you can set the minimum and maximum percentage so for example just see the effect let's put the minimum at 10 and then the maximum just at 20 so this means that at most our game will be rendered only a 20% of our resolution so with 20% you would expect everything to look pixelated but right now it's um looks exactly the same that is because in for dynamic resolution to be used you also need to go back into your camera and here on the main camera down here you can see a toggle for allow dynamic resolution and as soon as we click if there you own our scene is very blurry because it's being rendered essentially at only 20% of our maximum resolution so this is obviously an extreme example just to show the effect in action so a practical use case would be to probably make the minimum at say like 50 and put the maximum at a hundred so on really low end machines it would render a small resolution and on a machine that can handle it it would render the normal film resolution so this is really helpful for ensuring your game is fully playable on just about any type of device however just like this we simply enable dynamic resolution right now it's not actually changing anything now in order to do that you need to make a script to define exactly what resolution scaling you should use so for example if you have a really intense part of your game then you can make your script set the resolution lower on that particular part and increase it afterwards and obviously the more general use case is simply setting a target to say something like 60fps and monitoring that in real time so you can increase or decrease the resolution to make sure you hit your target framerate check the manual page linked in the description to see how you set up that script another great feature of a GRP is how it supports physically based lighting meaning you can use real-world values to have your lights behave according to real-world physics so here on let's create the new light let's make it a point light so here I created the new light and you can see all of the various options for example over here on the emission here you can set the in light intensity and this as you can see it is based on real-world units so by default it's using lumens but you can click on the drop down menu in order to use different types of real-world units and also one neat thing is when you change from one into the other unity automatically does the conversion for you and you can also set the in light color so set it to something and instead of setting a comma directly once again you can choose the color temperature to set real world values in kelvins so let's say you want a more reddish light or a more bluish light then naturally you can set a normal light cookie then you also have volumetric so for example there's no light right there and you can enable or disable and then you can set up your shadows so you can see how you have tons of options and once again one of the main things is the ability to be able to set real world values all right so here we covered a whole bunch of things from a gr P however this is just an overview on how to actually get started there's tons more features that I haven't covered here and like shadows reflection probes more fog light layers ray tracing and many more the complete feature list is massive so check the manual linked in the description to see everything it offers so go ahead set up a scene with HG RP play around with the values and make some gorgeous games this video is made possible thanks to these awesome supporters go to patreon.com/scishow to code monkey to get some perks and help keep the videos free for everyone if you enjoyed the video hit the like button subscribe to the channel for more unity tutorials post any question have in comments and I'll see you next time [Music]
Info
Channel: Code Monkey
Views: 99,926
Rating: undefined out of 5
Keywords: unity hdrp, unity heretic, unity hdrp tutorial, unity physical camera, unity hdrp lighting, unity lighting, unity high definition, unity high definition rp, unity hdrp skybox, code monkey, brackeys, unity tutorial, unity game tutorial, unity tutorial for beginners, unity 2d tutorial, unity 3d, unity, game design, game development, game dev, game development unity, unity 2d, unity 3d tutorial, programming, coding, c#, code, software development, learn to code, learn programming
Id: YAVL6grnsiM
Channel Id: undefined
Length: 16min 19sec (979 seconds)
Published: Fri Feb 21 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.