Tech Art with Chris Murphy | Live from HQ | Inside Unreal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
>> Hey folks, we hope you've had a glorious week. We're excited to welcome you back with another round of free Marketplace content. Our October set features a fully animated combat set, handcrafted movement animations, an easy to use multi save solution, beautiful foliage, and a fully customizable loading screen system. In addition to all the timed to free content, a robust JRPG template and modular sci-fi environment bundle have been added to our permanent collection. Download them all today. Soaked with info on the state of our oceans, 2D side-scrolling puzzler Koral was designed to be enjoyable for players of all skill levels, enthusiasts and casual players alike. To execute the goal, solo Dev Carlos Coronado designed Koral’s gameplay to use nothing more than a single joystick. In our discussion with Coronado, he details how scuba diving helped him capture a realistic yet surreal depiction of the ocean, elaborates on his drive to be a one-person studio, and shares tips for aspiring solo devs, looking to follow suit. Dive into his interview after this. Already on the third evolution of their car configurator, Audi is trailblazing the use of real-time technology. With the most recent edition, vehicle changes are continually updated to the Unreal Engine files, meaning Audi dealers can now demo the latest version of the vehicle almost immediately. These real-time ready Assets could also be leveraged to create even more projects such as interactive service manuals, custom user created videos, or marketing Materials. All this vastly increases their return on investment. Do you have questions about UMG? Well, you're in luck because we've got answers. Our own Chris Gagnon, lead programmer on Editor, assembled and provided a handy overview of best practices for UMG. His tech blog covers how to structure your UI elements in both C++ and Blueprints. Be sure to walk through his helpful example. We want to extend our congratulations to Frogwares who recently released their Lovecraft-inspired investigative thriller on Switch. We caught up with the team leading up to their launch to discuss their development process, to find out how they overcame design challenges, and to discover what inspired them to dive into the dark setting of HP Lovecraft. Now for this week's top Karma earners, we're giving shout outs to ClockworkOcean, Adnoh, Shadowriver, Alekann01, IndieGameCove, GarnerP57, expose, Rumbleball, Herr Edgy, and chrudimer. Thank you all for supporting other folks on AnswerHub. First up in our spotlight section, This Dead Winter is a dark fantasy adventure game set in an ancient woodland suffering through an unending winter. You, a beautiful fox, embark on a journey across ruinous lands to find your missing cub. Follow their development on their page. Community Dev Bartosz Kamiński has recently kicked off a series of four-minute tutorials for beginners, teaching the basics of procedural Materials, implementing footstep sounds, or spawning meshes in a radial. If you're just getting started, hop over to see how he may be able to help you on your journey. Last up, this week is DAYMARE: 1998, a third-person survival horror game set way, way back in the 90s, where you explore and uncovered deadly creatures that lurk in sleepy Keen Sight, Idaho. Alright, that's it for this week. Thanks for tuning in and we'll catch you next time on the Unreal Engine news and community spotlight. >>Victor: Hey everyone and welcome to the Unreal Engine livestream. I'm your host Victor Brodin. Today I have invited evangelist, Chris Murphy to come and talk to us about some of the adventures with shaders you've been doing, working a little bit on landscapes and other various cool topics. Just to start us off, what time is it right now for you, Chris? >>Chris: It's 4:00 in the morning. >>Victor: Chris is a champ everyone. He asked me, “What time is the live stream?” And I said, “Well, it's 2:00 PM over here and on the East coast,” and he says, “Well, that's 4:00 AM my time. I'll do it.” So big up everyone in chat. I'm happy you're able to do this. >>Chris: He’s exaggerating a little bit. There was a definite groan before the words, “I'll do it.” >>Victor: Okay, fair enough. There was a bit of a conversation in between, but he said, “I'll do it,” and you're here today. So, very happy about that. Before we get started, I'd like to let everyone know that we will be handing out keys to Daymare: 1998 in chat. So, keep a lookout for those. There will be a little link to an image, so we actually have to type them in manually. With that said, I think it's time to get started. What is your first thing today, Chris? >>Chris: I'm going to be running through a couple of effects. I'll be honest with you, I'm not running really at 100%, just due to the time zone difference, but I'm going to step through a few different things now. I kind of last minute changed up some of the topics I was going to cover but I'm going to begin with a couple of just little landscape things that I've noticed a lot of people don't do, that I would like people to just be aware of. After that, I'm going to move into the procedural building stuff that a few people have seen me do on Twitter, which I should be able to the remake from scratch reasonably quickly. After that I’m going to move into some kind of interesting Post Processing effects and concepts. Then finally I'm going to touch on the Pre-Skinned Position and Pre-Skinned Local Bounds nodes that have come in various fashions of Unreal but we haven't really -- I haven't seen too many teams really taking use of them yet and I want to stress to teams why these things are powerful. Because I'm unfortunately running on Australian internet from home, I'm going to have to kill my video feed while we're running this. So – >>Victor: We were not able to do both at the same time. >>Chris: Switch off my screen now. Yeah, we have to pick one or the other in Australia. Here we go. The feeds coming through now? >>Victor: Yeah, we see it. You're all good. >>Chris: Rad. Okay! Video games. So, we have a very basic environment that's coming through at the moment. We've just got this kind of empty area and I'm going to use this as just kind of a test bed for what I'm going to be developing from here on out. Now the first thing that I want to do, and I'm going to try not to move the camera too quickly because I know we're running at like one frame a minute, but, the first thing that I really want to touch on is landscapes. There is a very simple little option that if you're going to be using a lot of foliage -- I'm not sure if you'd be able to see it very well in this video, but you should be seeing a lot of popping going on with this grass -- >>Victor: It's coming through. >>Chris: -- as I move forward and backwards. That's coming through okay? Oh, what a world. Just be aware of folks that to fix your LOD popping on Assets, is literally as easy as opening up the Material and clicking this Dithered LOD Transitions and then just hitting apply and then moving on with your life, because seriously, that's all it takes. What we will get in return is your grass will now actually do like a nice screen door fade between each version. Now because I just applied it to a grass that has like four or five variants, it'll take it a second to build shaders but hopefully you'll see where I'm kind of going with that and why that's advantageous. I provided b-roll for a couple of different effects that we'll be doing today as a just in case, but you'll now notice that as I move forward and backwards, we're no longer kind of getting that effect. I know it's a really simple thing where Chris’s first thing to show you is a checkbox, but, for anyone that's unfamiliar of what my role as an evangelist is, basically across Australia and New Zealand and Southeast Asia, my job is helping teams. So sometimes it's obviously just meeting people at conferences, but other times I'm on site for a day here and there for different teams or dropping in for an hour to check out things. There's a lot of commonly reoccurring issues that we really see popping up. So, it's just little things like that kind of checkbox that I'm always kind of flagging. If you're following me on Twitter, you're probably used to me generally harassing people over these checkboxes. Obviously, the heather in here has not been set up to do it, but you'll notice that we are no longer just getting that pop of the grass. I just really wanted to stress that as the first thing. The next thing that I wanted to go into was, quite often this language of "Smart Materials" gets thrown around and anyone that’s talking about Smart Landscape Material, it sounds like a really, really complicated thing and it sounds like there's going to be more work in there, but it's straight up, it's really straightforward. I really want to show people about how to approach a little bit of logic in your Landscape Materials to get you a long way. I'm going to load my simple Landscape Material that we've got running at the moment. This was the one that we're seeing in the world right now. It's nothing too fancy, but I want to run through a couple of things that it's doing. First off, when I opened this up, what I've got is I go to my paints and I just paint in a little bit of dirt. You'll notice that as I painted this in that grass is disappearing and reappearing and plenty of Unreal users are going to be already aware of this one but I just want to make sure that everyone is, especially if you're new to the Engine, or you've just started looking at things like these live streams. In my Landscape Material, I scroll down here, you'll see I've added this thing called the landscape grass output, and what this actually lets you do is the values that get read into this, if it's a one, it will automatically spawn Grass Meshes at that location. Because that's coming through with a value of one, it's spawning grass. A little cheeky thing that I'm doing is I'm doing a one minus value over here applied to a Texture, you can see the Texture here, which is essentially just swapping it every now and then. So sometimes it's grass and when it's not grass, it's flowers, and both of them are looking at the landscape layer called grass. So, this will actually go ahead and just spawn those Meshes and this just feels, I mean, just for perspective sake of what this looks like, if I didn't have grass enabled, look at that thing. What is this, amateur hour? So, having this kind of set up just feels so much nicer. It feels like a complete product and it's really not that much work to just get it following a simple couple of rules and have something running there. Do me a favor and just make sure that those things are in place. Now the other thing that really want to stress is go back to your landscape. Now at the moment, landscapes can end up at giant mess but what I often find is a really nice way to handle these things is, you'll see here that they have a thing called ML_Dirt and another one called ML_Grass. This isn't anything fancy. I've literally just created a Material layer and what I mean by that is if I open this up, you can see that this is the Material for grass and I'm calling to set Material attributes at the end and I'm actually passing this around as its own little mini data type and by doing that, it means I can just kind of crunch down all of the dirt logic and all of the grass logic into a single instance, like a single node that I can just drop in. Now, not only does this allow me to have fewer nodes causing chaos in my landscape, it also gives me the added advantage of being able to have, if I ever need to use dirt in my project, I can literally drop in that ML_Dirt layout and share it between different Assets. If I drop in a tree and it needs to have dirt or grass or something at the base of it, I can re-sample those things, use the same Textures and not have all of extra complexity for no good reason. The other reason that I bring it up is because also you can then use this Blend Material Attributes node, which literally acts like a Lerp, but it Lerps entire Materials together and we're going to be using a little bit of that today. To give you a quick example of what that means, let's add in an entirely new Material layer. I'm going to use the same Material attributes and I'm just going to create it as a spot here. I'm not going to create it as a separate Material function, but to do this, I'm just going to quickly drag in some Textures. I know I have some sort of rocks available to me. >>Victor: Hey, Chris, if you're able to, when you're zooming really quickly, it's coming through in a little low frame rate. So just try to be a little slower then we can follow along, alright? >>Chris: Yeah, no problem. Thanks for the heads up. Please direct all concerns about my internet speed to dm.gov.Au and we'll go from there. So, with this here, I'll try not to do any sharp zooms, but we’ve got this rock [inaudible] Texture and just this Normal Map. I'll just preview this on the Assets, you can see what's up. Nothing too fancy. I'm going to get this and I'm going to add what's called a World Aligned Texture. When I add a World Aligned Texture, what this essentially does is, if you imagine a projector was placed along this axis and it projector was placed on this axis and another one on this and they were just shining their light at whatever was there, it blends those three images together. I'm actually making hand motions right now that no one can see while I describe. >>Victor: Next time, next time you'll be in the studio. >>Chris: Next time, oh thanks, man. I'm going to get this and the first thing you need to know is that when you're handing a Texture to a Material function, they need to be handed off as a Texture 2D type. This typically outputs just the color values, but I need to actually output the entire object. So, you just can’t plug it in, but to do it you literally just right-click and hit Convert to Texture Object and just plug that in, okay? Because I'm going to need to start previewing this, I’m going to go ahead and I'm going to call a Set Material Attributes like that node you saw just before. I'm going to add three channels. I'm going to add a base color, a roughness, and a normal channel. For the time being, I'm just going to plug these in and I'm just going to preview it over here. When I preview it over here, I'm just going to go to this sphere. You'll notice here that unlike before, this sphere actually has no pinching going on at the top of the sphere and that's because it's just projecting this Texture in space at this thing. And the reason I'm doing this is because what we can actually do is, we're going to use this Texture as a way of projecting cliffs into our landscape. I'm going to right-click and I'm going to call Blend Material Attributes and I'm going to blend between the existing Landscape Material where we have dirt and grass and I'm just automatically going to add cliffs any time it's sideways. Next thing that we need to know is, well, how do we do that? Actually, just before I do that, I'm going to quickly set up the roughness value so that it doesn't look terrible. In a situation like this, this Texture that I'm reading in is pretty close to gray scale. If I was to grab just the red channel from it, I'm going to use that as a black and white mask and I'm going to run that into a Lerp and I'm going to tell the Lerp that hey, whenever the value is a purely bright, I want that to have a roughness of like 0.8 and whenever that value is super dark, I want that to have a very high roughness value because I don't want to have the shiny crevices going on. This is just a quick way of me just getting around, not having a roughness for that Texture. That's going to be the rock, the cliff face that would kind of bring in. Actually one of the little things I'm going to add is just a scale and I'm going to plug this into Texture size and this actually kind of controls how big that projection going onto it is and if I was to set this to 512, you'll see that -- give it just a second. Sorry, Victor, I know in micro zooming, it's a habit. You can see here that if I set that to 512, it's quite large, if I was to drop it down to 20, we'll see a tiling Texture. In this situation, I'm just going to set up the 512 and move on with my day. The next thing that we need to do is work out how we're going to blend between top and sideways. To move between the -- Sorry everybody. To move between this and this version, what I'm actually going to do is I'm going to use what's called a normal, in world space. So, I'm just going to preview this node and hopefully I can explain it sufficiently to everybody. Now for just one moment, if you're unfamiliar with using this node, that's fine. What I want you to do is look down on the bottom left corner of my screen and you'll see that we had X, Y, and Z. Okay. Also, it's really nice using the word "Zed" instead of "Zee," while talking to an American audience, but that's what you get. So, we've got our X axis our Y axis and our Z axis. You'll notice that those colors correspond to red, green, and blue. If I was to look around here as something as along the Y axis, you'll see that it goes to green and then it goes into what seems like black. But actually, what this is doing is giving me a value of negative one on the green. Same thing goes for here whereby the X is a value of one, and over here it's a value of negative one. All of this basically tells me which direction the surface of the sphere is actually pointing in. The more blue it is, the more upwards it's pointing. By knowing that the more blue something is, the more upward it's pointing, I can get this, I can say to it, “Hey, I just want your blue channel or your Z axis.” That's now going to give me a value that when it's completely facing upwards, it's white and when it's down here, it's going to approach a value of zero, value of black, which is actually pretty close to what we need here. But the truth is, is that I really want to get this rock kind of blending in nicely up top so that it doesn't just do like a smooth interpolation into it. One nice thing that I can do is I'm going to get this Texture that I used earlier for this noise and I'm just going to bring that across to here. What I'm going to do is I'm going to subtract this value from this one. Even that won't quite be what I want yet. I'm also going to lower the scale here so they don't match up. So, watch what happens here. If I was to get this and I was to just subtract this channel and just preview it, you'll notice that we're now kind of getting this pulling away at it and that's a lot closer to what we really want to be seeing here. See how that's subtracting through? Just a quick little bit of logic that I want you -- Excuse me, hiccups. Just a quick little bit of logic that I want you to be aware of is if this value is white, if it's at the brightest point and I'm subtracting it from this value, what this means is that a value of white here even subtracted from a pure white value up top is still going to be equal to zero when they line up. So, whenever this happens to be a value of one up top and it's subtracting one, one minus one is zero. What is good to do here is to actually multiply. If I was to multiply this top section by another value, what we're essentially given is a way to kind of push up what these numbers are equal to. I'm just going to call this Cliff Blend Multiply, and hopefully this will make sense in just a little bit. As I plug this in, what we're actually going to see here is, notice that -- actually I'm going to add a saturate at the end as well. If you notice what's going on here, watch what happens when I change this value, see where that line is ending up? It's getting pushed further up and down as I change this. 54 was too high. But what that's essentially doing is this value was previously a value of zero to one, right? Zero, one. Now this value is a value of zero to two. By being a value of zero to two, it means even if this value is equal to one, it's only what was initially a value of 0.5 that is now going to actually accept any change in its value because two minus one is still equal to one and what a saturate is, it’s a clamp between zero and one. It stops any value being above one just makes it equal to one and it stops any value being below zero, it just makes it equal to zero. I've done those two and then the other little thing that I would really like to do in this situation is I'm going to use a Power node. A Power node multiplies any value coming into it against itself. What that means is that, I want you to think for a second, one times one is equal to one, right? But 0.5 times 0.5 is equal to 0.25. The reason I bring this up is because what that information tells us is that when we multiply a number by itself, that's between zero and one, the closer it is to zero, the quicker it gets darker but the closer it is to one, the more likely it is to stay at the same. It's essentially a way of providing contrast to something that we're looking at. I'm going to get this and I'm going to create a new value called Cleanse Contrast, or, apparently, "contast." I'm going to set this to two just initially. Now having these two values available to me, I want you to look at what happens to the white and dark values on this as I increase the contrast. 17 was too high, but see how that's actually pulling it up into it. That's actually kind of allowing me to kind of create a really nice little blend here. Now I have no idea of what's going to be a good value in this situation. But that's okay. We're just going to plug it in and see what happens. In this situation, I know that a white value is going to be standard landscape and I know that the black value is going to be cliffs. I'm just going to get this Blend Material Attributes node that we've got. I'm going to grab this. I'm going to say, “When it's white, I want you to be that and when it's black, I want you to be that.” By the way, a little thing that a lot of people don't seem to know is if you hold control and click on here, you can just grab the end of a pin and plug it into something else. I say this because quite often I see people disconnecting and going back and plugging things in and that would be a waste of time. I've got that plugged in now, that'll do it for the moment. I'm just going to hit apply and we'll see how this works. Victor is that feed resolution coming through okay? >>Victor: It’s coming through alright. I do know that when you're compiling shaders it definitely takes a little bit of a hitch. >>Chris: In that case, I'll try to just keep things still whenever I'm compiling shaders. With those things kind of plugged in, I'm just going to go back to the landscape and we'll let this thing just do what it does. Give it just a minute. >>Victor: You want to take a question? >>Chris: Sure. Let's do it. >>Victor: What are the benefits of, or differences between using Material layers versus Material functions? >>Chris: Essentially, they all get compiled down to the same thing. So, your Material layers -- Sorry. Let me start again. Can you clarify with the person whether when they say Material layers, they're referring to the Material Layer System that's experimental? >>Victor: No, when you made the, what I thought was some Material function, you said Material layer. >>Chris: In this situation, what I'm actually doing, is a Material function -- a Material layer is a Material function in this situation. So, as we've been bringing in the experimental Material layer, I think that might be a different system for that, but essentially it is just a Material function. That's all I'm doing, I always use the prefix of ML to remind myself that the output of whatever this is and also for quick selection, that this Asset is going to be returning an entire Material type. So, I know all of this stuff that's kind of coming out of it. Sorry about that. That that was me not clarifying very well. In this situation, I'm just going to go back to here, let's just grab this over to here and I'm going to get the sculpt tool and I'm going to just flatten for a second and I'm going to pull this out. I'm going to turn off grass for just one minute, we'll fix that up in just a moment, but you'll notice that as I pull it out now, what that's actually automatically doing is it's creating that Rock Texture whenever this thing goes completely vertical. Do you see that? >>Victor: Yeah. >>Chris: Having that kind of logic set up actually lets us create more natural landscapes that as we kind of just build cliffs, the cliffs are becoming cliffs. What I'm going to do really quickly is just a tweak these values so that it doesn't look terrible. The scale looks like it's okay. So, 512 was fine, but what I will change is just this Blend multiply to being something that's a little bit nicer. So, I'm going to pull that to about maybe there, going to get my blend contrast and you'll notice that again, if I was to get this contrast, as I increase it, we're getting a hotter edge so that when it goes to rock, now it's just going straight into it. But if I was to drop this contrast right down, it's now going to be a softer blend between them. If I was doing this in like an actual professional capacity, I would use a Height Lerp to kind of get at blending into the cracks of the rocks first. For anyone that wants to know how to do that, literally just typing in the word Height Lerp and just using this, it's pretty great. You can just use a Heightmap and it'll blend between them from most values to highest values. It's a really good little node, but I didn't really need to set that up to prove a point. With this in mind, and this kind of generally set up, the next thing that I'm quickly going to do is I'm just going to go back to where my grass sample was earlier. I'm just going to reorganize this a little bit, grass stuff. I'm going to get this and I'm going to multiply the existing grass value against this and I'm going to add a value here called Grass Contrast. I'm going to set this grass contrast to like four, but now if I re enable grass, this should now make it, no grass will appear on the cliffs either because it's now using that same logic to do it. While that's compiling, feel free to shoot another question, Victor. >>Victor: Sure, we can grab another one. Someone was curious about, can Texture objects be used as Material parameters? >>Chris: As Material parameters? Yeah, you just get the -- Ta da! >>Victor: If you didn't catch that, that was a Texture object parameter. I believe you can right-click the Texture sample as well and convert it into a parameter? >>Chris: No, you've got to convert to object and then you convert the objects convert to parameter, either way, Bob's your mother's brother. If I go back and I look at this, my contrast here wasn't quite set up nicely. We're still getting a little bit of grass occasionally spawning on the cliffs, but that's literally just going to be a matter of me getting this cliff blend contrast -- sorry, this grass contrast and tweaking that until I get something. Unfortunately for this one, I do need to hit apply each time to get it to work out when is acceptable to bring in those cliffs and when it's not. >>Victor: What would be the workaround around that if you sort of want to iterate a little bit faster without compiling shaders? >>Chris: If you're willing to -- In situations where I've had to really debug that and really preview it nicely, I literally just run this value out to the diffuse color for a little while. I just override the diffuse color and I literally just preview the black and whites because I have a pretty good idea of how that's going to look when it all comes out, but that's not necessarily at stake. >>Victor: Do you usually use master Material for your landscape rather than making it an instance? >>Chris: Yeah. I try to for as long as I can until the point that I'm forced to change. There's always a certain given point where you'll be like, “I guess I've just got to bite the bullet and do that thing now,” but as much as possible, I typically try and run it this way. The problem is, if you build with instances, it's going to be recompiling your master and every instance the second you hit apply, and that just slows down your work flow massively. >>Victor: Mmm, okay. That's a good tip. >>Chris: It's good in the long run, but when you're doing that initial setup and you're just getting things working, it’s kind of just wastes your time a little bit. As I said, this is just kind of like a little bit, and obviously I'm doing it on like a tiny hill, so it's not really the best example. I really should have made a much larger thing. But hopefully that still gives you an idea. I'll just pull this up for a second so we have a better idea of what's up. Again, I’m going to get this flat node and I'm just going to rip out some chunks of this. It's going to look a bit strange for a second until we erode it. So just bear with me. >>Victor: What are the keyboard shortcuts you're doing to set the size of the brush? >>Chris: The square brackets control the size of it. It's just the same as Photoshop. I've got this and I'd just like to kind of rip this out. Now if I set this up properly and I kind of tweaked these values and I had a rock that wasn't tiling quite as much, I'm sure you can kind of start to see where I'm going from. A lot of people kind of look at this like it's some kind of like weird magic that's going on, but honestly, just getting this kind of setup for your Material starts to just create automatic diversity in what you're saying which really just helps kind of get everything going. Sorry, I'm just bringing this together. That was the first quick thing that I kind of wanted to cover with folks just to let them know that that's entirely achievable. The next thing that I wanted to cover was, quite often people want to do a technique known as interior mapping. I'm getting ahead of myself. Let's take a quick look at this. I'm going to create a new Material and I'm going to call this M_InteriorMap. This interior map Material, imagine for a second that you're looking at a building. When you typically look at a building in a video game, it's just going to be the picture of the buildings, facade or windows. I bring this up because it's very easy to do something that's a lot more than that, but involves us using a lot of Texture and involves us using a Cube Map. A Cube Map is -- I'll open this Asset up -- A Cube Map looks like this. To a create this, I literally opened up the Realistic Rendering Demo, so that it's available from the Learn Tab. So, you can just pull this down yourself. All I did was literally just grab a camera cube, sorry, scene capture cube, which takes a 3D photo for you. I saved that out as an Asset and that generates this for me. If I was to get this Texture and pop this into here, unlike normal where you can just right-click and hit preview, you'll notice that when I preview it, we get an error. The reason that we get an error is because Unreal actually needs to know which direction inside of the cube it's currently looking at. What happens if I was to get the reflection vector and feed that in? You'll notice that now when I look at this sphere, we're kind of peering through the globe. Do you see that? >>Victor: Yeah. >>Chris: If I was to get the camera for instance, you can see that it's now syncing out correctly. It's upside down, but it's actually syncing up as if I'm kind of looking through a little mini port. If I was to use this, that logic in mind, all it's actually doing is it's feeding in the direction to say, “Hey, you're looking at this 3D thing from this perspective.” I bring this up because, check this out. If I was to go Interior Cube Map, this is just a node. If I was to get that and I was to plug that into my UVs instead, it gets the Cube Map and it breaks it into nice little rooms. See that? >>Victor: Yeah. >>Chris: Now, by getting something like this, this is where we actually really start to see something that's kind of powerful because what happens if I was to get this and I'm just going to apply this to a cube in my world. Do I have a solid cube to use here? Sorry, I assumed I would have a cube because that's -- just for a second, I'm going to apply this, kind of drop that into the world and I'm going to apply my interior map to it and I'm just going to embiggen it. Alright. There we go. You'll see here that now what we've essentially started to get is something that actually lets us look into these rooms. The next little thing that I'd like to do here that I find to be quite useful is I'm going to get this interior map and you see this little randomized rotation Boolean that's been set up. If I get that, I'm just going to read in a value of True, and what that does, you can see it already happening there, but if I hit apply it's actually going to randomize which direction you see. Now we're using one Cube Map, but each room looks like a distinctive room. This is really great because if we were to get something like this, alright, so that's really obviously just squares, but nothing stops us from setting the roughness value of what we're seeing here to be very low, like a value of 0.1. I'm going to multiply this against a very dark value, like zero in here and plug that into my emissive, because by adding that reflection -- so by setting the roughness to a really low value and setting the emissive color to a very dark value, it now kind of looks like we're looking through glass, but behind the glass it still looks like there's a room present. Do you see that? >>Victor: Yeah. >>Chris: This is the first step of doing something that's a little bit more interesting. The next thing that I'm going to dive into is definitely going to be jumping up in terms of advanced workflow but hopefully it gets you a good idea of how to use this. Give me just one second. I'm quickly going to import an Asset that I had elsewhere, there is a cube somewhere. Sorry about this. I'm just going to quickly pull in, one of these is a cube Asset and I'm currently not seeing it. Sorry everybody. I just want to get a cube, that's actually set up from the bottom rather than set up from -- There it is. Great. Cool. Done. I got what I was after. I want to get a cube that's actually been set up so the pivot point is on the bottom and I know I could just duplicate an existing cube, but I just want one that I trust. Alright, great. The reason I've done this, so I brought this cube in instead, sorry, every now and then the Unreal launcher can do this. Can we shake out of it or not? Every now and then the Unreal Launcher can to be a little bit finicky on that. >>Victor: Looks good now. >>Chris: All fixed. I'm just going to quickly swap this over to the cube that I just imported and the reason I've done this is my cube that I just imported, the pivot point is down at the bottom because this way, if I scale it up, it just makes it bigger and if I scale it along the X or the Y, it's going to, do it accordingly. What I would really like to do is I would like to get this building so that -- and I'm going to revert it to being really visible, what I'd like to do is get this building so that as we made the building bigger, we actually added more groups. You can see here that as this gets bigger right now it's just going to make the rooms themselves bigger, which isn't really what we want. We want the rooms to stay reasonably consistent. We just want to make sure that as it gets bigger it does its thing. There's a good way for us to handle this. What we're going to do is we're going to go into this and first thing I'm going to do is I'm going to kill the tiling. I'm going to set this tiling, which is currently as you can see, set to a value of 4;4, which means four rooms by four rooms and I'm just going to set that to a value of one. By setting this to a value of one, it's just going to give me one big old room as we look through this. Now, the reason I've done this is I want to manually increase or decrease the size of the UV, so the tiling through the UVS and I'm getting through that according to scale. So, here's a really cool thing that a lot of people aren't aware of. Let's begin by thinking about the problem that we have. What we really want to do is as the object gets bigger, we want to make it tile more along the directions that we see. So, if you imagine that we were looking at the X axis, which is this one, we would want the Y axis and the Z axis to increase how much tiling is going on based on the size of this surface. Does that make sense, how that would work? What I'm going to do is I'm going to go back to the node that we used just before, which is, I'm going to get the normal, I'm going to preview it. And I want you to think about what we actually have here. So, this, when we looked at it as a sphere, it gave us this. But when we look at it as a cube, we're actually given colors that correspond to the direction of what we're looking at. Now, these are negative values on their opposite sides. So red becomes negative red, but if I put an Abs function, what an Abs function does is, any value that would typically go into a negative now becomes positive. It's like the most optimistic node. So, what this is doing is a value of negative one, now it just becomes a value of one, but a value of one stays a value of one. By getting this, what we're actually able to do is use this as the way of blending between the sizes. And then you're probably like, alright, but how do we get the sizes? But that's actually super easy, because you can literally call Object Scale as a node, which gets you the X scale, Y scale, and Z scale of the Asset itself. If you think about the problem now, I mean really it's just a matter of getting this and saying, I want to get this value and I'm going to say to it, “Hey, whenever you are red,” okay, so whenever it's red, that's not going to give us a black and white value between here and here, Whenever it's red, we want to get the scale of the Y axis and the scale of the Z axis and we're going to multiply it against that. And whenever this value is green -- Oops, I should really plug it in. Whenever it's green, we want to get the X axis and the Z axis. Do you see that? So, we're just going to get the X axis and the Z axis and I'm going to plug it in to that. Now fortunately -- Fortunately, this means if we look at the logic that we have going on here, now this one says whenever you're red, do this, and when we connect it to this, which says that whenever you are Y, do this. Which means that the only thing left is that if you're not X or Y, you must be Z and if you're Z, we're just going to get the, the X and Y. Okay? I'm just going to append. I'm going to plug that in. That little bit of logic there, just doing that, is now going to get me the scale according to any UV panel that we're currently looking at. If I was to multiply that against a regular Texture coordinate, which is just a standard UV map, what I'm able to do when we plug that in, by default, that should look completely normal. I'm just going to apply. You’ll notice that now as I scale it up, it's just adding more rooms in. Do you see that? >>Victor: Yep. That's a large apartment building. >>Chris: My default size isn't great here, but we can fix that ourselves. This value is now just tied into this. If I was to set the scale of manually to be like 0.25, now it's kind of just adding those in as I scale up, see that? >>Victor: Yes, you’re a wizard. >>Chris: The whole point of this is to establish that I'm not a wizard. >>Victor: You're generating rooms there. >>Chris: Having this going on is a really good way to start processing how -- Having this going on is a really good way to start processing how are we can approach some of the development of our Assets in a much more interesting way, because all of a sudden we can start developing Assets that are kind of intelligent enough to do what we clearly want them to do. It's worth noting for something like this that we don't have any Blueprint involved. This entire thing has zero Blueprint. It's literally just a Material that knows what it's doing. So, having this kind of setup means that can be like, “Hey, I need a building here and I need the building here, but this one is going to be this.” It's worth noting that it's not that much extra logic as well to automatically clamp the room sizes down. If you wanted to, you could comfortably get these values that are kind of coming in and we could be rounding them out and if we round them out, it's actually going to stretch to the nearest room size. I'm saying this -- I'm pretty sure this will work. I'm just going to round that for the time being. Watch it. See that? >>Victor: Yeah. >>Chris: So, it's doing it in 0.25 increments right now because I'm manually tiling and this Material is doing it as 0.25 but the round is happening before that. So really what I would need to do is have some sort of value called tiling that was multiplying this against 0.25. We're rounding that value and I'm going to set this back to just default. This wasn't actually meant to be in the presentation, but— >>Victor: Doing it live. >>Chris: We're there. We're there now. Let's just do it. If I get something like this, see it's now squishing the rooms right up until the point that I can fit in new one? Which stops us getting like half rooms popping in. Honestly if you're playing a video game, no one's going to notice that that's what's going on. Do you know what I mean? If they're playing, they're not going to notice that this room is actually that squished and if they do, you probably should do a better job of distracting them. >>Victor: Could you show us the shader complexity of the current Material? >>Chris: Yeah, sure. That was actually the next thing I was going to be doing. It's worth noting, you can get all of this that I've done and you could comfortably -- >>Victor: What does that node do? >>Chris: Vertex Interpolator -- So, for anyone that's unfamiliar with Vertex Interpolator, usually developers used to use custom UVs to pass things between the vertex and the pixel shader. If you do a Vertex Interpolator node it literally just does this side on the vertex and converts it to pixels. So, it just makes sure that these instructions are being done. >>Victor: Nice. That's super handy. >>Chris: This single node used in certain situations can save massive amounts of performance, so please use it, it's good for you. Anytime I make something like this I always get someone who's just like, “Yeah, but how complex it is?" And then I'm like, “It's still green." It's not as green as our sky dome over here, but we're still pretty good with how that's looking and it's not that much extra work. It's funny cause like these buildings are now going to correctly instance, whereas if that were Blueprints with a whole bunch of different parameters set up, unless I was using custom [inaudible] or something, these wouldn't batch together, but now they will. Being able to have all of these buildings comfortably kind of batch, especially if I just created a couple of instances that are the exteriors. I've got a more complete thread on Twitter for this, that you're more than welcome to check out. My Twitter feed on that, it’s like a 20-step process where I've gone through this bit by bit and really carefully explained everything and then I've added some outer windows and stuff to it. The files are available to download from that Twitter thread as well. Feel free to get these Assets from there to kind of get a better idea of what's going on if you don't feel like going through this video and like recreating it manually. How are we going for time at the moment? >>Victor: We're still pretty good. >>Chris: Good is a relative term, but yeah. >>Victor: Do you want to take a couple of questions in regards to what you covered so far or do you want to wait until the end? >>Chris: Yeah, that's probably a good idea. Alright, let's do it. Question time. >>Victor: They were curious, can you blend entire Material attributes values in a single Lerp node? >>Chris: Yeah. >>Victor: That’s it. Yes. You can do it. I think you were doing that. >>Chris: I mean that's literally all it's doing. It blends everything together. The other thing is, that's nice about it is if I look at that node and I click it, you can say, “Hey, when it comes to vertex attributes, just use A or B, but when it comes to pixel attributes, I want them to blend.” This can get around some issues that you get where you're using a Texture to blend stuff that isn't quite playing nice for vertex attributes. Even if you didn't want to do it this way, you can still manually blend stuff if you need to. At any point, I can get this and call Get Material Attribute and then I can be like, “Hey, I want the base color out of this,” and then I can call Set Material Attribute and I want to set the base color. Now the cool thing is that if I feed this into this, I could do some sort of instruction and then that will now have all of these properties, but the base color will be at whatever's plugged in here, so you can override just that one channel. >>Victor: Do those add more instruction counts in the Material? The Get and the Set Material Attributes? >>Chris: Get and Set are actually less expensive than using this, which a lot of people still use. Please don't use that. But to my knowledge, I don't think this adds any instructions because I think they all get compiled out. Don't hold me to that, but I'm reasonably sure they are compiled out. >>Victor: It would seem like they were fetching and setting the data rather than doing an operation on it. >>Chris: Yeah, I think it's just in the graph. I'm sure someone from Epic that has a better understanding on that side will be able to clarify. I've never gotten to a point where I've been like, “Oh, woe is me, why have I used so many Gets and Sets that my performance has been terrible?” I'm assuming that it's fine and I've done some pretty complex stuff on some pretty low-end machines. I believe it's okay, but hopefully someone else at Epic can clarify that point. >>Victor: Can you separate the cubes slightly like for doing an apartment cutaway, walls, floors, and ceilings? >>Chris: Yeah. You can do that. It requires a little bit more math to really kind of figure out how to do it. Essentially what you want to do, if you think about the problem is, if you consider every value that's coming in -- I can probably think [inaudible]. >>Victor: We can follow up afterwards. >>Chris: No, let's just do it. If I use a Frac node, one of the things that a lot of people underestimate is the power of a Frac node. What we're doing right now is everything that's coming in here is telling us how much this value is being multiplied by to end up at its new position. But if I was to get a Frac node and plug that into my emissive color -- sorry, I just realized I forgot one thing. I didn't want the Frac node from there. I wanted the Frac node from here. What this Frac node is essentially doing is the Frac node is going to make sure all of my values between zero and one. So, if I have a value of 4.5, it's now just equal to 0.5. That same math of a frac node actually lets us kind of like follow that logic through and say, well if we know that this is how big each tile is, nothing stops you from getting these, and kind of increasing and decreasing from either side, like squishing these UVs in and by squishing these UVs in so that the value of zero is here and the value of one is here, so that further inside; that's how you would kind of take that approach. That would kind of push those floors a little bit together and kind of extend the walls. The advantage of being able to do that is you can obviously create walls going on in between the things, but it also means that you can run that as an external mask that would act as like exterior concrete. I believe the version of the Material that I put up on Twitter automatically adds, instead of squishing the rooms that adds concrete to the top and the left and right sides. So, it actually adds overall [inaudible] size to like kind of add that extra concrete on the other side instead of squishing the rooms themselves, which is a very similar piece of logic to what we're describing now. Any other questions before I move on to the next? >>Victor: I think I had one more here. Would there be a way to combine different Cube Maps as to get even more variations of interiors behind the window glass in one master Material? >>Chris: Yeah. We kind of started taking on the whole Ian Malcom thing of being so preoccupied with whether or not you could, that you don't know if you should. But if you're wanting to do that, you could do it in a few different ways. It depends on how random you want it to genuinely be, but you could comfortably just run a Lerp that switches because these here, this is a UVW being fed into a Texture. There's nothing that stops you from having another one of these and then lerping between them. You could do your cell selection as to which face you're actually selecting in a few different ways. Obviously interior Cube Map is doing that itself by getting the randomization here. So, if you want to follow the logic that they are doing along this true path, by the way, if you click Hide Unrelated, I can grab just this true logic. If I was to get this -- I want to get that. I want to get you and your true -- You're pulling in this data. So, how they're handling that randomization is I think done over here, you could use that same logic to kind of handle your own exterior, secondary randomization that's randomizing between these Textures themselves. That would be one way to do it. Another way, if you wanted to really kind of make sure that edges of rooms were kind of matching with one another, you could use a Sobol randomization which gets you to the integers. It creates kind of a grid of random cells and the cells themselves would be the value that's being read into here, sealed or floored. If this is an integer being read in -- If I was to get this and I was to -- That should -- Cool, let's hit Apply. It would help if I -- It’s giving me a random number. And I did the same thing again. I want to get you and I want to seal you. I think that should work. In my head, that works. Yeah, there you go. So that's now actually getting a random number for each single cell. We could use those values that way lifting out of it as a way of interpolating between different things. But because that's reading in a grid position, it shouldn't be too hard for you to read in corresponding grid positions for each cell so that this random and this random have the same seeded value, therefore they output the same which would make the lights in each cell kind of match. I can't remember if I'm doing that in my Twitter version or not. I have done that before though. >>Victor: If these cubes are not aligned to the world axis, do the Materials still work? >>Chris: As in, like, If I got this and I turned it sideways, and did this? >>Victor: Yep, that was one of the questions. >>Chris: Yes. >>Victor: There we go, future of architecture. >>Chris: Anything else? >>Victor: I think that was it for now. I might follow up with some later on, but please go ahead with your next example. >>Chris: Rad. Sorry, I'm not quite running at 100%. The next thing that we're going to do here is we're going to take a stab at Post Processing in a slightly different way. I'm just going to just kind of shrink this down a little bit because it's really just bit of an eyesore. I will put another one in because I need something to demonstrate the thing that I'm about to do. For anyone that's unfamiliar with it, typically when we create a Post Process, this is -- actually, I'm going to roll back and explain what a Post Process is. For anyone unfamiliar with Post Processing, essentially how it works is as the camera, it renders all of the stuff in the scene it then runs an extra pass at the end that allows you to change like the exposure, it allows you to change the color balance and all of that stuff, right? But one thing that's really useful is we have this concept called Post Process Materials. A Post Process Material is really useful because it allows us to actually create a Material that is doing a series of instructions on the final image. I'm just going to create one of them really quickly now. I'm just going to create one, I’m going to call this M_PostProcess. Let's just build like an outline shader or something. We're going to build a really basic outline Material. The first thing to do is really straightforward. You literally get this and you say, “Hey, you're Post Process.” Okay, now you'll notice that that just ditches all of your channels except for emissive color. That's good. That's fine. Now as a quick thing, if I was to get this, I'm going to go to Scene Texture and I'm going to select Post Process Input Zero. Just for the time being, I'm going to multiply that against -- Give me a color Victor. >>Victor: How about green? >>Chris: Green. Okay. I’m not going to multiply it because that's going to look terrible. Let's do a Photoshop-like overlay. There we go. That's now putting this image over the top of it. See how that's going on there? >>Victor: Yep, we've got night vision now. >>Chris: We have night vision now. Oh that's why he chose green. Good job. We're now kind of like getting that kind of blend going on and if I wanted to, I could hit apply and I could push this out to the scene. I just click here and I say, “Hey, I want to use an Asset and the one I want to use this called Post Process Outlines,” which is now doing this. What's really important here is if we want to, we could create an outline shader. There are a few different ways to do an outline shader. I'll create a reasonably basic one, I guess. Let's just follow through that logic. I'm going to us a node called Sample Scene Depth. You could do this manually, but I find this is an easy way to quickly set up what I'm about to do. Imagine this node given an offset, it will go ahead and it will look at how far away the current thing in the scene actually is. So, what is the depth of the thing in the scene? What we can do that's quite useful was if I wanted to, I could get this and I could duplicate it. I'm trying to think of how to demonstrate this next bit. Pretend we're sampling this pixel here. If I wanted to look at this pixel and this pixel and this pixel and this pixel. So, the ones that are above, below to the left instead of right, I could actually look at all of those and see how different they are to this middle pixel and by doing that I can see whether it's an edge or not. Because if there's not much difference between these things, then it means it's probably a flat surface. But if there's a big change, it means that -- if this is coming up with a really low number and this one over here is coming up with a really high number, I know that this is really far away, but this one isn't, therefore, there's a line here. I hope that makes sense. We're going to do that. Reasonably simple. All you need to do is, there's a nice cheap way to do it, use this Blur Sample Offsets node, which already reads in X, Y offsets of 0:1, 1:0, 0:-1, -1:0. It's quick way to do it. So, I'm literally just going to get this and be, plug in all of you, and you're probably like, “Alright, but that sounded like a reasonably complex task of evaluating these things,” But actually it's kind of not. If I got this, all I need to do is I add all of these together and then I see how different they are to this one. To do that really just means, if I was to multiply this by negative four because there's going to be four of these things and then I add everything together. >>Victor: I think we lost your screen share there for just a little bit. Okay. You're back. >>Chris: Did you get my audio or just the screen share? >>Victor: I think it was full hedge. It was only a couple seconds. >>Chris: Okay. What was the last thing you heard? >>Victor: Negative four. >>Chris: Okay. So, by multiplying this by negative four and then adding everything together, this negative four is now -- it's equivalent of kind of adding this and then subtracting this, adding this, and then subtracting this, adding this, and then subtracting this and adding this and that, subtracting this. By multiplying it by negative four ahead of time before I just add everything together, it means that I only would have to add it one time, if that makes sense. By having this kind of set up here, I'm getting all of those things and what that's kind of doing for me -- I actually, you know what, I'll just show you. If I get all of those values, and I was to saturate them, look at that. >>Victor: Yeah, it looks pretty cool. >>Chris: I look back in my world for a second. This is what we see and that's because that's creating a reasonably basic out -- You'll notice, it might be hard to see because it's getting pretty framey, but if I was to get this and it's getting a bit of jitter going on, but you can fix that jitter by just getting this Post Process Material and saying, “Hey, I want you to happen before tonemapping,” And what that means is when the anti-aliasing pause kicks in, it will actually smooth out all of the stuff that you're seeing there. Is that visible? Can you see what's going on there? Can you see a difference in this? >>Victor: I saw the thought a difference there, It was especially clear on all the -- all the white ones. >>Chris: Cool. That's a reasonably basic Post Process. Obviously, we could have done this in a cool way, but this is a reasonably basic digitized looking Post Process thing. Let's do something people don't often do. Let's go one step further. I'm going to delete this from my Post Process for just a moment and I'm going to go back to here and I'm going to grab this. Actually, just before I do that, now that I think about it, I’m going to apply this again, sorry. One thing actually I forgot to mention for any folks that are following along at home is if I add that image that you just saw and I multiplied it, one minus just flip the zeros and the ones, if I multiply that against the Post Process color, we're going to get that. Normally I would need to do some masking that removes the background stuff as well so that we don't get that happening with the sky box. But see how we now kind of getting that applied to the standard imagery that we would otherwise see. I figure I should probably show people how to finish the out. So, we've got that applied. What I'm actually going to do this time is I'm going to get all of this, I'm going to copy pasta, I'm going to create a new Material, his is going to be called M_ -- I'm going to call this Box Process Now, this is -- Box process sounds -- >>Victor: Names are important. >>Chris: Yeah, I'm going to call it Moveable Process, just as a reasonably straightforward way to do this. I've got this M_MoveableProcess, I'm going to delete the existing Post Processes, so we're back to where we were before. What I'm going to do is I'm going to get a cube and just drop that into my world and I'm going to make this a big cube. One of the really cool things that a lot of people don't realize is that when something is running translucency, it can actually run almost all the same logic that your Post Processes can. So, check this out. If I go to this and I say to it, “Hey, you are translucent,” and I'm just going to plug this into the opacity and then I'm going to hit apply and I'm going to set this box up to have that Material, I called it movable. Now when we look through this box, we're actually seeing that Post Process being applied to it. Do you see that? >>Victor: Yeah. It's coming through. >>Chris: One thing that actually could be rad here is if I ditched that one minus, so we just have what we originally had. I could run it like this. Actually, what would look even cooler than what I'm doing right now, now that I think about it is, I'm going to multiply that against like a rad looking color of some sort, let's do orange this time. That's right guys. Colour with a U, livestreaming from Australia. This might look a bit psychedelic. That's pretty cool. So, we've got that going on there. With this, what we can see at the moment, if I was to go into this queue, it's going to bleep out of existence. Do you see that? That's not good for anybody. So, if I get this, I'm just going to literally make this two sided. By making this two sided -- >>Victor: If you didn't catch that, Chris, do you just want to show the checkbox again? >>Chris: Sorry. It says two sided. >>Victor: There we go. Under Details. Cool. >>Chris: And now if I go into it, we’re now able to call a Get. We're not out of the woods yet. We have this issue going on. Does anyone want to guess why this is occurring? Victor, you got an idea? >>Victor: Well, the box is below the landscape. >>Chris: Exactly. It's only going to be two sided when we can actually see what's there. Okay? So, alright, that's a bit of a problem. So how do we solve this? Well, there's a really cheeky way to go about solving this so please don't judge me for everything you're about to see. Now that I've put that forward, let's check this out. If I disable the depth test on this box, there's a checkbox called Disable Depth Test. This will now render through everything. Give it a sec, if I go into it, I can now see that that's occurring as well. Do you see that? >>Victor: It's coming through a bit choppy, but I think we can see it now. I’ve used that checkbox to do player names on your team and such. You’re able to see them. >>Chris: Here’s the issue we're going to get, see that? Not ideal. Fortunately, there is a nice little thing that we can do, which is, there is a thing called World Positioned Behind Translucency. World Positioned Behind Translucency literally just gets you the position of anything you're looking at that's behind the object that you're seeing. So, if it's a translucent object instead of getting you the world position of the cube surface, it would be getting you the position of the grass or the building behind it. Do you get what I mean? >>Victor: Yeah. Just a quick request too, when you're doing these quick motions and just showing the little things, just go a little slower. Since we're a couple frames behind due to the output rate. >>Chris: Sorry about that everybody. >>Victor: Or you're just too fast for us. >>Chris: No, I'm just trying not to get into a political rant. I've got this world position, so if we get that world position, the first problem that a lot of people have when they approach these kinds of issues is, they don't approach these problems from the perspective of localizing it. But if we assume that the inside of that box is 0:0 and then it's a local position, all of the math that I'm about to do becomes much easier. So, there's a thing called a Box Mask 3D and what is, it looks at to two things and it just works out if they're inside of the box or not. I’m getting the world positioned behind the translucency, and I’m going to tell it that the location is 0:0. Now this isn't going to work yet because I am missing something. This world position is in world coordinates, but if I transform its position so that it's in local space, I'm going to tell it that the information coming into it is absolute and I want it to come out relative to the box that I just added, I then just need to get these bounds and set them to the objects local bounds and I think if I plug this into opacity, we should see what we want. The bounds need to be the size, not the minimum. Let’s do this again. What we have here, I can now move, I'm going to put this box, wherever it goes, provides a Post Process just to that region that you can physically see into and then when I get in there with it, I can be like, oh, Post Processing and then I come out and it's doing its thing. For that kind of effect, we could use this for all sorts of stuff. I actually gave you a reel earlier, do you mind playing a thing for me that I sent you earlier, can you play the one called Movable Post Process through your feed? >>Victor: Yup. >>Chris: Thank you. So, I'll talk over the top of that. This is something that I did as a quick demo when I was using this feature elsewhere. I whipped up a procedural level creation tool so you could just walk through and hit buttons and it would play intelligently, place bits and pieces in the world. I'm actually using that Post Process concept of just like it's not actually a Post Process, like it is just translucency doing some fancy stuff, but using that as a spawn technique that grabbed all of the regular Assets in the world and quickly just had them. The box is actually just shrinking down. If you see what's going on in that scene, can you see how the box getting smaller and smaller? That’s actually all it's doing and it creates a really nice little spawn effect that you could use without having to do like a ton of extra pixel instructions that are actually on every single unique Asset within the thing that you're spawning. So, it's kind of nice to be able to just spawn stuff and be like, “You're what I care about.” If you wanted to, you could probably use like custom depth or something like that as a nice way of masking out specific Assets too with less overhead. This can be approached in a few different ways, but I technique like this is very rarely actually used, but as far as I'm concerned, this is really quite valuable. If you don't mind jumping back to my share, the last little thing I'm just going to show you on this front is if I go to this Asset, if we went to -- there's this value called Edge Falloff. Now this isn't going to work out of the box. I’m going to create a scaler called Edge Falloff. You know what, I might actually show you the problem first, so you can see what occurs. Watch what happens if I plug in an Edge Falloff of 200 straight into this. If I was to just read in an Edge Falloff of something like that and just plug in a value of like 200 or whatever it was that I just did, it's not going work. It's not going to properly give me the size of what I actually need it to be. What I actually need to do here is I need to get the bounds and I need to subtract the Edge Falloff size from that so that it actually brings it back in. So hopefully this will make sense to you in just a sec. I'm going to get that value. I'm going to subtract. The Edge Falloff is a radius. So, I need to subtract it from both sides. I'm going to multiply by two, I think this will work. That did not work. It actually did a little bit, let me just bring the Edge Falloff to be a much smaller number. So that's now kind of creating that nice fade in and fade out of the Post Process. Do you see that? >>Victor: Yeah, I see it. >>Chris: By kind of subtracting that first, it actually gets you like a nice blend. I found some pretty cool stuff with this. I put together a tune shader a little while ago. It was really cool to like walk into a tuned world and then walk out of the tuned world. You know what I mean? That kind of stuff is really fun and you can kind of create some really unique and interesting effects. Being able to kind of like walk into something that suddenly makes the whole game experience, just feel like something you haven't really seen before instead of just changing the camera effect, it's kind of a nice way to handle all of this. I might do one last little thing just because, I'll be honest with you, I'm kind of running out of steam. >>Victor: We're getting short on time here as well. Did you want to show the mannequin there and the World Position Offset? >>Chris: Yeah, that's what I was going to do really quick. >>Victor: You're doing well, Chris, considering how late it is there. We can all see what time it is for you. >>Chris: What I'm going to do this time around is, I'm just going to mess with the existing mannequin. If I was to look at the existing mannequin, which is opened up on a different screen somewhere, if I was looking at this existing mannequin, this is what we've got. Now remember earlier I used the World Aligned Texture node to project onto this Asset? So, if we were to do the same thing with our mannequin, we would actually have a bit of a problem. I'm going to ignore all of this. I'm going to get everything that's coming out of that and I'm going to call Set Material Attributes. I'm going to get the base color and I'm going to set the base color on the mannequin to be -- sorry, I'm just going to get a noise Texture. I guess that'll do. By default, we're going to have a bit of a problem. If I was to multiply this value by dark red -- Nah, I'll go for red, just so it's visible. If I was to overlay this, Victor, you there? I just feel like -- >>Victor: Yeah, we're here. >>Chris: Cool. Alright, so I'm just overlaying this onto it. We would have a little bit of an issue. I'm just going to hit apply and I'm going to look at my mannequin. >>Victor: Waiting for the shaders. >>Chris: That looks okay. Right? It looks okay-ish. The problem is this, if I was to apply an animation to him, did everyone see what's going on there? Because it's a projection in world space, the Asset is kind of shimmering. I hope my connection’s able to -- >>Victor: I think coming through. Yeah, we can see the Textures sort of staying still in world space, whereas the mannequin is moving. >>Chris: Wonderful. A quick little thing that I just want you to be aware of is, for something like that, all you need to do is uh, if I call a Pre-Skinned Local Position; Pre-Skinned Position actually gets me the world position when it was in its t-pose and you've got to use the vertex interpolator for that. Watch what happens when I plug this in instead. I'm just plugging that in. See what that's doing now? >>Victor: In just a moment. There we go. >>Chris: See what's actually going on there? That Pre-Skinned Position because it's the T-pose position, I can actually just project onto the Asset and even though it's moving around, you're not getting that shimmer anymore. Victor, it might be a good idea, I gave you some b-roll on this effect just before the livestream started just in case, do you mind playing it for me? >>Victor: Yeah, what was the name of it? >>Chris: It's called local bounds. >>Victor: Coming right up. >>Chris: Cheers, peers. You can see on the left-hand side is what you would normally get and on the right-hand side is the Pre-Skinned Local Position. The cool part of this is -- If you drop back to my screen now, if that's okay? Now the cool part of this is, at the moment, this is using the world sizing, but if I wanted to, I can actually get this Pre-Skinned Local Position and I can divide it by the Pre-Skinned Local Bounds, which divides it by the size of the Skeletal Mesh when it was in its t-pose and I'm going to set this Texture size to be a value of one. What this actually goes ahead and does is by dividing it by the Pre-Skinned Local Bounds, it actually aligns the Texture to be projected according to the size of the Skeletal Mesh. You don't have to be finicky about what exact size the Asset was, you can just have generic skins. Now this is really good because think about if you're making a video game and you want it to have camouflage on the character, or you wanted to project like a cool decal onto their t-shirt or anything like that, being able to just read that information in, means that what you end up with is a really elegant and quick way to generate a ton of content. You can really quickly generate uniforms based off of camouflage Textures being read in. You can really quickly generate all sorts of weird and wonderful patterns that are just being brought in and that really takes -- I'm not saying to do that in a game for every skin, but let's say you had a game that you wanted have hundreds of thousands of loot drops for the player. When you're able to use something like that to just really quickly generate a weapon skin for literally every weapon, by just projecting that particular camouflage type into that particular region on the Asset. That's really valuable because you can then use that for your smaller Assets and then you can still do all of your custom detailed hero Assets that look really, really nice that are the bigger features. This is really important for developers because we want you to not get bogged down by workflow issues that just shouldn't exist. When you're able to kind of get this Pre-Skinned stuff and just project things onto Characters or onto weapons or to items in general, you can create a lot of value that you can keep rewarding players and just keep giving them all sorts of free stuff in your game. Keep giving them drops, make things look interesting and that's pretty great. Please keep in mind that the Pre-Skinned Local Position and the Pre-Skinned Bounds are pretty valuable. You can see the Bounds here has just made this go between zero and one and it's just kept it to a nice size, a nice scale for the projection, which is great. Last little thing. I'm kind of out of time to really do the procedural gen stuff that I was going to quickly cover. What I'm just going to do is load up a project and just show you some of the tools that exist so that you can jump into that. My apologies for anyone that jumped into the stream. The prop gen stuff I originally intended on doing, but it’s kind of involves a lot of moving around and would have involved me moving quite quickly and I wasn't quite comfortable doing that and not slipping up at this hour. This world here is just being procedurally generated. The forest has been brought in using the Procedural Foliage Volume tool. This is available for everyone, just go to Edit, and then go to Experimental under your Editor Preferences. So Experimental and you'll see that we have Procedural Foliage and the Procedural Foliage System literally lets you set up rule sets that tell it -- you can literally set up this Procedure Foliage System is looking for these three types of trees and if I open the each of these trees, each of these trees just has some rules that I've set up that say how much shade they cast, whether they can grow when they're in the shade, how many seeds they spread whenever are not pollinating -- seeding? What's the word here? You set up all of these rules for these trees and if I was to go back here and simulate it, it actually regrows that forest and it throws them all in. This is a really useful little tool because it actually syncs up with the Foliage tool. If I generate the forest and then I'm like, no, you can just remove those trees, you know what I mean? So, we can still get like that nice little custom layer in there. It just saves you having to paint all of that because, why would you waste time? If you can just kind of drop that straight in and have a good time, it just means you can just like be, give me a forest, I'm going to carve out the area that I actually need, let's all move on with our day. That's, that's the first thing that I kind of wanted to touch on. Now, the next thing that I quickly wanted to touch on is this landscape itself. I'm just going to hide the trees for a second. This landscape itself is actually completely procedural as well. So if I go to my Content Browser, I'm going to run the widget, see this thing up here, I got stuck without internet for like six hours and I was trying to look for a project to just knock together while I was waiting for something, that's a long story, and this was kind of what I cooked up real quick. This tool, if I click here and hit Generate, that generated, see that ditch corresponds to here, or if I wanted to have to pull this across and be like, “Hey, let's generate that,” and you can see here that that dip is there. By the way, the Foliage should just stick to your landscape because of how the Foliage System works. So, it will actually, even after changes to your landscape, it stays friendly and as of 4.23, you can also have generic actives as follows too, which was really great. Anyway, back on track. So being able to have this kind of system is reasonably straightforward. Now this looks like something that would be complex, but it's actually really not. I'm going to open up this Editor Utility Widget, this doesn't involve a single line of code. I'm going to open up this Utility Widget, this is all Blueprint and I've literally just gone ahead and created the widget by just dropping in a display image, which is the preview and then down bottom I have generated like just a bunch of sliders and a big old generate button, but if I look at that display image, it's using a thing here called Preview Map. I’m going to open up the preview Material. So, this is what you see on that little clickable area. This literally takes in a Heightmap called landscape RT. I've been a little bit cheeky with how I've set this up to get contour lines working so I could actually see what the height was really doing here, by multiplying it by 10 and then fracking it, we're going to preview that. By multiplying it by 10 and then fracking it, it actually gives me a nice gradient between all of these layer lines and then by kind of just doing a little bit of extra math there, I’m subtracting 0.5 and multiply that by at two, which kind of gets the bright areas in the middle and the black areas along the side and then heavy contrast, which gets me this. Then I'm just literally lerping in some green. That actually gets me like a nice little preview screen. This kind of math isn't too complicated and it's actually just seeding off of the render target. Now if I look at the actual logic involved; I'm going to get back to my graph, this is the entire thing. It's actually reasonably straightforward and most of it, like these things down here, if I zoom in, all they’re doing is saying on value changed, call this Update Variables function. That’s all, all of those are doing. Every slider, every time I change the slider it's just updating the variables. I hope my stream is keeping up with me. >>Victor: Yeah, it looks alright. >>Chris: When it calls Update Variables, all it's doing is, when we first create the thing, I'm creating a dynamic Material. I'm getting that dynamic Material, and it's a really simple landscape generation Material that I created. This is literally just a couple of noise functions to create something like this. And I've added like a scale value to make it bigger and I've added an offset for different things. But it's actually reasonably straightforward in terms of what it's actually doing. All I'm doing in this widget is literally getting this and I'm calling, “Hey, I want to update all the variables. Your offset is just equal to what the slider has. Your scale is equal to what this scale slider is. Your reduction amount is what I'm using for that black area. Wherever I click your reduction size is this.” I'm literally just running through and just setting up all of these things and just letting it do its job. The only thing that's unique here that's worth noting is, see this Draw Material to Render Target? So, this literally takes a render target and I'm getting this Draw Material to Render Target and I'm automatically then just outputting the landscape render the target from that. So that's creating like a black and white Texture and after that creates a black and white Texture for me, anytime anyone hits the create landscape button., so anytime anyone clicks this big old generate button down here, what that's actually doing is it's regenerating it just in case and then I'm being a little sneaky, I'm saying Get All Level Actors and just grab the first landscape you find. Then we have this function here, which is really where the meat of what we're doing is. A lot of people are unaware this even exists and it's called Landscape Import Heightmap from Render Target. By importing the Heightmap from the render target, literally just takes a black and white render target and sets that as the height of the landscape. From here, I've done a couple of other little things. I actually generate a grass Texture as well based on the landscape. So, I'm actually generating grass patterns based on the Heightmap. So, this is a separate Material, again that's getting rendered. This essentially it's just looking at the slope and saying, “Hey, how slanted is it? It's pretty slanted, maybe make it dirt.” So essentially this is like a static version of that cliff painting that you saw earlier and the advantage of making static instead of making this a world projection like I had before is it's just a little bit cheaper and it's a little bit easier for artists to modify because they can go over the top of that and be like, “Look, I can see that it's generated and added some no grass there, but I really wish it had some grass there.” We can see that like by having that as a static thing that initially gets pushed out. It's worth noting that this workflow is good right now, but it's not really where you want it to be. And honestly it's why after thinking about it a little bit, I was a bit hesitant to do this as the core of the livestream because if you go to Edit, Preferences and you go to Experimental, there is the Landscape Layer System, it’s something that's experimental at the moment, which allows you to create Blueprint brushes. Being able to kind of use the experimental landscapes whenever you're creating a new landscape, it's going to mean that render targets like this I've just done on separate landscape layers, rather doing them using the functionality that you're seeing at the moment. That's in 4.23 at the moment. That's something people can tinker around. >>Victor: That’s the Editor version you're working in now, right? >>Chris: Yeah. This is all just vanilla .23, nothing fancy about it. That general procedural system is probably much better for a landscape discussion in a future version of Unreal once those layers are kind of a bit more stable and everything's working. >>Victor: I'm sure we'll cover that. >>Chris: I would hope so. Just a quick heads up for anyone that's fooling around with this stuff, be aware that if you go to Edit, Plugins, if you go here, you'll see Editor Scripting Utilities. I think it's disabled by default, but it adds a ton of extra functionality that you can do. So, it adds a ton of extra little calls that you can do within Editor Utility Widgets and the other one that's really powerful is, I think its Blueprint Material and Texture Nodes. So, this gives you the ability to do Blueprint only nodes for creating static Textures and all sorts of stuff. This is really powerful when you're doing procedural landscape widgets and such. >>Victor: We had a Nick Pfister on a couple of months ago showing off how to use the Editor Utility Widgets. We also have good documentation on that. Pretty straightforward, how to get started. >>Chris: With that said, I think that's probably the core of what I really was going to be covering today. I guess it's a good idea for us to kind of go into to a question. I might stop sharing and just switch back to video feed and deal with my, my 5:45 AM mug. So, I’ll switch over and we’ll go from there. If anyone has questions from this point, I guess now now's the time to do it. >>Victor: We actually have a lot of questions. I don't actually think we'll be able to go through some of them and I've been paying attention here. Let's see if we had some earlier that I’d be able to grab, just one or two, there's quite a few. Would you be willing to maybe go through them and pick some out that are relevant and answer them later? Just on the forum, you can get some sleep and then we'll take -- How about we do that? >>Chris: No, I can answer. I can still do 10 good minutes. >>Victor: Let’s go through a few then. What a champ. Is there such a thing as vertex normal local space? >>Chris: I believe so, yeah. Let's find out. Yeah, Pre-Skinned Normal. >>Victor: The answer is yes. What was it called? >>Chris: Pre-Skinned Normal. By the way, a little thing, and I know this is weird, but a lot of people don't know this. Shift D aligns nodes to the right side. Shift A aligns them to the left side. This works in Blueprint as well. That's just a nice thing to just keep your nodes. There you go. So, align left, align right. And if you ever have nodes plugged in like this, I'm not sure if you noticed that I was doing it, but if I was to click these and hit Q, it will straighten them and just auto-fix your stuff. Just a lot of people aren't aware of Q, Shift A, Shift D. I just realized that you can't see my screen. >>Victor: No, we cannot. >>Chris: Sorry. >>Victor: Next time. That's also what makes going through the questions a little hard because I know that you're just like, “Oh yeah, it's right there. Let me show you.” >>Chris: I'm going to ditch my video. Let's go back to the screen while I answer questions. >>Victor: Here we go. >>Chris: If you hit Q, they'll just straighten your notes. If I grabbed things like this and you Shift D, Shift A. >>Victor: You get dancing nodes. >>Chris: Yeah, dancing nodes. That's just a good way of just not having to deal with straightening stuff manually. >>Victor: Or marking them, right-clicking and selecting the option in the menu. >>Chris: Oh God, yeah. Hotkeys, man. The nodes that I was mentioning before, which I put on the screen and then straight up forgot that I had was just a Pre-Skinned Local Position, Pre-Skinned Local Bounds. >>Victor: Why is it called vertex interpolator if it's a pixel shader only node? >>Chris: It’s interpolating the values from vertex through to pixel, I guess. You'd have to ask the person that had named it, but I believe that's why. I think it's getting the pixel values by getting the verts and then interpolating to get the pixel position. The equivalent of the pixel side. We got documentation of it, but yeah, I believe that's why it's called that. >>Victor: They were curious if any of this content might be available after this stream? >>Chris: The buildings that I did are public. I put them as files on my Twitter feed. What was the other ones that we had here? What else did I do tonight? Post-process stuff, I didn't do the Post Process, but that's pretty straightforward. I can send that through and you can post that. The Material itself was super straightforward though. >>Victor: It's nice sometimes to be able to look and break it down. >>Chris: If you want to, I can push that through. It's not a big ask. I might do it after I've slept though if that's all right. The Material generation stuff I can send through to you if you want. It's kind of hacky because I'm just like throwing it together, so it was pretty ugly to look at. I spent zero time making the widget itself look pretty. I was like, oh, functional, and then just called it. But if you want, I could post that. >>Victor: We'll take a look at it after stream and see what we'll be able to share. These are all specific to what you were doing right then. Is any of the operations you've been doing in the Material graph here SM5 only or do most of them work on other platforms? >>Chris: That's a good question. I don't believe so, but I don't want you to hold me to that because I'm not too sure about these ones. I haven't run them on a non SM5 device. I think it's all fine though, but you'll need to, don't hold me to that. You'll need to check it yourself. >>Victor: Yeah, it's fairly easy. You can turn on the ESGL 3.1 preview and just apply the same Materials in your scene there and you can check it out. >>Chris: I’m not too sure about the building stuff. Your interior maps might have issues, but I doubt it. I'm not going to answer that question just because there's a bunch of Materials they have that I would have to go through to verify today. To my knowledge it's fine, but you know what I expect ES 3.1 to do versus what it actually does, ever anything that's similar whenever it comes to advanced effects. >>Victor: Sounds good. I think that was it in terms of what you covered and questions regarding them. It's getting really late and I know that you should try to get a little bit of sleep. Chris actually went to the bed and then he got up for the stream and I recommended him to go back to bed. True champ. We’ll see if we can get you back here. >>Chris: That’s alright. It’s the job. That was it for the, through the core stuff, I guess. Are there are no other big questions that are really kind of popped up that you can think of that are -- that are worth jumping on? >>Victor: In regards to -- Some of them don't have enough context for me to know precisely when they when they were asked, unfortunately. So, it's just can you show some slight variation? Not entirely sure unfortunately when that was asked. So that's a good tip to all of you. When you go ahead and phrase your question, try to be a little bit specific about the question maybe you mentioned like, “Oh, you know, when he was doing the landscape Material or the Post Process,” and then it'll be a little bit easier for us to know when that was asked. But yeah, that's really cool. A lot of cool stuff. If you want to see some more work on this, Chris's Twitter profile is another good resource. You can go follow him there where he frequently tweets about all these cool things. I think its kind of a cool idea that we get together and we show some a little bit more, exactly how you did some of these things on the livestream. I think that's a pretty cool concept. Sort of grabbed the best of what you've done recently and then go over it. I think with that said, thank you so much Chris for coming on and doing this with me. For all of you who are still watching out there and stuck with us for this long, I'd like to let you know that we are doing transcripts of all of the livestreams now. So, on YouTube after a couple of days whenever the people are -- it's actually done by a person, so they go through, they listen to what we've said and they write up captions and that transcript we provide a link to in the YouTube description and it's a good way for you to go and Control F and search for specific keywords if you were interested in a specific part of the stream. >>Chris: I'm so sorry to whoever has to translate my rantings when I'm trying to work out what I'm doing. >>Victor: That’s on the captioner's job later on. Don't worry, you don't have to worry about that. As always, Amanda went ahead and posted a link to the survey. I think we're going to go ahead and do that again. If you fill it out and drop your email in there. Let us know how we did or you would like to see in the future. I generally go there and use it as a reference to what you guys want to see on the stream and if you enter your email, you are part of a little t-shirts sweepstake that we're running. If you're interested in meeting other developers around the world, go ahead and go to unrealengine.com/user-groups and you'll be able to see if there is a Meetup group near you. If there is none and you have a group of friends or people there that are excited about showing off what you do. Go ahead and send us an email to community@unrealengine.com and we can tell you all about what it means being one of our meetup organizers. Always make sure you check out our forums. We have an unofficial, Unreal Slackers channel on Discord, where people are really helpful. You can ask your questions or if you have any problems, let them know and try to get some or even just feedback. Facebook, Reddit, you know the deal. That's where we're at. Our community spotlights that we have every week, we usually source them from our forums, but you can also just go ahead and ping us either on Discord or like I mentioned community@unrealengine.com. It's a good email address just to let us know about what you're working on, it's always really fun to see. We're still looking for more countdown on videos, so 30 minutes of content of you working in the Editor, speed it up to five minutes and send us that with together with your logo, separately, so that we can do to cool little countdown timer, then we might go ahead and put you on one of our countdowns. If you're streaming on Twitch, like we do, make sure you use the Unreal Engine category so that we can come and have a look when we have a couple of minutes in the day and as always follow us on social media. Chat, please give Chris your biggest thanks for sticking with us for two hours now and technically you've been with us since the prep, which is an hour before this, sorry, half an hour before to stream. So, two and a half hours, big up to Chris. Thanks again. Will you be at Unreal Dev Days next week? >>Chris: No, I won't be. Actually, on that note, I will be at GCAP, which is Australia, New Zealand events, for any developers that are at GCAP, next week. So next week is Melbourne International Games Week. We have a meetup going on Monday night, which you can find through the Unreal Engine Melbourne Meetup group. We'll have a couple of devs there. >>Victor: That’s meetup.com? >>Chris: Yeah. So just hit the Melbourne meet up and you'll see it there. But we're having just a general mixer, so it’ll be a couple of couple of Epic folk floating rounds that could hopefully answer some questions and for any of the Australian devs that might be attending, feel free to send me any videos that you've got because we're running it at an E-Sports bar in Melbourne, which has a bunch of TVs kind of streaming. We're going to be running developers’ games on each of those streams. So, if you've got either a trailer or anything like that and you want to put in there, or if there's a known stream that might be running, please let me know. >>Victor: That’s awesome. >>Chris: Thanks for having me guys. >>Victor: Always, Chris. If you are at Unreal Dev Days next week, we will be there, both me and Amanda, so please come say hi. With that, next week we will be -- Actually, I have -- there’s this tool called Mod IO. I’m not going to talk too much about what it is right now, because I want the people who actually made the tool, but they will be on the stream next week talking about how you can make a mod framework for your game. That's going to be really exciting. That’s Thursday next week. Until then, goodbye. Thanks everyone for hanging out.
Info
Channel: Unreal Engine
Views: 42,442
Rating: undefined out of 5
Keywords: Game Development
Id: nqatEfc5w5I
Channel Id: undefined
Length: 124min 23sec (7463 seconds)
Published: Thu Oct 03 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.