Unity: Progressive Lightmapper, Probes and Post Effects

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey guys it's Sam for digital meet again and in this tutorial we're going to be looking at the progressive light mapper in unity now I've got a cinema 4d scene open here it's just a room it's very simple we got room here we've got a few objects in there I've just got some paintings on the wall they're basically boxes with the backs cut off and you know a picture map to it I've got a wall material and a floor material you know it's all very simple it's not you know the greatest model in the world it will serve our purposes so yeah I just want to talk a little bit about this scene so you can see up here we've got a null called room and inside that we've actually got a room object there we go as you can see there's some other there's there's separate objects within that which are the paint ins the box the glass and the windows are a separate object as well and yeah that's about it really I've also got another object which I've called room shadow caster which is basically the outside of this building now there's a very good reason that I've actually separated this outside part from the inside part which will become apparent as we go along and the other objects have got an ear this is this animated sphere here and I've just animated it moving around the room now I've done this because in unity this will help to show sort of lighting and reflections for dynamic objects so obviously because this is moving around in it's animated it won't be baked and via the progressive light mapper so to make it fit in with the scene so it doesn't look like a sore thumb we'll have to use light probes too to help blend it in okay so that's our scene just to quickly go over the materials very very simple obviously on the glass I've got a transparent material this glass material that we'll just come across the unity called glass and it'll probably be an opaque material and we'll have to set it up in unity our walls very simple I've just got a normal map I mean the reflections channels turned on but that's not going to be carried across the unity all the diffuse channel so I mean they those could be turned off it's just the color and the normal that will get come across there so very very simple materials like I said this isn't about materials this is about lighting this is about sort of you know baking light Maps and stuff I've got fluorine error as well again it's just a normal map that will be carried across and and the color channels are very very simple so the first thing I suppose we should do is fire up unity just to make note that I'm using unity 2018 point 1.3 F 1 so if your version of unity looks a little different though the settings are in sort of different places you may be using a newer version or an earlier version ok so let's start by creating a new project I'm gonna create new it's gonna say where'd you where's the location I've got it in my documents I set up a folder there called unity projects and that's where all my projects go at last for the title I'm going to just call it unprogressive progressive light map oh there we go that'll do and the templates 3d everything's fine there so I'm just going to create the project okay so this is what my unity looks like when it opens up yours may be arranged slightly differently so I'm just going to go for that quickly when yours opens up if it's the first time you've opened up unity it's probably gonna look like this which is the default layout I absolutely hate this layout so if you want yours like mine you go up to window go to layouts tool and then you go to this little drop down here and just say one column and this would be your project folder and this is your scene hierarchy up here so I'm gonna I'm going to go touch actually our project panel here and create a folder and I'm actually going to call this hashtag imports now I've named it hashtag import because this is listed out alphabetically and I want my imports folder at the top so I can easily find it basically and that's where our FBX is are gonna go let me export our cinema4d the next thing we need to do is actually save our scene at the moment it's called sample scene and you can see down here we've got that's where it's saved and that's basically just a placeholder when you first open unity in older versions it doesn't do that you have to save but I'm gonna save anyway and I'm gonna call this progressive light mapper so let's grab the name from the path there and I'm just gonna call my scene progressive light mapper and you can see it's saved it here this scenes folder is now obsolete because I've saved my scene so let's delete that and we've saved our scene so you're probably thinking the first thing we need to do is get our objects in this scene but there's one thing that I do every time that I am start unity up and that is changed the lighting model by default the lighting model in unity is set to gamma and if you're using a PBR workflow or you know the standard shader in unit if you're using PBR materials gamma is not the way to go light doesn't fall off as accurately it's just a different lighting model you're probably thinking why have these options and there's a good reason some platforms that you're building to may may not support a linear workflow that might not be the look you're going for there's many reasons but I'm gonna be choosing linear so let's go up to edit go down to project settings and go to player they'll open up this window here and you can see the color space is set to gamma I'm gonna choose linear like I said light falls off more naturally it travels further I find and all that kind of thing so there we go color space let's set to linear that's the first thing I do when I open unity and now we can get to UM actually exporting from cinema 4d so let's open cinema 4d back up I'm gonna export my room so I'm going to select my room okay because I just want to export this in fact these are going to be separate FBX is I'm gonna have my room as one FBX um have my room shadow Castle as another and the animated sphere as another so select the room go to file export FBX it will say where do I want to save it now this is something that cinema 4d does that I find quite annoying when I say export as the folder that will open up at the path will always be where the cinema 4d file is saved even if you've exported to another location the next time you export it'll always open up where the c4d file is saved which is rather annoying I wish it would remember the path so you didn't have to keep navigating to that place so soon as that isn't something that cinema 4d does I'm gonna create a little shortcut if you like so my unity project is saved in my document so I can get quick access here go to unity projects progressive light map where is my project going to assets and there's my imports folder now I'm actually gonna drag my imports folder here into my quick access so I can just click on that and get access to it every time now as you see down here there's the file names unique progressive light map for FBX I don't want that I'm exporting my room so I'm a type room and then press save and then it will open up the FBX export sentence so the FBX version I'm using is the latest one and by default camera splines and lights are turned on and so attracts and I don't know if normals is or not but I'm choosing to export the normals and here we have Texas materials in bed textures and substances now all of that is default I think apart from this selection only what that does it basically says instead of exporting the entire scene as an FBX it'll only export what you've got selected now I select in my room and we've got this selection only so all of this is OK we've got cameras splines lights but I've got none of them my scene anyway so they won't get exported tracks is if you've got animation on an object or the object that I've got selected at the moment hasn't got any animation on it so nothing will come out of that ok so that's that's good let's press ok done its export to uni let's go back to unity and that will now see that we've got our room object in our imports so basically I'm gonna grab my room and drag it into my scene and there we go we've got a room Oh No there's no materials on it and if we actually go into our room press the cube you can see that we've got some stuff with colors on it there but there's no floor material there's no wall material in earlier versions of unit he would just extract all that information in 2018 I've got a click on our room FBX in the project window and usually it's on this tab but if you go across the materials you can see that we've got this location use embedded materials if you drop that down and just say use external materials legacy and then apply it'll actually extract my materials and the textures here we've just got a little normal map settings pop-up it's saying a material is using a texture as a normal map but it's not being marked as a normal map you know in unity you just press this fix Now button and it will make that's recognized as a normal map so this is what our scene looks like there's a couple of things we got saw out though if I go into the room you can see that even though this is a room that's blocked blocked off light is still coming in and you got some weird shadows going on there and that's because in unity light will travel through the back face of a polygon they won't see it they're not two-sided he only recognizes the front face of a polygon but we're gonna deal with that in a minute the other thing are windows they're completely opaque so let's have a look at those let's click on our windows yeah as you can see we've got this em orange sort of outline when we select stuff kind of like cinema 4d I find it quite annoying so I'm gonna go to the gizmos and I'm gonna say turn off selection outline and turn on selection wire also I think I'm gonna get rid of the grid as well so we don't see that and that should be okay okay so now I've got my window selected if you just click on that you'll see in the inspector the information about this object and its material so if we drop down this material we can see it's got a lot of color which is gray want to change that to white for now and we're using the standard shader and rendering mode is opaque well I'm gonna drop this down and say well we want transparent we want this to be a transparent object okay so what dictates the transparency of this object is not well you can't see through it and that's because it's decided by the Alpha of the albedo so if we go if we click on the color of the albedo which is basically the conic color channel and then mess with this alpha bring it down you can see that we're getting it more see-through now now as we all know glass has a tint usually so I'm actually gonna change the color of this to black and then just push shut my out you can see it getting darker there so I'm just gonna make sure that it's not 100% transparent maybe something like that something there we can always tweak it layer but at least it's see-through now okay so we've got our room in let's talk about the progressive light map Allah so you want to look at the sames for our progressive light mapper but we need to open the lighting window so let's go to window all the way down to lighting and then choose settings I'll open up this window and I'm just gonna grab it by the tab here and move it across next to our inspector so now we can flick between these two okay so if we go to our light in window we've got quite a lot going on here we've got environment at the top and as you can see we've got this default skybox we don't really need to worry about any of this in fact I'm gonna close this up because that's fine as it is we've got real-time lighting you'll find that this is probably checked on by default I've turned it off you've probably got auto-generate on like I've got down here so basically if you mark something as static light map static this will begin baking straightaway and every time you make a change it will rebake which can be handy if you want to wait right as you're working but in my case I'm gonna turn this off I only want it to generate the light maps when I press this generate lighting bun I'm gonna turn it off for now so it's not constantly baking every time I move something okay so this real-time light in we don't want real-time global illumination it's not really real time it's precomputed but I've turned that off and then under mix light in we've got this turned on and that's exactly what we want under the like mapping settings this should be set to progressive I think it does that by default but if you're seeing enlightened changes to progressive because that's what we're talking about this lighting mode we've got shadow mass subtractive and baked indirect and we're going to be talking about that a little a little layer but for the time being let's just hit the generate lighting burn and see what happens well as you can see bugger-all nothing has happened and that's because we've got a tell unity that this room object here this in our hierarchy is actually marked as like light map static it basically says this needs to be light mapped it's not going to move anywhere I need you to bake it so if you select room and make sure you go to your inspector and in and select the room we've got this little checkbox at the top here called steak and now if I drop that down you've got a few things you can market ass everything like map static includes a static batching static blah blah blah and all the rest of it freeze of use if I just wanted this to be light maps tag and drop that down and say light map static and just click this like I'm also gonna want it to be reflection probes static we're just for easy view so I'm just gonna check this checkbox and it will say do you want to enable the stag flag through the children objects as well yes I do we've got there's no called room and a load of objects in it so yes change children and if we drop down now we can see that everything's been ticked that's great so if I go back to the light in panel and click generate lighting you'll see something happen and there we go something's happening something's kicked off but we're getting some very very strange results there and that's it finished now I think you'll agree this does not look right and there's a very very good reason for that we have got you these four where our wall material is so that's on UV one and the floor and you know we've got you v's for that but the light map needs a second set of UV s to tell it where to put the light map we could do this in cinema 4d we could go to our room object you can see we've got you these here in fact let's have a look at them let's go to UV edit and this is our UV s for our room now you can see they're all laying on top of each other and crossed over and all the rest of it now we could actually generate a second UV tag for this room and make sure that all the UVs are separated out so they're not overlapping but we can actually have unity do this for for us sometimes you need uhz a great job at this and sometimes not such a great job so depending on the object you may want to create a second UV yourself but because this is basically very sort of linear it's like a box shape for the most part it's not very organic and unit you will probably do a pretty good job sorting this out so I'm just gonna go back to this for you go back to our unity scene and go back down to our project window here and actually click on the FBX and go to the inspector go to the model tab and we've got this generate light map UV so unity will basically without this checked on what it's using is actually the you've you've ease from UV one and as you can see this looks awful because they're all crossed over you know you can see here we're getting some errors we're V's Elaine on top of each other so we can say generate live map movies and what unit will do will is use UV one as a reference but then spread them out so they're not overlapping so let's check that on just to note that that's not enough that you just check that on you've got to actually apply so there's an apply button down here and then they still apply the changes now if we go back to lighting and hit generate light lighting you'll see that something's happening now and that's it finished and still it doesn't look great it it's not very good at all really this because we haven't really set up our our settings for our light map so the first thing I want to do straight off the bat let's go to our lighting window is set to progressive great it's also set to shadow mask now I'm gonna actually change this to baked baked indirect and it underneath it says mixed lights provide real-time direct lighting while indirect light is baked into the light Maps and light probes ok so let's try this again not much changed there it looks kind of the same as it did before and that's because of our directional light remember earlier when I said a real-time light it won't recognize the back face of a polygon and that's obviously evident here because these walls aren't you know producing shadows and it's because the light is traveling straight through the back face of this wall which is not visible here but visible there so let's choose our directional light that's already in the scene and go - inspector this is set to mixed let's change this to baked okay go back to our light in and generate lighting okay now we're getting something a little bit more closer to what we had actually one it's quite dark in here for several different reasons and the bake isn't particularly good either we're getting there we've got some seams going on here well there's several reasons for this let's have a look at the light map sayings first so B got it set to progressive this prioritize view it basically means that whatever you're looking at that's will what will get progressively baked first which is really handy because if you want to sort of go oh did I sort out a problem here you can go there and it'll do this part first and you'll go great and then you can spin the camera around and go here and then it'll prioritize this view that's what that means next we've got direct samples and indirect samples this is just the amount of samples that it shoots into the scene if you like the amount of rays or photons here we have bounces it's set to two at the moment so this is how many times light will bounce you'll get direct like coming in bang it will hit the floor it will bounce off of the floor and take some of and its energy will be reduced slightly because of absorption but it'll take some of the color of the floor with it and then boom it lit something else and that's bounce too just too bright in this room up a little bit I'm actually gonna put four bounces the maximum is four and it's because the after four bounces there's not too much energy that'll make significant changes for the amount of calculation that euni-unni you will have to do so I'm gonna change that to four and I'm gonna generate lighting again that'll be better not much but um yeah we're getting there okay there's something else that is causing this very dark scene remember when we selected our room and we said if we go back to the inspector mark everything is stack well there's a few objects in this room that don't need to be staying and I bet you can guess what they are and there's actually a view to visualize this which is quite helpful if you go up here we're in the shaded view at the moment but if we go all the way down here we can see bakelite map so if we click on that it gives us a sort of UV grid and it actually shows what must been baked it kind of just shows the lighting in fact we can chain turn off the UV view as well at the bottom it says show light map resolution if I turn that off this is just a representation of our light map and you can see it's very dark now that it's these windows these windows have been marked as light map stacks they are actually getting baked into the light map so let's just turn our resolution back on again now it's glass it's a transparent object there's probably absolutely no reason why these objects should be included in our light map bake so let's choose these glass objects I've got glass glass to glass 3 we can choose all of them that should select the windows up here and obviously look we've got the skylights and we've got a window downstairs we've got these three windows and we've got a window up here so there should be enough likes spilling into this room that there just isn't so I'm actually gonna select all three of these drop down this and untick light maps take they are now not included in the own as you can see they've changed their lovely and these are changed as well so they're not being included in the light map now let's go back to the lighting tab and generate the lighting again and as you can see that actually pushed a little bit more light into our scene let's go back to the shaded view not too much but and you know it's pretty subtle but we need to improve the quality of this and you're having a problem on the stairs there and it's probably because one our resolution and the amount of samples in the scene but you could just leave it like this just to get an idea of how the lighting is going to be before you do your sort of final bake and that kind of thing but I'm gonna start cranking up the scenes this other settings here I'm gonna close this we don't need that so it's just these light map settings that I'm interested in okay so the direct samples they're 32 they can stay as that indirect samples are two five six I'm gonna double that to five twelve and let's see if that actually makes a difference it definitely takes a little bit longer to break the light map not too much difference what about the bounces yeah we put those up the filter in we don't need to worry about for the time being in fact I don't think we will need to worry about all basically what this does is for the samples that are generated on our walls oh it's kind of like GI in on cinema 4d where the samples are it tries to blend them together by blurring them blurring the samples so this is what this does basically like map resolution okay let's go back to our bake like that view and let's change our resolution that might look okay is set to ten they set it to 20 already you can see that the resolution is a lot tighter now and if you go back to our shaded view and generate our light mapping again press that button again we can see this had cleaned up a lot of the areas that we had a little while ago there we go we're still getting a seam on the floor there but it's cleaned up that problem that we add on the step so as you can see increasing this value actually helps us out a little bit and there seems to be some stuff going on here [Music] but again we can sort sort these out I'm actually gonna crank our light map resolution up to 40 and I'm gonna make the light map size you can see here there is set to 512 so this is this is the resolution in texels if we hover over this you can see it sets the resolution in texels that are used per unit for objects being lit by baked global illumination larger values will result in increased time to calculate the Bates lighting so this is basically these in-depth direct samples are how many samples there are per Texel okay next onto light map size it says 512 so that means that the maximum size the light map can be is 512 by 512 pixels and if you look at the tab of the tabs at the top here we've got seeing global maps and object maps let's go to global maps and this is our light map this here is a directional map and I'll talk about that in a minute but our light map can only ever be 512 big well for doing a room you know this size you're not getting a bad result but I'd like it to be bigger get more detail on there so let's change this to 1 K so we got 1024 by 1024 you've also got the option to add ambient occlusion to your maps I'm not gonna do that underneath we've got directional mode now what this basically does is like I said if you go back to global maps it creates this secondary map here if I drag this up at the bottom it kind of looks like a normal map and that's because what it's doing is in directional mode it will look at the normal the normals of an object or the normal map that is using and actually consider them in in bouncing light problem with this is you get an accurate bake and you will get you know say if a ray comes in and hits the side of a normal map and then it will bounce off in the correct direction but for something like this I don't think it's really gonna matter too much and another an upshot of doing it this way is they actually doubles the size of your light map data because it has to make two Maps so I'm gonna go back to our scene tab and I'm actually going to turn directional off I'm gonna turn it to non directional so there we go let's give it a bake again generate light Maps and as you can see that there's a lot more going on now because I've made the resolution higher and I've also made the light map size bigger and this will probably take a little bit longer so in the future when I when I start baking because this might take 30 seconds to a minute or even longer I will I will push the video forward for you guys okay well we're getting some better stuff going on now little bit cleaner there in the lighter areas but we can see that we're still getting blotchiness some blotchiness and some patchiness going on but all in all is getting better we've got some errors here so I'm actually gonna start increasing it more I'm actually going to boost the indirect samples to a thousand and the lightmap res mmm 60 that should do and I'm gonna hit bake in a second and I just want you to have a look what's going on with the bake and also I'll show you this prioritize view thing as well so let's generate the lighting okay that's happening if I turn it around here it will start prioritizing whatever I'm looking at so I can do this I could even shoot up the stairs here and say well I'm gonna see what this wall looks like and it will pry up prioritize those things okay I'm going to get back downstairs and wait for this bake to finish and I will fast forward it here okay so are our bikes finished and as you can see it's a lot better quality than it was before it's very dark in here still so I'm actually gonna change the direction of my my directional light in a minute and but this is a good example of the GI you can see the light is hitting the floor it's taking some of that color with it and it's been cast onto the ball there so there's a good example of the the wood there but like I said it's very dark the quality is a lot better than it was but I think it would be nice if we could shed some light down this the bottom end of this room but before I do I want to talk about the fact that earlier I was saying that when when light comes through the back face of a polygon is not blocked it doesn't see back faces of polygons you're probably thinking well how the hell is this wall casting a shadow then if you know light travels through the back faces were over polygon that is true for real-time lights and the reason that it's not bleeding through the back face of this polygon is because we're using the progressive render and I've set the directional light here if we go to the inspector again to baked when when you do that when you've got a directional light set as baked you know the progressive renderer is set to Beit indirect a ray will here back face of a polygon and the Ray will be terminated it won't travel any further it will say the right you've been occluded and that's why we get in shadows like this is just real-time lights that aren't occluded by the back face of polygons they will be occluded for a baked light I'm actually going to clear the generated light entire and you can do this by going down to where the generate light button is clicking the arrow and saying clear bates data so if we do that we go back to what it was and again you can see that the lights traveling through the back face of this now and if I grab the direction of light and go to inspector we can actually rotate this light round the I so I'm actually gonna do this so we've got a little bit more light coming into these windows here now I can't really visualize it very well because it's coming through the back face of these wall so what I could do is actually go and grab open up my room grab my was it called room there we go room and if I open up I think is enlighten yeah you can see we've got car shadows it's on now you can turn these off so there's no shadows on that's fine but then we've got this two-sided here and that'll give us a better idea of what's going on now you can see that everything is not good in the land because where this seam is up here we can see that light is getting through it there's a good reason for that if we go to our directional light and if this wasn't set to baked it was sets a real-time or mixed you could use these quality sense to hang this in you can see we've got this thing here called bias which we can play with it actually helps I'm going to undo that but what's causing this is something called normal bias and if we grab this and bring it down we can see that that's slowly disappearing I've got it actually set to zero now but when you set these to zero your you may start getting an effect called shadow acne so there's something to bear in mind I'm actually going to do undo what I just did there and I'm going to change this back to a bakelite even though it hasn't been baked check because I'm just trying to get a idea of where our lights coming in so I'm gonna go back and select directional light and start turning it again okay that looks pretty good we've got both windows shining into the room I'm also gonna tilt this on the X as well this way so the light gets drawn further into the room something you notice about the sky is where if I look at the sky as I tilt on the X the Sun position moves and as we get closer to the horizon the color of the sky changes orangey red and then tonight so I don't want to go too far something like this so it's maybe afternoon something like that great so we've got lots of light spilling into the room now I'm just gonna get back in here again just make sure what we have before the directional light itself is its mode is set to baked and in lighting we've got baked indirect and I'm to go generate lighting again and I'll see you in a sec okay our bakes finished and this is what it looks like in you notice when we look out this window we can see through the back face of this and we get in you know we're seeing inside our actual building there we take a look at that in a minute because there's actually going to be I'm going to use our shadow caster that I showed you earlier and not only with that blockers from being able to see in their bill actually self another problem that we're going to come across in a little bit first things first though you can see that this part of the room is quite dark and it may be because of my materials and this is something that I didn't talk about actually if you open up the material folder here and I'm gonna choose this fish one and that's actually in regards to this picture here this fish picture and and just check the out bead oh you can see that we've got this texture this fist texture here and I think we can see it if we drag this up yeah so we've got this fish texture which is in our fish material but I just want to go into our albedo color and make sure that it's actually white because when you create a material in cinema 4d let's go back to it and create a new material and open it up and you can see that it's not quite white here and if we loaded a texture into this slot in fact we can just generate one currently we can um a delay surfaces let's say checkerboard that's fine then this overrides this color and that's fine so it doesn't matter if I put this to black or white because there's something in this slot this is ignored now when you export to uni this isn't quite the case I'm just going to delete this material and go back to unity if this color is say half gray you can see that it's actually tinted our picture if I put this to read it actually tints our picture red that's actually quite a nice effect that but you can see that this texture does not overwrite this color so it's always important this color is white to get an accurate representation of this texture so in cinema 4d if I choose my floor it's really important that in the color channel here where I've got my texture that this is a hundred percent white because it will take that information when it goes into unity so I'm just going to make sure my fish that's fine the glasses doesn't matter the light I think this is white yeah it's a hundred percent white but like I said we got to make sure that this isn't great now you'll see this pink material and this is actually on our pink box here at the bomb that obviously this is pink but there's nothing in the albedo texture slot we want this to be pink that's its color and the same for the red the starry night is a picture but that sense of whites will get there and then obviously we got the teal for this box up here and the walls the walls are just is just a white material and you can see that we can change that and then we've got white which is also why so everything's as should be so that's just something to look out for the bottom of this room is pretty dark let's move on to the next thing the bottom of this room is pretty dark I'm still not 100% happy about my lighting actually how it's hitting the walls and whatnot I mean so in fact I'm just gonna tweak that again really really quickly so I'm gonna clear my light in data there we go we're getting shadows for some reason oh it's because this room is still go to inspector it's still got its shadow set just two-sided I'm gonna leave it on that for the for the second for the minute while I adjust my lighting a little bit okay so so yeah I'm gonna say something like that now that'll do that'll do for now I'm not gonna mess around too much room to I'm gonna take this two-sided off and put it to one just so it's generating shadows and I could bike again but you know what that looks like already so we know that when we bake this half of the room is pretty dark now this is why I've made this Lily they're here because I'm gonna put an area light there so what I'm going to do is go to create go to light area light and it's created this area like here I'm just going to drag it up and put it under my directional light for now just to keep it out of the way and I'm gonna zoom in on it and it's all the way over here so with it selected I'm just going to go to its position coordinates and zero these out zero zero zero lovely and now it's in the middle of our floor here and I'm going to raise it up and put it in this little recess that we've got up here now I actually can't see that recess too well from this from up above because you know it's a back face so I'm gonna look at here from underneath and using this little gizmo access gizmo at the top here if we click on this it will shoot to this side if I click on it again it will shoot to the underneath and if I click on the center of it it actually toggles between perspective view or on an isometric view so we can do that but now we can see that we actually can't see that little recess so what I'm actually gonna do is actually bake the scene again so I'll cut this out see in a sec I actually didn't like the lightmap Finnish bike and I just started press generate like this it starts generating the light map as we can see and then I press the cancel button so it just sort of stops where it is kind of thing and it's just so I could bake the lighting into this part here really so what I'm going to do is press this and then go underneath so then we can see this and actually move my area light to here and now I can use these little handles you can see on the edge of the area light to actually size it so I'm just going to put it there drag this handle out so it sort of covers the inside of this there we go and come out of this view and shoot round here and now I obviously need to lift it up so I'm gonna go into this view here and this side view and then I can in an orthographic view so I can actually just sort put it up in there like this okay great so it's actually in there now pointing down obviously you don't want to push it too far so it'll be on the back side of this so it's important to make sure that it's not gone too far up it's actually sort of setting that little recess so everything's good also if I click on the area light and go to its go to the inspector see its properties you'd see its intensity here I'm going to actually turn it into 10 C from 1 to 1.5 so it pushes a little bit more light into the room and I'm gonna bake again and we should get a em change almost immediately down that into the room there we go you can see that that really brightened up sort of that area now as we go around you can bake all this okay so I'm gonna leave that and I'll get back to you guys in a minute okay so the light mapping is finished as you can see it's a lot it's a lot brighter down that that end of the room now so we're looking a little little better now although our wall material doesn't seem to have our bricks on it anymore which is a little worrying so let's have a look at this okay did it it today yeah we've still got our wolves on but and it still what the normal but because we're not using a directional light map maybe that is the reason why but I'm gonna actually sort out our materials a little bit now so let's um let's just go through these let's have a look at this little red box I'm gonna make this more shiny so I'm actually going to pay smoothness up if I put it right up you'll see that what's actually in the reflection is the outside so let's have a look at the outside you can see the horizon and the sky and you got the Sun there and that's exactly what we've seen in this box and we're not seeing the room now there's a good reason for that we need to set up some reflection probes in our room so that's going to be the next thing that I do also even though this area of light is trapping photons into the scene it doesn't look like a light and if you notice if I go back to my c4d file and actually I have a look at this I set that up as a separate material so we're gonna sort that out too so let's go back in fact let's do that first let's grab our room and have a look at the materials in it we've got walls light and all the rest of it light is the one we're interested in and if we type 12 this down we can see that the colours white but what I'm going to do is turn on this emission turn on the emission it's going to ask for a color so I'm going to change this to white and as you can see now it actually looks like it's glowing and it's actually emitting light I think that maybe a little too bright maybe so we can actually grab this color and just drag it down to gray there we go and it makes it darker so maybe something like this so it's kind of like a soft light okay that will do is for now as you can see the global illumination it says global illumination baked now what that means is if you've got a texture in your emission channel or a color and emissions turned on and this is set to baked it will actually actually contribute to the global illumination so if I was to go back to the lighting tab now and press generate lighting in fact I might do that in a sec let's grab our area light and go back to inspector and this little checkbox at the top left will actually turn the area light off we'll go back to our room and back to our material yeah so if this has got if the emission is turned on and it's got a color or a texture and this is set to baked it will contribute to the lighting so let's generate lying again and see what happens now there's not much going on there so I'm going to stop this go back to the inspector and look at our material and you can put this up to white here but you can actually turn the intensity up as well so you can actually do values over over one so if I was to grab this and put it up here and I think you can turn that to one or is this zero let's have a look I don't know what it was on normally but okay so we've got minus one plus one plus two I think this is I think this is normally set to zero but I'm gonna I'm gonna actually turn this intensity up to five okay close that and generate light in there we go yeah that did it so you can see that that's actually contributing to the bake now if I go back to inspector and go to our HDR and put this back down to zero maybe and then bake again I think that's back to normal who's here I have a look yeah it's still generating light but just not not as much as it as it was and I can actually change this on the flight so if I change it now to say one there we go it's intense it has gone up and it's actually contributing to the room so I just wanted to show you guys that I don't actually want this so I'm gonna go back to the lighting tab and cancel I want our area light to be doing all the work so I'm gonna go back to the area light now and turn it back on click so you can see these colored cubes back on when it's off it's gray so I'm gonna turn the area light back on then I'm going to go back to the room and back to this material here and yeah I'm gonna change this back down to zero and keep it at this kind of color I think yeah that's something like that will be fine but where it says glowing global illumination baked I'm going to change this to real time this way the emission will not be included in our bake as far as I'm aware so let's go back to the aerial I actually and turn that off I just want to make sure that this is not contributing anything to the scene and by the looks of things it's not and let's go back to the room and change this to baked yeah and as you can see it got brighter yeah it's that's fine so let's change it back to real time I'm quite happy with the luminosity of that so even though it's luminance it's not actually crapping any photons or rays into the scene so let's go back to our area light and let the area light do that for is instead yeah that's fine I find the results with an aerial eye are a lot more cleaner than they are with using a mission it's just a personal preference for me you know take it or leave it so that's bacon and I'm gonna let that finish okay we're back in the banks finished always looking rather well apart from we've got still this this issue here I think this might be a bug in uni I'm not sure let's carry on regardless okay so this half of the room is lit well let's go back to this box and I'm actually gonna there's a metallic value in the material on the turn that right up so it becomes really shiny and I suppose I can turn that to red so as you can see the reflection that we're getting in this is the outside and there's a good reason for that I'm just going to undo those changes I made so we're back to red and back to not metallic the reason for this is unity produces a a kind of like a global light probe and if we go to lighting and 12 down our environment we can see that the Sky box is you know the default Sky box which is this and environment light in yeah is the sky box so environment lighting is basically ambient light it's taken from this Sky box environment reflections again is the sky box so this default Sky box is the source for ambient lighting and environment reflections now we can actually override that in a volume with what's called a reflection probe so let's do that let's set up a reflection probe or several so what I'm going to do is I'm going to create a empty game object I'm now going to put this under my directional or area light it doesn't really matter where and I'm gonna rename that and you do that by just clicking on it and then clicking on it once and I'm gonna call this ref probes this is just play basically a placeholder for me to put my reflection probes and I'm also going to make sure it's in the center of the world so in the inspector with the ref plate probes that selected on 0 this out in its position so it's in the middle there and I'm actually going to create a reflection probe now so you go to create light and it's quite fitting that the reflection probe's in light because it produces ambient light so click on that and we get this object here so what I'm gonna do is actually zero out this object so it's in the middle of our world and luckily it's actually in the middle of our room as well so I'm actually going to go into this view here and orthographic and then I can make sure that it's actually smack bang in the middle of this room and the reason that I'm doing this is because we're actually going to make this box projected and the reason I'm going to make a box projected reflection probe is because this room is basically a box or an oblong should I say some we go to this view and orthographic just to make sure that it's actually in the middle and that looks pretty central to me so central vertically and central side to side and then be the reflection probes selected in fact let's put that in our ref probe object that's what I made it for there we go so it's in this now with that selected I'm gonna go over to its attributes which you can see here let's just drag this down so we can see all of it there we go the type is set to bait that's what we want to do you can have a real time reflection probe but that is very very resource heavy so I'm not going to do that I'm going to keep it on baked we've got its importance we don't need to worry about that that's if you got reflection probe volumes that are kind of intersecting you can say which probe is more important than the other we've got the intensity of it one is fine we've got box projection I'm gonna leave that off for now but we are going to be using that and then underneath there we got resolution and is it HDR I've won that on that song by default stands for high dynamic range we want that for our reflection probes but the resolution wants you I think that's a little bit low so on the bump L two two five six and yeah everything's great there now we've got these two buttons at the top this one allows you well let's just press it it allows us to edit the bounding box so basically anything inside this we'll be affected by this probe now if we look at our red box here you can see that it's taking its reflection from the global internal sky sky but if it's inside the bounds of this volume you can see that the reflection changes actually comes up as nothing because we actually haven't baked the reflection probe yeah so let's sort out our bounds first so we want this just outside our room here and then we can do that with the bottom as well I'm gonna grab this little handle and drag this up so it's just below the floor eye so and we're gonna do the same for the top as well we can track that all the way down so it's above our ceiling there and we're gonna do it for here but we're actually gonna overshoot our room a little bit because we want this glass to receive the reflection as well which I think it will do anyway but let's let's just put that there okay now we're gonna spin around so click this and we go actually going to edit these sides of the bounding box so they're just outside of this room but again we've got our window here so maybe overshoot just a little bit I can't see my handle now there is there we go and the same the other side we're gonna put it there and that should do this for now yep so let's shoot back into the room and I just wanted to have a look at our box here I'm gonna come out of this by pressing the button again and we're gonna bake this probe now so with the probe selected we can see that we've got this bake at the bottom so let's bake it and now you can see that our cube is actually receiving reflections from inside the room now we can make these reflections even more accurate because we set the bounding box like we did we can actually select the reflection probe and box project it because it will actually project it onto the the bounds of our volume if like so let's have a look at this keyboard we do it click on box projection boom okay so we're getting a result like this now great so now that we got a reflection probe in there we can unselect that and you'll notice these icons that represent all these things are quite big and so if you go up to gizmos and 3d icons we can just shrink those down there we go we don't really need to see see them and I've just noticed that we've got a main camera in our scene floating off there we don't actually need that so let's get rid of that mmm okay so let's sort out our other materials we've got this teal here in fact this red box I think it doesn't need to be fully smooth I think a value of noir point 85 could be good or even nine we want it kind of shiny but not to mental select our teal box and we can do this excuse me the same for that naught point nine for the smoothness and let's do that for our pink box as well point nine okay great and what about our wooden floor let's make that a little bit shinier shall we so if we select the floor which will select this room object we can see that we've got the wood floor planks if your go into there we can actually crank it smoothness up and if you crank it up all the way you can see that that is now taking on some of the characteristics of well he's taken on the reflection generated by this light probe reflection probe here sorry it's not quite right but let's see if we can sort this out so let's have a look the smoothness is on one now think that's a little bit too high maybe something like naught point nine yeah so we get some blurred out reflections there flexion probe yeah box projected yeah baked to do today it's all good yeah seems good these seem a little inaccurate these reflections here but we're gonna sort those out so don't worry about that and we're kind of getting a result now the walls as well let's choose the walls let's pick them and that'll be the walls material so you can see that it's just a color with a normal map in it now if I crank the smoothness up we can actually see the normal now because it's receiving some light so I think that one is a little bit extreme so maybe something like noir point eight or more point seven maybe that could be good yeah we're actually getting some of that specular off those bricks now it's not so flat maybe not point six something not too mad let's go noir point five now I'll do is ok this glass as well let's choose this glass material and we've got it set to transparent again let's wipe the smoothness up this can be all the way up the top I think this glass and as you can see now we're getting reflections from that reflection probe that we just baked and in this glass we gain there there and there that's great okay and these should be getting some of I know there's nothing in there and there'll be nothing in these for the time being either okay any more materials I don't think we really need to worry about too much this white material here I think that I'd be okay with am smoothness of 0.5 something like that yeah okay so we're getting there now our floors you know it's not the best materials in the world but this is more about the lighting itself and here we got some light up here as well now you'll notice that the reflections in this lockdown here they don't look too hot and again is because it's getting its reflections from the sky outside and you can see in the window you're not really getting a reflection of this ball or anything like that so we're gonna need to set up a reflection probe there too so what I'm going to do is actually created a couple more reflection probes so I'm going to select this for a flexion probe here and actually duplicate it so you can control see um sorry control C control V and it will call it reflection probe one and I'm actually going to move this to here and just like before I'm gonna go into this view in this view and set this reflection probe up just in this little bit here so somewhere like that it's in the middle vertically and again I'm gonna select the bounds we don't need to worry about a quote or maybe for the window up a little bit I don't know and then just drag this in here and I'm just gonna select the other probe to see where that ends actually that one yes somewhere like someone like this that should do is scoop route to the other side as well using a little gimbal at the top and you can see there's way too wide because the side of the room but we're actually just doing this little bit in fact maybe from the top would be bad there we go so just pull that in there drag that in there what's wrong call that a little that'll do so now we've got this as well so we can bake that Bob so now everything in this little bit should be receiving stuff from that yeah we can see that the ambient color in there is a lot better as well so again I'm going to select one of our reflection probes this one will do control C control V and I'm going to drag it over here and again I'm going to go into our orthographic view and here we go I might go to the top actually there we go and then I can track this here just sort of put it in the middle change our bounding so it fits along there oh I missed that do that again grab this handle bring it in and I think you get the idea now one that glass in there okay just outside the room there go back to the other view yeah it's all fine and dandy that way and that way yeah okay good so now we can bake this as well although the top oh yeah the top I forgot about the top so let's go to this view orthographic just grab the bounding for the top I just drag it down I want to include that glass so let's do that that's fine and now we can bake this probe as well so let's have a look at the floor there and just see how that changes bake bake bake okay so now we can see the reflection of the picture in that as well okay good now you may see the you know we've got our window reflected in the floor there and it doesn't look too practical doesn't look too hot um and I'm gonna select all three reflection probes and just actually bring down the blend distance because where is it box projection yeah BM you know we actually haven't got a blend distance and there's a good reason for that and it's because of the rendering mode that I'm in and I'll come to that in a second so all in all we've got that preset that's out pretty good we're doing all right you know everything's visible so let's set this up so we can actually have a little walk around it and see what it looks like so what you're gonna need to do is you are going to need to go to up here you've got assets import package and then you've got these packages that come sort of installed with unity one of them character so let's grab characters we'll bring up this little dialogue everything should be selected anyway but you can press all and import I'll have a good I'll think about compiling scripts and a load of other whatnot ok so now that that's finished we've got this folder in here called standard assets and if we open that up you can see there's a folder called characters if we open that up we've got a first-person character which is why one open that and then we've got prefabs and this is where you want to go and we've got this FPS controller so I'm going to drag that into our scene and it generates this it's a little little fella so he's zeroed out in the world but if we go to this view again no not that this view orthographic we can see that he's sort of going through the floor and if you press F that will frame him there you go so we can drag that up so he's above the floor and then we can go back into this view and you can see that he's got a camera attached to him and he's facing up the stairs in fact if you go to your game view you can see what the player controller is seeing if you've got another camera in the scene that's not good you get rid of it the only one one one that's active anyway so we got this thing in there let's press play then and see what happens in fact I'm going to go to the game window and there's a little button that says maximize on place so basically it will just make the game screen as big as it can okay so let's hit play opens up the game window I've full straight through the floor look up and see the room traveling away from me so I'm gonna press escape so I can actually stop this and the reason for that is there's no collision on the floor a lot like cinema 4d you need a collision sore tag if you like whereas in this is called a component so let's select our room so make sure the room selected and fold up our materials and you can fold that up for now as well let me go this button add component if I click that and it's already there and you got this long list of stuff just type in mesh and that basically will find something called a mesh Collider so let's add that and you can see it's added a mesh Collider to our stack of stuff now so let's hit play again oh you've got a bit noisy we didn't fall through the floor I'm able to look around and walk and we've got some really really annoying um sounds going on there so what I'm gonna do is click on my FPS controller and we've got a load of scripts and stuff attached to this object so the first thing I'm going to do is I'm going to open up the footstep sounds here and size is how many fields we've got I'm gonna put 0 so now we got no foot soap stamps jump sound and land sound I'm gonna get rid of them as well so you can just do that by check clicking on this end tab ear and then choosing none so now there's no noise so hopefully it won't be annoying for you guys okay so we've got no noise now brilliant I think the spacebar jumps yet okay so we can we can look around now okay it's not too bad just have a look what happens when we go up the stairs yeah we get stuck and it's put cause of our collision mesh our collision objects so let's stop that select our FPS controller and this is the collider capsule we've got here so I'm actually gonna go over select it go over here character controller and we've got a radius I'm gonna actually shrink this down to I don't know one point five yeah point one five actually so we've got a thin kind of fella and in terms of its tallness as well if I press play in fact let's go to a view like this and like this if I press play and then press escape and go back to our scene view which it doesn't allow me to do for some reason I careless okay let's go to game take off this maximize on play go to our scene press play escape go back to scene okay you can see that he's actually hovering off the floor a little bit even though we should be stood on it and it's probably because this skin with fear so if I actually bring this down to a noir point nor instead of it being out you bring it down to an old point naught to and do that and then try it again I'm sorry that's something else you should remember when you press play any changes you make here when you stop they'll all get referred so make sure you do this kind of changes when the game is not playing ok so noir to fine something like that let's press play now and it should be sat a lot closer to the floor now you shouldn't mess around with the skin width too much because if you go to values that are too low you might find that you get stuck in walls and that kind of thing if you are it's because of this skin width and you need to put it up okay so what about the height I think I'm going to adjust that as well because even though the capsule is encapsulating the camera here let's put it down to like 1.6 okay it's made the capsule smaller and if I grab the whole FPS control and move it down you can see that the camera is no longer in the capsule it's kind of sat on it so let's press play okay that's not too bad in fact that that's a bit more there we go and we can actually go up the stairs now there's something going on here with the reflection probe I'm not quite sure what but we'll check that in it out in a sec okay at least we can move around now and you'll see that when we go right up to a wall we can actually see through it which is no good so let's fix that okay the reason that the camera can see through the wall and it appears that we're getting let's have a look at our probes Oh our probes are rendering the outside for some reason that's very strange that one retained let's have a look at this one up here again this could be a bug I'm not sure no that one retained but doesn't appear to actually be okay so maybe our I'll claim a lighting date and rebake the scene that should I should do it that's something you should note as well if you go to light in go to generate line and use this drop-down you got this baked reflection probes thing there there we go because our correct probes now yeah that looks a lot better it doesn't look I thought something look dodgy okay so back to our FPS controller but there was something else I was going to show you what was it let me just ever think oh yeah we can actually um mix these pre baked reflections these these pre baked reflections are really really good for okay say I look in this red cube I can see the windows being reflected behind me so those windows there these reflection probes are really really good for that but they're not so hot on reflections for stuff that isn't marked as a reflection object so now's the time to bring in our animated sphere and then I can show you the the problems associated with having a dynamic object everything in this room the paint ins the walls everything in here is being marked as light Maps tag so they get baked into our I was seen here because unity knows that they're not going to be moving but what if we've got a moving object let me just shut up and actually get on with it and show you what I mean so if we go back to our scene here I'll fold out my room in fact while we're here I just want to make sure there's nothing wrong with that windowsill it doesn't appear to be no should be fine okay obviously got a little error in unit either so let's export our animated sphere i'ma grab it and file export FBX gonna go to our imports folder and then we're gonna I'm gonna name this ami mated sphere oh if I could spell and there we go save export settings everything's great we want to make sure we've got tracks on so it actually takes the animation and that should be exploited go back to unity it recognizes it we've got this animated sphere now we don't need to generate light map movies because it's not going to be light mapped because it's not going to be stag is animated it's going to be moving around but we do need to go to materials and change this to use external materials legacy apply and now you can see there it takes on this red material because I think you shared that material anyway okay then we go to animation and actually let's go to rig first is set to generic which is kind of the new correct way doing it but I'm gonna change it to legacy just because it plays it animates on play and if we go to the animation tab now I can actually make it loop as well so we're it's this wrap mode down the bottom there I'm actually going to change this to loop and apply it and now we can drag this let's just close this up we can drag the animated sphere into the scene and if we look around here there it is in the corner now you'll notice a few things about this it doesn't have a reflection on the floor in fact if I choose the floor and choose the wooden planks and crank this right up you can see that it's not been reflected in the floor at all which is no good you'll also notice that it doesn't have a shadow either so if it was in this light it won't have a shadow and in fact I can demonstrate that by creating another object a unity object of cube I'm just going to zero this out and actually cut its size down by half there we go so this is a dynamic object just like this sphere so you notice that not only does it not have a reflection in the floor it doesn't cast a shadow either and that's because of help we've got our scene set up so let's address both these things in fact I'm going to leave that cube there for the time being and I'm gonna actually put my would reflection back down because that looks awful so let's change that to point eight or whether it was when was it point nine yeah that'll do point nine unless sort out the fact that dynamic objects don't actually receive any any shadows okay let's click on our directional light it's because our directional light is baked what this wants to be is mixed so it's a mixture of baked and real-time now it's probably you probably think of what the hell does that mean well if this light set to baked it means all of its shadows and its light is baked but if it's set to mixed it means that its light is actually baked onto static objects but not onto dynamic objects we want to change this to mixed and what's the shadow type yeah let's stick to soft shadows that should be good enough the resolution it says use quality settings I don't know what those quality settings are so let's actually go check them out if we go to edit I think it's in quality you see here hard and soft shadows and it's high-resolution stable fit and this is actually set to very high the moment understood it's an ultra that should be fine but yeah these are high resolution soft shadows and we've got a shadow distance of 150 which is overkill because we're only operating within this distance so let's let's find out how big this distance is create a cube and that's one by one by one so let's actually stretch this out Oh [Music] probably zero it out as well that I don't okay so it's distance in terms of the length of the room that there is okay about eight meters what about the other way answer stretch our in the Zed so that's a little bit of overkill but even that's 12 meters so we don't need any more than 12 12 meter shadow distance now you're probably thinking who cares who cares if it's 12 meters or 150 meters does it really matter actually does because um if you go back to that setting edit project same quality the larger this distance the of the shadow quality gets but if you bring this distance down to say what'll you say 12 meters something like that the real-time shadow quality actually improves because it doesn't have to deal with spreading shadows out over a large distance so it means the shadows closer can be better quality that's a long shore there anyway so I'm actually gonna put this shadow distance down to 12 just to make sure maybe three something like that so yeah that's fine if you go back to our directional light now it says use quality settings we've just set the quality settings in quality so we should be absolutely fine in that regard okay yeah we should be fine so what I'm gonna do now is actually rebake the scene because I've changed the nature of our light now so I'm gonna fold this up go back to our light in window and we've still got this set of baked baked indirect and it says here mixed lights provide real time direct lighting while indirect light is baked into light Maps and light probes okay that sounds good to me let's generate the light map this is what I wanted to show now that we've set that directional light to mixed we've got the problem where the we've got baits like fine that's been baked into you know the wolves and all of that malarkey but the real time aspect of that lie is not hitting the back face of polygons and terminating it's just moving through them and this is exactly why I created this object here called room shadow caster so let's unhide this so really it's a it's a it's a blocker so let's export this as its own FBX and the reason you probably think what you just include it as part of the room because if you go back to uni the reason that I didn't include it as part of this room model is because all of this geometry that we've got on the outside would have to be included in the light map so if we go back to the unity and go to light in global maps and look at this we've got all this real estate for our room inside we're never gonna see the outside so we don't want the outside aspect of that taking up loads of room on the light map when it's completely unnecessary so that's why I made it a separate object so let's go back to this choose our room shadow caster file export FBX go to our imports I'm actually gonna call this room shadow caster just to keep things tidy we can save that last for export settings and I'm just gonna say yes to this that's fine go back to unity they'll have a think quick and now we've got this thing called room shadow caster so let's go to the inspector go to the model we don't need to generate light map movies because we're not gonna mark this as stack we do not want this to be included in a light map there's no point we just need it to block our shadows what else do we need to do materials I think it's got the white material on it so let's then do what we did before just for the sake of it and now we can drag this into our scene and there we go it's in our scene and if we go inside now it's actually generating shadows now you'll see here we've got a little bit of an error there and a little bit of an error on the corner so we actually need to dial in our shadow set in slightly and that you can see now this box has got a shadow and that's because the art directional light is now mixed it's out you know bakelite in data and real-time lighting data for objects that are dynamic we didn't let the fake finish that's what we're getting all this crap here but let's sort out some of these issues here like this and this so let's go to our directional light and let's have a look at these bias scenes so the normal bias is not point four that can come down let's try to we're still getting an issue there more point two nor point five okay not point five is a bit too big because we're still getting the problem three night before yeah we gain oh four but not three so naught point naught three seems to be a magic number there and it's sorted out our issue there and there yeah that looks actually okay what about the fact that the light is leaking through that might be a baked issue I might come back to that in a minute just to make sure okay so now we've got our lights order and we've got a shadow blocker there let's let's bake the scene again let's go to light in the scene tab and generate lighting okay the bikes finished and yet again it appears that our reflection probes didn't bake properly it seems to be a bug so let's go back to light in okay here bate reflection probes yeah and it's still dim baked properly well though that maybe it did I'm just going a bit mad okay let's go back to this it's definitely box projected I'll come back to that in a minute I said that earlier there's something else we can do oh it still appears that we get in a problem with that shadow bias yet we are when we're zoomed out a little bit let's go back to our directional light let's see if we can hone this in a little bit more let's bring this down to maybe 0.02 yeah that appears to have fixed it maybe that bias needs to come down a little bit as well although I'm reluctant to mess with that because that that is the thing that causes shadow acne and we're getting all kinds of weird reflections going on here as well by the looks of things hmmm yeah it's almost like in the reflections they're not seeing that our light blocker is on the outside which is very very strange I know why I'm an idiot basically this thing on the outside here is generating shadows but so if I select the thing on the outside here and we can see that it's not being marked as static that's good we don't want it marked as light maps take but we need it to be reflection probes static we still need the reflection probes to see it so let's mark the shadow caster is static and then drop down here and untaek light maps take and now hopefully when we um go down here drop this down and say Baykal reflection probes they'll give it a good break and now they can see that that wall is blocking so now our reflections look proper it's just that these can see this outside and that was the issue there so we've fixed that out it wasn't an error that's good that's good for us okay so I think we're almost there we've got shadows for dynamic objects now so if I grab this box and move it around it gets shadowed when it's in when it's in a direct light so that's great let's delete this cube now we've got another rock we've got something else that's troubling and that's the fact that this even though it receives reflections and if we zoom in we can see the reflection of the room in it it doesn't actually make reflections on the floor now there is a way you can actually get reflections on the floor for dynamic objects and that is by using a kind of real-time reflection method now you'd be saying why would you want to use two methods well screen space reflection is what I'm talking about and the good thing about screen space reflection is that it works in the confines of the screen so if I had this view that's great it'd work here and it would show the reflection to this ball on the floor but if we look in this ball because it's screen space it wouldn't be able to reflect anything behind the camera so that's why this method using the probes is very very good for that kind of thing so we're gonna use a combination of both we're actually going to use reflection probes and screen space reflections reflection probes are very very cheap in terms of cost you know to the system system resources screen space reflections are a little bit more intensive not just a little bit a lot more intensive but if you've got a good rig you can put those in your setup so that's what I'm gonna do now so what do we need to do well we actually need to go to the asset store so I'm hoping the window asset store it'll open up this and I'm already signed in so that's fine let's go to the search and I'm going to type post-processing stack there we go unity technologies and it will look like this is called the PO processing stack it's made by Unity Technologies and it's free which is what we like to hear and if you have a look at some of the images here you can deep zone map in you can there we go we've got some screen space reflections we've got bloom it does all kinds of stuff so it's worth looking at so I'm just going to import this should get this thing come up saying decompressing it'll bring up this little dialog here all should be selected anyway so you just need to hit import and did editor to do it brings this in it says the project contains scripts or assemblies that are obsolete API so you can go ahead and unit you will automatically upgrade the scripts sometimes it might mess up that's why I suggest making a backup I know it works I don't really care so just click I made it back up go ahead okay so that's imported in I'm gonna get rid of the asset store tab close tab now we're back in our scene and now you'll see that we got a folder in air-cooled post-processing okay we don't have to look through that it's fine so what we want to do is click on our FPS controller and press F so we can see it and we're gonna actually 12 this down and then we got this first person character and if we click on that and go to our inspector you'll see this is where our camera is so we can add a component now and I'm going to type post and it should bring up the post process and behavior and if I bring click on that it'll add this post processing behavior and it's looking for a post processing profile and it says none in there for the time being so we need to actually create one so we go to our project folder create post processing profile you can name it whatever you want I'm just gonna leave it as new post process and profile when you click on that we've got all this options here if it you know motion blur bloom color grading you can do all that kind of stuff as a post-processing effect now I'm just going to go back to my first person character where we put this and we need to now drag this profile into this here now if we go back to this we can actually set up our screen space reflection so it's easy as checking it on if we click on the title it basically opens up the settings for it which is great and this is actually what turns it on and off so let's have a comparison let's click Play and have a look on the turnaround and see this ball moving so now at least we're getting shadows from that bull but notice as it moves around it doesn't look very grounded at all and you can see that when it moved up these stairs there I had a look check out the reflections and then pop the reflections popped in and out so maybe we need a probe on the stairs here but maybe we can blend our probe so it goes in there comes out blends back in pop that's not very realistic at all and also it's lighting as well it doesn't look very realistic and we're definitely not get any reflection so that's what that looks like for the reflections on the floor for the ball there are none so if you go to our post-processing profile go to screen space reflection and turn this on you'll notice there's a little warning at the top and it says this effect only works with the deferred rendering path well let's check what rendering path we're using if we go to edit project sounds and go down to graphics we'll get all these tears so this is the lowest tier this is the standard the medium tier and the higher tier well what tier am I actually using well let's establish that first project settings and I think it is in quality yes so I've actually got Ultra selected and you can see it ticked it so I'd say that's the higher tier which it most definitely is so if we go back to project settings and graphics and go down to the higher tier it says use default on that uncheck that and at the bottom here you can see that the rendering path is forward we actually want this to be deferred and now we should get screen space reflections so let's go back to our post-processing five profile you can see that it's turned on and already I can see in our view poor now look I'm getting reflections of that ball in the floor very subtle but they're definitely there the quality is low I'm gonna bump this up to high and already you can see that's good and the good thing about this is it actually merges with our with our probe relations so I'm just going to twirl this up and I'm gonna choose this probe in fact I'm gonna choose all our probes let's grab all this and now you can see now there are in deferred mode that this blend distance is actually not grayed out anymore which is great now this blend distance actually has an effect on the boss projection of probes so you can see the blend distance is one I'm against we're gonna shift it up and look what happens the reflection of this window in the floor it gets further away is is yeah it's mad okay but when it's on zero you can see that they're in the right place keep pressing the wrong button there we go so you can see that they're actually in the right place now this is set to one normally this um blend distance so the blend distance actually means what distance does one probe blend with another probe now if the gap between this probe here and this probe here was one they'd start blending together but it's not so this was one normally and you can see that it doesn't be great things for our box projection it's not the end of the world but I'm gonna rain that in a little bit but I don't want it to be zero so I'm gonna say naught point five that should be acceptable and okay let's give this a play and see what our ball looks like when we give it a look okay so now we can see that this thing's got reflections it's actually a bit more grounded grounded in the world which is very very nice so he's got shadows and it's got reflections on the floor ah this something still not quite right about it which is a shame it's and it's it's lighting it's not being lit correctly as it's moving through the scene and that and also it's reflections of right dodgy when it's in this stairwell er so let's do that let's create another reflection probe for that stairwell so I'm just gonna grab one of them there zoom in on on oh yeah something else I wanted to say as well it might be difficult to work in your scene now well now we've got the shadow blocker here this object it might actually be hard to work in the scene because now it's blocking what you can see but there's something we can do about that if we select it and then go to so we select our shadow caster we go to the mesh render section in the inspector window and twelve down lighting is it in there yep it says here did you do cast shadows is on we can turn them off but we don't want that we still want it to cast shadows but you can say it's two-sided we don't want that but shadows only so if we check shadows only it will still cast shadows but it will just not be visible in the in the world if you like and you can see where our shadow distance is working now if we get far enough away you can see our shadows bleed off but like I said that's not going to matter we exist purely inside this zone here and you can see that we've still got an issue there so let's choose the shadow caster and just turn it to one shadows only yeah that's definitely what we want let's go back to our directional light and see if we can bring this normal bite yeah it's the normal biased again so naught point naught one okay that seems to be working all right what about point two is that what we had before yeah and is back it's probably because we changed the light major deferred now we've got a tweak a few things again and also that has ramifications for our bike as well because we're in a different rendering mode and I think that might affect the lighting model so for the sake of being accurate I'm gonna do another bike and I'll be back in a minute see in a sec let's do another bike well I didn't either bike and it was really really quick so obviously there wasn't a problem with the bike itself even though I changed from forward to deferred it was quite happy with that all the reflection probes are looking nice so let's get a reflection probe in that stairwell so let's choose this one up here it's probably the best candidate and make a copy of this and it's called you at 3 so let's move it to here let's get in another view there we go orthographic let's choose the one above just to see where its bounds end ok I think this is actually gonna be alright so let's do this here I go to the inspector window and change the bounds slightly just so it covers this although they should blend anyway we can bring this down so it's actually in the roof and yeah let's drag this all the way down to the bottom that should be fine something like that as long as it covers the steps its box projected I'm not sure if I won though or not but let's leave it on box projected for the time being and let's bake it okay so it's baked that let's go back in it's actually the ambient for this section now should be correct and oh we can see a little bit of light bleeding here so again let's go to our directional light let's see if this M biasing does anything for that not really it's probably this normal bias yeah is the normal bias I think we're gonna have to consider putting another zero in here that seems to have fixed it I'm not sure a value of zero will cause problems I'm gonna try it under try and let's put this right down to zero that seems to have fixed it doesn't look like there's any problems there okay let's check the ball going up these stairs now it's a net press play I ball travels long we've got some reflections you've got shadows travels in their lens lens to that okay it still looks like it's getting reflections from outside which is really weird I'm not sure why ah that'll be why first of all it's not actually baked but also the bounds of it we didn't check this direction so let's do this and we could do it from the top actually and grab its bounds and blast them in this way and this way great let's bake this hopefully it will actually hold on to his reflections this time come out of this yeah we will get again let's hit play okay so it's going through there yep great turn up the stairs social receiving some laughs decent shadows this tight reflection okay good okay well it's not too bad let's check that it's held onto it yep good good I might take that box projection off we'll see how we go okay so we've got that that's good now the other thing is the light in this looks out of place when we play it we can see that yeah it's moving around but it doesn't appear to be lit correctly as it moves from a dark area to a light area it's lighting doesn't appear to change and it looks pretty almost fluorescent when it's in dark areas which is not good so how do we light dynamic objects because you couldn't you couldn't bake its global illumination as it moves through the scene on every frame that would be way too intensive so unity came up with a lovely way of doing this via light probes now what light probes are they're kind of a matrix of points in space they're basically sample the light in so when you bake the scene they go get baked as well these points and they take light information in all directions I think they call it some kind of spherical spherical harmonics or something like that you noticed it basically creates a point that takes light from every direction so it's like a sample and it basically blends between samples to give dynamic objects sort of like an approximate lighting so let's let's do some light probes let's do that now okay so I'm actually going to create create empty object and I'm going to call this light probes [Music] and I'm going to move this up under reflection probes and then I'm gonna go to create light and then light probe group and then I'm going to put that in our light probes now as you can see we've got this kind of thing going on this little thing with four probes let's make our gizmos bigger so we can actually see the bloody things there we go okay that'll do um hopefully this lot won't get in the way too much and I'm actually gonna zero these out that's zero out our actual null there we go and then where's our like probe group there we go they're there alright so how would we go about setting this up now light probes really this shadows a good example so you'd want this to be darker than this area here if you had a piece of paper on the floor you'd want it to be darker here and lie your hair emceed put a probe there and a probe the other side of the shadow and it blend between them so that's what you'd normally do and seeing as this is just moving along the floor in this room and then moving other stairs and then along here you could just put them there but if you didn't if you if you didn't know what dynamic objects you were adding to the scene and where they were gonna be save up object ly you could pick up and throw into the air it would you'd need probes to be everywhere so we're going to make a grid of probes that's probably the most sort of pragmatic way to do this so I'm gonna move these here in fact I'm going to move them into this corner here and how many do we want right so the way I'd select this is if I grabbed like this the probes have disappeared so what you got do is you actually got a select one and then you can do this so you might think that's strange so I'm just going to move this to this side so we've got you know a sample from both sides of the room but then we've got this chasm in the middle where it's just gonna blend between these probes and we want a little bit more resolution than that so with these probes selected I'm gonna go up here and press duplicate selected so should duplicate them and when I move these now we've got another set of them so there we go I'm gonna do that there and then say duplicate selected and do it again so now we've got a lovely little grid of clones of probes even there and I just want to make sure that these are evenly spaced so I'm just gonna kick these about a bit something like that I'm not going to be too accurate but I'm gonna make these here so it's a bit more square and then I'm gonna go into this view and make sure that they're actually in the right place vertically as well so I'm gonna grab all of them or move them up to their knee that near the ceiling then I'm going to grab these few down here and put them so they're on the floor then I'm gonna duplicate selected these bottom ones and actually move these up here so we've got a little bit more of a have a grid type thing going on then I'm gonna grab these in fact I could grab all of them can I and then say duplicate selected drag them this way so now we've got a lovely little mesh thing going on there and that covers about off the room let's just grab these three and say duplicate selected and then move these here like this and we've got a lovely little grid in this room there so let's zoom in because quitte probes now we've actually got a probe that is behind this box here so that's actually gonna be sort of like no lighting at all so what I might do is actually grab this and move it in and up so we've got like a sample coming from there it's otherwise it's just going to be black it's inside a box you know that's not going to help anyone and then maybe move this here and leave on top of the box maybe we can also add probes where you know we need a little bit more detail or something like that but I'm not going to worry too much I don't want to go too mad okay so what I'm gonna do now is go back into this view here and I'm actually gonna grab these two probes duplicate selected and then move them here and I just want to make sure that I'm not colliding with anything now that looks fine I just wanted to make sure this lip up here I wasn't you know grabbing so now we can go back into our top view and let's move these there like that let's duplicate these again and put them there I might even duplicate them again you might not need this many I mean this is a little bit overkill I've gotta be honest but it's a small scene so we can afford to you know do this do this kind of thing and now I'm going to do it here as well I'm gonna grab these on a duplicate selected and I'm gonna move these two here on the stairs now again because the stairs actually elevate let's see see what we got here yeah okay so they're going through the bottom of the stairs there we don't want that so I'm gonna go to this view orthographic and then we can get a nice clear picture of what's going on I'm gonna grab this lot here and move them up grab that and move that down so it's in the middle then I'm gonna grab all of them and duplicate selected move them this way so again we're off way up the stairs and we don't want it collide with the stairs there so I'm gonna do that grab this one and move it down grab this and again move that down so it's inside this then I'm going to grab all three again duplicate selected move these up so now we've got one at the top of the stairs there that's great there we go move these down so that's there and move these up so they're kind of in the middle there okay so that should be pretty good yeah maybe go to a top view just to check these out I think we could probably move these closer together as well so if I select these and just blew them there it's like these and boom there if you want to roll these lines is basically the relationships and the blend relationships between all this stuff basically now I can grab these duplicate and let's see let's see what I want to do okay I'm going to put two there duplicate select it again and I'm going to put two there I'll screw it I'm gonna do that and then I'm going to select these four duplicate selected move them over here I'm not I don't want to take too long doing this so it's a little bit slapdash but you know that will do nicely all right cool okay so we've got a grid of probes throughout the scene now great I think we can stop edit in these come out the light group so now these need to be baked these need to actually have some probe information baked into them so we're gonna have to do another light baked all's good I think yep so let's get back in the scene let's come out of the light Pro Group and we can turn these gizmos down again because they were massive let's go to the light in tab and generate our line okay guys our light probe group should be baked now I think there might be a way to visualize it if we have a look through here no the light probe group is on ok well let's check hmm that does look different doesn't it it looks like it's let's test this with a box let's create a box 3d object cube yet again we can see that it's actually receiving probe Deo effect if we select our sphere here and actually enlarge our 3d icons you can actually see the probes so you can see this is the light and it's taken from this area and this area of this area in this area so basically what's happening is this dynamic object is sampling all these probes here and then making well actually this probe is a virtual probe so these are the probes that we we made this one this one and this one and based on these probes it makes a fourth probe internally which is basically a mixture of these two light this object pretty clever stuff really it's good good stuff and you can see that the colors changed anyway back to our cube that's receiving data as well from the probes so let's zero this out and check there we go you can see that it's not fluorescent white anymore so it receives real-time lighting date from direct light and everything else from probes so let's just make this cube a little bit smaller not 0.5 by wrong button not point 5 or 0.5 okay there we go so as we move through the scene you can see how this swaps what probes is using to get data and as we move into here you can see the box is actually getting darker and as we move here it gets lighter and if you move here you can see there's receiving light from this area light above but it's not actually it's actually using these probes to generate this lighting and as we move away from the area light it gets darker but you can see how that's using these probes so let's get rid of the cube and let's hit play let's just check our reflections are good if they look good they look good rule looking good up here yep great okay so let's just press play and have a look at our little sphere and see if it still looks out of place that's a lot better that's definitely a lot better it gets darker as it moves into there it doesn't look florescent moves out of here moves up the stairs gets darker as it moves up here yeah that's a lot better I'm really happy with that that's great gets lighter as it moves down there and it does it all again that's great so that's one more thing we can do to make this look rounded there's something else we can do with the post-processing stack actually and let's just make our gizmos tiny again so they're not getting in our way I slipped down this end of the room we can actually add screen space ambient occlusion so let's have a look at that let's choose our post-processing profile and then go down to where are we ambient occlusion so we can open this up there's a dit boom now I'd say that's a little bit of overkill there just a bit do not mean it's it's a bit too much probably need something a bit more subtle but you can see that on our ball it's really helping as well so let's press play again with that turned on and you can see that the Bulls now got a shadow because it's doing screen space ambient occlusion it's actually doing it for the ball so especially as it moves up there it actually saw it grounds it a little bit more but I think this is way too heavy is default saying and if anything actually I'd um I'd heavily suggest there's a guy on the unity asset store called sonic ether and he made a ambient occlusion post-processing effect which is very very efficient let's say it's very good and it's a lot more subtle than this one sod I'd um be after tempted to use that but for this case I'm just going to hone him we're going the post-processing stack so let's do that okay the intensity is at 1 at the moment let's do 0.5 and see what happens okay that's a little bit more so on that's a little bit bow and we can even rain in the radius a little bit so I think that's a bit too much so let's point to maybe that's nothing point 2 yeah that's a little bit more subtle and the sample count is medium yeah I think we're quite good with medium actually it doesn't look too bad so let's play that yes that's a lot more so so we get them reflections we're getting a bit of ambient occlusion under the ball we've got our probe is working really really nicely I'll be getting some clipping there oh yeah that's something I didn't saw out again when we walk up to the wall you can see that is clipping so this is a setting on the camera so let's open up the FPS controller select the first person camera in the inspector window we can see this clipping near and far now a value of 1 is 1 meter so no point 3 is 30 centimeters so let's reduce this down to 0.01 that is 1 centimeter now let's have a look okay so now if we walk into the corner brilliant we're not getting any clipping anymore right up close that's exactly what we want something else you notice as well look at the anti your light aliasing on these stairs you can see the Jaggi jaggedness code on there the stepping and there's a good reason for that when we switched from forward rendering mode to deferred rendering mode the let's get back in our scene the default anti-aliasing no longer works okay so let's actually get somewhere where we can see stepping big-time I mean that's a pretty good example I wouldn't mind it a little bit more extreme to be honest probably something with the diagonal and I know yeah okay something like that that'll do even that window there see a light in dark area you can see the stepping along this line here so let's go to edit project settings and go down to our graphics it's this when we went to deferred rendering here we need we need to go to deferred rendering to be able to use screen space reflection but the upshot doing that is that when we go to edit project settings is it quality yes it says anti-aliasing here and I think this is MSAA or whatever they call it this is actually no longer on so we might as disable this and as you can see it looks exactly the same so now our anti-aliasing has to be a post-processing effect so let's go back to our post-processing profile I'm turnt bloom off I don't really want to mess around too much setting that up the other ring there's nothing to configure here if you cinema4d user and you're doing renders you know that if the Rings good did the ring prevents things like banding that kind of thing and it's really cheap as well so let's turn on dithering you don't have to do anything else with that but we were talking about anti-aliasing here we go anti-aliasing let's turn that on let's let's keep an eye on this edge actually before we turn it on watch that as I turn this on boom it's already smoothed it out slightly so this is on fast approximate anti-aliasing I'm going to leave it on that Lee it's on the default preset but I changed that look at that stepping again and we can see that that's dramatically smoothed that out so let's have a little play now and have a look at the steps yeah our steps seem to be a lot better by the looks of things well there's a little bit going on there okay let's make sure that that's in there yep that's good post place this info file quality about extreme quality that doesn't seem to be changing ink too much okay we got temporal and okay I'm just gonna leave it on on that and see ya see what we get yeah it's better I'm quite happy with that yeah the Lighting's good the ball is moving around pretty good as well yeah it gets darker there we've got a bit of reflection underneath we've got our um we've got a little bit of ambient occlusion screen space and it also seems to be running well still so that's good [Music] yeah all looks good now I think because this outside wall has been turned off no I think that's still good yeah I think we're getting the correct reflections yeah real good but yeah in a short amount of time you've managed to bake a scene we've managed to get some nice reflections and stuff we've managed to get picked get some probes so our dynamic objects look pretty good bit of ambient occlusion it all seems to be running quite well and we're still getting these errors though here on the window which I'm not happy about but what I'm going to do now is a final bake we've got it set up as we want it and I'm gonna go back to the lighting and it seems that we've got everything working as we want so I'm gonna crack up the direct samples to 64 so that's double and I'm actually gonna double the indirect samples as well to two grand leave our bouncers on for the fill trims okay the light map resolution is okay let's have a look yeah I mean it's pretty high and socially see what's going on with these errors here maybe unity is not unwrapping this in the best way maybe there are overlapping light maps in fact we can check if there are aren't with the UV overlap yeah we're getting some UV overlap here which we can see on that painting and we're getting there we getting UV overlap here in here sometimes unit he doesn't like dealing with them dealing with long thin UVs but all in all I don't think that's too bad yeah we've definitely got some problems there so if you're suffering from this kind of thing thank you well first of all this is a really good way of evaluating that the UV overlap and you may want to consider unwrapping these objects yourself if unity is having a tough time there may be a better way to do if we select this and go to the inspector and have a look at these light map set in scaling light map yeah default parameters well there's one more thing that we can do actually so just go back to the shaded view of this I mean it's not bad I mean be you can see that area there it's something weird going on there it doesn't know what to do with it but what I'm gonna do is carry on with the light setting so I've cranked these up that's great light map resolution 60 the light map size is 1024 am I even doubled that if this isn't the size there it will be this is the biggest it can be so it might still only need I mean you can see one directional light map 1024 by 1024 it still might only need 1024 by 1024 and not actually need to go to a 2048 light map the thing that determines that is the light map resolution if I push this up to 120 I like double what it is now would then he would after that it would use that and if this was set to 124 by you know 1024 and I push this up to 120 it probably give me a message saying object as reaches maximum size in the light map or some like that so it's sort of playing with these two things really compressed lightmaps is on I'm actually going to turn that off it might give us a slightly better quality although maybe not may not be that noticeable the other thing is this light map Ram is the bomb so it's on default medium at the moment I'm actually going to create your new one and like a new post-processing profile it's created this new light map parameters so now the scene is using these parameters so if we click on these parameters and go to inspector we can have a look at some of the settings here okay so we've got loads of stuff at the top we can completely ignore because this is under pre computed real time GI we're not using that if I go back to light like and we used we using Bates mixed light in here and as you can see we've turned off the real-time lighting so all of these settings up top can be completely disregarded answer your lazing samples they're basically smoothing out of the samples as far as I'm aware and I see what the bubble says the maximum number of times to super sampler Texel to reduce a lazing progressive light map for super samples the position and normal buffers blah blah blah it basically smoothes it out so let's double that the push off and the bait tag they can remain the same now if you go down to back face tolerance I've had in scenes before where we're getting errors like this like this here and it's nothing to do with over lapping light maps in fact did I look at that in the UV overlap let's have a look well there's no overlapping movies there so that obviously isn't the problem and sometimes it's the fact that this back face tolerance is too high so are actually gonna lower this I wonder what the bubble says about this the percentage of rays shot from an output text so that must hit front faces to be considered usable right okay well I'm gonna lower this to 0.4 and see if that helps so yeah that's our settings now of lightmap parameters for this so I'm gonna do a final bake at this ridiculous lastly that's not even ridiculous you probably want more than that for a final bake further depending on the scene and the size and all that kind of stuff but I'm gonna bake this and we'll come back in a minute okay the bake is done and yet we're looking good and looky here oh look that problem that we were having is gone and I highly suspect in fact I'm pretty sure that that issue was caused by was caused by this push off value where is it there we go yeah this back face tolerant value even I think that was what the issue was so let's give this a little play and see what we can see in fact let me come out of that and maximize go to our game window maximize on play play boom okay so that's looking good that the div the rings okay actually it's not too bad that looks alright yes that's it guys yeah that's how you use the progressive light mapper and we got some extra bonus stuff on top of that as well with the light probes reflection probes we've also done some post-processing as well so that's a real sort of basic simple look at our together after decent result out of the progressive lineup vamper my viewers on youtube don't forget to Like and subscribe and hit that Bell to get tutorial notifications you can also check me out at digital meat dot uk' where you can filter my tutorials by category you can also follow me on social media links in the description and the footer of my website if you'd like to support digital meat this can be done via patreon or the support page on the website but if you'd like to support digital meat and get extra tutorial content you can purchase the Prime membership in the store at digital meat UK for winding down I have a second channel beef doctor where I do game streams link in the description and the footer of my website okay thanks for watching guys ohyeah [Music] you [Applause]
Info
Channel: DIGITAL MEAT
Views: 35,916
Rating: 4.9427891 out of 5
Keywords: Digitalmeat.uk, Cinema 4D, C4D, Cinema4D, Digitalmeat, Greyscale Gorilla, GreyscaleGorilla, 3D, Workflow, Cinema 4D Workflow, C4D Workflow, Tutorial, Tutorials, Cinema 4D Tutorial, Cinema 4d Tutorials, C4D Tutorial, Unity, Unity3D, Unity 3D, C4D to Unity, Cinema 4D to Unity, FBX settings, FBX, Progressive Lightmapper, Progressive Lightmapping, Lightmapping, Lightmapper, Reflection Probes, Light Probes, Post Effects, Post Processing Effects
Id: bJcdBgKq-Fg
Channel Id: undefined
Length: 129min 43sec (7783 seconds)
Published: Tue Jun 12 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.