UE4: An Advanced Real Time Arch Viz Project | Adam Zollinger | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

UE4: An Advanced Real Time Arch Viz Project

teacher avatar Adam Zollinger, Professional Arch Viz Artist / Teacher

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

42 Lessons (5h 2m)
    • 1. Intro to the Course

    • 2. Get The Correct Software

    • 3. Exporting from 3ds Max Using Datasmith

    • 4. Start a Template Project and Import Your Project

    • 5. Set up Your Level and Navigation in UE4

    • 6. Adjusting V-Ray Materials in UE4

    • 7. Create and Apply New Materials - Bamboo Leaves

    • 8. Use Free Substance Materials in Your Scene

    • 9. Finishing Up Our Materials

    • 10. Adding Area Lights and Spot Lights

    • 11. Setting Up Sun and Environment Light With HDRI

    • 12. Finishing Up Model, Lighting and Materials

    • 13. Setting Up For Light Baking

    • 14. Lightmass Importance Volume and Portals

    • 15. Lightmap Optimization on Each Object

    • 16. Light Bake Quality Settings

    • 17. Additional Lighting Effects - Polishing Off Our Lighting

    • 18. Place Bamboo Models Around Your Scene

    • 19. Get Some High Quality Foliage Models from Epic Games

    • 20. Using the Foliage Tool

    • 21. Adding Trees To Your Scene

    • 22. Screen Space Reflections and Baked Reflection Captures

    • 23. Placing and Using Cine Camera Actors

    • 24. Post Processing Settings

    • 25. High Resolution Screen Shots

    • 26. Another Still Shot and More Camera Settings

    • 27. Render Animation Sequences With Level Sequence

    • 28. Animating Objects in Your Scene

    • 29. Section Conclusion

    • 30. Basic First Person Navigation

    • 31. Adjusting Inputs / Setting Up Custom Inputs

    • 32. Level of Detail (LOD) Optimizations

    • 33. Material Parameter Collections

    • 34. Dynamic Color Changes

    • 35. Turning On and Off Lights Dynamically

    • 36. Basic UI

    • 37. Changing Materials With UI Buttons

    • 38. More UI Controls

    • 39. Optimizing For VR

    • 40. Importing VR Functionality From Pre-Built Templates

    • 41. 41 Nav Mesh Setup

    • 42. 42 VR Button Interaction

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class


*Latest Software

**More content being added regularly

***NOTE: This is a project based course in which a large amount of 3d content will be provided to your for download. The content is yours to use for the course and other purposes. (No resale)

Content Provided to Students:

  • Complete house model (3ds Max + V-Ray / 3ds Max + Corona / .fbx / sketchUp)

  • All necessary texture maps / materials

  • Various furniture models with all materials applied

  • Various object models with materials

  • Foliage Models

  • Models / Materials can be used in both 3ds Max and UE4 (also in .fbx and sketchUp)

  • All models are UVW mapped / unwrapped as necessary


