Unity VR Optimization : Universal Render Pipeline (URP)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's optimize with unity's universal render pipeline the universal render pipeline is a pre-built scriptable render pipeline made by unity that will allow us to optimize our graphics for a wide range of platforms so if we're targeting The Quest 2 or pcvr it's kind of a match made in heaven the universal render pipeline has a lot of features and I can't guarantee that'll cover every single one of them in this video but I will give you a short introduction of how we can include it into our projects and what settings might optimize your projects if you'd like to see this roadmap I will make sure to put it in the description below so here we have a project that I have not updated to use the urp yet and you'll see that it is 2021.3.8 F1 and I notice on the unity forums and a few other forms that they're saying that the 2022 version of unity is actually giving us better GPU usage when you're using the universal render pipeline so you might want to consider that in the future so let's add the urp to our project and we're going to go to window package manager and then we are just going to look it up Universal you'll see here we got the universal RP which is the render Pipeline and we just hit install all right and now that is installed you can actually install some samples here if you want to explore on your own and see what the urp has to offer but we're not going to do that right now so now we've installed the universal render pipeline you might be saying okay we've done it well guess what not quite you see we still have a few things we need to hook up to make sure that the universal pipeline is actually being used because at this time it's still using the standard pipeline that comes with unity and you can tell by going to edit project settings and if you go under Graphics you'll see here scriptable render pipeline settings set to none and we have nothing to set it to so let's create one really quickly so if we right click here and go to create go down to rendering and then urp asset with a universal renderer and I'll just name this Fistful of shrimp urp you'll see it actually creates two different things for us now we're going to play with both these a little more when we're optimizing but I just want you to notice the relationship between this the universal renderer data and this which needs the renderer list which is using the universal renderer data so this is the universal renderer pipeline asset and that's what we needed to hook into our settings so if we go over to project settings we see here that now we can drag this in here and we're going to hit continue and I turned the whole scene pink great just what we wanted now the reason that everything is big is because the material shaders that all these objects are using currently aren't compatible with the universal render pipeline that we just put in so to fix this we have a few options so one option we can do is go into the material itself and just change it manually and you'll see the Shader here it says standard if we go to Universal and go to LIT you'll see that it has changed it to what it used to be and since these all share the same material they all changed but doing a one-to-one like that is kind of annoying now we could do a bunch of them by finding our materials folder and and yeah if we selected all of them we can actually go up to edit go down to rendering materials and convert selected built-in materials to urp for seed and you'll see that that fixed that up too but again that's not too efficient it would be nice if we could just bulk everything and luckily they do have that functionality to do that we need to use the render pipeline converter which is up here in window rendering and then you'll see render pipeline converter and what we need to do is it has on 2D here we need to change this to built-in to urp and we need to play with a few things here and if you have a big project I am going to warn you this can take a long time so you might have to be a little patient if you are using this method so to finish this up we just have to check all these boxes here and then hit initialize converters now before I click convert assets and make all this pink go away I'm going to point out here it's actually going to generate a few settings for us here and that is going to be correlated with these project settings over equality and you'll notice that we have Ultra very high these are going to create a new settings for these specific pipelines for us to use so with that in mind I'm going to hit convert assets and show you what I mean boom and there we are everything is set everything is converted let's talk about the universal pipeline we are officially using it now let me point out a few things that were done automatically when we use the converter so if we type in pipeline here you'll see that we actually created a whole bunch of new pipelines and also renderer datas just kind of like what we did at the beginning and these are already set up by unity for us to use and if you want these are kind of default settings so you have your low quality medium Ultra and high and you can see these pipelines actually already automatically set up if we go to Quality and you click through here you can see that they have already been in place now these are nice to have as a default and starting off points depending on what you want to Target and they will have their own little settings over here that you can kind of get a feel of what Unity determines to be like ultra settings versus what they determine to be low settings but let's customize one for the quest so I'm going to add a quality setting here and I'm going to click it and I'm going to call this Quest 2. so for the Quest 2 settings I might as well check these off because it's going to be deploying to Android and we want to make sure we're using the Fistful of shrimp urp that I created there we go and then I'm going to come over to graphics and I'm going to make sure I'm still using the correct one here as well there so what kind of things can I do to improve the quality for the quest if I come over here let's talk about rendering starting off we have to always make trade-offs that's what you always have to think of when we're optimizing with the universal render pipeline are we going to get high quality or are we going to get more performance and it's always going to be a balancing act so starting off we have this rendering path either forward or deferred in here if we choose forward rendering that's going to be the classic way of how things have been rendered and it will allow us to use multi-sample anti-aliasing which will smooth out these edges which is recommended by meta if we do deferred what that gives us is the ability to have a lot of dynamic lights so if I had these lights all moving around and casting Shadows then we might want to consider using deferred rendering but the problem with that is then we can't use multi-sample anti-aliasing and that's just because of how the rendering techniques talk to the graph graphics cards and that's the trade-off there so here I'm going to choose forward rendering because I prefer smooth edges over having a bunch of moving lights and then here we have transparent received Shadows that will just when it's disabled transparent objects will not receive shadows and again you have to ask yourself how realistic or important is this and I don't find it to be that important so I'm going to turn it off and I'm also going to turn off post processing and that's because post-processing is extremely taxing on the CPU and GPU and if you can avoid it it is recommended next let's mess with some of the settings over at the universal render pipeline asset and starting off we have quality we have HDR that's high dynamic range what that will do is it will create a greater contrast between our lights and colors but if we have that active it kind of messes with the anti-aliasing so we are just going to go ahead and not mess with that and for anti-aliasing we are going to put it on four and you know what it should be changing in the scene but for some reason it's not and I found found out if I click the main camera it will actually do the anti-aliasing even though I haven't changed anything so if someone can tell me why that is please inform me but you can see if I play with this a little more if I turn it to eight you'll see it gets even smoother if I go down to two it's not as smooth and depending on your performance that you need if you need to squeeze out a little more you could try to get away with two but 4X is recommended by meta and next we have lighting and shadows and sadly that's where I'm going to have to stop for now because we are gonna be getting into light mapping and that is enough for a whole different video so for now I hope that was a good introduction to the universal render pipeline likes and subscribes are the best way to support me at this moment and I always appreciate your time take care bye-bye
Info
Channel: Fist Full of Shrimp
Views: 11,477
Rating: undefined out of 5
Keywords: unity urp, xr interaction toolkit, unity xr, unity vr urp, vr unity optimization, unity vr beginners quest 2, unity xr toolkit optimization, vr tutorial optimization, unity vr optimization, optimization, oculus unity optimization, vive optimization, quest unity vr, vr optimization, unity xr optimization, unity optimization tips, unity Quest 2, quest 2, oculus quest 2, Unity vr quest 2, quest 2 urp, unity optimization mobile, unity, Universal Render Pipeline
Id: OqpS2z_I3hU
Channel Id: undefined
Length: 8min 38sec (518 seconds)
Published: Mon Dec 12 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.