In this course, you will learn everything you need to know about architectural visualization using real time technology with Unreal Engine (UE4), the most advanced and professional real time tool available to arch viz artists (It's also free). You will also make use of Datasmith, a tool designed to translate your 3d rendering projects into real time (projects can come from 3ds Max, Revit, SketchUp, etc.) The course will be split into several large sections, with some sections coming later as software and techniques evolve.


In the first part of the course, the focus will be on transitioning an existing 3d rendering project into real time UE4. You will learn to achieve photo realism with your materials, lighting and post-processing, all using built-in real time tools. From there, students will generate photo realistic animations and renderings that render in REAL TIME! No more waiting for overnight renderings. Change your camera motions, object animations, camera / lighting effects all with immediate feedback.

Topics included:

  • importing using datasmith

  • UE4 materials

  • Lighting techniques and settings

  • Perfect light bakes

  • Fixing Errors

  • Photorealism

  • Animating Cameras and Objects

  • Level Sequencer

  • Lighting with HDRI

  • Foliage / Landscaping

  • Much More

SECTION II: (coming soon)

In this section, students will convert and optimize their scene for desktop navigation so that it can be shared with others, and navigated in real time on any computer. We will explore interactivity in this section and start learning about blueprints. Students will also learn to use the UE4 widget system to create interactive menus, buttons, etc.

SECTION III: (coming soon)

Students will optimize their project for VR navigation using a headset. We will look at specific interaction blueprints for VR, and approach the project in a way that gives the best interactive and immersive experience.

Meet Your Teacher

Teacher Profile Image

Adam Zollinger

Professional Arch Viz Artist / Teacher



Adam has been working as a professional (and award winning) 3d artist for over 10 years, but his expertise does not stop there.  He has also authored / illustrated a children's book, and created graphics for numerous mobile games, and has been teaching 3d graphics professionally for 5 years.  He has expert knowledge in the following programs: 


3ds Max




After Effects

Unreal Engine 4


Various other software programs and plugins

Most importantly, he has dedicated himself to lifelong learning, and he loves to teach others as well. 


From the artist: 

"I mostly work in the Architectural Visualization industry. ... See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Intro to the Course: Hi, I'm Adam Salinger and I'm an archivist professional and have been for over 15 years have also been teaching People Archive is for over four years now, using software such as three DS Max Veer, a photo shop and Unreal engine four. I think I'm uniquely qualified to teach Archive is because I taught myself via the Internet through a long and arduous process. So now I know how to cut through all of that and make it much more efficient and fast for you to learn in this course you. Before an advanced real time ark vis project way, we're going to create a professional level, real time project using the industry standard for high quality, real time graphics. Unreal Engine Four Real time technology has really advanced in the last five years, and it enables us to do many exciting things that were previously impossible in the world of architectural visualisation or are viz. The first part of this course will focus on taking a fully developed three DS max and beer a project into real time. All the models and materials are available for you to download, which is a huge bonus. Feel free to add the assets to your personal library way will explore how to use you before an extremely advanced and powerful gaming engine to render an animate are seen with instant results. No more rendering overnight or outsourcing to render farms even for animations. The next part of the course, which is currently in development, will focus on setting up our scene for real time navigation both on a desktop and in a VR headset. Finally, we will get into blueprints for our views and start adding in functionality and interactivity toe our virtual spaces. There's simply no better way to quickly and effectively communicate your architectural ideas than with real time technology in Unreal Engine for so start learning today. 2. Get The Correct Software: first and foremost, let's download on really studio, which we go to unrelenting dot com and go to enterprise on real studio. And here we have the promo video that they're showing. But you can just go right here and say Get the free bait and now takes you to this page where you will see download unrealized studio which is what you want and this will give you the epic installer. From there you can install Thea unreal engine with unreal studio available which will look like this and then you out the chance with this unrealistic Dio beta to install these others plug ins. Okay, welcome in, everybody. Hopefully you have watched the promo video, the introduction to what we're gonna do in this course. And now, before we get started, we got to do some housekeeping items. So make sure first that you have downloaded on really engine and I'm using for 20 you There is now for 21 available and that is fine as well. But you need to make sure that you have the proper installed plug ins. So I have you can see on riel Data Smith is installed here, needs an update OK, Install two engine down if you go down here to unrealistic Dio beta beta inside your your epic games. Launcher library. Unreal Studio beta. We can install the UN really Data Smith two engine and that enables us to import data. Smith objects to export the data. Smith objects in the first place. You will need to get exporter plug ins. Just gonna come up over here. Okay, These you can see there's Autodesk three ds max Exporter sketch a pro exporter auto Dis rabbit exporter. So those are the three big guys. You tell it which engine you wanted to work for, and then you download it and install it and it will run directly inside those Softwares. And when you go to export out of these Softwares, as you will see that there is now a Data Smith option available for export. Once you have those Softwares installed, you're ready to go. You will need three DS max to open my three DS max file or I've also exported out the data Smith files directly with asset folders so that you can import the data Smith and it will reference all those asset folders to create the objects in Unreal Engine four to get those want to look at a few other things about the course. I've got a preview of what the course should look like, and this was This is what your dashboard will look like. And the overview the course content The Q and A. First let's talk about the Q and a little bit. This is a great place for you to introduce yourself and say Hi, I'm so and so from this country. And participating here in the Q and A is a good way to get the most out of this course because I answer questions here frequently, you can see there's already been some questions asked with some answers given and you can search for other people's questions here. Or you can ask a new question in the course content in the first section as the course exists, right at this moment, it will probably look a little different by the time you get to it. But in the first section there will be a article that has the downloads for the models. So once you come here, it will take you to Google Drive, where you can download the House B 06 Zip, which is the three DS max file, with all the materials archived in with it. So it's a Zip folder containing everything you need, or you can go into your respective Data Smith folder. Whichever version you have. Go in here and you'll see the asset folders and the actual data Smith Export, which is a small file. It's just some information. All the assets are actually found in here. Okay, so that's the course that said, you navigate around all the other content is here and you can just get going. But make sure to use the Q and A, and I hope you get the most out of this course by participating and that you enjoy the things that you learn. Please let me know if anything with the file downloads doesn't work in the Q and A section 3. Exporting from 3ds Max Using Datasmith: Okay, let's get started with our file. If we open the provided file, this is what we should see. This is in three D Studio Max, and it's pretty much ready to be exported. You'll notice that everything looks like a normal three DS max file. I do only have single objects, even though in the real time thing this lounge chair, for example, will be copied many times. But I'm only gonna export at once because then, in unreal engine, I only have this static mesh loaded into the file one time, and I could just copy it around instead of loading in several different static measures for the same object. Okay, so that's a little bit of an optimization tip. We will have the same thing going on here like there's one bar stool. There's one dining room chair, one place setting, etcetera. Okay. And the materials air all applied these materials I'm giving to you that I've made and we're ready to export as long as we've got our software set up properly. So all we have to do is say file export and we'll search down here for data. Smith, which should be here, is long and he floated it correctly. And here's a lot of the things I've been doing. But let's call this one student export all visible objects. Okay, Now that'll take a second. Because I've got a lot of geometry and a lot of materials that are coming through. With that, we're ready to move on to the next lecture. We will let that export give it a minute, and then I will see you. An unrelenting in where we will use a template to start are unreal engine file. And then we will import what we're exporting right now. So next lecture. 4. Start a Template Project and Import Your Project: okay when we opened you before we will see our existing projects. But we want to go to new project. And here we have the tablets Unreal studio. And this only gives you a few options for templates, a blank template or the product you were. Neither of those is what we want. Exactly. So we can just go to the blueprint tab here, and what we're going to do for this project is start with first person. And the reason we're going to do that is because for the first part of the course, we're going to be setting up. Our are seen to be rendered an animated, and so first person fits It gives us the quality that we want. It's higher quality than like a BR, For example, at VR has lower setting so it could run at higher frame rate. At first, we're not too worried about frame rates, so we can simply use this. We'll get rid of the gun and we won't use a lot of the navigation at first, but we will later. But long story. Sure, this is the best template that we can use for our current needs, so we can do that. We can set up with desktop console maximum quality, and we can even add starter content. Okay, And let's call it student house. Create project. Make sure it's going to the right place for you. This is unrelenting 4.20 dot too, by the way, and many other releases of Unreal Engine will work, I believe there's already for about 21 as we speak, and that's OK, then features that I'm using are going to apply broadly. The only thing you need to make sure is that, of course, you have un really studio in Data Smith installed with your current version. Once the template loads, you'll see something like this. This is the basic level in here first person template. What we want to do is just create a new level. So we go to file new level, we can use the default, and then we'll save this level as a new name, which can be well, first of all we can do is make a new folder, call it maps and then save it in here and call it house. So what we have in this level, we just have direct light, and this Ferric fog, skylight, spear reflection, capture and a player start for our navigation. And then we just have this one object here, which we can delete. You need to look and make sure that you have import data Smith. Right here. That means Data Smith is working and attached to this project. If it's not there, you might be on a different version or something, or you don't have it properly installed. But one thing you can do is go to settings plug ins, and then you can go down to unrealistic Dio. And because it's already working, this is this is all good. But if this wasn't enabled, you can enable your data Smith importers here, and it would make you reset. You would then convert your project to a Data Smith project. And after reset, you would I have this button here. Okay. With the button, we just hit import data Smith and find the export that we did previously. Click on student export. You can put it wherever you want in your content browser making your folder, if you need to. I put in the geometry folder. Actually, I'm gonna make a new folder that just says Let's see. New folder data Smith import. We want to import the geometry, the materials. I'm gonna leave the lights and cameras out. I don't know that I even have any of those, but I'm going to do all lighting in un, really engine. You go to the static mesh options, make sure that we're in the white right range and we'll go over this more later. But make sure that our light map resolution is in the right range. Minimum 64 is probably fine for lots of small objects. 64 is great Max light resolution. I think we would want to go higher like 10 24 maybe even 2048. We don't want to overdo it, but the closer we get this to correct, the less will have to go in and manually adjust everything later. I'm gonna leave it at 2048 as the maximum and say import and again, this will take a minute. So what? Let's let Data Smith do its thing 5. Set up Your Level and Navigation in UE4: Okay, So after everything is imported, here's where we're at from the outside, it looks like this. It took a while for all the materials to compile in things and for everything to come in. But it looks pretty decent, and you can see there's not really any lighting going on inside or anything like that. The direct light is coming through the window as a stationary light. You can see that a few of the materials didn't come through properly. And those are things I could have fixed in three DS Max and V Ray by making them a little different, adjusting them a little bit. But I want to actually show you what it's like to just bring a straight up three DS max file into unrelenting in. And the fact of the matter is sometimes data. Smith will not translate things perfectly. For whatever reason, this material, this would material is not coming across, and that's fine. We will get to that later. How to adjust that? It's a very simple fix in this case, but we will look at all the materials, make sure everything is working properly eventually, But first, let's get our level set up like we normally need for all levels that we have in our canoes and make sure that everything is working properly. And then we'll jump to starting to refine things that have come in. So in this level, remember, it is a default level, and it just has these few things over here. So we are going to want some of our basic stuff. And those are volumes which would be light mass volume, a light, mass important volume. Drag that in. And, as you probably know, this is just a volume telling the U E for light baking engine. Where to concentrate. It's efforts so that it's not trying to light the entire scene, but rather it's trying to focus its efforts in an area where it matters for your project. Okay, so if we hit space bar with that selected, we can then get to scale and we want to scale it so that it takes in our entire scene space bar again to go to move. We'll move it into place here. So although we need to do here is just make sure it encompasses air seeing, so that when the lighting the light bakes specifically happens, then we are covered for all the lighting that we need to make it a little taller. Go from view, make sure it's right in the right place. That should do it right there. Now we need another volume as well, which would be a post process volume. And we'll do a similar thing. Just get the right size, and this will encompass are seen as well, and it will tell it where to apply our post processing effects. Now, the way we're going to do it, this post processing becomes a little less essential. But this makes it so that in real time everywhere we navigate around, we're seeing post processing. You can also do post processing in the cameras that we're going to set up, and so that's why you may or may not need this post processing volume. But this way, when we are just navigating around any post processing we have in that post pressing volume will be showing to us as we go around what we're going to do for navigation in this is change. Right now we're in first person templates, so when we start our level, we will be holding a gun as the first person character. And that got a little the shoot. When we click the button, we don't want any of that. So we can actually take this player start and we'll get rid of it entirely. And we'll bring in an archivist character over here from a content browser. We will just drag in an archivist character. Make sure he's above the floor for the floor. We will need to click on the static mesh and bring up the static. Mish editor, click on this and make sure there's a collision. Add box simplifies collision. Okay. Already had one on there. You probably will not. Okay, so this green line around here represents our collision. So this does have a collision. You can show it by turning it on and off here. Okay, so this does have a collision. Now we will not fall through when we start our archivist character here. We need to make sure that that is what activates when we push play here. So with the archivist character selected, the only thing we need to do is make sure that it is being auto possessed by player zero, which is the first player in our game, and when we hit play now we should have a nice archivist character. And the reason I used the Archivist character is because it moves a little smoother and nicer than a first person character, which is kind of running around real fast. Let's get back in here, Okay, so we'll need to put some more collisions on and things like that. We could put some collisions out here on this object, and that will be our basic navigation in our basic level Set up. Now, we'll talk more about this later, but for now, we're just gonna be taking still shots and animations, so we don't have to worry about the effectiveness of the navigation too much yet. But it's still a good way for us to look around in our scene and make sure that everything is working right. This ground needs is collision as well. If you open the static mesh editor and add a box simplified collision save. Okay. Oh, and the last thing was, you can see that left over from the first person shooter game. Is this red cross hair in the middle of our scene, which we, of course, do not want for architectural stuff. So let's just delete that real quick in the content folder. If we type in H u D heads up display and you can see there's a heads up display component made here. If we click on it, open it. Basically, it's just a blueprint saying to cut the screen in half and put a tiny red line right in the middle of it. And all we have to do is just all click right there to break that link, compile and save. That makes it so that it's not doing anything anymore. And there we go Case are levels basically set up? We can navigate around it either in game mode or just in the editor mode, and we have our light mass importance while you're set up in our post processing volume set up and everything is ready to go. So let's move on 6. Adjusting V-Ray Materials in UE4: Okay, now that our levels kind of set up, let's go in and start adjusting materials. Let's take a look First of these ones that didn't come in properly, we'll take this. No, there's a leaf right there. We don't want Let's look at this material So this chair would underscore One is what's not working and it's giving me an heir right here. You can see with this big right? This big red air message here that that is my problem. And you can see this is a normal map that came in from three DS max. And the problem I can see right away is that sampler type is set to color. I said that to normal. That air goes away and I can hit save, and you can see my chair is now my chair. Material is now showing up properly, So when this imports, if you double click on this map, you can see it came in and Unreal Engine knew it was a normal map. You can see right here it put it under texture. Group World's normal map and compression settings. Normal map. So it knew it was one. But for whatever reason, it did not translate right here in the normal map slot to be set to sampler type normal so that through an air and we fixed it and everything's working great now. So let's see back in our scene, that should show up. Yes, there it ISS. Let's see what's going on here. This might be the same material table would. OK, so it's a different name. Similar material, probably similar problem. Normal map needs to be set to normal. So a few of these issues are to be expected because data Smith doesn't figure out everything exactly perfectly. And I want to show you that you can get everything up and running without having to go back to Max. So I want to make this as an example of a rendering project you did in three days. Maxwell's be Ray without any additional adjustments. You bring it into unreal with data Smith, and you get it all working. So some of these problems are to be expected, and we're going to address them all and get this thing up and running completely. Okay? This object has become apparently missing material altogether. We can address that later. One thing I want to look at Is these plant materials here these air Not right, because Well, if you look at the back of a leaf than it is incorrect, it's invisible. Can't see it. So let's go into this material and I'll show you how to adjust. One thing is with Data Smith is it brings in kind of grouped objects like this, and so you need to make sure you're on the right thing. If you go down to the bottom with the underscore pivot object, that's where the material will be applied. And the reason it does that is so that so that all your pivot points can be in the right place. And everything can be edita ble properly, no matter how you made them in three DS max. So that's something to keep in mind. As you're using Data Smith. It actually makes this little component that could be moved around like this. Otherwise, if you remember when you used to bring things in with FB X, the pivot would be at 000 no matter what, and it would be impossible to edit this thing properly. So Data Smith handles that by making these little grouped objects. OK, but the object we actually want edit is down here and we can go into the material by clicking here. Of course. Okay, inside here we can make sure that this is double sided Weaken Set the shading model to I actually want to do surfacing Opaque is good. Instead of putting it to two sided foliage, I want to put it to subsurface subsurface And now that gives us the ability to make it look like light is shining right through it. And the way I'm going to do that is by doing some basic you can see that opens up this tab here. So I'm going to do is drag this out and do a multiply. And I basically want to take this as the subsurface color. Let's go into the Green Channel only. No, sorry. Let's go into the RGB channel. And then what we can do is multiply that by kind of a light green to make it so that it's kind of translucent looking. So let's do a three vector constant three vector which is in RG be value and we're gonna multiply it times that and that's all going to go to create our sub surface map so similar to three DS max when you, like turned up and down the influence of maps rights were taking that map and lightning it by multiplying. It turns this, and we could do similar things with, like speculator Weaken, do a Multiply Here and run it right into the Green Channel of this, which is a black and white channel that tells it to be speculator in certain areas. And then what you can do is multiply it here, say, by six. That's gonna make it super reflective. In some areas, if you put it to zero, it will multiply by zero. And no, it's now. It's no longer reflective, right? And then you can think about the roughness. Let's say we want to make it shiny. Er, you can put it 2.2. The roughness, as translated to V Ray, would be like glossy nous level, except it's inverted. Zero Roughness is totally shiny, and one roughness is totally dull, so you can see that's too reflective that could be affected by our speculator. Multiplier here said it to to see what it looks like. Still too much 0.5. That's probably about right, maybe and come back and fine tune that later. But there we go. There's a reflective leaf that's also slightly translucent. It's got some subsurface scattering type effects going on on it that should cover it for the leaf. And, of course, none of that would have come through perfectly from the ray. And very Regis had kind of a map applied. But now we have our leaf, and from the back side it looks nice. And if we shine some light on it, it even has a little bit of subsurface scattering going on, which is awesome. Let's look at the glass real quick because it it always looks a little kind of foggy as it comes in from Vera. If we go into the material itself, we will see that there is in enormous matrix of nodes going on here, and it's all just trying to do the math for what was happening. In very case of the A pass ity is being has all these different notes on it. It's like ridiculous case of these are all just math math going on to try and get the right for Nell effects like that. I think It's totally overkill. So I'm going to kind of, ah, blow this all out and just make a very simple glass instead. That gives us a pretty similar effect. And keep in mind, having very complex materials like this also causes performance issues later. And we'll look at that when we talk about optimization. But we can simplify this quite a big. I believe I've gotten pretty good effects with what I'm about to show you for my glass material. Let's just put it at a base color of black like we would normally hand be right. So to do that, we can do the three Vector. You can get a three vector note to come up by holding down three and pressing the left mouse key. Let's drag that into the base color. We can leave it as black metallic. We're not going to need speculator we will need, but we're already hooked up to a bunch of Well, I guess we're hooked up to this 13 vector right here, which is fine. We'll just use that one basic three vector and this is basically a map telling you how much speculate reflection tohave. Okay, so we could even put that all way up. 211 and one and then in the roughness point No. Two is fine. So basically, it's basically like a mere reflection, and you can see here, look how nice That's working already, even with all this stuff kind of disconnected. Now, the other thing I've noticed and I haven't got this to work exactly right. But the refraction, one thing we should mention here is with the glass were on surface for material domain blend mode is translucent. Okay. And so there's the refraction. Note is available to us here because Ron Translucent. What I've noticed is this is that this refraction with the friend l note it often just distorts things in a weird way. If we turn it off entirely by disconnecting it, holding down, all clicking there, we can still get something that looks like glass in our case. And we don't need to worry about a lot of refraction going on. If this was on a bottle or something, where there'd be a lot of distortion going on as you looked at the bottle, I think that'd be great. In this case, we're just looking through a giant window pane. And so I don't think we need a ton of distortion going on through that window and you'll see if you leave it like that. If you look at things at a weird angle, it will do some weird distortion for you because unlike V Ray, it's faking a lot of things, and sometimes it just doesn't look right. So that's our glass. Let's look at it one more time. Basically, you can either leave these here or just get rid of them entirely. Oh, what? I didn't discusses the opacity. This is where a lot of that stuff is going on. But we can just put a constant for an opacity. Right? Capacity is essentially a constant, so I just put it at 0.2 or no point to let's try 0.0.2 and save. So what that glass material is trying to figure out was basically our final effects coming out of the ray. But im simplifying it a ton because we just need to get it to read right, and I believe this material will read pretty well. There you go. So there's a material you still have that nice reflection going on and the glass is no longer gonna look cloudy when we do our final image and everything should work just fine. We still have a reflection, as you can see, so everything is good there. We have our leaf set up. There's other materials we could go in and tweak. You can see this one has stopped displaying properly. If we go into that dark wood material, this one is a blend in Vera. It's causing certain problems. It makes functions for each different material that were in the blend. And here we have to string up the different materials has different parts of the blend and then save, and there it is. So this is a good look at some of the different problems we might encounter and some of the different adjustments that we need to make to make materials work coming straight out of your way. In the next lecture, we're gonna look at this bamboo out here which has come in which the material is completely wrong on this. So we're going to bring in a material, basically import a bunch of maps and make a material from scratch for this bamboo. I will provide the maps for you, so don't worry about that, and we'll just see an example of how to do it, So let's move on to that. 7. Create and Apply New Materials - Bamboo Leaves: okay for this Bamboo out here. Let's get this all set up. Okay? Right now, there is a diffuse channel on there, and that's basically all that we're seeing. It looks like that that's not gonna cut it. So what we're gonna do is go into our maps folder and do an import. I'm gonna go find my bamboo maps, which I've made. So I have a normal and opacity speculator in the subsurface scattering and the diffuse. I think that if uses probably already in here. Okay, let's open. And we're just importing all those maps right there. Okay, Now, let's go into this material on this bamboo and will actually go on. Apply all this. Now, remember, this is actually a little scene component, And inside of that component is the actual static mesh that we want to adjust and that will have our material on it. So this material right here is what we want. Okay, So are based. Color is their great. We need to make sure first that are materialist set up with the proper parameters. Here. This will be the shading model. Let's see this one opaque. We want this blend mode to not be opaque, but to be masked. Okay, We want it to be two sided. And we could go with two sided foliage here or sub surface scattering. Okay, Now it's just a matter of bringing in our maps. So the Novi one, of course, is texture sample. We can copy this one and paste it. Control C control V for speculator. We aren't going to need this. This came in from the ray. We don't need that. We can leave the reference the roughness as a constant because we don't have a map for that . Now, this one we can use for speculator. And we just need to Of course, said it to the next map that we have for our speculator and not the diffuse. So that would be right here. Bamboo branch speculator. One of the biggest ones is gonna be the opacity mask because this is now a masked material , which means we have a slot for opacity mask. Let's put that on on so we can see what it looks like. Just go right there, starting to look pretty nice. We can do a normal map. Okay? So you can see that's starting to look like leaves and then we can do the subsurface color as well. There we go. Okay, so there's our leaf material. Let's hit, save and go back and look and we can adjust the roughness or things like that Weaken do various different things, but pretty much that's what we want for our bamboo texture. There we go. Now, of course, this could be copied around, however we need. Scale it up, do whatever we want. Let's turn off the snapping on the scale can even rotate it except that it's modeled pretty much to make it so that it goes flat up against that wall. OK, but you get the idea. We've got our material now we can put our bamboo all over our scene and everything is good . Okay, so that is a bamboo material that we brought in and created ourselves using maps 8. Use Free Substance Materials in Your Scene: Let's look at one other element of materials and that is thesis substance materials that are free and very cool that come with unreal studio and data Smith to use them. We go to settings plug ins, and it's the first thing we see here. But if it's not, then you go to substance and make sure that substance is enabled. If you don't have substance installed, you can do that from the engine launcher and add this substance. Plug in to your own RL engine and then you will be able to use it and we'll to enable that you will require restart. Make sure everything is safe to restart when it comes back. Will be with substance. Okay, that was fast. We're back. Open our level again. Okay, Now we will see. Right here we have this substance source button. If that plug in is working properly inside the source, we will need to log in and then we'll be able to see all the materials. Okay, These air not displaying for me properly. But they will be for you. I'm having video card problems or something. But if you go to included with unreal studio, you will see all the materials that you can get. There's 110 that are included for free once you sign in. And then, uh, I'm just gonna go to this white marble and hit the download and that will import it into my scene. Okay? And it actually looks like this. There you go. This is a cool material, and these air all set up with maps that worked very nicely. They're very photo realistic. Okay, so we can use this on my countertop here. Now you'll see that the mapping is wrong, because in Max, I was using real world scale, and this is not using riel world scale, so everything is a little bit different. That's easy to fix. We go into our material again and do a texture coordinate type correctly here, coordinate texture, coordinate. And we'll set that up to go to affect all the maps at the same time, because we want them all to map the same. And basically, if we're in real world scale in max than in here with a one by one tile, we would probably want this set to tile it like 10.2 Something like that. You hit Save There. Now it's mapping basically right. Maybe that's a little too big. Or definitely that's a little too big Tri Pointe 05 Okay, sure, we'll take that. Now. The nice thing about substances. First of all, you can see it's a great material, has great maps, but it's more powerful than just that. If we go to white marble instance, which you can see when we created when we downloaded the white marble material, it comes with all these settings. So there's all the maps, but here's this instance here. Substance graph. Instance. When we click on that, we bring up all these parameters that we can adjust and the material will adjust in real time. So here's our material so we can do something like we can change the color, right? Let's just make it orange and there's our material. So these are all parameters that can be adjusted on that material. You can change the roughness Case announced very dull, and now it's very shiny. Let's put it back toe white so it doesn't hurt our eyes any longer. Okay, White. And there we go. Eso You can see all the different parameters that could be said here. This one isn't. You have too much control over this one. You can change the randomize seed, and you can see that's changing the marble, which that's pretty cool. So it's kind of like a procedural material, and we're just changing the inputs for it. And it is adjusting in a very nice way in a very photo realistic way. So these substance materials are awesome. Down here, you can you can do different adjustments in the technical parameters, these air, the main adjustments that we can do on this material on some of the substance materials, we can adjust more things. For example, if we use the substance brick material, we could adjust the coursing in real time here and see it all updated in a photo realistic way. So these are awesome assets that are worth checking out. Okay, so there is the one that came in from beer A. And there's the substance. When the substance one is looking better, it's cool. Yeah, totally better. Okay, so that's an interesting, interesting thing that we can explore now. Remember that there is 112 110 different materials that come for free when when you are a member of unreleased studio. So there's lots of different things in there that you can use that can really make your scene look very sharp. And that is a great asset to make use off and again, you can get the base material and kind of make it look like a lot of different things because it's got that those parameters in there that are adjustable to keep that in mind. Okay, we're gonna move on to the next video in just kind of get all our materials squared away, and I'll lead you through it as we go, and and then we will eventually be able to move on to adding some lighting toe are seen. 9. Finishing Up Our Materials: The only thing left to do here is just get all the materials up and running as we want, and I can see that there's some that are kind of messed up, some that I want to adjust, etcetera, etcetera. So here. Okay, let's take this light. For example. We want these light bulbs to be self illuminated, so changed this material to instead of opaque. Sorry, no, we want to mess with the shading model. So instead of default lit, we wanted to be unlit, and that opens up are in missive color slot, which we will do a multiply note out of there, plug it into our diffuse color, and then for R B node in our multiply, we'll just turn it up. That turns up our light. So we're multiplying that color by 10 and that gives it a self elimination. There we go, and we'll see that some of the light bulbs are missing that texture. So if we go into our content browser and type in light bulb and find that texture, we can make sure that the other elements in here have as well like that. We'll need to do the same on this light over here. This material like I mentioned before is a blend material. It's having issues staying linked up. OK, this is missing a material together. There's a material in here called brass. Okay, this brass clock material. So I'm going apply that here. I'm gonna apply that to a lot of other things too. But I actually want to drive just the brass to S O N v Ray. This wasn't set up ideally for what we wanted here specifically because we needed to be a metallic material. So let's hold down one and hit the left mouse button. That brings up a constant for us. We'll string that into metallic, and we know that metallic is basically a switch on and off. Zero means it's not metal. One means it is metal, and changing it to metal changes the way that it reflects it. Changes are shading model essentially and now we have a nice brass looking material and all we would need to do is adjust our colors and our values for how much speculated has in those kind of things. Roughness. They could maybe said it lower 2.2. And here, instead of de saturating this. I think I'm gonna multiply this. Now. Keep in mind there's a 1,000,000 nodes we can use inside of here. And I am scratching the surface for you. Showing kind of some of the essential things that will make sense to archive is artists that are coming from three DS max of your A to get your materials up and running Fastest way and Aegis way possible. But make no mistake, this material editor and these notes in here give you a lot of power to do basically anything you can imagine. You just have to understand what all the notes do, which is no small task. Let's care speculators going. Let's do Let's lighten up the overall color of the brass. Okay, great. Now I think we're about there, Actually, let's turn down the roughness a little bit. Make it more of a mat. There you go. Okay. Safe. We'll just leave it right there. Go back. There's our brass. I want to put that actually on here too. It was actually made for this clock up here. Brass clock elements. 11 of these elements is missing. Something that needs to be chair. Would one Okay, so I'm just going through and fixing all my mistakes. Chair would one. Okay, clock is ready to go. This one is going to get the brass treatment. There's a material missing here. Oh, for this one, I want to do a substance material. So for that share, I'm gonna put this substance material called Leather turned Matt on it. Okay, so let's apply it and see how it looks in the first place. Oh, yeah, that's nice. Okay, are gonna leave it mostly like that. And I just want to make sure that in this instance, the color's good scratches, scratches, amount, handing scratches, which looked kind of funny. So let's not do those dirtiness. Maybe a little bit of dirtiness. But really, what I want to adjust is its roughness. So what I can do for that is going to the the mat, the material change these parameters. Let's see. So for roughness, we have a map. It's just at a multiplier in there before it gets to the map. And let's add a constant for the speculator here. So we're taking a substance material and we're just suggesting it. Let's turn up the speculator point for point toe one and see what happens. Okay, so you can see the speculators going now, but the time you leave that 10.5. But the roughness is kind of very rough. So let's multiplied by something smaller than one to make it less rough like that. And that's okay. One thing I don't like about this is the normal. The normal is very ah pronounced so you can actually multiply a normal by something to multiply. But what? You don't multiply normal by a constant, you can turn it down by multiplying it by another three vector. And in this three vector, you'd set the blue to one and the r and G 2.5 and multiply, and that turns down the bone by 50%. Okay, so if we took this and put it to you zero zero and multiplied that times this normal map over here, we should get no normal map. It'll just like that. Set this 2.3 and 0.3. Okay. And then the only thing I want to do is turn down the speculator 0.3. Save it. There's our leather. Okay. So you can actually adjust these substance materials with both of the uh instance here and just go into the regular material editor because what the instances doing is adjusting the maps better applied. But you can still go in and adjust any of the material notes that you want. Everything seems to be working here. I think our materials are basically set up. Let's make sure the right materials on this one. Yes. White structure. It's actually set to gray. That's okay. Okay. I think our materials are basically right. We could go in and adjust more if we want. Like, maybe this floor wants a little more reflection on it. Now, here's the perfect example again of a super complex material that came in out of the way. I mean, clearly, we could just detach that and put a constant for our speculator. I believe what this is trying to do is figure out the friend l effect for reflection. So if you have for now reflections on your materials coming out of the way, it's going to do something like this. So, for speculator, maybe we could do a multiply. These are just ideas. There's no right or wrong way to do this. Let's do it. Multiplied by that original sample and then say Multiply it by three. That should make it really, really speculator. And then the roughness. We could go in and adjust to be something different. Like point to now we'll have a really shiny floor, right? There's are shiny floor, way too shiny, obviously. So let's set this to actually like 0.5 the normal on this one. I think I actually want to turn up so we could get rid of flat Normal and just do a multiplier like I just showed you multiply. We'll apply there and then put a three vector again. Well, down three and hit left mouse button. So here again, we would set the Blue Channel, the one then we could set these channels to to There's our super bumpy floor, obviously overdone, right? Let's just set it all the one when since we took out that flat normal, Matt, maybe it's enough that we don't need to multiply at all. Let's see. Oh, yeah. We actually want to use the multiplier to turn it down now, maybe even 0.3. Okay, so we're just going in tweaking materials until they look like we want, because they don't necessarily translate exactly how we imagine them. That's good. Anything I could go down even more one last time and we'll turn down the speculator and the roughness. 0.35 turned up the roughness a little bit. 2.35 And that should put us about where we want. And of course, that is personal preference. You can adjust that whatever you want. But you can see we were able to cut out all this junk over here, which I don't think is really contributing a ton to the final look of our concrete. Maybe you want it. Maybe you want to keep it. I'm showing you how to adjust it and simplify it. If you so desire there's our floor. You can see a little bit of normal mapping. Going on came perfect. So we're gonna leave it like this and then move on to lighting. Wait. I see one material that I don't like this one. Okay, again, we have the same deal going on. So maybe it's in your best interests and not use for now. Reflections in V Ray, when you're every exporting. I think I'm not positive this, but I think that might get rid of a lot of these notes if you don't use that now, I mean, you could also leave this year and just put a multiply right at the beginning because everything to the left of it is gonna be multiple is gonna be applied to this note. So I can just if my speculators too much, I can just take it, put a multiplier at the beginning and put a 0.3 multiplier on it. So all this stuff going on over here is now just being multiplied by 0.3. So I didn't like how reflective that was, and I didn't like how smooth it waas a man. Look at all this stuff here for the roughness. Let's see. Yeah, that's offer roughness. So again, you could just put a multiply right there. And most by all this, whatever is happening over here by a multiplier to turn down the roughness if you want it, Yeah, I'm gonna leave it as is. And then we're gonna go on Teoh the the fighting section of the course. And so I'll see you in there 10. Adding Area Lights and Spot Lights: Okay, let's jump in and start adjusting our lights a little bit. The main light that we want to talk about first is the direct light, which is right here, and we can. This comes in is a light source. It's the direction is just a directional light, just like we're used to in Max. And what we can do with this is rotated. We'll see that the shadows will change in our house so we can set our rotation to wherever we want. And that's going here with its elected. And we can just turn this up and down, right? So we can in real time, figure out where we want that light to be shining. So let's say we want it like this. Okay, that's fine for now, if that's how we want it. Okay, Now that is a stationary light, which means that for static objects and things, the shadows can be baked in, but it also has a dynamic quality to it. So, like, for example, if we moved to this right now, see that pot moving That shadow is adjusting as we move. Right. So this is the main difference between static and stationary lights. a static object can be changed in game. Now, that's what we want. We want the light, direct light, light source. We want that son to be stationary. A stationary light will only have it shadowing and bounce lighting from static geometry baked by light mass. All of the lighting will be dynamic, can change color and intensity and game. Okay, So the reason we would want that is because later we're gonna make some of the things in our seen movable like this sun shade out here. We wanted to cast a shadow as it goes across the floor. And of course, it is going to do that because we have a stationary light there. If it was just baked in light for that, then as we move this across the shadows wouldn't work properly. So the sun is good, and as a stationary light, the rest of our lights in here can be static. Because we are at least at first, we're just gonna bake this all in. We're gonna bake in the G I and the direct lighting because we're just gonna be generating renderings. So it's like, uh, generating is still shot or something. All that lighting is already calculated. When you when you say that you're render and this is gonna be very similar. But with animations we're gonna leave that son as a stationary light so that we can move things around and the sun shadow will stole if that makes sense and then later, when we have, like, a VR scene where we can actually pick up something and move it around we want that to be affected by a stationary light as well. So that, like, if we went and picked up this chair and moved it, it could. This light could still be casting a shadow for that chair on the ground. But that's a whole different animal when we get into VR, so we'll consider that then. But for now, we're gonna bake most of our lighting in except for our direct sunlight. As you probably know, when you start adding lights, the stationary lights are default. But let's bring in a spotlight here from our lights panel. So by default in stationary, we can set it to static. If we left it a stationary, we can only have a certain amount of these before they start giving us a Red X like that. And that means that basically, you have too many stationary lights overlapping with each other. So now the engine is just gonna render this as a static light, so you're limited. The only the only other way to address this is if you were to take each of these lights and change their attenuation radius like 20 so that they don't overlap with each other anymore . See that? So the attenuation is only going to here, so the lights not really gonna affect anything. But now this cone is not overlapping with these ones. And you can have a bunch of those stationary lights because they're not overlapping with each other. So the limit only applies if they overlap with each other. But again, we don't need to worry about that now because everything is gonna be static and we can put as many static lights as we want, so that gives us a good opportunity to talk about Attenuation Radius. We don't want it lighting the scene way down below our floor because that's not helping anything. So 332 centimeters looks like it's OK for Attenuation radius here. I could just make sure that that's set to something reasonable. Let's place that from the top view. We'll put it right there and then from the front view. Well, put it. Okay, so are our spotlight. It's placed. I would recommend calling it something worthwhile. So instead of just spotlight, we can right click on it, rename it under the edit panel, track light a one and then we can copy it to these other ones. So there's three of them. They're actually there's 1/4 1 over here in this plant that's not really working there will have to move that plant, but there it is now because we name that properly. We can easily just go into our world out liner here, select all four of them, and we can adjust them together. So the interrupt cone angle will say it's like 30 degrees. There you see them all appear in the outer cone. Angle can be 40 degrees, and we can just adjust them all together, and then we can point them how we want. I just want to make sure one of them is pointed at this wall over here to light up these pictures. So if we select that light and hit space bar. It'll bring up the rotation, and we can actually close these down a little bit. 20 and 30 more pointing. You should be familiar with spotlights and kind of how they work from working in Max do. Okay, so this is now just about placing lights around for these lights. We're gonna put a rectangular light, which is like a very area light, essentially so we can scale that to whatever we want. Size wise. Let's change that to free it. F two. We can change that too. Chandelier shandy. Light underscore a one. Okay, so there isn't instance ing in here, like in Max, But we can name things, name things so that we can easily select them again. Let's turn on our our snaps for rotation right here. Space bar. Okay. And then it's just about placing that if you go to the top viewing hit f, you can focus on it. One nice thing you could do to with this particular scene. This roof is so heavy, geometry wise, so you can just select it in his age and it will go away and then control h will bring it back Control, ages on height, all hopes. So let's hide it. Take this and place it under our chandelier. Over here. Make sure the size is right. We can change this. Change the source of it right here. And then let's put it in place. This way. And we're good to G O. Okay. We can copy that. Over to the other chandelier. It's Hold on, Alden, Drag another light. You know, we have some lights over here. Have some lights over here. You're looking a little Bryant for these chandeliers, so we can take both of these in column intensity four, maybe some around there for these ones. You can select him all and said intensity to five, maybe. Okay. So we can just go through the whole scene, place lights in the areas that we need him. I'm gonna put another spotlight in here and then a few more on these tracks over here to light up that and then some inside of here. He's pendant lights, and then we'll be good on the lighting. They will talk about optimizing everything, getting the light mast work and all those things in upcoming lectures 11. Setting Up Sun and Environment Light With HDRI: Okay, we've talked about the direct light. Now let's talk about the environment light that we're that we're dealing with here. And we're going to use a skylight for that which came in our default level as well. The skylight should be set to stationary, and it has two different options here where you can either capture the scene around it, which will gather all the information and basically create an image that is now lighting. You're seeing an image based lighting image. The other thing is that you can do is specify a que map and then import your own HDR. I So this is very similar to what we would do in V Ray. I've imported Avia H dear, I hear if you guys want to get some HD rise, you can always go to no emotion. HD rised up net. So here it this website I've showed you before in other classes. But you can get a bunch of free h your eyes and you can just import them. Let's go back to my content folder and we can going to maps and import and just select in HD rise. So I selected for my collection this one is is a free sample that I'm just gonna use as demonstration purposes. But back to our skylight, we can use this here to actually light are seen. We can change the resolution of it, too. That will increase our baked times. But it does work. If we go up to here toe lit and see unlit lighting on Lee, we can see how that skylight is looking in here. In fact, we could even turn off the direct light to see. So with direct light off now we're just seeing the skylight and how it affects our scene. So that's what the captured seen using our our sky sphere in the background, which came default in the level. And it has kind of animated clouds. It's almost like a procedural h dare I. And like I said, we can make that effect are seen by just capturing the scene. And that would capture fog and everything around this. Or we can put our own HD Ryan and we'll light the scene like that. We can turn up the intensity. So there's some nice environment lighting for us. Maybe somewhere right around there. OK, that's basically matching our sky again with it capturing we'd probably wanted at one case . So those are different options there. But if you wanted to use this HD rye and then make a sphere that matches that H dear I so your sky and you're lighting actually match just like we were doing. Vera, we can go to this folder here and go to engine content and we can search for engine sky sphere Editor, Sky sphere. That's the one. You can drag that into our scene and this is just a sphere with a inverted normals. Basically, let's make sure it's big enough by saying, you know, scale it up 20 times. Let's see how big that is. Okay, so that's big enough. Obviously. Maybe too big. OK, but anyway, now there's our sky and we can actually apply Rh dear. I material onto it. So let's go back to where we've imported Rh dare I In our maps folder, we have this HD right here. So in the skylight we put just the map. But for this we would want a material and we could apply it to this map back here and make it match. So what we could do is just add a new material Put in the right place to make a new folder here called materials. And in here add new material each to your eyes Guy. Okay, If we go into this, the way to do it is to make sure it's an unlit material like that. And then we can do ah texture. Coordinate our texture, sample any node and make sure we've selected Rh dear I texture map. Okay. One thing with this is we need to make sure that it is sent for compression to hdr I. And then another thing you might want to do is make it so that there's no mitt maps on this mitt maps. If you don't know that that controls that changes resolution. Basically, as you move away from or get closer to an object to to save efficiency. This one we don't want share changing resolutions. We wanted to always stay like this. So it's giving us a nice, crisp evaluation of that color there. Okay, with our each year, I added, here, we need to put a world position to it like so. And that will show here that we have that thing map to this fear we could actually put a multiplier here and make it even brighter like that. A three. Okay, that's the basic element of how to set this out. And we can, of course, put that material right onto our sphere. Select the sphere. Drop it in. Okay, now we're seeing that sky represented out there. And the sky is also lighting are seen the skylight. So then we could just kind of adjust this to make it look like it's correct, right? Yeah, that looks pretty cool, actually. So now the whole thing is being lit with the h dear, I awesome. And it's matching the background, which is also being seen with that editor sphere. Okay, so this hdr eyes kind of a night scene. We're not gonna go with that. But this shows you how you can light within HD right, which is awesome. The only other thing that you would want to do is be able to rotate in here, and you can do that with custom rotator. Think that's the right node? No, it's not this one. What we want here is a rotate about axis just like that, and we'll have to put constants for the rotation angle. And for the pivot point, which can remain at zero, the rotation angle will be between 10 and one. We actually want this to go into the position. With this, we're going to want to also put a normalized rotation axis which tells it which access to go around. Constant three Vector. We want to rotate around the Z axis. This and this will be our and G will be set to zero b will be set toe one. Okay, okay. A few of the things we have to do here. We have to normalize this vector. This is a vector in foot. We need to normalize. It basically makes it directional. But only length of one for that vector. And we Then you just need to add the absolute world position. Plus this rotate about access number up here. So now if we rotate So you want to set it up like this? Zoom in here and all this is doing is basically telling it how to rotate and the rotation angle is this thing right here, which will, if you put it 2.25 that row toots it 1/4 of the way around. Okay, point for. But what we want to dio and hit save Then out here, we can see that we've rotated. Now the sun is over there, okay? And everything's looking about, right? So there's our rotation. I like this. This is cool. And one nice thing about this is it adds background out here as well. Okay, I like this lighting. This is great. Now we could turn back on the direct light, and obviously now it doesn't match any more. So for the direct light, we'd have to do something that makes it match by, like, rotating it like this, rotating it like this and then adding some color to it like a lot of color, right? And then maybe turning it down. Okay, so that's how you could do some environment lighting with some direct lighting and with a sky sphere if we put it back. So it's not lighting only anymore beyond lit. And there we go. That's how we can light similar to what we're used to in the rate 12. Finishing Up Model, Lighting and Materials: Okay, Now we're basically getting close to where we're ready to start rendering, which is really light baking in unreal engine. And it's the closest thing we have to rendering like we do in V Ray here in Data Smith and Unreal Engine. Unless we had the rate for unreal engine, which we can really, literally just render right out of here. But that's not what we're going to do. We're gonna bake the lighting using unreal engines built in light bake tools. To do that, we need to get all our models lighting and materials squared away is that we're ready to go . So for models, what we need to do, we just need to copy things around by holding Ault and then using the move tool. So remember I told you we imported only one of these objects because if you had all these in Max, it would import each one of these and make a separate static mesh for it in your content folder, which is not actually what we want. We want one of these little seen components here that holds all the information for this stool, and we only need it once, and we can just copy it around. Same goes for the chair placemats. Okay, hold on. All move. Space bar gives you the rotate option. Put it to 90. Go back to move, grab the two axes and we can get. Just keep on doing this. So I'm just gonna be going around doing this for everything. Making sure lightings, right. All the lighting we want in the scene is here. And all the materials air. Correct. I won't. Kind of a Okay, that part's good. I already added in lighting. If you hit G, you can see game mode, which shows? No, my objects added in lighting up here in these pendants added light shine on that painting there, or that photograph could see my roof is off right now and again. Control h brings up back. Okay, so I'm gonna just go around and copy some things and I'll be right back. Have an interesting issue while trying to do this. And that is that all those objects are different on this plant that I'm trying to take around so fast. This way to address that is to select the whole plant and the pot that I want to take around that I'm control clicking on the things I don't want so that I just have a selection of the plant. Okay, let's select it like this. Select this plan, all the objects with it. You can see if I had done this better. Probably attached it in three ds max than it be easier. I was just know, super simple way to select this unless it was named correctly or something. But what I'm gonna do is just group it so that we could move it around, make sure I've got all the leaves here. Think that's it. Now, if we right click on this, we can do group. And now, if we all drag, you've got another plant here, and then we can just move this into place from the top to you. I want to have this Scott beat over in the corner here. Maybe rotate it so it fits. Okay. Simple stuff. Scale this one down slightly on hideout floor. So we make sure it's in the right place. Control age for that and then top view. Okay, so I think I've got everything placed turn off game mode. I could see Oh, out here. I forgot about this. Let's copy this here. I'm gonna rotate both of these something like that. And then I'll copy this around out here onto the patio, and this is probably boring for a lot of you, so I will just do it. And there is not much else we need to do. As long as our materials are set up in our lighting is how we want it. We can start messing around the light bake and getting some something that looks like, like finished rendered quality images. That's just place this real quick. And then we can start setting up cameras and generating animations and doing all those kind of things. So we're getting to the good part now that we've got our seen all set up as we need it to be. Let me just place a few more things and then also you in the next lecture where we're going to start talking about getting some high quality light base 13. Setting Up For Light Baking: Okay, I showed you how to set up the HDR I but we're now going to get ready to do some light baking, so I'm actually gonna turn off the each year. I just turn off that editor skies fear out there and we will change the skylight back to what it waas so that it's just gathering everything from around captured scene. And then we're gonna change the direct light to be something different. And this is all in prep for getting a nice light bake for us. Let's say something like that. Okay, so now we're gonna focus on doing a light bake right now. Obviously, everything looks wrong because of the adjustments I've just recently made and I would need to bake it again. Let's do a quick bake to get back to something normal. And then I will start talking about how we're going to do a really nice bake and set everything up properly. Okay? With the lighting back to normal in the sky, then we're looking at something like this, which is great. And right now I'm in the lighting on lee view which you can find here lit is normal. You can also go down to lighting on Lee, you can also do. Another interesting wonders is detail lighting, which this one will show the normal maps essentially show self elimination. All that stuff this one shows self elimination to this can actually show like reflection, bloom all that kind of stuff so you can see reflection and normal maps were showing up on this thing in the detailed lighting mode lighting only they are not OK, so let's get sit up to start doing our light bakes. One thing that we can do to make it easier so we can see our light bakes well is to make sure to go into this show tab here and turn off anything that might be distracting us. So in lighting features, one thing we can turn off a screen space and being occlusion so that the ambient occlusion we see is not screen space. But it's actually being generated by our light bakes. We don't The one thing that unreal engine does sometimes is put to different kinds of the same thing on top of each other, and in this case that will be a little bit distracting. The other area where that happens for example, is reflections. There are screens based reflections, which is calculating kind of in real time. And then there's And then there's basically baked in reflections that we do by setting up our reflection spheres and a reflection. Actors and then building and reflection captures here. Okay, so that's two different kinds of reflection going on At the same time, we'll talk more about reflections later. Okay, I just fix that chair because it was missing some legs. That means the bake isn't proper on that one right now. But that's OK. We're getting a good look at what are baked. Basically Looks like Okay, Another thing that we will need to do here is make sure that all our lights are in the correct mode. So I will need to do for that is make sure that all our lights see weaken, search for them over here. Make sure all our lights are static or stationary because that way they will be baked in moveable lights. Do not bake anything into our scene. Remember, we talked about how we want the sun to be able to cast shadows dynamically so that is set to stationary. Otherwise we consent to static. So everything is just baked because it's not gonna be changing if you have other situations , like when you're in VR and you're moving things and you just need the shadow to adjust with it as you move it, that's where you'd have to have different considerations. But when we're just going to generate renderings out of this, which is what we're doing for the first part of this course weaken set everything to static or stationary. Yeah, the thing to remember again is that stationary bakes the G I, but not the direct light of that light source. Static lights bakes both direct and G i of that light source. So for the sun, we will have the g i from the sun still being baked into our objects. But if we have a object getting direct life from it and we move it than the shadow, the direct light shadows will update properly. So there you have it. I think we're ready. We've got we've got the things turned off. Let's make sure in show we have of that the other thing we can do is make sure that our exposure is not set to game settings. Where? In game settings, we probably have automatic exposure enabled in here if we went here. Auto, expose auto exposure. Okay, so auto exposure is turned on in here in project settings. Here we contain weaken turn. This often just set it to something fixed in this way. We're not distracted again by different types of lighting. Negative Two works here for us. Okay, So we're getting rid of all the factors that might adjust our lighting so that we can focus on Onley are lighting and not be distracted by other things. Another thing that could be distracting his bloom. You see, that changes lighting slightly, especially around the light bulbs. Okay. Everything is good there. One last thing we can do now is make sure that if we're doing a light bake that are light bulbs can put off a little bit of light. Okay. Especially like in here this light bulb. We wanted to admit some light, right. So on this light bulb, we can go to the light itself and make sure that on lightness settings, we can use in missive for static lighting. So this means that this in missive material will actually bake into our light map. If we check this year and we can boost it a little bit by saying let's say five that boost the brightness of this not will bake insight of this pendant light here. We could do that for all of it. All of the light bulbs that we have get that all set up properly. Make sure each of these is properly emitting light so that when our light bakes, it's not just some really bright things sitting there and inexplicably putting off a bunch of light. There's no light bulb in that thing, but there should be. And then we would just have to do it for these two objects, these two chandelier objects. And then we're good to go. And then let's go to the next video and will will start doing some light bakes and seeing if we can get this to look nice. 14. Lightmass Importance Volume and Portals: okay. I promised you some some light bakes in this video. But I might have lied to you cause we still got some more prep work to dio. Okay, we have talked about the light mass importance volume, which is out here like most important volume. And remember, it is just going to tell the light mass where to focus its a focus, its efforts. So that is not trying to bake and calculate light for everywhere in this entire universe. But rather just on these parts that we wanted to focus on that will say was time when it comes to light making another thing that we haven't looked at yet is a light mass portal which can focus our light in areas where we have openings in our building. Okay, So light mass portal is similar to the light mess importance volume. It's telling us that there's an opening to the outside here, and we want a bunch of light calculation to be focused here because we have a giant window . Actually, let's just make it cover this entire window. We can place thes throughout our scene where we have openings so that the light masking probably focus here will get higher quality here as the light mass focuses its efforts. And we also save us time because again, it knows where to focus. Focus its efforts instead of just randomly going everywhere. So we have a portal there. We can copy another one over to here. Make sure they're placed properly. We have one. That's Haider roof again. You can actually see anything in here. Let's make sure this is scale. Properly getting it's the right amount of light. And then let's copy it and rotate it. Put it on this main window over here, All this glass in here. So I'm just gonna go around in place. All these and the important ones Aziz well, are gonna be back in the kitchen area and near the front door. I'm gonna go and start placing all these things, and then we will have all our light importance volumes and portals set up. And our light mass will really know where to focus its efforts and get us some high quality light coming through the windows in those areas. So I'm gonna go ahead and do that, and you guys can just move on to the next video 15. Lightmap Optimization on Each Object: Okay, we've got all that stuff placed Now. We need to look at light map optimization for each individual objects. And again, we can go interrupting the optimization view modes and look at light Mac density. This is gonna be very important. And if you don't know, this is showing us the resolution of each of the light maps. And the deal is, if it's green, it's supposedly high enough resolution. If it's blue, like this ceiling, it's supposedly to low resolution. And if it's red, it is more than enough resolution, meaning in my bog down our light map times are light mass times significantly, and the result will be high quality, but perhaps not optimum as far as time and memory goes. Okay, so the idea is to get everything in something in a green zone. But if you look here at this floor, this broad is green in this floor is green. So are those both good? Well, these squares that you can see here, actually the pixels of the shadow there can be rendered in that light map so you can see them there well enough that that might look a little blocky and not high quality if we're trying to do direct shadows right onto that floor, okay? And especially like here, those two big this read it looks pretty good, but again, that could cause us major delays. Okay, so we want to be mostly in the green range, but make sure that it's not so much this green rain, but maybe this green range, right? Especially in places where they can be very prominent direct shadows being cast on it. Okay, so how do we adjust all this? Well, we did it when we imported. So if we go back to our import right here, we could go into the settings of this and reimported. And right here is where we would set static measure options. So the minimum of 64 the maximum we set to 2048. So some of these might be at 2048. Okay, so let's go look at these objects here. So let's go into each static mass here and see what's going on. If we select this with this red map on here saying it's got plenty of resolution in the light mass, then we go into the static mesh, bring it over here for you guys to see and what we have here, the light wrap. The light map resolution is 10 24. Okay, so that's a pretty high resolution for a basic simple wall. But you can see that there's actually a lot of geometry going on in this, and that's why it needs that. If you go to UV button up here, you can see UV channel zero. Okay, This is probably my material channel. UV one isn't super useful to us. U V two is automatically generated light mass. You VW unwrapping? Okay, so it is actually going to take the shadows that it calculates for G I and it's going to bake them onto this unwrapped material right here. One thing you need to consider here is that this is gonna be 10 24 by 10. 24. So that gives us the resolution of those shadows that will be showing up on these walls. And that's what that light mass optimization view mode is showing us. Now we can change the resolution here under general settings. 5 12 we can save. I mean, go back here and now it's green. But again, is that enough? resolution to show us nice, crisp, direct shadows being cast onto that wall. I'm not sure it is. So the easiest way to adjust is actually not going into the static mesh, but just going here to override light map resolution. You can see it's great down and says, 5 12 If we check this year, we can now put it to you can kind of slide it to wherever we want. Pricing somewhere like right there is perfect. But see, we're at 6 80 We don't have to go a whipped 10 24. So this is how we can go through an optimized things. This is obviously too high resolution. This is too low of resolution. So this is the fastest and easiest way to do this. One other note in here with these generated maps we need to The key is that nothing is overlapping because if it bakes a shadow onto here and it's overlapping with these faces here than this shadow for this object is also gonna get baked onto that object. So we'll see random objects with shadows that we didn't want on them. Okay, so those are automatically generated. Another thing to consider here is that if we have low resolution and these edges start getting in close to each other, like from here to here, and there's not of padding between them than some of that shadow will actually bleed from one to the other. And that's where we'll get kind of weird light leakage or shadow leakage through on the edges. So we need to make sure there's enough padding here and we can actually regenerate. These automatically generated U V s right here so we can say source. Light map index is one. So this is the source. It's going to take this in, unwrap it and put it on to because that's our destination destination light map index. Okay, and then you can always go here and apply changes if you make any changes. But the reason I bring this up is because we can put minimum light resolution as 64. We can set it to 32 and then apply those changes, and because it's assuming that the resolution is going to be much smaller, it gives it more padding. Okay, so now it's more spread out, and it just unwrapped it automatically. For us, it's similar to doing a flattened map in the U V W modifier unwrap you be w modifier in three DS max. So used to be that we had to you kind of do a lot of that and make a lot of those adjustments are cells unreal. Engine and Data Smith are pretty much handling it all for us. This is how we adjust it. So for this one, let's say 5 12 is the minimum light map resolution, and then we can imply changes and you'll see the pattern gets a lot tighter. Okay? And because we are above 5 12 this padding should work because our settings we actually went up to 608 and everything should be good there. And you'll notice that because our padding is smaller than we need actually less resolution to get the fine details. Because now each of these objects is a little bit bigger than it. Waas. Okay, so these are all just optimization tips, and what you want to do is go through and make sure that each thing is showing properly. One area I know I'm gonna need help is right here. This one already has a big map on it. I need to go even bigger. Okay, that's all the way to 40 96 it's barely in the green, so that one is kind of problematic. The way that you could deal with that is in three DS Max, you could make this a much more simplified object, like if it was just a rectangle with a map on it. Obviously, the mapping would not be need to be huge. So I'm going to go through and optimize a lot of these things, get everything in the right zone that I need. I know this is going to need adjustment and you guys can do the same and meet me in the next video, that much closer to being ready to render out our global illumination with really high quality light maps. 16. Light Bake Quality Settings: Okay, I've gone through and optimized a lot of this. Ah, not everything. Perfectly. We're gonna give it a go. See how it works. You may have noticed that this is not showing up, and that's because I turn these two movable, which means they will not be included in the light. Bake and they're lighting will basically come from the stationary sun. And that is it. So it won't have baked G I on it. This will make it stand out from the rest of the scene because it doesn't have a bake on it . It doesn't have the g I on it. Okay, But it's also a movable object that we're gonna be moving in animating. And so that's how I'm going to set it up. If I look in lighting now in the optimization view, milk lineup density can see everything. Not everything is perfectly in the green mode. Some things like, I know this. I want to have higher resolution because through the window there will be these shadows coming in. Okay, But other than that, I think we're ready to go. So let's look at some basic light map settings and get a light map going. I'm gonna go back to lighting on Lee so that I can focus on just the lighting. And first and foremost, we will just worry about the settings here which, of course, lighting quality. And we can just go preview medium higher production. So this is the easiest way to adjust our light map are light mass settings. Let's just do preview for now, and we'll do a quick bake just to see what's going on here. And we can do build lighting only Boom will wait for it. It'll go and I'll be back in a second. OK, so here's our light map are light mass and it looks pretty awful right now, to be honest. And that's because we haven't really got everything set up like we need to. Yet we have the objects set up individually, like we need one problem. Having here is the reflections are awful, cause we haven't even addressed that yet. So let's just make those go away by just doing lighting Onley. Not detail lighting. Okay, so this is straight up pretty much just our light mass. Here it is. One thing I see is that there's a lot of artifacts going on. There's a lot of here you can see that resolution might be bad. Here is, well, just overall kind of choppy. The other thing I was going to say is that I can see the direct light could possibly use a little more intensity. And perhaps this light right here could use a little less. Right. So these are the kind of things that will start having to try and figure out now. And that's why we're still in review light baking mode. 01 thing I've got going on here is this color still is here from when we did the h dry, right? So it's set that to three and back to color one. Okay. And let's talk mostly, though about instead of just fine tuning what are light? Intensity wants to be in all those things. Let's talk mostly and focus mostly on light map settings. Okay, so all we've looked at so far is like lighting quality here, production high medium or preview. You guys probably know that in the world settings there is also light mass settings. It might look like this. Drop it down. And these five right here, the ones that really control the quality of our light bake, and they're gonna be important. So by default, this would be at one. This is all default right here. OK? I had to set it to to make it render really fast. What? This is static level lighting scale. Okay. If you hover over this, it'll tell you that this means that our light, when we're lighting than everything, is at 1 to 1 scale. If you drop the scale down to, like 0.5, your rendered times, we're going to go way, way up. And that's because it's kind of like doubling the detail in your it's It's like changing the scale of your whole scene so that the light map calculations are doing finer details. So one is default and it is usually fine if you really want to get in and get finer details , finder calculations and, like crevices and all these kinds of things that you might want to change your scaled down that has to have a direct relation toothy indirect lighting quality, which so if you put this 2.5, then you want to make sure your quality goes up by the same proportion, so if you're cutting this in half, this would want to multiply by two like that. But let's talk a little bit about these settings. Indirect lighting quality. So this is the most obvious one to change. And by default, it set toe one. We could set it to three. Actually, I think five is probably a pretty good number. Okay? And that just that's just like an overall setting for the indirect lighting calculation. The other thing to look at. His number of indirect light bounces were probably familiar with this from using V Ray. One thing to keep in mind is defaulters three, if you set this to light 10 that will push more light into your scene and bounce it around in here. And it will make a nice difference, but only so much. So, for example, 10 is not gonna be much different from 2020 won't be that much better than 10. So setting it to 10 is fine. Going more than that is kind of, ah, worthless. It won't. It won't add to your render times too much, and it won't be changed the quality or the look very much, and then you can just change the number Skylight bounces, which is doing the same thing, but individually just for the skylight. Lucas that that three set this to five will leave the scale at one. We could maybe set it to like 10.8, and leaving this at five is probably OK for even that 50.8. The only other thing is the smoothness, and this will smooth things together, and it does exactly what it says here. Smooth this factor to apply to enter indirect lighting. This is useful in some lighting conditions when light mass cannot resolve accurate, indirect lighting. One is default. Smoothness tweet for a variety of lighting situations. Higher values like three smooth out the indirect lighting mawr but at the cost of indirect shedding shadows losing detail. Okay, so they will. It will basically smooth these things out. So you don't have is really bad are affecting, but it also is much less detail. It's like kind of blurring the whole thing. So if you get really high quality here, you can actually turn down the smoothness to add more detail into your seat. Okay, so those are all the settings that we would need. Now this is gonna up the settings a lot more. This is gonna This is gonna up the lighting time a lot more. And one other thing. I want to show you real quick. Let me open it. Weaken Goto window statistics here inside of statistics, we can show lighting build info. Okay. And this will tell you all the different statistics that we need to know about how long things air taking gay. So lighting time rectangle 10 is taking a ton of time. 84 seconds. OK, you can actually arrange it by the amount of time it took. So rectangle 15 is taking the most amount of time. That is that roof, which I think we have to turn up to really high quality. You go into details. I think we had to turn that up really high just to make it render. Yeah, so 30 48 for that thing, right? Rectangle 10 which is probably this deck material. Yep. So, like I was saying, those could be simplified a lot. Both of those could be simplified a lot. So this is something to think about when you're back in three DS Max and modeling things simplified makes it render a lot faster in here. And I think, as art viz artists working in three DS Max and V Ray over the last decade or so, we've really at least I have gone away from worrying about Polly count too much because computers have gotten to the point where it just isn't hard for my computer to render things anymore, no matter how crazy the scenes are. Maybe you're not all in that situation. I am. I have a really, really nice computer that I use it work so. But my point is, when you're doing on riel engine, we need to revert back to what we used to do back in the nineties, where we were super worried about polygon count and shader, complexity and all that kind of stuff because in real time those things matter a lot, so you can see that some of this geometry is taking a very long time. Surrender and others are not. So this is something, and this is You can also look at the memory, the amount of memory it's taking up OK, and there's other. There's other great things in here for optimization as well, so you can see the resolutions in here which things air really high, and you can see the two that are taking a really long time to bake are also the ones with the really high resolution. So anyway, this is a good way to get an overall view of what you're looking at in your light bakes why things are taking a long time, and then you can go back and fix things that might be overdone a little bit. Okay, so there you go. Those are some of the basic settings in the world settings. Let's take a look at this and do a higher light bake and then see what kind of results we can get. With the adjustments that we've made, this one's going to take a while, so we're gonna pause the video. 01 other thing. I want to check out these world settings without going full on like production level quality yet, so let's just go medium and we'll see how these worlds settings air doing on our light bait . Okay, so here's my new light bake in lighting Onley mode, and I turned down the exposure a little bit as well, but overall, it looks fantastic. won't wanna move that. Okay, so let's look inside and see. We got we've got the global elimination is lighting up the stealing very nicely. Everything is working really well. You can see this is getting a lot of light coming from these windows over here. Some artifact in going on down there, which we might need to address some more light quality issues. But overall, this is looking so much nicer. So much better. We've got a nice global elimination going on. One thing I want to look at. Let's look outside here. So everything's really good. Look at these nice shadows over here. You can see even with the highest settings. If we can't get the resolution of this object high enough, then we're still gonna have some pics elation in there. But in general, everything's looking really nice with e settings. Could add some resolution here. One thing I want to focus on is like this furniture, these organic materials. One problem having here. If you look here at this edge right here, there is dark and then light. So the lighting is obviously not working right right there, and, like, right there as well. Um, up in these pillows. It has something similar. Okay, now what's going on there? I I opened one of these. I opened this one and you can see it doesn't have it anymore because it's actually just in preview mode now because I adjusted something's let's look at this pillow and we could do the same thing. So if we opened the static mash and then look at the U. V s in here u V Channel Zero Okay, this was the unwrapped Material Channel. So I unwrapped this and painted a custom material for it. And this is that channel that's on zero. In Max. It would have been Channel one. And then there's this one which isn't super useful. And then there's Channel two. This is the automatic generated U. V s for the light map. That unreal engine did. Okay, and you can see what these organic materials it kind of struggles a little bit. You can see right here that there's just a part that's kind of turnout missing there. So So that's probably these pieces up here. They will be lit differently than this, and you will see that scene and you just don't want that and like, the seam here is not at a naturally occurring seem. And so you will see that right there. See that line going across there? So light bake isn't blending across. Those seems properly. So back in here. What can we do about this? Well, one thing we could do is say, let's go to our level of detail zero, which has our build settings in it. Okay, so this is our basic build settings for this thing. What we can do is say that from UV Channel zero. We want to just use this as basically basically this as our light mass. So what we can do is basically say we want to use this nicely unwrapped, manually unwrapped thing that we did for the materials as our light mass channel as well. So if we go into L o d zero where build sayings air at, we can take our source light map, which would be zero and make a new destination. Lighten up. We could make a Channel three and then we can say apply changes. We say minimum light resolution. Remember, this will affect our padding. Ah, that's fine. 64. Okay, so that should have generated a new one on Channel three. And there you go. So it's much cleaner. There's a few missing spots, but I think those were missing in my material on rap as well. And there you go. So it kept the same chunks of UV, the same shells, and it just rearranged them into a new light mass. Now we're not gonna have those same problems gave. The only other thing we need to do is make sure that in general settings, this static mission knows to use our new channel as its light map coordinate index. So under general settings, we can hit this drop down arrow right here. And we just need to make sure that the light map coordinate index is now set to three. And then we can save. And now, when we generate the light mountain, next time it's gonna be using that new channel we made, which should be much better, much cleaner, much more accurate. So there you go. Our general G I is working very well. Can I see? It looks on that chair. Everything is good. We could go even higher settings if we want. We remember we haven't gone production level or even high level yet. And with our world settings, we could go much higher the render time just for this one on my little dinky computer that I'm using currently here took probably 45 minutes to an hour. So that's something to keep in mind. We could go much higher, but it will increase our times by a lot. The other thing to know is that you can also do this distributed across multiple multiple machines to shorten your render times. Okay, but those are the general settings. That's what we need to know. To get our light maps right. Keep tweaking your model your your class model or your own model to try and get it right and to try and get your light maps looking very nice and high quality. And these are the kind of results we're gonna be getting as we move forward, we still need to adjust reflections and other things about our scene. We haven't done any post processing yet, so we'll look even better. But right now we're focusing on lighting only to make sure that element is correct. 17. Additional Lighting Effects - Polishing Off Our Lighting: okay. I want to look at the finished results that I'm getting with my light bake and then talk about a few other effects that we haven't really covered that can also come into play if we so desire. So here's my created another level that we can use to look at. So this one is the one I'm considering. Basically, like big properly. All right. If we go to lighting, only weaken, see what kind of lighting we're getting, and you can see that everything looks pretty good. There's some places I noticed, like right here on this floor. We could use higher resolution for the light mount for the shadow from that guitar coming off of there. But in general, everything's looking good on a few areas, like on this couch right here. I believe that's because the padding isn't quite enough on the light map resolution of that of that chair. But we were able to get some rid of some of the other weird things that were going on with that chair for this particular version of the project. I've gone in and changed the materials. I added this in this of material on the TV screen, and one thing we can do that actually affects lighting. I just changed the TV screen to a unlit in missive material like this for the missive material. I put a a map in here and rotated in a size that properly so that it fits on that screen. And then I put a parameter here, has and named it the TV glow and put it to default value of five. And that's multiplying times this to make this brighter and this parameter, if you don't know, he can talk about these more later. But this is just a a constant, but if you right click on it, you can see you can convert it back to Constant, constant or converted to parameter and David TV glow again When it's a parameter, that means that we can access it from outside of this material, usually using blueprints. We confined the parameter TV glow and change the number of it using blueprints so we could turn on and off the TV, which can come into play later when we develop some blueprints for this particular project . Okay, so that TV is that TV material is applied, and in thes static mesh we just go to again Using missive for static lighting makes the make sure that's checked, and then we can turn the boost of that light up and down. So three it's not very bright, but you can see it's lighting a little bit. You could turn that up if you want. It can also turn up the miss iveness of the material to make it match. I don't think I mentioned this before, but I ended up putting a substance material on these shares that turned leather material the same one that's on these chairs here. I've also changed the pool material to be a little bit darker. Now that we're getting good lighting, we can really see kind of what needs to be adjusted and what is looking good and what isn't looking so good. Another thing that specific toe lighting that I've done here that we haven't discussed you may have noticed with my earlier light bakes that the lighting coming in from the direct light was very sharp and crisp, and I wanted that to be a little bit softer, especially as it got away from the contact area of the shadow. So here it should be sharp as it gets away. I wanted it to be a little softer and you can see we're getting that effect now. And the way that we did that is settings in the direct light. And it's this right here, light source angle. I'm gonna go into the test level so that we can mess with these things and see what kind of effects they have. Okay, in my test level, which is basically a copy of the other level, we can look at this direct light here, and it's at 1.3 right now. If we set it higher, we'll get a preview saying this is not big correctly anymore, which is fine, because this is our test level. But here you can change the angle. Putting it higher makes it softer as it gets away from the contact point. And I used it with the use area shadows for stationary so that when a baked, it actually gave me a nice soft area like shadows as it got away from the contact points of the shadow. You may have noticed earlier that some of my objects were rendering too bright to light and not matching the rest of the the light map. We're not matching the rest of the light bake. And what I had to do for that was reimport some things that came in through Data Smith but just weren't working properly. And there was this object, this wall and this object over here and the reason they didn't work properly. I don't know if it's the reason, but the way to fix it was to go back into three DS max, make sure they had material channel U V W mapping on them and then reimport them into here and now they work fine. So it wasn't the light map channel, the Channel two and three DS Max. That was wrong. It was Channel One. So I put simple box maps on them, even though I think of originally and Max they didn't have mapping on them because they're just solid colors. So I didn't bother, but that cause problems when I brought it in through Data Smith. So keep that in mind, too. And again we can look at the age here. I I really like this h dear, I I wish that I had made it myself so I could give it to you. But I did not. I think it looks great in here. But again, I'm gonna turn that off and show you some more things about the skylight. That is the editor. Sky sphere. Turn that off. There's our sky. Let's look at that for just a minute. Again, we're just kind of tying everything together here to get basically a finished looking rendering real time rendering. So the sky sphere is by default and are seen here. We can also import it later if we want to buy going to BP Sky Sphere. Over here in our content browser, it has a lot of adjustments that we can make. The thing that I did here was the cloud opacity. That's what I changed. I don't like this super cloudy. We're looking sky. So I turned the clouds way down like somewhere around there. And this guy sphere is just a blueprint that has clouds that are animated in it so we can change the cloud speed and all those things. We have to make sure that it is linked to our light source or direct light. And that way, if we move our son, why don't we just do it Direct light. It's rotated like that gave in in our sky sphere. We can refresh the material. And now we see that we have a dusk sky because it's linked to our son, right? And then the third thing that comes into play is the skylight. And remember, it's gonna capture everything that's around. So if we go into here and it's on stationery and we recapture and you can see everything kind of shifted to the color of the sky now So now everything from our skylight is coming in kind of pinkish, right? So our shadows are getting more pink. Purple. Okay, so these are all things we can do these air kind of things we want to figure out before we do the light bake, get the light looking proper, and then we could bake it. We could get more of a dusk seen this way. Another thing we haven't discussed is the fog, which is in this file by default. You can also add it from the content about browser, basic atmospheric fog. And of course, this can be If you do the sun month multiplier up, you will get more and more fog and you can see really, That's just as things get further away from you. They're getting all that atmospheric fog going on and merging up the brightness of that. You can see my exposure is changing as I do it up in this area. Let's turn that off. I just do this, okay, so you can see my skies really that color. But with Fogg added in, it's getting more of that color, which the reason I'm showing you all this is because you want to harmonize everything so the sky needs to be the proper brightness. It's just like any other rendering where our shadows and our direct light in our sky all need to be the right set to the right amount to make it look harmonious and correct. So these are all things we can do to make adjustments, get everything in the right balance so that you have the right light levels for everything . Right now, the sky looks too dark to me so we can turn up the fog, something like that. Okay. And then we could bake again, and a few more things that we can do to kind of balance it out and then will consider this section wrapped and we'll move on. Let's see the skylight. We can always adjust the skylight levels. So right now the intensity of this is that one. We turned it up. You could see we're getting purple Lee pink glow everywhere. So it might be tempting if you're shadows air looking too dark to turn that up, pumping skylight everywhere and that works. It's going to start tenting Your seen quite a bit, I would say. Leave that at one and use a basic pulse, a post processing volume instead. And you could go to global elimination in the post processing setting. And we could turn up just the global illumination in general to brighten up your shadows and get everything at the right level. I think that works a little better. A lot of different things you can do, but just like a rendering, you're wanting to get all the light levels correct, inaccurate and again it might help you to look at lighting only. Okay, I think it's looking pretty good, and this is before it's baked. Obviously there's the preview here because we changed the direct light. Then everything is gonna be a preview because the it's stationary. So the G i of that light needs to be re baked. Okay, but that's basically it. I think our image is looking pretty good, lighting wise and weaken. There's a lot of things we can do. I showed you different features and different effects that weaken Dio to get whatever look and feel we want for this. And we've got a nice, high quality bake over here in our other level. We're going to run with this and call it good, okay? And we will talk more about post processing later where we can really fine tune some lighting. We're actually going to do the post. Processing most is mostly in camera so that when we're getting our renderings were getting exactly the right color grading and and lighting levels that we want for per that camera. Okay, so we'll talk about all that coming up. But overall, I think our light is high quality right now and ready to move forward 18. Place Bamboo Models Around Your Scene: Okay, let's talk about foliage and landscaping. We're going to use the foliage tool in this section, and we're going to get some landscaping and plants all throughout this scene to make it look even better. Let's first look at this bamboo. It looks really good, I think, but it's also a good example of what not to do. This one is created in Max and like other parts with the project, I want to show you what it's like to just bring in an archivist project as is. So this might be something you'd have in Max, but when you bring it into you before it has some issues, it is still working and I think it renders nicely. But the problem is, it's not really optimized for real time, but it could be If you go to optimization, view modes and shows shader complexity, you can see that this is causing issues. Work in the extremely bad range for this and what this is doing is basically just causing us major problems as faras frame Rico's. So the issue here is actually overdraw, which means that when we're looking through several different objects and we're still rendering things behind it. So there's several layers of things that were rendering. And the reason that's happening here in this case is because of if we look at the lighting only because these air just planes with a tree leaf opacity map mapped onto it in these planes are overlapping a lot. So we're looking through this plain to see that plain to see that plane, so transparency on top of transparency on top of transparency. So the way around this, if we were going to create this in a better, more efficient way for specifically for real time is one way to fix it is to make our polygons for our big planes with the opacity maps on it. Make the polygon of that plane or the shape of that plane match the the leaves as closely as possible. So you're not having these huge planes block things out. But you're having things that are actually the shape of the leaves, and then you don't have to look through transparency so much to see the leaves behind. So those planes were just in general be blocking each other a lot less. That's one way to address that. But other than that. I think these air looking pretty good. And we're gonna copy him around the scene as kind of a hedge around our house on both sides . So that are creepy. Neighbors can look into our yard. Right. Okay, so we'll just do that and then we'll take some more and we can do things like add variation so that it doesn't look so uniform. So these ones were just placing manually. I'm gonna show you also how to get some really good foliage from Monreal from epic games themselves. And we're going to use the foliage tool to place all of that so you can see both methods. And so, in the next video, let's download some cool foliage. 19. Get Some High Quality Foliage Models from Epic Games: Okay, as promised. Let's look at a way to get some nice foliage from epic games. So if you go to your launcher, you bring mine up here. Okay? If you go into your marketplace for your for your launcher and you look for open World Demo Collection, you can see license for use only with you before based products. A collection of realistic acts. Assets from epics Open World Demo Shona GDC 2015. Use them to create new levels or at them to existing ones. Okay, okay, So if you download this, this is cool. There's all these things. Days or trees, rocks. Stuff looks great. Awesome materials, I think, because I already own it, it says Add to project might say something different for you. You might need to download first and then you can just add it to any project. I wouldn't recommend adding all this to a project. Make a queen project. Add this to it because it's a lot, a lot of information, but once it's in your library, you can see down here open world demo and I already have it as a project and it's in here. So I did, added it to a blank first person template. I'm opening this now. It can take a very long time. It's a ton of information. So we're gonna need to be careful about how much of it we bring into our seeing. We're going to grab a few plants, few trees and migrate them into our own project. Then we can use them there. We are not gonna bring the whole thing in. Okay, let's have a look here. This is a first person template that I opened and this is the blank project. Basically that I added that world demo to and I took some of the content from it and I just dropped it into here and it took, ah, long time to build. So be aware of that. But here we can see it, and it looks fantastic in lighting only mode. You can see that they made the Leafs very similar in shape to the opacity maps of the Leafs less overdraw. Ah, this is all really, really high quality stuff. Okay, so let's just look at which ones that I've got and we'll just migrate them into our other scene. So this one is the Scots pine we can right click on it and browse toe asset and just go ahead and ask that actions. Right? Click on the asset itself in the browser here, content browser asset actions migrate. And then this will just give you a breakdown of all the things that will be migrated with it. So it's a bunch of materials. Be where it is. It's in the content kite, demo environments, trees, Scots, pine 01 So that's what we're migrating. It's gonna bring all this stuff with it, my great. Okay? And then find the project, our student house, our pool house and then go to the content folder like this and then just say select folder and it should migrate. Content, migration completed successfully. The other things that I'm gonna bring in our this grass patch, I can select it properly. S m feel grass, too. Browse to asset and it's here. Foliage grass, field grass again. My great. Okay, I've already done it for that one, so I don't need to do it again. This one I'm grabbing the heather mesh clumps too. I grabbed this one as well. Field scab ius. And then these plants, these bog myrtle Bush is okay. Browse to asset. These are foliage bog myrtle to in here. We'll see. Bog myrtle one Barg Matal Bush. 01 Bob Myrtle Bush 02 ferns. There's the flowers in here. The fuel scabby s the heather. Okay, So grab the ones you want. Those the ones I'm gonna grab and my Graham over, and then I'll see you back in our other project where this will now be part of it. We will have this in our content browser there, and we will be able to add it to our scene. 20. Using the Foliage Tool: okay. Inside our project again, we can go into the foliage tool up here. This is what we normally see up here. We can go to this tab, which is the foliage tab. And here let's just get rid of this and start from scratch here. Inside here, we just have It's a basic brush for foliage. The brush size is 50. Right now. Let's add something in here so we can see what's going on. So if we go to our newly imported content tight demo environments, college flowers, Heather Okay, you can just drag this content right up into here. This is the static mash. This is where this is what we need to drag in. The rest of this is material for it and maps. Okay, so once this is in here now we can actually start painting. And the brush size is 50 right now. And if I go like this, it will just start painting foliage, which looks pretty awesome, right? Let's undo that real quick. You can also do a single instance mode where everywhere you click will paint one bush. Okay. Each of these foliage types that are brought into here also have their own settings. Drag this down a little bit so you can see that we're getting a scale. Min and Max, this is like any scattered tool you've ever used before. We'll set the scale Mina Max to, like 0.6 and 1.3. But that means it'll randomize as we go. Placement can be randomized. Also angle rotation all that stock and be randomized. Here. We consent for this object. If we wanted to cast static and dynamic shadow, we can change light map resolution. I believe this would be overriding the light map resolution to find in the static mesh and then we concept collision. So this is like static mesh settings for our landscape object. We don't have these features going on the distance field lighting and dynamic indirect lighting going on. So we don't need to worry about that for this because we're gonna be baking are lighting for the most part. So I like the single instance placement because I don't want it going over into this sidewalk and we're still getting are random ization going on, and I want to do things in Bunches, so I want these flowers kind of bunched right here and maybe Ah, one thing we need to talk about is we can filter where things will actually be able to be placed. So this is a static mesh over here, so placing it on a static mash, we definitely want to be able to do that. These air landscape objects that we create here with these big landscape slopes and things like that We haven't done any of that. We could place that on a landscape if it wasn are seeing the BSP is like if we had brushes in here, we don't have any of that going on, so that could be turned off. Really? You can also place on other foliage. Really? All we need for this instance is that but those filters could come in handy if we have objects. We do and do not want to place things on. Okay, so we can also add different kinds. Now, if we want a clump it together, we could we could put a bunch in here at the same time. And then just as we go around painting, it will put them all in there, or we can do like what I'm doing and just place a few at a time. We've got a road going down here. Okay, let's add some other objects into here. So let's take this other flower added into our foliage as well. Okay. With this one added in here, we can now. So this is telling us how many instances there are there, 17 of those we can actually deactivate thes and keep this one activated. And now just go place this new plant, which we have. Let's go over here. Okay, so we're placing one at a time, basically, and that's fine. That gives me more control over what I'm doing one kind of a bunch of them right here. Okay. So I can have bundles of plants. You can also go and reapply settings after the fact. So this maintains the connection between the landscape object and this landscape settings here. If you get some that are a little bit rogue here, then you can always select one, and you can move it over like that. Okay, that's good. Okay, for over here, I want to bring in some of the shrubs. So again we'll go to kite demo violence, foliage bog myrtle. Make that part of our foliage. Okay, so let's deactivate everything except for the bog myrtle and start painting that in, make sure it's got its random scaling going on as well He selected was a 0.8 and scale and 1.2 in scale. And then we can just start placing it single instance mode still to start putting him a bunch in here. For this, we could maybe turn off single instance mode and just start painting like that and you can still select those individually later and move them, scale them to lead them. If you need to, over here, I'm going to do the same thing. We were just landscaping, and I'll just I'll just paint him in almost like ground cover here, okay? And then ones that are rogue will just go in and kind of adjust. So this one is no good. And remember, when we get all this overdraw going on, it's going to start making it very complex and hard for the GPU to render and by overdrive , mean these leaves all overlapping with each other. It's gonna be hard. We can check that out later. When we talk about optimization and things like that, we'll see if it works, you'll notice that these air set up with nice Lodz. So if you look at those ones over there, they look simplified, and as I get closer, they look normal again. That's another optimization that is happening for us that was automatically built into these particular objects that came straight from epic games. So again, really high quality stuff here. The last thing I'm going to do is go paint some of these flowers onto here onto this dirt over here. And I think here I want a single place, each one like this. You can see that random Z rotation is happening automatically. That's just a check mark. Hey, there we go. So there's our landscaping. Let's just have some trees in the next video. That's how the foliage tool works. There's more to it than that, but that is the brief rundown of what it does. If you've used the scattered tools like Forced pack or something like that, then all this makes quite a bit of sense to you. Keep in mind that the relationship here remains between this foliage settings and the foliage in your scene. You can see that all the instances of them are are there. If you went in here and say delete, we'll remove this, then it would actually remove all those instances, and it would warn you, you could also replace it with a different asset if you wanted. So the connection is still there, and you can also do reapply settings. Two instances. So if you change your settings, you can hit this and it will change the settings on all the instances in the scene. That's a really cool tool, thanks to epic games for these awesome foliage pieces that we can get in the next video, we'll put in the trees. 21. Adding Trees To Your Scene: Okay, let's add in some trees now in our content Kite Demo Environments Trees folder that we've migrated from. The other project, Open World Demo was We have some trees and we can simply drag them into our scene. Boom! That's a huge tree. OK, we don't want it right there. Maybe in the corner of our yard. Oh, who would be cool? Pine tree doesn't really fit this particular house, but we'll say it's in California, where the climate is such that you can grow kind of like lots of different kinds of trees. Okay, that's cool. Got a tree in the corner there. Let's bring in another tree. And you know, there's not much to this. This is just dragging some content. Bring it in. Here we go. We can scale it as necessary. Place it as necessary, leaving these a static objects because we're gonna bake all the lighting. The only other thing that I want to do to these foliage items is make sure that we don't have movement on him because I think the movement can look a little bit cheesy and it could mess with our lighting to toe, have movable objects going on in our scene. The foliage items are set up to have movement based on the material's. Put this one in the ground a little bit, make it look like it has less of a trunk. I think that in our backyard is dappled in shadow. Let's do a few more. One more, maybe. And this is all personal preference. Obviously, where your trees they're gonna go. We'll take a look at turning off the movement in the foliage as well. In just a second after I placed this tree on a scale it non uniformly place it, make sure it's not going through my wall and then we'll be good right about there. Okay, Now I've got trees. Perfect. Okay, the only other thing I'm gonna do here is turn off the movement in these flowers. You can see here. I've already done it on these ones, but these ones are still moving around quite a bit. And that is just in the material. Using the world position offset. It's like putting a noise through the material of this thing and giving it motion. And so we need to do is find the parent material. For that. There's instances which are like Children of that parent material, and they're all based off of the parent. What we need to do is open the parent and then we just can, right click right here is So it was set up to be here, I believe. Okay, so that's all calculating the wind and making it move like that. And all we need to do is all click right here on world position, offset and then save and just disconnect all that motion stuff and it will. It will now sit still, and that makes it nicer for us. You can leave that in if you want. That makes it nicer for us for baking the lighting in, making everything static and are seen. And I think that motion could be a little bit distracting. It's more of ah more of a gaming looking thing to me. Like in games you have your walking through fields of grass that has a slight blowing motion to it, which is great for that. I think in this context we don't really need that. Okay, so there's our foliage. I think everything is looking pretty cool. Is all preview lighting so we can do another bake. And then after that, we're gonna talk about reflection to get all that working perfectly. And then from there we should have a really complete scene and will start animating and rendering cameras doing the post processing in camera and have some really nice looking, finished images that could be generated out of here. So stay tuned for all that, Let's check out reflection. 22. Screen Space Reflections and Baked Reflection Captures: All right, let's get some killer reflections going on. It's kind of weird because we've already done the light mass in the light, bake and everything, although we've now added some foliage that needs to be baked. So but basically, we've got to get reflections going to really get to photo real, and we haven't even address that yet at all. So right now what we're seeing mostly in our scene is screen space reflections. So here's a perfect example. Over here in this window, you're seeing the reflection of that TV that's over there, and it looks weird and not correct, but it's a screen skate. Space reflection will look at what that looks like. So we go to show lighting features, screen space, reflections on and off So you can see on that stove top and on the countertop are screen space. Reflections are changing, so you can see that's pretty accurate reflection there of that light up there, which is great. The only problem with screen space reflections is there happening in real time, and they are calculated in real time and therefore they cost a lot to our performance. Okay, so keep that in mind. The other way to do reflections is to actually just bake them in. And we do that with actors called Reflection Capture Actors. And we have a box reflection, capture and a sphere reflection, capture and a newer one that comes with later versions of Unrelenting Is the planer reflection. Okay, so playing a reflection and obvious place where we'll want a plainer reflection is out here on the pool so you can see that's giving us a preview already of what that's gonna look like There's our plane or reflection. It's a little bit big, so we will set it to the right size and just set it over that pool. Okay, I'm just gonna scale it until it fits basically over the pool. OK, so that's actually showing us a preview of what that reflection is gonna look like. And, you see, the reflections are pretty accurate here, But if we go into game mode now, we're seeing the actual reflections taking place or previews of them working. This is actually going to get baked in to, but you can see now there's trees reflecting that pool, the houses reflecting in the pool, and we can actually bake the reflection without baking lighting again by just going to build build, reflection captures. You see, we're getting this air here that says plainer reflection requires global clip plane project setting and able to work properly so we can go into project settings. Just search for it. Support global clip plane for plain reflections. Yes, and it will ask us to restart, which we will need to do. Okay, After all the resetting and rebuilding, we can now use the plane reflection here. And you can see we're getting nice reflection on the pool. And like I said, we can go in and build reflections aside from the lighting. And now we have a better result out there in the pool. We can do plan to reflections for these windows to if we want. I found in the test scenes that I was doing that plane reflections on the inside of the windows were nice so that it doesn't look like we're looking through something totally clear and empty there so we can add more planet reflections. I'll go through in place all these around the inside of the windows and will see what kind of results we can get with that. Okay, After the reflections are built for those planning reflections, I can go into visualize my reflections by going here, I can see him getting nicer reflections that TV is reflecting in the right place over there . Two over here. Okay, so we go in and build reflections built him on this window to their less visible here. But you can see, like my dining room light reflecting in here. Uh, they're ish. Okay, so we're getting some of that. Another thing to consider is that you you can use these these plain, these captures. And of course, they're being they're being baked in, and so they're not calculating at runtime For a rectangular room like this, we can easily use a a a box reflection. And for that, we would go to the top view and just make sure that that's all the right size inside this again. It's gonna look like this in our scene. That's our box reflection. And we need to make sure that it encompasses our whole scene here. And so I get weaken, Just scale. Okay, So that takes our whole scene in. That's one kind of reflection we can do is less accurate? Well, not really less accurate, but it displays differently than the spherical ones. But I have seen people do a different way, so some people do it with the box reflection. Some people prefer the spherical for architectural stuff box makes sense because we're in a rectangular room rectangular area. One thing to keep in mind is that if you when you start putting spherical ones in, let's put some in. If you have areas where the reflection just isn't working right, or if you need particular attention to reflections, then you can put a spherical in that area and then you just suggest the radius. And according to the documentation, the smaller radius is within a big radius. So, like our box one is the big the big reflection capture. But the smaller radius ones for this fear will actually increase the detail in that area. So the way that I do it is I put big reflection for for some of the overall reflection stuff, and then where I need to find tune it. I put a smaller radius sphere capture in there, and that will kind of had to the overall reflection or refine it basically so right here we're getting nicer reflections. You can see there's some stretching and some skewing going on down there, and this is obviously pretty hard to understand sometimes because just kind of, ah, explosion off reflections going on. I think we can use a more reflections in here specifically on places where we really want reflection to be seen. That's where we can ADM or reflection spheres. Okay, and again we can adjust the radius down. See, that's giving us a pretty cool preview. Okay, so think about the places where you need good reflection going on accurate reflection going on and then think about the best kind of actor that can give you that reflection. And then you need to consider whether you want to use screen space, reflections or not, they they are costly when it comes to frame rate and all those kinds of things. So for are still shots and are animations, they'll be fine. We can turn them on. We can turn on things like screens, get space and being occlusion and screen space reflections. And that's all OK, when we're doing still shots. When we're worrying about frame rates, you can see I'm getting kind of heavy right now. Actually, when we were worrying about, like VR or navigation speed or any of that kind of stuff, we might need to turn some of those things off and turn off some of those those reflection and lighting features and things to speed up the frame rate. So now it's just a matter of finding where are reflections? Need to g o getting them right, setting and properly, making sure that they look good. If not, then go back and re adjust the placement and the size of your reflections fears some outside here that can add reflection to the outside. As I place this fear out here and change the radius of it, you can see how the reflection changes. That's the nice thing about these reflection capture actors is you can kind of get them looking correct, and then you just bake him in. So they're not doing real time calculations to make sure that is showing reflection for that entire window. We can keep doing this various different points around the house. Okay, so get your reflection right. Remember the big, bigger reflections air overridden by some of these smaller reflections fears that we're gonna put in here. And they really sharpen up the preciseness of the reflections in the areas that we choose to put them. Okay, so get all the reflections right and then captured them again. Then we can go in and add a new light, bake to it. And then we're really going to start looking really good assed faras. The overall photo realism and quality of this rendering goes, Let's bake reflections again. Turn off game mode. There you go. So it looks basically just like the preview is giving me, and these are gonna be totally after accurate because the way it's capturing, but that's why we have a preview of it before we bake it. And that's why we can add in more accuracy by using the right kind of capture actor and then, by putting him at the right radius is and in the right places to get the information that we need one last thing to keep in mind. We have our captures our reflection, capture actors showing reflections on our windows and things we can actually make it. So these windows show screen split screen space reflections as well, even though it's translucent in the material. We would just have to open the material and make sure we haven't said to translucent material for this glass. But we can turn on screen space reflections for this glass so that screen space reflections will actually work here. But again, this all comes with a cost in your rendering time and your frame rate and a final note on the reflection. A portion of this is that often times in V ray you guys know about make invisible to reflections. So, like a rectangular light won't show up as a giant white rectangle in this window right here , the way you handle that in unreal engine is with the speculator scale. So on a rectangular light, you go to speculate scale set it to zero, and it's not gonna show up in that window if you said it to one, which is default, so you have to watch out for it. And if you build again now, you can see there's a giant speculator reflection of that light in there. So you don't want that in most cases because we don't want that light to be really divisible to speculator, so we'll turn it down to zero. We'll do the same with other lights. These ones are fine because of how they're placed. You make sure this one doesn't have that same thing going on. Speculator scale zero. He's one. Should technically be set to that as well. They might be okay. All right, but that's basically it. I think that's enough for reflections right now. I think we should be good. If we build everything and then do a nice light bake, we should be there. As far as being ready to render things. We've got our landscape. We've gotta reflections. We've got our lighting workout. They were pretty much ready. Todo Okay, so I'm gonna do a big light bake, and I'll find you in the next section where we can get going on rendering 23. Placing and Using Cine Camera Actors: Okay, here we are with a light bake with our reflections all going and everything. Everything is working and don't really like the way everything has turned out. This reflection isn't looking great. I can go in and adjust that and also with the sun angle being changed to make thes softer shadows and then adding the trees. I don't have quite enough resolution to really show the soft shadows of those leaves as they come down here. So it looks like just kind of staple. It's not great, but I'm gonna go with it for right now. And we can, of course, adjust light maps forever and ever. Light mass bakes forever and ever to make them look good. But for now, we're gonna talk about how we can get some cinematic cameras in here and some post processing going on. And so we might I might go back and re bake later, but for now we're gonna talk about cameras. So you have probably seen in my other course or in any other exploration that you've done that you can put in a post process volume that encompasses your scene and you can do all your post in that way as a kind of overall for your seen. Anything within the volume will be post processed. So as a simple example, let's take the temperature here in the white balance of the post process volume that I already have in here, we could turn it up. Can we get some nice post processing going on can undo that. So this is where you can do bloom. You can do all sorts of things. You can do exposure control. You can add dirt onto your camera. You can add ambient occlusion. So in this post in these post settings, you can do a lot of lighting techniques and various other effects. But in this course, we're not gonna use that so much. The post processing volume as we are just gonna post process per camera because I think that works better, especially since depending on the camera, you might want different settings. So let's go up here and type in camera. Start typing in camera and the one we want is the sin. A camera actor, he can place that in our scene. It's giving us a preview here. We can also go into perspective mode and say, Let's make this. That's in a camera actor view. Okay, so now, as we move, we're moving our camera around with this actor. We can't look here, type in the name of it, make sure it's selected, and in the details panel of it, we have all the same post processing stuff down here that we would in a post processing volume. We also have camera settings, which I think are great. Thes camera settings work like a physical camera, essentially so in lens setting, we can we can have minimum F stop maximum f stop focal length, etcetera, etcetera. We can change the focal length here like this. We can set the current aperture to 2.8, and that's important because with a 2.8 aperture, we can have a very shallow depth of field so you can see it's very focused out here and very blurred in here. If we lower this even more, it would be even more pronounced Now. It's kind of blurry everywhere, but we can change the focal distance under the focus settings if we drop down. Manual focused instance was right here. We're at What is that 100,000 centimeters away set to manual, we can bring it in, bring in our focus Closer. So now we're focusing on the couch right in front of us. Now we're focusing on the plant. Now we're focusing on the bamboos outside, okay? And with the aperture lower like this, the depth the distance over which were able to focus is gonna be much lower at 1.2 than it is that say something high like this. Now everything's in focus, obviously, and that's just like a regular camera. Actually want to set it here? So minimum have stopped is 1.2 f stop in aperture are the same. So this is minimum. It's at minimum 1.2 now. So we go is lowest 1.2, but no lower. And then we can go up Tu 22 because that's our maximum. So put it at 1.2 and we'll get a very shallow depth of field meeting. The distance over which were able to focus is very, very low. Okay, you can also use this sample seeing depth from seeing so you can click right here, and it will now focus right there. And you see the bamboo is now out of focus. You can also draw debug focus, plane. And now, as I change this, the plane will move and tell me what's going to be focused. So right now, the plant's gonna be perfectly in focus, and now the Bam Boo is gonna be in focus. Thank you. Turn that off And there you go. Okay, so I like that a lot because it works like a regular camera. I like that. We can just look right through this and see exactly what are finished. Image is gonna look like. Now let's look at some other effects. Weaken do. That's the focus and depth of field. Let's move on to do some colored rating and other effects. 24. Post Processing Settings: Okay, let's look at some or post processing features just really quickly. We have colored rating here. White balance is pretty self explanatory. You to go warmer, cooler. I want to be somewhere right in here. You content it, which will put it either greenish or purplish reddish. Whatever you want to call that, think that I will leave it Default. We can do global cover grating here, which you can go into the saturation. Turned it on globally. Turned up saturation for the scene. Actually. Candle lake that a little bit. You can also change the color. I think so. These air typical tools contrast you can up in like this. Put it down like that are just colors were used the sliders to adjust. Okay. More importantly than this, I think, is gonna be the 01 thing before we move on from that, there's these that are basically set up to be like film, and they're recommended that you don't really use them. I kind of like him. This is this is similar to the slope of a an s curve that you do like a curves amount of a curve adjustment layer in Photoshop. Okay, so you're adjusting the intensity of that curve or the contrast. Basically, the toe will be the left side of the curve. As it goes down towards black in the shoulder is the opposite. It's up above the highlights. Okay, those aren't doing anything that effective. There's the black clip. There's that the really darks and then lay clip. If anything, you can use these top three to easily adjust kind of your S curve. Look, let's look at some of the other things. We have exposure here. And actually, instead of this, I like using this one under camera, which is exposer exposure, compensation. And this is just a flat number. You could turn it up and down, and for some reason it's not working. Probably because we have exposure turned off in our view part here, we can put this to game settings, and now it will work. Speaking of that, when we were doing the lighting, we turned off exposure and returned off screen space. Ambien inclusion. Now that the light is baked and I'm no longer trying to isolate the light, I've turned back on screens base and being inclusion in the view port right here. Okay, So here we have a really bright look, maybe slightly too bright. I like it for inside and then outside. We want probably some bloom going on coming through that window, cause that's some pretty serious light coming in through there. So we can just go to the bloom. Okay. Again, make sure Bloom is showing up under post processing here. We can check, Bloom. And there it is. Okay, so we want to turn that down. You put it somewhere around right there. Okay. You don't wanna go to crazy on all this stuff. I think a little more contrast. That would be nice. So back to you can go to my slope right here. Make sure the highlights aren't too burnt out somewhere like that is good. We can always do promoted chromatic aberration. And this is again something you don't want to go overboard on. That's what it looks like when it's to the extreme. This is, of course, simulating what a real lens would dio. It adds a little shifts in color, especially as you get towards the edges. And it's kind of a flaw in your in your lens, but our eyes kind of used to seeing it in photographs so super, super subtle on that one. Don't go overboard unless you're going for us. But specific effect meant to look like that. You could do a dirt mask. You can do auto exposure here, said it goes up and down. That would be Max Brightness, Max, men brightness. And then you can change the speed up and speed down. So if we're moving this camera around anyone exposure to change as we go from indoor outdoor, then we would use the auto exposure. It would automatically change. Depth of field is here, but it's being handled already automatically by our manual focus and aperture settings up the top screen space reflections can be used here. Okay, We can turn up and down their intensity and their quality. Okay. For this, we're just gonna leave it off. But if we have a specific place where screen space reflections need some extra help, we can do it in post right here. Same with ambient occlusion. So we can turn up and down our Ambien inclusion like this, and we can turn up the radius of it. Okay, that actually looks pretty good. This is gonna be heavy stuff because it's all being computed in real time and screen space stuff. So it takes a lot of GPU power, but we're rendering a still shot, so we should be just fine case or keep that in mind the last thing I want to show you. And this is really cool when my favorite things about post processing and this could be done in a post processing volume or in this Senate camera. And it's the not that one. It is the It's under miscellaneous here, and it's the color grading L U T. Okay, so in L. U T is a light is a color look up table, and what it does is it tells each RGB value in your it's like a graph showing, or a diagram showing each pixel of color in your seen each RGB value to shift to a specific RGB value from the chart or table. OK, and so what that does is it's like a a plug and play color grading that can basically happen. It shifts all your colors to be slightly different to give it a different tone. Different feel whatever you want and what we need to do to implement this. It's really easy and really cool. You can go in search. You can go in search. Let's try generic How you t you before click on the first result here and in the docks. Unreal engine dot com. You can get this the color neutral L you to tea right here. If we save this image, we'll save it, and I'll put a link to it in the resource is, but it's under docks, Andrea Legend and then, um, under this file structure here, engine features rendered graphics, post process effects. Look up tables. You wanted to save that. Now we can bring a photo shop. Actually, first, let's use the snipping tool or any screen grabbing tool that you have. Okay, make sure you're in the snipping tool. New grab right there, and you can just copy it and then close this down. Make sure it's in your clipboard. Now open Photoshopped in photo shop. We are going to open or create a new, and we'll use the size of the clipboard. Created new file pay star Kip Clipboard Into here. Now we want to do is do a bunch of adjustment layers to make this Look how every wants to go toe layer, new adjustment curves and we can buy each color we can take and make our own curve per color something like that. So we can fidget with this until it's exactly what we want. I like that. Then go to the RGB and do an s curve. Get even more contrast in there. So essentially we can do whatever we want. Here, make this look. However, we want color wise with adjustment layers, we could even do later adjustment. New adjustment, vibrance. We could even do black and white. I mean, we could do anything we want. Okay, So in the black and white, let's say let's take those greens. Okay, whatever. We could fidget with this forever, but those adjustment layers are important. We will now open the UT file the neutral one. Okay, here and we will just drag these adjustment layers. I'm gonna leave the black and white there because I want to show you how pronounce this could be by doing something dramatic. Okay, so we've now taken that neutral RGB and place the same adjustment layers that we did on the image that screenshot of our image onto the neutral RGB and we need to save this out save as and we'll just call it. Just save it as a J peg and college Black and white. Black white O U T. Okay, now back in UN Really engine. We can simply import it into our contract folder under maps import. Okay, we haven't l u t here. We need to open it and make sure that it knows that we don't want any mitt maps on it. So you how it's already going. Lower resolution. We want no mitt maps, and we also want to tell it what it is. It's here. Texture, group, level of detail. We want to say, Look up, table color. Look up! Table This way. Now it's no longer pixelated. It's that got that nice, greedy int. And now it knows that we're using this as a look up table. And now here we can apply It has a look up table Black and white. Are you t and Boom. There you go. If you look at photo shop, exact match. Okay. So we can do whatever adjustments we wanted. Photoshopped apply it here as an l. U T. And it now applies to everything pretty cool, right? The only other thing that you would need to know here is you can turn it up and down. It's kind of cool. You saturating. Look, I think this is a kind of cool shot. Let's make sure the focus is right. The only other thing I want to do here is vignette ing, which is just another effect here on the sea. Where is it? Under camera image effects, vignette, intensity. Let's turn that up. So we're focused out the window there and we look up slightly and focus in a different area and we're good to go in. The next scene will just in the next lecture, we will just render out this scene just as it is focused settings. Let's use the eyedropper focus right there on that leaf, and then we can turn up the temperature a little bit. Something like that. Okay. Next video 25. High Resolution Screen Shots: Okay, once you have this set up like you want it, okay. Rendering? Not sure. I like the l u t I did. Let's turn that down more. Okay, there's a shot now to render out a still shot of this. I mean, this is basically are rendering right here. We just need to do it a little higher resolution and get rid of all the the engine stuff that's in here. We can do that by just going to hear and saying High resolution, screen shot. And then we just have a screenshot multiplier for for what we want to render. We can either use a slider. OK, we can take a screenshot just by hitting the camera, and this will immediately go to Well, it showed up right there, but I missed it. But the place that it goes to is your project folder going to student house project and under saved screenshots windows high res screen shot opening up In their days, there's a rendering. If we open with photo shop, we'll see that it's higher. Resolution 2955 by 16 22. So it's doing multipliers of your actual screen size. You can see It's pretty good resolution, not a ton of noise or anything like that. Everything is clean, and now, if you want, you could further adjust from here in photo shop. So it's a simple is that once you get it all set up, our light bakes and everything all right, Reflections air, right? We do our post on camera, and then it's just a matter of saying, Boom, spit out a still shot for us. And the cool thing is, we can do the same thing with animations, which we're going to get into next. 26. Another Still Shot and More Camera Settings: okay, Before we move on, let's do one more. These still shots just for the fun of it. This is another camera set up. The other one is still there. So we have this one. And now this one. And that's just to show you that the post processing can be individual per camera, and that's a nice thing. I set up a different Kelut for this one, and then I just did what we did on the other ones. Basically, one thing that I didn't mention before that might be helpful to you. Is this global elimination tab? I turned it up here, and you can turn it up more if you're shatters air getting too dark or to contrast to you can actually imposed up the global illumination or the indirect lighting can also change the color of it. So this could be handy depending on what you're trying to dio. Okay, so all these things were going to come into play your global elimination, just like always. You're wanting to get the right balance between direct light and bounced light, and then some of that double come into play is going to be the curves and the post adjust here are applied to your image. So a lot of different things coming into play here. One other thing that I want to mention is the bloom up here. I messed with the bloom a little bit because we're kind of looking towards the sun so we would see Bloom coming from there. So the intensity is high could even go even higher. But the thing that made a difference is the threshold, because here we're seeing blooms on every highlight, and it just makes the whole thing look like one of those cheesy wedding photos, right? Everything just blurry. But if you turn on the threshold, that changes, where blooms gonna be applied to. So if you look right here in this chair, there's a highlight there and you can see the bloom starting there and then going away. I changed threshold, and as you go lower with threshold, it's like Bloom fills the whole scene. So you wanted somewhere. Maybe like right there, because we want Bloom coming from up there. That's realistic and maybe a little bit right there, but not too much, so much that it's distracting on. The other thing is we could go into the colored rating again. You go into the shadows and maybe going to the Gamma or the gain of it to make it brighter . We feel like they're too dark right now. Something like that. I think I'd still want to turn down that bloom. Okay. And of course, in here you can change the color too. So the gamma basically the it's like the middle slider on the levels adjustment in photo shop stays here, just upping the whole thing. Overall, this is like specifically for the dark parts. Okay, so I think somewhere around there looks fine. Maybe a little harsh in the contrast. But whatever. That's all personal preference. You get it to look the way you want it to. The other thing I did was ambient occlusion again to train. Make that dialed in. So that's another still shot. Let's look now at setting up how to animate cameras like this in our C 27. Render Animation Sequences With Level Sequence: when we go to animate these cameras, what we're going to do is go up to the cinematic stab here and we're gonna set up a level sequence and you can see there's a master sequence here too. But really, all that is is a collection of level sequences, and we're going to do it manually so you can see how it works. So if we add a level sequence weaken, just name it. He has put new folder level sequences and we'll call the 1st 1 master save. And then for this one, camera three will do another one at level sequence in little sequences will call. This one can three sequence. It's now we have two of them in there. And let's make one more week and copy. We can just copy this one duplicated and call it cam one level sequence because we know that's our other camera in here. Okay, so now let's go into the cam. One little sequence, Kate. Now what we need to do is add camera one to this level sequence. Add to sequence, Sir Sina camera actor one and you can see it puts a camera cuts track here, and then it puts the actual camera in here with different parameters that could be animated . Okay, so let's pilot that act that actor camera one right there. Right now, if we go like this, nothing's happening because I cameras not animated. We can change the working range end here, 20 200 and then we can zoom out like this. The red line represents where the end of our video's gonna be. We could make it longer or shorter, so we just dragged the clip. The red line is gonna be worthy video actually ends. And then we can just animate like you normally would with key frame animation. So looking through this camera, we can say Okay, the manual focus right now is set to a certain distance. We can put the slider at the beginning and say, but at the beginning, dear zero and say key frame manual focus distance. Add a key from here And you see, it adds a note right there. Now, if we go to frame 75 let me change that focus distance. We also want to be in cinematic view mode, which you could do here in so default view port you do cinematic Vieux port and make sure we're in sin a camera after one. Now we'll see all the updates as we go. So I put these key frames in for for zoom, which isn't right. We want it back here. Okay? We're just gonna am athe focal distance, which starts here and then goes further. We can This is a lot like after effects where you can jump to the key frame and let's adjust that So that is focused on the bamboo. Now, when we play this, we'll see a focus from here to there Animated just like that. Now, in the meantime, we can be moving the camera slightly so we can do current focal leg. We could just adjust that or could actually adjust the transform. The other nice thing is, you can add tracks in here. So one thing that I've done before is like, if you click here, you can add different effects from our post processing into here. So, like focus settings, there's already a track for that in here, so we don't need that, But we can do post process settings here. We can go to the camera and do exposure compensation at a track for that, right? And now we have key frames for that. We're not going to use that one here, but we could do current focal length. Will set a key frame for that. And then as we go to the end of our video to make sure we're seeing the whole thing go to here and we're going to just slowly move to there. So very slow camera move. Hit the space bar to play it. And the focus is changing as we go. Okay, Nothing too dramatic. You can see that. The Lodz on our plants outside or not working properly. They're changing as we get closer to them. I think that's an Elodie issue. So we'd have to adjust those. But there's the animation of the camera. Now. The way that we use the master is we can save this sequence or here and then open our master sequence. This is the master sequence, and what we do here is we go here and see ad camera cut track. No ad shot track from and one camera one sequence. Er, now we have our animation from our first sequencer in the master sequencer. And if we make this much longer, like 500 and then we go like this. We can now see that we have this camera cut or this shot from sequence one now being referenced in here. So what does that mean? If we go to camera three sequence, sir, and then add the camera camera three into here. Then we'll have two different camera cuts, and we will put them together in the master sequence. So let's go to sin. Active three. Here we are in sin. Actor three. And we can just animate. What do we want to animate here? Let's say it's a transform and will say the location ex location as a key frame there, and we'll just do an easy move over to there. It doesn't look great. Doesn't even look good. Maybe that's because we're in game mode. Okay, so that's how it's really gonna look right there. Okay. So I'd actually want to animate like the exposure as we get further out, like right here. So let's look at that as an example. So we can add a track for that post process settings, camera lens, camera exposure, compensation. So right here Will will leave it as is until it gets right here. And then as we get over here, we will go higher exposure. Let's see how that looks cool. Okay, Now, if you save this, close it down and then go back into our master sequence, sir. Now we can add another shot from the camera. Three sequencer. Now, we have both shots in here. You want to drag it so it's not overlapping with this one, and we want to make sure this goes from here to hear. You can also do things like add transition tracks in here if you want, so you could use a fade track where you go from black or from nothing to solid black and then back into video again, right? You could do that. I would only do this if I didn't plan on doing any editing later in, like, aftereffects or premiere or something. But I usually would be doing that so I don't worry about doing getting too fancy with my editing. And here important thing is I have these different clips that I can now render out and to generate this, we would just do this and it's not gonna be that pretty, Just an example, but this shows you the tools you need to make really cool animations, and they render in real time. That's the best part. So render this movie or video to file. You can go here. Output format, video sequence. 30 frames per second. You can make it full HD if you want, or even four K. You can turn off use compression if you want higher quality and that's basically it. You can save it to a J. Peg sequence, which is what I typically do in this case, to be able to show you guys, I'll just do a video sequence. If you're taking into after effects, then I would usually use a J pic sequence because that will basically just come in as video into aftereffects. Okay, a few other options down here we don't need to worry about. And then we can just capture the movie. Ah, right here is where you tell it where to go, and I'll just it's gonna save in my projects, saved video, and we'll just capture everything will have to be saved first and then it'll render out. Okay, now, let's just ah, watch our video here It's pretty cool. It rendered in, I don't know, 10 seconds or something. You see, we still have that led issue going on here. These things get more dense as you get closer to them. This one looks nice and crisp and clean. I mean, it's very high resolution. It's very good, kind of a boring camera movement, but that's it. So we have a movie rendered in real time, approaching something similar to photo realism and pretty cool. And the awesome thing is that we can generate any still shot. We want any animation we want quite easily. And not only that, but we can. Later in this course, we're gonna add in parts where we can navigate around the whole scene with our desktop computer or even with BR. So this is a very versatile file. Once we get it all set up, we can generate anything we need, and it's quick and fast in real time. So that's how you use the level sequence, er, to make movies out of your scene. 28. Animating Objects in Your Scene: I've set up one more or I'm going to set up one more level sequence here, and I've set up another camera that we can look through. Let's set up the level sequence for it. It's gonna be in level sequences and it's gonna be sequencer. Camp four came four sequencer. Okay? And here we're going to look at animating objects. It's very simple. We add this the camera. So there's our camera. Nothing special yet can slide this. But what we also want to do is add are object here that we're going to animate. Apparently, it's named Rectangle 657 So it's at it. Let's just say 6570 It's actually 6577 Okay, it's that guy right there. Now we've added this, and all this does is give us the ability to edit the parameters of that object within this sequence. Er okay, so that means we've got a transformed track here and we can add other tracks that we want, but we want the transform track, and all we're gonna do is set the location of that thing. It's not the X we want. It's the why. So we're going to set a key frame for the Y right here and then dragged this over here and we'll set another key frame for the why that is over here. And we can animate that very simply, just like that, and then hit space bar and there goes, That's a little fast. Now remember, we set up, we set up our lighting so that we could move that object and the shadows will work correctly. That's our stationary lights. So if you look on the interior on these cabinets right around here, you'll see that as that moves, it will be covering that area. We're shadow, and as it goes back over the wall, the wall is covered with shadow. So it's this cool shade. Okay, so we can play it and it animates. Okay, so that's just a show that we can animate objects within our scene and we can add anything in our scene into the tracks here, and it's specific to this level sequencer. Let's say we went over here and watch it from this side. Have a nice little animation going here, and here we go. There's our son shape. I think for this key frame here we should put it a little further back. Then we watch it hit space bar, and it should come into seeing just like that, and the dynamic shadows are working properly. So there you go. You can animate objects as well. You could even take this chair and rotated 360 degrees and animate that you can animate anything just just like key from a key frame animation in three DS max. And that's what's cool. It can all happen in real time, so that's additional things you can do with the level sequencer. 29. Section Conclusion: Okay, everybody, thank you for making it this far. We've covered most of things that we need for getting our scenes to look photo real, and then how to export them into a format that is visible by anyone. The still frames the animation. Now in development for this course is the ability to take this into turn this exact same file into something that is navigable with your first person character on any random desktop. And then we're also going to get into how to make it navigable with VR headset so you can actually walk around this house. So there's still a lot to come. Thank you for making it this far. I think this has been great. I want to show you some of the examples of things that I've been able to generate out of this file that is available to you as students. So for the original version that I did that was developed independently by me. This is the kind of this is some of the videos that I spit out from it. - As you can see, you can get pretty good results and render to your heart's content because it all happens in real time. That's the coolest thing about animating and rendering in here is that you get instant results, instant feedback on every change you make. That's what's awesome. Also, some renderings that I've spit out from here lots of random screenshots generated taken so you can get pretty cool results and again, real time. That's what's cool. So it's funded. Just act like a photographer and start walking through your scene and taking pictures of stuff, changing your settings, all that kind of thing. It's it's great you get good results with it. So, yeah, I love this project. I've enjoyed doing this project with you guys. I love doing real time stuff, animating and rendering out of real time. It's all fantastic fun. I hope you guys have enjoyed it and stay tuned for the stuff that's coming soon, where we will take this into something that could be navigated and explored and even interacted with 30. Basic First Person Navigation: okay, in this part of the course, we're gonna talk more about navigating, are seen using a character and walking around in real time. If I hit play right now, we've touched on this earlier in the course, and so it's already set up and running. But here we can walk around the scene using W A S D. Keys as control or the arrow keys. So let's revisit this and talk a little bit more in depth about how this all works. The main thing to keep in mind here is that we need collisions on the ground so that our character is not falling through the ground. Of course, we do that by going into the static mesh object, and we can look here by showing the collision. If we turn on simple collision, we can see this green line appear around our object, and you can see it boxes in the entire thing, which means even in this center part, there will be a collision, which is perfect for what we need. If we didn't have a collision here, we would just at it by saying add box and put collision And what you may not know is that you can actually move these collisions around and scale them however you want and hit save . Okay, So that put a collision from here all the way to the back corner of the same object that our character cannot fall through. If we did the same thing for this and this object, maybe the entire ground object, this one, you can see if we did the same thing here and added a collision, it would again and close that whole thing so we could walk around. So that's perfect for that. If we have a box collision on that, we can add box collisions to this outdoor wall. Let's see how it's set up right now. So right now I can walk through walls because there is no collision there. And I can also walk off the edge because there's no collision there. See if I have any collisions out here on the outside. Do you have collisions here? If I go to this wall, I will fall through the ground before even get to it. So, actually, this I do need a collision on this ground material or this ground texture ground mesh. I should say so. Let's demonstrate at box collision and you'll see the green box show up there. Okay, so that's to keep them from going through the edges when we're in first person navigation, Then we could go in place collisions on this wall to keep us in this one. We cannot place a simple box collision on because, as you'll see, it will enclose the entire area, which is not right, because now we'll be starting inside of a collision and we won't be able to move properly. Okay, What we will do to keep ourselves in the yard here is to open the static mesh and you'll see that if we've just placed a regular box collider on here than it would encompass the whole area. And our guy would actually start inside of that collision and he wouldn't be able to move properly. So the actual way to do it, you can see what I have stood up here is to add one box collision and then scale it down. So originally, this would have placed, you know, like this are surrounding the whole thing, which is wrong. So I brought it over to here and scaled it down and then just place it on the outside edge of the wall and then you can just copy it rotated. Place him all around all four walls and then you are now having a collision that prevents your character from leaving the yard properly. OK, so just to verify, let's do this. We shouldn't be able to fall through the ground anymore. You put a collision on that? Yes. And when we get to the wall, we should stop like that. Walk through the bamboo case of that some basic navigation. Now, the other thing that we talked about earlier that I want to touch on again is the character . As you know, when you start with the first person template, you will have a character that has a gun and you can delete the gun, delete the blueprints that go with it so you don't get a compiling air. But what I actually prefer to do, instead of trying to fix the first person shooter character that comes in the template is I just put anarchist character in here, which, if you search over here for archivist, character can just drop it in. Mine is right here, and you will see that this is a smoother control for archivist types projects, and you can actually control everything in here from swimming to flying. The things where we wouldn't want to concentrate is on character movement walking. This is in the details panel of the Archivist character. You can change the max walk speed, but you'll see when I play that I've got a pretty nice smooth control going on for my archivist character. You can change the height of it and things like that. So this is better than a first person shooter character where you be running around and jumping and all that kind of stuff. So this gives it a more professional feel for navigating architecture. Now the only thing you have to keep in mind is when you do eat your first person character from the template, then the engine won't know exactly where to send the player controller and what character to possess with that player controller. So you need to make sure and set this archivist character all way down at the bottom to auto possess player zero case. A player zero is the first person in your game, and we only have one person in our game. So we want that to go into this character and all it really is is just a little capsule telling it not to run into things. The other thing that is important to know is that under settings, project settings, input over here on the left, everything is mapped to work with your keyboard and also a game pad. Because we started with the first person shooter template. All these mapping is will be correct. So as an example, space bar is set to jump. That means there's a blueprint, probably somewhere in our game where if you hit space bar actually with the artifice character, I don't think there is a blueprint for jump. But what this is saying, that is, if someone does hit space bar while you're in the game, then it will run the script that is associated with the space bar and the access map ings like move forward set to W. So there will be scripts in your game where W is run, and that is what causes your character to move forward. So if these inputs need to be set up and mapped correctly to run the proper blueprints in your scene. If, for example, you started with the VR scene than everything will be set up to be run when you quick e motion controllers and not these buttons, so the inputs would not work properly. If you started with that template, we happen to have started with first person. So that mapping czar correct. If you need to change those, you can export them from. If, for example, you were in VR mode and he wanted these ones, you could export them from here and then import them into another project so that these would be replaced. And then you could put a first person character in your game, and it would be looking for the proper inputs for that character. So again, just make sure that it's set to be possessed by player zero and when you hit start. Since there's no other characters in your game, it'll no to go here and you're ready to go with your navigation 31. Adjusting Inputs / Setting Up Custom Inputs: Okay, a little bit more about input settings. Just so we're clear about it. I'm going to do a little demonstration here if we go into settings again. Project settings, input we can actually make new in input. Mapping is here. I'll delete this and start over. To do that, we would just do this. Click this and it creates a new action mapping. Okay? And I'm gonna put this as, say hi as my action, and I'm gonna map it to the keyboard. You can see everything's in here. So including VR controllers, motion controllers, mouse keyboard, game pad, etcetera. And when I press one, I want to say hi event too trigger. Okay, it's automatically saved. Now, in random blueprint I have in my scene that's receiving inputs. I can hit one, and that event will trigger as an example. What's going to my character just already selected. And let's just turn it into a blueprint, Okay? I created a blueprint, and here it is. We can see the components that make up my blueprint. There's then, of course, the construction script which runs when this thing is constructed. So basically, when the level loads and here's the event graph where we do our normal blueprints. If I right, click here and type in, say hi, you can see there's an action event Say hi and this triggers an event. Now we can run any script you want off of this. So when say Hi has triggered, we want to print a string that says Hello and we'll compile that and save now because this guy is his character is set up to receive inputs and we just mapped a new input. Let's see if it works when were playing. We, of course, have our normal mouse inputs are directional vector scale er's. And if I hit one, you can see up there in the top left screen, it says Hello. Hello? Hello? Hello? Hello? Hello? Hello. Hello. So that script is running now that I'm apt that input and created event called Say hi. No. Every time I do that, it will run the script which is just printing a string to this green. Okay, now that will be important later. It's important to understand how our characters air working and where they're getting their inputs from, so that we can switch between things like first person shooter or virtual reality characters. But it is also important because later, when we're doing blueprints, we might want to put in our own actions and map them to a key on her keyboard or a button on our motion controller. OK, so that's how inputs basically work. 32. Level of Detail (LOD) Optimizations: Okay, One thing I want to talk about at least a little bit here. Since we have our navigation set up in things like that, One thing we should mention is some optimization. So depending on your video card and your computer set up, this may be a very big deal for you right now. Or maybe a small deal. One thing we can do is just look at the frames. So if we go here and say stats, not stats show FPs is what we want. Frames per second and you can see I'm way up high in the hundreds here, and that is great. That is easy. That's good. Everything's great, so you may not have to do any optimization if you're running at the same 10 speeds I am with VR, you need 90 frames per second with first person navigation. It's more like 30 frames per second, and you'll be fine. Okay, so as long as is in the green up here, you'll be good to G. O. OK, but if you are having problems with frame rate, then you will need to know some optimization stuff. So we've looked at some things previously in the course in earlier sections. And you guys know that some things are being done in screen space, meaning they happen and are being calculated in real time. And other things are burnt in so turning off screen space. Things will speed up your time turning off the post process actor because that's all happening at real time. So in a post process actor, you can go down to the right here, post process volume settings enabled we can just turn it off. This gives us a very different look, obviously, But that wheel, street a frame time for you. Okay, I'm gonna leave my non because it's working just fine, okay? And other screen space, things like you can go to show lighting features and you can turn off things like screens based ambient occlusion, screens based contact shadows, screens placed reflections. Okay, those things can all help you, but they also cost you. You know the quality of your image. So you'll have to balance that. Another thing that we can do. I've talked about overdraw. Some of that is if we go to optimization view modes and goto, overdraw and shader. Let's go to Shader complexity. Okay, so you see anything where I have opacity and things behind opacity and, you know, looking through glass, all those things are going to be complicated. And there in the red and white, which is extremely bad according to this. But you know, what else are you going to do if you need to have glass on your scene? And in architecture, this is gonna be a common problem, So there is ways to fix the foliage to be better. This bamboo is not optimized as well as thes trees are, and that's because of the way the polygons are formed. As we discussed earlier, there's too much excess space around the opacity maps, so there's a ton of transparency over transparency over transparency. And that's what's making this so difficult. Okay, so that could be optimized better. But ultimately, we're gonna have to find other ways to optimize because we need glass and we need transparency. So let's talk about one other way. Where we can do optimization is, and that is with levels of detail. So let's use this chair as an example. If we click on the mesh of this chair, let's look at it, and it's put in wire frame. So it's pretty heavy wire frame wise, especially down here where these wrinkles are. Okay, so what we can do is generate levels of detail and make it so that as we move further away from the chair, it is going to become optimized and have way less polygons. Now, unreal engine could do this for us automatically, which is quite awesome. It is very similar to the pro optimized tool. If you're used to using that and three d studio Max, it can do that for you. And you can set the distance basically how far you want to be away before it optimizes So right now, as an example, let's look at this chair It has unimportant has just one level of detail. We can set it to two or three or whatever we want. But two will suffice in this case. And then we apply changes. Now in the Elodie picker, we can go to L o D one. We can go to L o D one and now we can adjust Elodie one for what we want. Okay, so we can go into Elodie one here and say reduction settings right now it's a 100%. So it's not actually reducing it all for demonstration purposes. Let's go all the way down to 10% and then apply changes like pro optimizer. It might take a second. Okay, there it is. And here you can see we're in Elodie one. We're looking at Elodie One. You look at L d zero. It's the high rez. If you put it on auto, then we will see it change as we move away from the object, which is what is gonna be happening in game. So that's a good way to look at it. If you look in wire frame, you'll see it looks like this are out of wire frame, sorry, shaded mode. And as you move away, we know in wire frame that it is changing too low rez. But you'll notice that it looks pretty much exactly the same, right? There just isn't a lot of change going on. So this Consejo US time and optimization with our models, if we have some high res stuff in there, if we start running into problems with frame rate, we can do this now. The only other thing to mention here is how to adjust the distance at which it will change . And that would be if we go to L. A d one, we can say Okay. Down here in Elodie settings Weaken, take auto, compute Elodie distance and turn it off. And now we can say what distance We wanted to change that basically. So if we go to this and go toe wire frame again right now, it's changing right there. And that's being controlled by the screen size Elodie one. Okay, screen size 10.5. If we set that's like 0.9, then it will change even sooner because it's like when it's 90% of it's normal size, it's gonna change to the low rez thing. Elodie Auto. Just like right there. It's now changing, so we could change that to be like 0.1, then it really has to get small before it will actually change. Put this on auto now and now you can see it's staying high, resting, high resting, hundreds staying high. Rez Right there is where it changes right there. Okay, so not until this thing gets really small in screen will it actually change. And that's adjusted by that screen size setting right here. I think of reset it to light 0.4 will be good. Okay, We can save that and then look at it in game. So when we play, let's play in briar frame mode. Actually not play, but so here it's high rez, and right there it changes. OK, so as you get further away, changes optimized for you. And since the aesthetic mission that static measure the same, that one should do it too. And it does. Okay, so the nice thing is that it pretty much looks the same. Whether you're here, we're back here, and it changes basically effortlessly. You can see the light map changes a little bit on it. Um, so you might want to adjust so that that doesn't happen until a little bit later. But you can see from this that you're really not gonna notice, especially when you're out here. You just don't need that to be a sigh rez anymore. So that can save you some time and optimize some things for you. That's how L O. D's work 33. Material Parameter Collections: Now we're going to learn about parameter collections under add new materials material parameter collection. Just gonna call this edible materials. Now what this does, we're gonna use this to add some dynamics to our scene. I'm going to use the example of changing the color of these cabinets while we're in gain. Okay. And we're going to do that using parameter collections. If we go into this, we will see that this is just a ray of Ram Attar's either scaler parameters or vector parameters. A scaler look like this. It has to members inside of this little group here. Default valve value and parameter value. All it is a constant. Basically, we don't need that. I'll show you how to use these two so that this makes sense. Then there's also vector parameters, which is going to be three Constance, not just one. And as we know, three vectors can make up colors because R. G and B is just three numbers and that makes up a color. So what we'll do is make one parameter here and we call a cab color will set it Defaults to black. That works. Okay, Save now what? I'm going to do is in this material that's on this cabinet. I'm gonna set it equal to whatever that parameter is. Then of based color here, we're going to replace this. Let's just do this disconnected by hitting all right there. And we'll drag out from here and say collection parameter and then we'll set it to edible materials. Make sure that that's referencing the collection we just made. And then the parameter name that we want it to reference is cab color or cabinet color, and you'll see that it's gonna be black and are seen. The Cabinet will be black now, but it will be sort of dynamic in that whatever that cabinet color is set to, it will now make our material that color. Okay, Somehow I had two different materials of the same thing in here, so I had to change both of them. I could also updated by placing the right one on all the cabinets. I have these cabinets set up is black now, and they are currently working and referencing that parameter. Now what I'm gonna do is make one more parameter under materials. We want material parameter collection, and this is just color collection or let's say, Cabinet color collection. Let's open it up. And in here we'll set several different colors that we want to change that cabinet, too. They could be whatever you want. We'll call it red. Been at another one. We'll call it Blue Gray and then black. Okay, so those are the four colors we've got and we'll save now. What we have is two parameter collections. One of them is collection of parameters that we want to change, and the other one is a collection of colors that we want to change that parameter too. Right? So in the next video, we will look at how we could implement this so that we can maybe used one of our input triggers to just change the color of this cabinet. Said it to a new parameter color while we're in game. So let's check that out in the next video 34. Dynamic Color Changes: Okay, so here we have the material parameter collections created. Let's go in and create a new input, and we'll call it like, Well, we'll take our say, hi one. And we'll change it to change cab color. And we can set that to one. That's fine. Okay, make sure that in our character say hi, Event is no longer there. Print string. We don't need eso. We're seeing change cabinet color and we're going to then take this when we hit one that will change our cabinet color. What we need to do is change the parameter that's affecting the color of this material. So how can we do that? Let's take a look. So out of here, we can, when we press the change cab color button, which is one we can say set parameter set vector parameter value. Okay. And this gives us some options. Here we can choose which collection we're trying to address, and that is the edible materials. And then which parameter name are we trying to change? And that's just the cabinet color. There's only one in there. Now the question is, what do we want to set it to okay and to get that. We actually need to come out of here and say, Get parameter value, get vector parameter value, right. And we need to go into the color collection and get one of our values. So let's change it to read. We just set that here and then this node will spit out a certain value. It will spit out the linear color structure of this parameter after we have said it to read . And then we can take this and string it to their Okay, So we're referencing our collection, setting it to read and then taking that setting and playing you get into the set vector parameter value of our edit herbal materials collection parameter cab color. Okay, so that's a lot to take in. Really were just referencing our color collection in order to set the color of our cabinet color parameter. In the other collection we made so two collections and the one is referencing the other. So if we save, compile now, if we go in and play, if we look over here and if we hit one, our cabinets change colors, right? So this is not super interesting, except that we can also toggle through as many corners is we want right, because we can keep setting that parameter to different values from our color collection. So let's escape out of there and let's open it again. And remember, part of what's going on here is that this character is set to automatically receive inputs . And so when we hit one of our input buttons, then the scene will respond because that character can receive inputs. If you made a blueprint from scratch, you we need to make sure that it is receiving inputs also. Or else when you hit a button, it isn't even gonna be looking for an event and it won't react to it. The character, of course it does. Okay, so keep that in mind. So how can we make it toggle through all of these? Well, we can. Well, here's one way to do it. There's probably multiple ways. What I'm gonna do is set up a variable. I'm gonna just call it a count, so we'll call it color count, and we're just going to set it to an integer. There's a number that counts, and we want to compile so that we can set a default and will make sure that the default of it accepted zero. So first it's set to zero. Let's bring it out here and get Discover account. Of course, it's gonna be zero at first. Then we can do. When this is pressed, we can increment the integer, which gives you a little plus plus mark. And that just means add one to the current count of color count. So it starts at zero than it runs. When I run this action, it goes through here and adds one to it. So now it becomes one. Now we need to check to make sure. Well, let's just go with this for right now. We don't want to then run out of here a switch on integer, and that gives us the ability to do different things, depending on what this integer is equal to. So let's add some pins. Here we have four colors, so that will be our four colors right there. And if the color count is set to zero Oh, let's one other thing. So after this comes in here and adds one to itself, we then get the output right here, and we can plug that into here so that tells us which one of these we should run. So it starts a zero runs through here goes toe one. Now it comes in here and it's gonna run one right. And on one, we want this to happen on to let's just select these control, See, to copy, can control paste on to We want this to happen again. Except this time we wanted to change to Blue on three. We wanted to change too gray and on zero, we wanted to change the black. Okay, so let's see what we get. Now remember, it's zero first, but it's not actually running this because we haven't done the input yet. So it's just looking at the default, which is black, right? So when we play should be black. Then we hit one and goes to read and blue and gray. But it's not going back to black. Why is that? Well, because it never reset to zero. So if we go back into our character, we went all the way through here, and then we went to 45678 and there's nothing there, so it wasn't doing anything. So what we need to do is make sure that once it gets above three to reset to zero, and we'll do that in here by putting a branch in and saying int greater than if the integer coming from here actually coming from this note is greater than three and then run it into here. So if that's true, we want to then set color count back to zero, right? If it's true that it's greater than three, set it to zero and then run it into here. If it's false, then just run it directly into here. And the selection, the number we'll be coming from again. Color count. Okay, so if that's hard to follow, what happens is we press the button. It looks at the color count, which starts at zero. It adds one to it. Now we're at one. That means it goes this way. If as long as it's not four or anything greater than three, it will say false, and it will go here and get whatever the color count is. Probably the same is whatever this waas and it will run it. If it is greater than three, then will no longer look back to here. It will go up here and say true and set it back to zero and then grab it, a reference to it again, which is now gonna be set to zero. And then it'll run. Okay, so that's just controlling that. Some flow control regarding how these materials will be decided So it's compile and save. Now let's see if it works. It's black, is red. It's blue, It's gray. Should be black. Fingers crossed. Boom. Back to black. Okay, so a simple, dynamic color change using material collection parameters. 35. Turning On and Off Lights Dynamically: Okay, let's explore now some other ways to do some interaction. This time we'll do it a little bit differently. But you some of the same principles we're gonna do a blueprint to turn on and off this TV. So let's just start with the box trigger, which just comes in here. We can change the size of the box trigger like this. Let's make it come out in front of the TV quite a bit. Okay, so right there, that's fine. Now it's turned it into a blueprint, and we'll call it TV on off Blueprint. You can see that the component is just a collision component in the script. Now, this is where we need to figure out how to turn it on and off again. We need an input here, some sort of event that could be triggered. One thing I want to do is when we walk into it. So when we begin overlap of that trigger box, we're gonna trigger something, and we're going to say print to screen, print string. Now this works in development only. So it'll show in game mode. To do this in a packaged product, you'd have to set up manually your own message that pops up into the screen. But we will do that later when we deal with you lies and things like that. For now, let's just say press t to turn on, uh, TV. Yeah, so let's just look and see what happens here. When we go into our trigger box, we walk over here Presti to turn on a knock TV. Of course, if we hit T now, nothing happens. Okay, lets go back into this blueprint and you can actually search for tea here. And let's just print string to test it. Hello. We'll leave it at Hello. Let's go here, Geysers says Hit T When I'm hitting T Now it's doing nothing. Okay, even though we set it up to print a string, Why is that? Well, because it's not receiving inputs and there's no input mapped to the key of tea. So we could say, OK, well, let's auto receive input from player zero. And now let's see what happens. There you go. Hello. Hello? Hello? Hello. Hello. All right. So we set this up to receive inputs and its auto receive input. So it's just looking for any inputs that are happening, so it actually sees the keyboard hitting T, and it's responding to it. The other way to do that would be to go up here, and we could set up actual input and create an event that goes with the letter T. And then we could even put it onto this character if we wanted, like we did for the materials. There's various different ways to do this, Not to mention you could do it with the level blueprint as well. But we're going to set it up like this this time. Okay, so that's not receiving inputs. So now it's just a matter of telling it what to do when we receive that input. Okay, so back in our blueprint that contains just our trigger box in the event graph, let's delete this and say when we pressed E, we're going to create a dynamic material. Instance is what we're gonna dio dynamic material instance, and the parent of this is going to be our TV glow or our TV screen. Yes, okay. And it's gonna create an instance or basically like a child of that parent, I will say TV adjusted. Okay, So what that does is it's gonna take this material and make it into a child of that material or an instance of that material. And then once we have that, it will take all this is a base but in that instance will be able to adjust any of the parameters that we've set up here. So as a reminder, we have the TV glow, which is multiplying this image onto the TV by a certain multiplier and making it glow. And we right clicked on it, and it was a constant. We converted it to a parameter by right clicking and saying, Convert parameter here. Once it's a parameter, I'll show you what you can do with that. So if you want to add new material instance Okay, TV test. You could go into here and you could say the parent is going to be TV screen. Now we have a material, and it's referencing the parent of TV screen. But you can see the scaler parameter value is actually visible to us here, and we can turn it on and say Okay, now set this to one. Okay, so that just turns down that parameter, which is in the parent, right there 20 So that's what material instance can do. So it's kind of like a generic master template for material. And then you can change all the parameters within the instance of that material gay. So we can save this. That's fine, but we're actually gonna be creating one of those instances dynamically in game. Okay, that's what this note right here does. So it's taking TV screen as a parent and creating a new instance called TV Adjusted and is doing it in real time. And what spits out here is that new dynamic instance material. Okay, so we actually want to assign that to our TV now, and we can do that by making a variable and calling it TV mesh. Let's do that. Make sure it's set to static mish static, mish actor object reference. Hey, compiling save! And we want to make this visible. And of course, what that does is makes it so here on our blueprint in the details panel of it. Okay, once it's compiled here, TV mesh visible. Compile. Now back here, when we select our blueprint, we will see that a default category has been set up and TV mesh are variable right there is available to us. Now. We want to set that to this TV mess, right? So what we can do is use the eyedropper pick actor from seeing and just say Boom, Grab that. Okay, Now that static mish is what are variable is set to inside of our blueprints. Okay, so we have this blueprint here, TV mesh, which is actually set to a certain object in our scene. Now, if we drag this out, get TV, Nash. Okay, so we would want to set material of the TV mash You notice I had to turn off context sensitive there because it doesn't know we're dealing with the static mash that's right here. If I dragged out of here, I might be able to get it. Let's see, set material. Franken typeset material, and it still doesn't come up. Okay, But that's okay. We're just gonna drag it out of here and say set material set material, and then the TV mesh will be set to the target because that's what we're trying to set the material on the return value. Well, the material will be taken straight from here. This dynamic material return value will go straight into that. And then the element index is the last thing we need to make sure it's applying to the right part of that TV mesh, which would be element one. Okay, so we can just set that hard code that in element one. So what is that doing right now? Nothing that will notice. Well, it's doing something, but we won't notice it. So here we we go into their and we see our message pop up. And the material, actually. Well, actually, we haven't done anything yet. If we hit t, the material will change, but we won't notice it. Okay, When I did that, it actually crashed my scene. So that's not good. But, um, I've done it again, and it didn't crash my scene. Okay, so if I hit tea right here, didn't crash my seeing. But you also don't notice anything happening because we just put the basically the exact same material back onto this TV in real time. But it's not exactly the same. It's actually dynamic now, and we can adjust it. So once we have this new dynamic material instance applied to our object, which I think is working, let's do this print, string success, bio and save. See if it works. Nope. Didn't work. I think that's when my scene crashed. It didn't save the fact that this was the mesh I wanted in my blueprint here for my variable. So if I take this eyedropper again rectangle 6610 I think that's right, save. Then we'll try it again. Que moment of truth. Here we'll go into our box. It says press T K T nothing. Okay, Actually, everything is working. But that crash messed me up. I just had to. It hadn't been saved that I put the auto receive input to player zero. So I reset that. And now it's working. And that's a good reminder of the things that we need to watch out for. So we need to make sure our mesh is properly referencing or being referenced into that variable. In our blueprint, we need to make sure a blueprint is receiving input and now it will work. If I go in here, my message will pop up and I'll hit T. And it will say success. So actually that material is being changed on that TV. But we can't tell because it look exactly the same. And it happens in a fraction of a second. Okay, so we want to make that do something else that we can see and get rid of this. Now we want to set the parameter of that thing. Okay, If we drag out of here, we can say set scaler parameter value. Now we need to get this name exactly right. And that would be in here the parameter values called T v Galo TV glow. And we'll set it to zero, and we'll string it right up to there. Parameter value TV glow set to zero set scaler parameter value on our instance. Oh, the TV material. Let's see what happens when we do this. Okay, We hit t and it went off. We hit to you again. And boom, it just crashed my scene. Okay, okay. We don't want it to continue crashing, are seen which it just did. So it worked. Turning it off. We need to tell it what to do if we hit to you again, right? So I think right here we should be able to put a toggle or a flip flop, which is a toggle switch basically Okay, so first time we hit it puts it to zero. Second time we hit it, let's copy this and put it to five again. So it just toggles on and off, and we need to make sure that the proper material instances being referenced still, it's gonna be the same. One is up here and one quick tip here we can double click on these lines and add a little redirect node, which makes it a little more queen for us. Possibly so. You don't have everything overlapping all over the place case and others of foot flops. So the material gets set automatically when you hit T. But the flip flop is between what the value on the parameter on that material instance gets set to. Hopefully that doesn't crash us. Let's try it. It did. Okay, I believe this is crashing because we're creating a dynamic material every time you press tea and then assigning it, which we don't actually need to do, right, because it's already created the first time we hit t So we want to do is say that the first time we hit t. It does all this the second time. It just flip flops between these two things and every time after that. So what we'll do is make another variable similar to what we did before, so t count t count said it to integer compile, set it to zero, bring it out here and get so think about how we could do this year the first time we hit it . So we basically wanted to a branch. If t equals zero, do this. If it doesn't equal zero, do something else. Okay, so let's do a branch and say if t equals zero so this will be a int equals integer. So if t count equals zero true, then do this create this material. We'll turn this offer now and these because we only want to go to right here. We want to set the material in the TV that first time with this mesh. So right now is this saying if this is the first time we're hitting it, then created dynamic material instance and assign it to our TV mesh, which was are variable if it's not equal to zero than we want to do something else and it's probably this you want a flip flop. The values of our scale. Er's right. And these need to go into that same material right here. And the only other thing we need to do is make sure that once this runs on that first time , we no need to add one to the T count. And then it will be one from there on out. Right. So let's take this and say, Get to count and incrementally at one increments end. Run it. Okay, now it's set to one. And now this will trigger every time. Instead of that, that should work. We'll see. You never know. Okay, T so that just assigned the material. Now get to you again. Didn't work. Okay, It actually was working. It's just that that input got turned off again because I crashed. So let's demonstrate. Here we go. We'll go into our trigger box. It'll say t to turn on the first time we hit t. It's actually not working. It's just assigning that dynamic material. But now that the dynamic materials on it'll start flip flopping between are to scale our values. Okay, so that's working. The only thing I don't like is that the first time it doesn't work So the first time we actually want to sign the material and put it to zero like that. So this will follow this whole string. It will add to do the T count and it'll go there and set the parameter to zero and then the next time it'll flip flop. However, I think the next time we hit it, we probably wanted to go here. And then the third time we had it, we wanted to go back just so that it works properly. Let's see, let's check our work here into their tea, turns it off and teach turns it back on. Boom, boom, boom. Okay, so a little bit of trickery there to get it, to feel like to the user that it's just working properly. Okay, but there it is, your turn on and off the TV. So that's another way we can use this trigger box and we could actually do similar things. We could make a blueprint here, copy it around and make it affect other items by just changing the variable that were affecting right. So we could we could be turning on and off this light bulb up here. If we said are variable to this mesh instead of the TV mesh. Okay, so that's a way you can make a kind of a template blueprint and then copied around and use it in other ways. Okay, Hopefully, that's helpful to demonstrate how to use some blueprints to make things interact. 36. Basic UI: Okay, now that we've done some simple editing stuff, I want to make it a little cleaner with some you I stuff so that we could actually control things with the button instead of just putting up ah, message on the screen that says, Hit this, hit this key to do something right? So let's do a basic you I because that will set the groundwork for creating a lot fancier menus and interactions in the future. So what we want to do is say, add new use your interface widget blueprint. I'm gonna call it Main menu to because I already have a test one called Main menu. So let's go in here and just do it from scratch. This represents our screen here, and the first thing that I usually do is put in a vertical box. And here is where we can search our palette of different items we can put in. Are you I and this down here is our hierarchy. So the canvas panel is is basically our screen. We can drop a vertical box and child it to the canvas panel. You can see it appears right there. Then we can resize it either by numbers or just by dragging. This is our anchor right here. So that's anchoring to the top left of our screen. Which means this will always be right up in the very top left of our screen. If we move it to here now, this relationship right here, this amount of pixels and this woman pixels is padding here will always be the same in relation to the top left of the screen. Okay, with our vertical panel, let's take now some horizontal panels or Arizona boxes and child them to the vertical box. Now we have a little horizontal boxer we can choose to fill, which fills the entire vertical box. So now are vertical box in our horizontal box are the same size. But let's take another horizontal blocks put in the vertical box as well, Child, that in the 2nd 1 Well, Fila's well, and now they're splitting the difference between the two. Okay, now, if we wanted a little padding here, we could do that as well. By changing the padding on both horizontal boxes to like three. Now, we have a little bit of padding between the two. Okay, Now we could put buttons in there, and we'll just keep on building up our hierarchy in the horizontal boxes will put buttons. Obviously, we would want those to fill across right. And I'm not liking the size of any of this so we could do this. There you go. That's better. And for the horizontal boxes were just letting the buttons fill the hole horizontal box, which you could do. You could also add padding to the buttons. Right. So they don't fill the whole box, get out another three padding to the button. So now there's vertical box, horizontal box and then button with, oh, with a little bit of padding in between. Okay, so obviously you can mess with that. And there you can spend a lot of time making it look pretty. We're not gonna concentrate on that right now. Let's add also some text to our buttons. You could just put it right there. Text and text. And for now, let's just change this one to say, Quit all caps. Okay, there you go. So there's a basic you Why? With a button and a text, and it's all just hierarchy stuff, and the panel has all the different elements that you can add. Okay, so there's a lot of different elements here for a basic button like this. This is a very simple set up now. This has a event tied to it. This button does. You noticed the text Doesn't. The button does right? All these events are down here so we can say on clicked, and then we can do something. Quit game, Compile. Save. Okay. And up here, you'll see that this is the event graph for the buttons that Aaron are you? I and we can always go back to the designer here and go back to the visual elements of our design. So, graphic designer. Now, if we clicked here and did an event for this one on clicked, it would take us back to the graph automatically. And this would be on a quick for button, one who could do something else. We're not gonna add anything there, though. Okay, now. So how do we get this to show up on our screen? Well, we're going to use a different blueprint to reference that entirely. Usually these you eyes are tied to the character or are player zero. So if we go into our character module here, which is being possessed by player zero as we know or our first player, we can now go into this and at the blueprint of this so that this player will now see a u I pop up and you can see I have the basic elements of it here because I was already experimenting with this. So if I just link this up and we'll talk about everything I did here, if they link this up and compile, and then we'd have to say which menu we want to construct, compile, save. Okay, so let's see how that works. And remember, this is being triggered by the M button. Okay, So when I play, if I m my you is constructed and it shows up for my first player by player one, you can see I've now have a mouse active and my menu is active and I can hit quit and it quits the game. So let's talk about how that set up. Let's just do it again so that I can walk you through step by step. So first we would search for whatever button we want to use. In this case. Let's use escape to bring up our menu. Then we needed to tell the engine to build. Are you I So the u I is in our project, but that doesn't mean it's always constructed and showing in our scene, but we're going to construct it by telling it to construct. So that's typing. Create which it. Okay, so right here we have this know that creates the widget, and we're creating it from the class of main menu to That's just selecting which you I were wanting to create the owning player. It will only show up to the player that we tell here. So what we do is drag out from here and say, Get player controller. This is much easier because, you know, we only have one player in the scene, right? So So the player controller that we're talking about is player index zero or the first player in our game or, in our case, the only player in our game. So that is the player that will own this widget that's about to pop up. Now we add it to the view port, so it's constructed, and then we added to the view port of this player that we're talking about here and to view port. And what are we adding to the view port? We're adding this menu widget that was just created like that. Now that would be fine, But let's see what that gives us. If we compile and save, we hit play and now we hit escape, huh? We can't use escape cause that just automatically closes our game. We don't want that. We could go into the settings and adjusted, but let's just use a different button. So instead of escape, we'll just detach this one here and use it on my new one. So M is the button we hit for menu. Let's try it real quick, so m okay, and you see my menu pops up, but I don't have. I'm still just controlling my character, though, so I need to switch control from my character, too. A mouse control that doesn't move my character around, but now gives me the option to show my pointer up and to click some buttons. So that's the last thing we need to do for this blueprint. Go back into the character here and remember, this could be done other ways. But we're doing it in the character because the character is set to receive inputs. So when we hit em, that character knows, Okay, construct, which it add to view port. Okay, so it's just a pretty easy way to handle all of this. So let's set that input up. Also, when we set the input, we want to set it for this particular player, so we'll show how to do that. So set input is they know that we want actually set input mode. Okay. And you have options here said in Promote game and you I game on Lee or you I only okay for this. We want you. I only because we don't want the character being controlled. So in widget to focus. So here we can tell it which widget we want to the the mouse to jump to. And we already have our widget here. It's right there, and we can just say this one. We want the mouse to jump to that one automatically when we hit em. And again we need to tell it which controller which player is now using this mode. Which players going into you I mode. Fortunately, we have that player right here. Okay. Every double click on this, It will give us a reroute node. Could make it a little cleaner. Here, it's come down here. It's come down here so we don't get mixed up, okay? And the last thing is to show the mouse cursor right. We need that. That is specifically set. It is a Belene. So set show, mouse, show mouse. Let's turn off context sensitive set, show, mouse, cursor. We'll just set it to yes, checked. And again we can drag out of our reroute node to here to tell it which one of our players is again getting these instructions. So for that player were setting show mouse cursor to true so that it should show up. And that's all there is to it for doing the menu. So let's see if it works. Hit play. If I am, my menu pops up. You can see my mouse cursor now shows and here we are. We can hit text block. Nothing will happen. We can hit, quit and the game quits. Okay, so that is a very basic main menu. We can also use that to control other things if we want so if we go back into here, we could go into the text block event click so we could view on clicked. Remember, this is the event of clicking that button. And we could say this We could turn off our TV and things from here if we wanted we could print a string that says hello. Okay, so all that stuff we did in turning on and off TV, we could actually make buttons to turn it on and off here, and we'd run all the blueprints, all the scripting right off of this button right here. Okay, So that could be a cleaner way to do. It is a clean way to quit your game. And that's some of the basics of how to do a widget blueprint. And that should help you help give you some ideas of how you can make some really cool interactions that looks sleek and worked really smoothly for the user. Last thing is, let's just test this out Play. I m for menu text block. No. Okay, go. 37. Changing Materials With UI Buttons: okay. I want to talk about taking theme menu that we've made the little main menu, the widget, and using it to control some other things within our scene. So in doing that, we're gonna make a totally new blueprint and control it using our main menu. So what I've done here is I created a generic blueprint and you could do that by going add new Blueprint glass. And in this case, we did an actor. Most times you're going to do an actor, these air, all specific blueprints that do other things. So we just created an actor and puts this little fear here. I named it would change, underscore BP. Now, when you go to edit the blueprint, you will see that in my blueprint There actually isn't anything here. If I go to the View port, there's nothing. It's just that actor and a default seen route component there, which is basically nothing. It's basically ah, placeholder type thing. That's the only component here. But what I did do is add variables and what I did. Let's just ah started over here. A added a variable, and I called it would actors and click the eyeball to make it visible outside of this blueprint, and we said it to static. Mish actor here can search for it static mesh actor, object reference. And then here, instead of making it just a single object, we're making it in array. That's what that little icon means. And so we're making a collection of static meshes that go with this blueprint. There's nothing in the blueprint except for this variable that holds a few static meshes that are, of course, visible outside of blueprints. So if we can pump, compile here, hit, save and then we click on her actor here, we now have because there's visible variables. If we click on the actor, we will see access to those variables right here. So one more time if we go in here. If this was unchecked, we compiled and saved. We would not see anything here, but because I made invisible. We can see them outside of the blueprint here, and we can change the category to. If we wanted, we could say static mash actors compiled save. Now the category will be static mish actors, and we got here static mesh actors right there. So there's three of them. And what I'm gonna do is put a collection of these doors in to his blueprint as variables. So we do that by clicking on here, and we're just setting the variables that variables, they're going to be equal to whatever we sat here and I can do it with a I drop her. I don't want that door. So the first object in the array, the first actor in the ray is that door just picked. The second one's gonna be this door, and the 3rd 1 is gonna be this door. Now, I'm gonna use the main menu to change the material of those doors. So basically, what I going to do is click a button in the main menu. It's gonna look for this blueprint in my scene, and it's gonna grab the variables out of there and whatever they're equal to since we just said it equal to these three doors is gonna grab these three doors and say, set the material on those doors to a different kind of wood and then we'll put a flip flop in to make it so that when you click it again, it'll go back to these Cut this kind of wood. Okay, so pretty simple in theory. But important part is to just have this blueprint sitting in our scene that has thes variables available in it. And we can set him to whatever. We can also add more to it if we wanted to. So it's adjustable. Now let's look at our main menu button to see if we can figure out how to make it work. Okay, so in the designer of my main menu, which it I just I took this button that we already had and I said that changed the text to say Change would. And of course, when we're in a button, we can go to the on clicked hit view, and it takes us to the graph. And we have a event on clicked button one that triggers whatever we have over here. So obviously I already have it set up, but we're gonna do it again. So first of all, we want to flip flop so we could go back and forth. We've seen foot flops already. Then what do we want? The flip flop to do? Well, first we need to find that blueprint in our scene. So what we can do to say get all actors of a class and the class that we're looking for is that blueprint we set up so that creating that blueprint actually actually creates its own class. And within that class we have We can have really anything inside of their functions variables, but we just have a few variables inside of it. But the name of the class was would change right? Would change. Underscore BP? That's the name of that blueprint that holds those variables. Now you can see that out actors. So it's looking for the class, and it's grabbing whatever is in that class. The actors that are in that class, we have only one that's in there, right, that blank actor sitting in the middle, nursing, that's our one actor that belongs to that class called would change BP. So it's giving us an array symbol here, but we only have one. So we're just gonna get the first object in the array array, get okay, so make this is set to zero because our index starts with zero, not one, and so that's just telling us the first thing that it comes, comes back out of the array. That's what we're grabbing. And it's just that one actor from now, now that we have that actor, we can grab the variables that's in it. So what was the variable called Get would actors can, You can see that's giving us an array of the wood actors that we have set has variables. Okay, so we now have a reference to that. When we click the button, it grabs a reference to our three doors. Let's look at what I've done already up here. So now we take off this execute herbal, and we run a four each loop. If you're not familiar with coding principles of four, each loop is gonna take and do one thing, or it's gonna run some code for each object. In this array that we have collected. Array is just a group of variables, multiple variables. So we have three doors here, and for each one of them, we're going to do a certain amount of code over here. So run this array into here and now say, for each object in the array, let's do this. We'll put that in the loop body. So what are we gonna do Well, we're going to set the material set material. I don't think this is the right static mesh that we're looking for. We want to drag from here. So the element in the array is there's each different door is one element in this array. So for whichever one we're on, we're gonna set the material and it will go for each one. So it will start with zero, and then it'll do one and do the same thing that it'll do to do the same thing, and then it will stop. Okay, so let's set the material here. I brought in a substance material called Beach. Would you can grab it too? With the substance. It's Free Beach Natural wood, Matt. Okay, compile, save. Let's see if this is working yet in here, we can hit play, and we can hit em for a menu and say change would. And there you go. The door changed. If I had changed what again? It doesn't go back because we have not set up our flip flop yet. We also haven't set up our menu so we can exit it without quitting the game. One other issue we're having is if we look over here at this door, we hit em and change the wood. You can see that this one's working, but this one's changing the wood of the door. Fring. So that isn't right. We need to fix that. We can do that by well, let's look, first of all, examine what's going on. If I click on this door, you can see Element zero is the wood. But if I click on this door here, you can see the out. The wood is an element one. So for the third object in R. Ray, right here, Line 37. That's this door over here. We need to do something a little different. So in main menu to again, we're going to look at here and say, OK, that we're setting the material for Element Index zero. We saw that for two of the doors. That's the right one to change to Beach natural wood. But if run array index three or two, that's that third door. We need to do something different. So we need to bring a branch out right here and say, Okay, if they ray Index equals three and we'll just type in equals if it's equal to three now to sorry to. Then we need to do something different. If it's not equal to that 1 to 2, then we can run this one because I was right. Okay, so really, we just need to copy this and paste it. And if it's true of it is equal to two or that third door, then we need to just do the exact same thing. Except we want to change number element index one, not element Index zero. Okay, let's see if that solves that problem. We'll start hit em for menu change would. And there you go. Now it's working properly. Now the last thing we need to do is set up our little flip flop action. So we can really just copy all of this control, see and control V down here, set it up to the B node in the flip flop, and then go back here and change this to chair. Would instead of beach compile and save. Let's start it again. And for menu change would change would back. Okay, so that's a pretty simple one. We could, of course, make it much more complicated. We could even set up an array of materials that we wanted to go through on the doors. This is just flip flopping be between two. But if we had, like five materials, we could set up a whole array of materials and shuffle through each one of those two. So there's a lot you could do. But that's kind of one way to set it up so that it's connected to this button here. And the trick was this. Get all actors of the class and referencing that that kind of empty blueprint that sitting in our scene that just has an array of doors sitting in it. And once we got access to those doors, those actors, those static mish actors, we could then change their materials. So that is one way to do that and one way to add more functionality to our menu items. 38. More UI Controls: So here we are in our main menu to again and all we do. All we have in here right now is a quick button. And the change would button, I want to put a little X up here in the top left. That makes it so that when we click on that, it closes the menu and gives us back control of the game. So let's take a little look at how we can do that. And this will just teach us a little bit more about you. I widgets and some of the things we can try to do with, um So again we can just add a button and we're gonna put it into the just the campus panel , which puts it up in the top left. So it's not in this vertical box with these other buttons. Just fine. Resize it okay about like that. And then we put a text in there. You just drag it right into here. Here's our button. Five in our hierarchy down here will change the text block to just have an X is not the most elegant way to do this, but totally works, Okay? And we're just trying to figure out some of the underlying principles involved with the U I widgets. You can make this all look a lot prettier when you do your own. If we just click on this, it will take us to on quick. And it can click this button here, which gives us an event trigger for when we click that button. When I did previously, OK, online. So button. Click five. Now What are you wanting to do here? We want to kind of destroy the menu actor and give the set that controls back to too. Not just you, I right. So when we create our widget, it's actually this code right here inside of our arc of his character. So we're creating a main menu to widget on this player controller. We're adding it to the view port, and then we're setting the input mode to you. I only so we want to reverse all of that. Basically, we don't want to show them. Oscars are either. So if I copy and paste at all into here, then we can look at kind of what we need to undo with our quick 15 I'm back in my main men , you know? And I just copied my code from the artifice character. This is what happens when we create the menu. Who need to now reverse that when we click this button. Okay, on a click button. Five. We need to get rid of the widget that showing on this player controllers Vieux port. So there is a function called remove widgets. If we could see remove which it's remove all witches. Okay, we can do that. And if we compile and save hit play now, if I hit em, my widget will come up. I can quit. I can change the would like this and I can hit this X now, which removes the widget. But it doesn't give me back control of my view port. So that's halfway there. Let's look at what else we need to do, though. So we removed the widget. Now we need to. So it's no longer interview port. We now need to change this element here, which we should be able to just referenced directly. Set input mode. Game on Lee. OK, so we need to now undo this here which has set the input mode to you. I only we want to set it back to game mode, said Input game Onley. Okay, so now that's coming back. And then we just need to set that variable set mouse cursor. We can turn off this set show mouse cursor. That's the one we want, and we just leave it unchecked and compile and safe. We need to target for this, and I believe it's gonna be our player controller. Yes, so the mouse cursor is dependent on. I mean, we need to tell it which player we're talking about that has no mouse cursor showing. So we just said it to player into zero, which is, of course, player one and just say, for that player, we don't want the mouse cursor showing it is unchecked here. Compile, save play. Hit em for menu and it didn't work. So let's see what we did wrong here. Leave now. We also have to have this linked up to a player controller as well, so that it knows which player were controlling here with all these, all these commands were giving so m x and now I'm back in game mode. I m hit the button. We're back in game mode. So we can now have kind of a main menu. It can hit em for main menu, change the wood and then close the menu and keep navigating. Of course, we could set it up so that if you hit em again, it closes the menu, too. I wanted to show you how to do it within the menu. Just kind of nice and handy. No instruction is needed, right? It's a little bit more intuitive. There's an X there, and everyone knows what that means. Okay, so that's a little bit more of the U I stuff and how to control it. So take it from there and start developing. Your men used to do all sorts of different things within your game to add interactivity and ease of use for whoever is navigating the seat. 39. Optimizing For VR: okay, lets go into turning this into a V R project for the first time. Right now we have a lot of baked lighting. It looks fairly good there. I need to do a new light. Bake on it. But we've looked at quality settings and all things like that. Now how much of this can be transferred of ER? That's really the question. If you look at my frame rate right now, it's It's down. Well, right now it's 24. It goes, it goes up higher, sometimes goes on lower. It's up 60 70. I don't have a great GPU running here on this computer, so it's pretty basic. Hopefully, it's about Baseline so that you guys could get at least similar results. And I've shown in the past where one option for you to take this into a VR type project is to just start a brand new project from scratch using the VR template. And that way, all the settings will kind of be optimized already, and there's a lot of 70 settings that you can optimize. You can get really deep into it, and the template is an easy way of making sure that that's all done for you. And then what you would do is just take this level, which for me is called House, and I'd right click on it and say, Asset actions migrate and I'd migrate this entire level and everything associated with it into that blank VR template project. So it's basically taking this whole level and putting it into a project that's already optimized for VR. But I'm gonna look a little bit at some of the settings that we can easily adjust here so that you understand what kind of settings might be changed into BR template as compared to hear. Some of these will bump up our performance, some of them not too much. But it's good to understand kind of what's going on and the dream that I've had of of creating a desktop walk through and a VR walk through in the same project where you could just switch seamlessly between them. Like, for example, if I'm playing this one and I say all, let's look at this in VR now I have done that, and you can do that with a little bit of blue printing to change your you know, your your character and all those kinds of things in your navigation settings. You can do that, However. What that really means is you have kind of you'll probably stuck with a pretty low quality desktop walk through and a really high quality VR that will maybe be chopping because the frame rate is too low. They so a lot of times they should just be separated most the time. They should probably just be separated. One thing that does kind of work is if you make that two different levels. So when you say Okay, let's look at this NVR Now it opens a new level, and in there you could have all your settings dumbed down, especially like your post processing settings, and make it just completely different. So all the system settings or the game settings for that particular project will be the same still. But on each level you could have different quality settings so that the VR one would still work seamlessly. So you could imagine making a whole level like this than duplicating the level and then putting something in, like with our menu to say, OK, let's look at this nvr now boom hit the button and it just opens that new level. And you could navigate back and forth with the menus if you wanted or whatever. That's another way you could handle it. And you could technically do V R end desktop walk through in the same file. But you have those problems that I already discussed. So what we're gonna do is look at some of the optimization that we can do just to turn this into BR. So if you go to the documentation on riel engine dot com with VR performance features, you can go here and look at some of the different things that we can set up. So one thing is VR instance stereo, and this was introduced to optimize VR, and it could be found under edit project settings, rendering VR Now with some projects, this isn't gonna help you much with others. It might. So let's just look at it, enable it project sittings, rendering VR. So if I type in stereo up here, we can enable instance stereo. Okay, this is gonna require a restart in a rebuild of our materials. So let's hold off on that for now. So that's one option. You can see if that works for you. Another thing is we can skip this mobile stuff. We're not focusing on that right now, but forward rendering is something that can potentially help. So by default on Religion four uses a deferred render as it provides the most versatility and grants AC system or rendering features. However, there are some tradeoffs and using the deferred render that might not be right for all of your experiences. Okay, so the key is forward. Rendering provides a faster baseline with faster rendering passes, which may lead to better performance on their platforms. Okay, so this is we're testing out, and like it says here, it's not only faster, but it also provides better anti alias ING options. It does change the look. It does change some of the settings, but for VR projects, it usually will give you a better result. As faras performance goes. Okay, if I go into project settings and go to forward shading, typing forward shading quick, Okay, again, this is going to require a restart. Okay, we'll restart later. Let's look at some of these other things. Okay, so this is a different method of doing the rendering and for VR. It's usually preferred because it's faster now in the VR post process settings. Okay, this is this is an important one for post process volume. This tells you to add a post process volume and set it to unbound. And then each of the settings, especially the heavy ones, should be probably turned off for VR. Now, what you want to do with VR is see what you can get away with and at a proper frame rate and, you know, for higher quality, see, try to put, inasmuch as you can get away with without costing you too much frame rate. But when it starts getting dipping down and with with VR, we're looking for 90 frames per second. If it starts dipping down into the thirties in the forties, then go and start taking out some of those quality settings and seeing if you can get it back up. So what it suggests here is in post processing settings. The key part is this box down here. When doing this, you won't need to hit every section and set all the properties to zero instead, First disabled, the really heavy hitting features like lens flare screen space reflections Temporal anti alias Ng s essay. Oh, that screen skate screen space, ambient occlusion, bloom and anything else that might have an impact on performance. Okay, so let's look at those things and start turning them down to up our frame. Right now, we've talked about in this course already how things like screen, screen, screen, space reflections are all being calculated in real time and can cost us pretty heavy. So those are the kind of things we can look at to try and increase our frame rate. So I put the pros persons in volume on unbound. Make sure it takes in our whole scene. I don't think that that actually is going to matter here for us, quality wise, just falling exactly what the instructions say. But my box actually takes in my whole scene that I wanted to already So Okay, so what? It's asking us to do a believe it's actually override some of the settings that are just default up in the project settings by putting in this post process volume. Okay, so this is telling us make it unbalanced of this applies to everything. So this stuff is not gonna be happening anywhere. So, like I am being inclusion, we can just It's unchecked like this by default, which means that is being controlled by the project settings. And we can just turn it on here, which is gonna override. And then we can just set it to zero. You can see if I turn this off and inclusion actually comes back on. But this is kind of an override. So zero. That's one of the big ones. Of course, it mentioned things like bloom up the field lens flares. We can set those 20 bloom intensity zero. Okay, already it's looking different, right? The bloom being gone looks quite a bit different. Screen space reflections We can turn off entirely. Okay, Right now we're hovering in the fifties, 60 seventies eighties high eighties for frame rates. So we're doing pretty well. We've already upped our performance a little bit by turning off all those things. Okay, One last thing I want to look at here is for optimization is with the scalability settings . So you can see here that I have scaled some things down as far as quality settings, and again, some of this stuff will be determined or set. When you do your templates, you can set it to highest quality lows quality. But you can also going to hear engine scalability settings and go to the quality of different things and set them. So I said anti leasing toe low. If I put it to cinematic, it goes back to where we were case and everything looks normal, but my frame rate drops considerably, right? So anti leasing we can put lower down the distance post processing. If you put this, you'll notice that my exposure settings are now essentially completely turned off. My auto exposure settings not liking putting that so low we could put that to like there. And it's basically working like I need to, but probably turning off some stuff that I that aren't absolutely essential shadows. If they put this too low, you can see that the shadows are non existent. Put it too high. You can see it's still not as good. Like the resolution of the Shadows is just not as good. But my frame rates cut, probably gonna be way, way higher. My shadows were taking up a lot of the processing time for the GPU. Okay, so mess with this until you get the results you want for the speed that you want. Okay, you can see some of these. I can put him down, and it doesn't even affect the way anything looks. Okay, So what I'm gonna do here is just kind of get my settings right. And then I'm going to set up that forward shading. I'm going to set up the instant stereo and then I'm going to reset everything and come back and see what kind of results we can get. We're already getting a very good frame rate with just adjusting thes scalability settings and the post process volume, as was shown to us in the documentation. So let's do that. Instant stereo check forward shading check right there, and we'll do a reset. OK, so that's some ways to optimize and get your frame rate up high. And from here we will take it to get the VR navigation in again, something that could be done by just migrating it into another template. But I want to show you how to do it manually so that we all understand what is actually 40. Importing VR Functionality From Pre-Built Templates: Okay, so here I am back in here, getting better frame rates now. And they'll fluctuate a little bit while I'm in the engine here. But when I package, they should be a little more consistent and they're high enough now that I'm confident that everything will work. You can see things look much different now. Getting weird shadow on the top of my pool here don't want. The point is that you can now get to a level where everything should work in VR properly. And from here we could adjust settings like I don't like my reflections right now at all so I could go and put putting better reflections. We could also bake all of our lighting, turn off any stationary lights and that put everything to static and bake it all in. It may be lower settings to to save free up some space, so there's a lot of things you can do. But now let's look at actually, I want to go to scalability and turn up the ante leasing. Do something better. Hopefully we can get away with that. We shall see. You can see my frame rate is dipping down quite a bit now Maybe I need to go to something there. Okay, So let's look now what we do to get some of the other functionality of VR into this particular scene. And this will be a case where again, we could have migrated the level to the they are to a blank VR template. Instead, we're going to go the other direction because I think it's more informative to you guys about how this all works so well, do it that way. I don't want to. Just all kind of happened behind the scenes so that you get it right. But you don't know why. Because then if something goes wrong, you won't know how to fix it. Okay, so let's go to a new project. Let's save this one and will close it down. We'll launch our engine. Okay? Once our engine is open, we can just create a new project and go to blueprints and virtual reality. And here we can set, you know, maximum scalability. This is going to adjust the scalability of our engine. The settings were just adjusting. Okay, weaken. We don't need any starter content. We can put it to stop console. Oh, another setting like, if you put it a mobile tablet that will also adjust some of those basic default settings as well. Mobile will put it lower, basically. So for this, all we need to do is create a basic project with the VR template, so we'll call it Blank, be our template, create the project. Okay, now, when we're here, we just need to grab a few key things that epic games has made for us. It's the motion controller upon. We can go to the motion controller pond, which is the character that has all the controls built into it. We can say asset actions migrate and you'll see all the stuff that comes with it. BP motion Controller is an important one. There's and then there's all those stuff behind the scenes is we're all the scripts and everything like that. Okay, so let's migrate that to our new scene or to our existing project, I should say. And you just navigate to the content folder of your project and say, Select folder content migration completed successfully. Okay, so this and everything associated with it has come into there. So now we'll have those controls that brings the hands that brings the teleportation scripts that brings everything. Okay. The other thing we have to get out of here is if we go into settings. We've talked about controls a little bit. We need to grab the controls out of here and save them so we can load him into our other file. So project settings inputs Year ago on project settings, we go on the left side, under engine to in blood. Now, I've showed you this before, but here we go. We have export and import. What we want to do is export these because all the inputs are mapped to the motion controller of your headset, your VR headset. Okay, so for example, grab right is motion controller, right? Trigger. Okay, so these air already set up and map for us. There's no point doing it again. So you should just export this. You can see I already have a file here. The are inputs, I and I. I'll do another one. Okay. And now we're ready to load that into other file. We now have everything we need from this template. Now there's no point reinventing the wheel on building all this stuff from scratch at big game has done it all for us. We just need to get the usability from the template and put it into our file and again. As I said, You can also merger level into this file, and everything will just already be here and working. That's probably the faster option, but we're just trying to understand exactly what's happening. Gay ones Back in our project, our house project. Let's open the level and we would just load those inputs in and put our motion controller pond in and we're ready to go. So search for motion controller put it in. This goes at the ground because it's actually tracked your head so that dummy stays at the ground and the camera tracks to your head in relationship to that dummy there. Okay, so that's right. And then our settings, our input settings, we'll just load them and we'll be ready to go to control RVR stuff inside of this project. Let's just import these, okay? My settings air basically already set up with both keyboard controls and and motion controller control. So I'm gonna leave it like that. But if you want the Strait of Template, you can just go to import, import the file you just exported from the other. And it will replace fully what you have here. Okay, Now you have everything set up for your controls and your navigation NVR in this file. So let's move on to how to control the navigation As far as where we want to go by just adding are now the mesh volume. And we'll do that in the next video. 41. 41 Nav Mesh Setup: okay, I've had to rebuild everything at the lower qualities and everything. The lighting obviously doesn't look as good as it did when we were setting up for quality. But from here on out, we're not gonna be worrying about quality as much. We can refine all those things the same way we have done it before and see how much we can get toe work with VR and still maintain a good frame rate. But as far as quality settings and trying to get things photo realistic for renderings. We've done that in the course already. So now I'm going to focus on some interactivity with VR. So what you're looking at is a lower quality file that works well with my particular computer. You can maybe get better quality with your GP U minus. By no means a super powerful GPU. Okay, but now I'm gonna look at just how to set up the navigation, and then we're going to go right into interactivity with PR stuff. So we brought in our motion controller pond. We need to make sure that it is set to be the pond that are player controller actually possesses, and we do that by saying Auto possess Player is set to player zero in our pond here. That way we have only one player in our seeing a player controller and it will possess this that player controllers, player zero, these other things like our archivist character right here it can just go away. And now the engine knows that players here goes to this guy. So that's what we will see when we start up. If I hit start, I am standing inside of that. Okay, so that's what it's looking like inside b are Okay, so that's ready to go. The only thing left is the navigation. And to do that, we do Knave mesh bounds volume Go back into game mode here. Actually, I am in game of my now bounds. Volume is set right here. If you hit p, it comes on and off as faras the display goes showing you the green is where you are able capable of navigating with your motion controller Pond. I'm not gonna go into this to death because it's not the point of this course, and we've seen it before. It's pretty beginner level stuff just as a quick refresher. All we have to do is make sure that this has a proper collision on it. This has a proper collision on it, like we did with desktop navigation or the archivist character, and then it wherever it overlaps with this knave mesh bounds volume, it will put a green square, which means that we are able to teleport within that area. And of course, the emotion controller Pond uses tell a boarding to get around. It needs to know where it is capable of teleporting. So all we have to do is scale this up to take in our whole scene. And then our navigation is set up. And like I said, the only other thing is making sure that player zero is going to possess the motion controller upon and not the old art of is Pond that we had in here. Okay, there you go. There's our basic navigation all set up. You go into game mode, we can hit play. You can see my motion controllers set up here, and I can teleport within that Greece floor that I set up with an ATM ish bounds volume 42. 42 VR Button Interaction: Okay, now that I've got the logistics of setting up VR all done, the boring stuffs kind of set up and we're operating at least nvr, which hopefully isn't too foreign to you. But once we've got that all set up, I want to dive more into doing some interactivity with your VR. Interactivity is going to totally different than what we've been doing with desktop interactivity. Because menus, for example, widgets that we set up for the main menu. Those aren't gonna display properly in VR, they won't work. And obviously we can't make a mouse cursor visible and just go click on a button when we're nvr, we have to think about different ways to make things operate. So one thing I wanted to do is instead of pushing a button because we're gonna be in VR and we don't want we're not gonna keyboard sitting in front of us that we can see. We can't just push a button to change the material in these cabinets anymore either. So we're going to start by just setting up a basic function to be able to do that while we're nvr. So it's going to be kind of like at life scale like we're gonna walk up to something, touch it or grab it or push it, and that will make things change in our scene. So it's like a live, interactive human size menus, kind of. So what I did to do that is just bring in a sphere. So over here, in your modes tab, even go to basic and you could distract a spirit. So I did that and my spears right here and it's scaled down a little bit and it has a collision on it already, which is nice. It's also movable, those air essential. And then I hit this button to add a blueprint to it. Mind says Edit, Blueprint, because I've already made the blueprint. But years won't say that you need to click on it and create a blueprint for this sphere. So again, this is gonna be a little bit of review. But I'm just going to set up this fear so that it can be grabbed with the VR motion controller so we can walk up to it are hand will open up and we can push the trigger to grab it. And that grab functionalities already built in to the motion controller pond that we brought in from the template. But we do have to set it up and tell it that it applies to this sphere. So the way that we do that is once inside here we go to class defaults, class settings, yes, class settings and say Go to interfaces And you can see I already have pick up actor interface set up here. If I didn't have this, then it would just say it looked like this and I'd say add pick up actor interface that came across when we migrated from the VR template and it interface what it is. It's a coding thing and I'm not a computer programmer, but it basically tells the system that this object is part of this interface and so it has certain qualities. So basically, we're guaranteeing that it has certain qualities that work with this interface. So by applying this interface to it, that means that it is an object, a static mesh that can be picked up at this point. So it also brings across certain functionality with it. So this interface can't be applied to everything. But this object does apply and and you can add the interface to it. And now, as long as it's within those parameters and it can be added now, it has the extra functionality. And one of those functionalities is something in the event graph called Event Pickup. Okay. And this won't be in any objects that don't have that in your face. Apply to it. Okay, Now you can see I've already done some work over here, but I'm gonna redo that for you to show you. So this is event pick up. The only other thing we need to do to make it so we can pick up something in here. Well, really were not even picking it up. We're we're using the pickup event to trigger something. Usually that would trigger the ability to hold it in your hand. But we're gonna run a different script off of it all together. We just need that ability to quote unquote pick it up. The only other thing is in this object. We need to make sure that we're generating overlap events and make sure your object is movable. And that should be set now for the material change with color change in these cabinets. Remember that was built into our archivist character. So I already deleted the archives character. But I brought him back in to look at his blueprint. You can also. I mean, I can also delete this and just go to Arc his character blueprint, and it will bring it up right here. Okay, Now you can see that input action change. Cab color is giving me a warning. And that's because I imported the VR inputs now and this was a custom input we had made before, so it's no longer in my inputs. So when I when I pushed the buttons like we did before, it's not gonna work because that's not set up as an input anymore. But that doesn't matter. We're moving onto VR right now, so I'm going to actually just take all the code that comes after that. So all the code that was triggered by that, that's what I want. And I'm going to copy it, control, see, and then go into my sphere blueprint and say, I want all that to be triggered after Let's deleted here. So when I go to do the event pick up, I actually want to not literally pick up the object as would be normal. But I'm gonna trigger this other script instead. So I'm just gonna paste it in here and put it right there. Compile and say Okay, now, mine worked years won't work initially. It will give you warnings here, here, here Because this variable is referencing something that is in a different class and doesn't exist in this class. Here, this class of my grab button BP the sphere button that we're making, Remember in the artifice character, we set up a variable artifice character. There's a variable called color count. So that's referencing the class Archivist character. Variable color count. When I copy that into here, the class of grab button BP doesn't have a variable color account. If I deleted this, you'd see that all those would go away. So all you need to do is set Create a new variable that is set to imager. Name it exactly what you see here, Color count. You actually put it without a space even though it shows with the space here. Color count, Compile. Make sure it's set by default to zero and then everything is recreated for you. Okay, so the only thing you need to do is copy and paste it into here and then create a new variable toe work with this color count. Note here and you're ready to go compile and safe. Now this script that we were used to used to be running off the push of a button is now going to run off of when we go and pick up that sphere. So let's try that out. And this is a perfect example of instead of using a keyboard. Now we're using an object that we grab in world space. That's how you have to think about things with BR. Okay, I'm inside. The VR doesn't look great. I've put my quality settings down so that everything could move quickly, but can still demonstrate here. Now when I reach out to grab that sphere, you can see that this thing knows that the grab the pickup interface is working and it checks. If this object has that interface applied to it, then change the shape of my hand, which you can see it happening. And then if I pull trigger, Thanet will grab quote unquote grab. But really, it's just gonna run my script to change the colors here. Okay, Now you can see we have great covers. Gay. So pretty simple stuff. We will look at some more ways to use these kind of tricks and interaction in some of the next videos.