WEBVTT

00:06.820 --> 00:07.930
Welcome back.

00:07.960 --> 00:11.170
Now we're going to keep adding some geometry to our level.

00:11.170 --> 00:16.410
And in the last video, we saw the texture streaming pool over budget warning at the top.

00:16.420 --> 00:18.370
We're probably going to see that again.

00:18.370 --> 00:21.190
And in this video, we'll talk about a solution to that.

00:21.220 --> 00:27.280
So first of all, I'd like some geometry to block the way as that's a complication we haven't encountered

00:27.280 --> 00:27.880
yet.

00:27.880 --> 00:35.890
So I'm going to go into my content assets dungeon folder and just get something like a three by two

00:35.890 --> 00:36.910
by two.

00:37.570 --> 00:39.340
Or perhaps even three by three.

00:39.340 --> 00:40.300
By three.

00:40.330 --> 00:42.100
Something like that.

00:42.130 --> 00:45.790
And these are some nice geometry we can use to block our path.

00:45.820 --> 00:52.000
Now, I don't have my snapping on, so I'm actually going to go ahead and delete those and bring them

00:52.000 --> 00:55.780
back in with snapping on so we snap to a particular increment.

00:55.780 --> 01:02.050
That way it'll look like I have actual precision here and I'm going to go ahead and bring these up.

01:03.440 --> 01:07.940
And just make some geometry that I can use to block my path.

01:08.720 --> 01:11.540
So bringing in some more geometry here.

01:11.660 --> 01:13.490
Let's make some obstacles.

01:16.700 --> 01:18.560
Let's go ahead and time lapse this.

01:28.020 --> 01:28.590
All right.

01:28.590 --> 01:33.000
And I think what I'm going to do is add a staircase right here.

01:34.830 --> 01:36.510
So some stairs.

01:39.110 --> 01:42.380
That'll give me some change in elevation here.

01:44.490 --> 01:47.700
And I'm going to replace this with a smaller one.

01:47.730 --> 01:52.590
A lazy way to reduce the size is just to bring it down into the floor like this.

01:52.590 --> 01:56.370
But I think I have something that's a little bit more suited for it.

02:01.150 --> 02:06.190
And I'm going to turn snapping off just to position this a little bit better here.

02:07.700 --> 02:08.490
Okay.

02:08.510 --> 02:13.190
And after saving, I'm going to press play.

02:13.900 --> 02:16.360
There's that texture streaming pool over budget.

02:16.360 --> 02:19.840
It is back, but let's just make sure we can run.

02:21.160 --> 02:25.040
Now, one last thing I think I need is some rails.

02:25.060 --> 02:31.630
I'm just going to use this corner railing here and just bring it down and in.

02:33.880 --> 02:37.690
So we have something blocking the way, like so.

02:37.870 --> 02:44.200
And now we have this little area here that we can place something up there, maybe a potion, whatever

02:44.200 --> 02:45.250
we want.

02:45.610 --> 02:49.930
And if I edit this railing and show simple collision.

02:50.770 --> 02:52.990
I see that it's going to block the way.

02:52.990 --> 02:57.940
So I have to go to this remove collision and just add a box.

02:57.970 --> 02:59.300
That's not what I wanted.

02:59.320 --> 03:00.680
I'm going to remove that.

03:00.700 --> 03:07.600
I'm going to add a box simplified collision and just have a couple of little bits of geometry here that

03:07.600 --> 03:08.650
can block the way.

03:09.570 --> 03:12.180
So two blocks should do it.

03:18.480 --> 03:21.180
So I'll just move those into place like so.

03:21.540 --> 03:23.580
And we should be good there.

03:25.110 --> 03:26.070
Okay.

03:28.510 --> 03:28.860
Okay.

03:28.870 --> 03:30.170
Things are looking good.

03:30.190 --> 03:32.470
We're blocked by the geometry.

03:32.470 --> 03:35.800
And if I click to move, I was using Wasd there.

03:35.800 --> 03:37.210
But if I click to move.

03:38.150 --> 03:41.900
Let's see if we can manage to move.

03:42.560 --> 03:43.280
Okay.

03:44.130 --> 03:48.810
Now notice if I click here, we have an issue, right?

03:48.840 --> 03:56.600
We want our pillar to ignore that visibility channel, but also block our projectiles.

03:56.610 --> 03:57.060
Right?

03:57.060 --> 03:59.190
So if I fire a projectile.

04:01.700 --> 04:03.470
It's ignoring the projectile.

04:03.500 --> 04:07.040
But if I click, I can't move either.

04:07.040 --> 04:11.750
So we do need to make sure that our meshes are configured correctly.

04:11.780 --> 04:17.900
So with my pillar and my stairs selected, in fact, all of these.

04:19.770 --> 04:23.220
Let's just make sure that these are set correctly.

04:23.370 --> 04:25.620
We're going to go to collision.

04:25.710 --> 04:28.410
Collision Presets can be custom.

04:28.740 --> 04:35.340
We're going to block the projectile and ignore visibility and we're going to make sure generate overlap.

04:35.340 --> 04:36.750
Events is checked.

04:39.110 --> 04:41.000
Now we get those collisions.

04:45.550 --> 04:50.980
And of course my floor tiles are not allowing me to auto run.

04:50.980 --> 04:57.130
So just to make sure I understand what's going on, I'm going to select this piece here, go to Collision

04:57.130 --> 04:59.380
Presets and set it to custom.

04:59.860 --> 05:06.670
I do want to block the projectile and let's just remind ourselves how our click to move works.

05:06.700 --> 05:14.740
We can go into private player or a player controller and we need to look at our cursor trace.

05:14.770 --> 05:20.440
We're tracing against the visibility channel and inability input tag released.

05:21.040 --> 05:28.900
We're getting a NAV path, so if we want that auto run, let's drag in a nav mesh bounds volume.

05:29.290 --> 05:31.210
I accidentally put in a second player start.

05:31.210 --> 05:32.440
That's not what I wanted.

05:34.340 --> 05:36.200
I want to go to volumes.

05:37.010 --> 05:44.930
NAV mesh bounds volume and want to make sure that this volume encompasses the whole play area.

05:48.220 --> 05:51.330
Pressing play now click to move works.

05:53.310 --> 05:56.520
And things are working okay.

05:57.310 --> 06:02.710
Now, one interesting thing is my stairs are not quite working right.

06:03.160 --> 06:05.260
I'm just going to edit those stairs.

06:05.530 --> 06:10.780
I'm going to show this simple collision and it looks like we have simple collision, even a ramp here.

06:10.780 --> 06:11.860
So that's good.

06:11.860 --> 06:16.150
And for the stairs collision settings, it's set to ignore visibility.

06:16.180 --> 06:20.360
Now, this is a kind of complication that we haven't run into yet.

06:20.380 --> 06:25.390
The thing is, we want to be able to click on the stairs and run to them.

06:25.390 --> 06:31.630
So we want to block visibility for that reason, but we don't want these balusters to block visibility

06:31.630 --> 06:34.000
because then we get those complications.

06:34.000 --> 06:38.710
When we click on those Balusters we don't get a valid location.

06:38.710 --> 06:44.890
But if we click somewhere like on the stairs themselves, well then we're going to run to that location.

06:46.870 --> 06:48.130
And it'll work.

06:48.950 --> 06:56.570
Notice I did actually run under the stairs and that's probably because of our nav mesh going under there.

06:56.660 --> 06:58.070
Sure enough, it does.

06:58.070 --> 07:03.140
So we do want our stairs actually blocking the nav mesh underneath.

07:03.290 --> 07:07.750
So that's something we'll want some collision volumes for.

07:07.760 --> 07:15.230
Basically we'll just say collision add box, simplified collision and we'll have a box that we put down

07:15.230 --> 07:15.650
below.

07:15.680 --> 07:23.330
We're going to go ahead and just make that box a little bit more narrow, bring it down and probably

07:23.330 --> 07:25.820
forward a bit like so.

07:26.880 --> 07:31.770
So that's going to ensure that we don't have the ability to run under it.

07:32.010 --> 07:35.940
And sure enough, it's now blocking that volume.

07:35.940 --> 07:38.970
Now we also have a hole up here.

07:38.970 --> 07:45.270
Now this is something we could adjust our nav mesh settings project wide for.

07:45.390 --> 07:50.820
Also, though, we're going to want our geometry itself looking pretty good.

07:51.180 --> 07:59.100
And again, our NAV mesh bounds volume itself also needs to encompass enough room to cover all the surfaces.

07:59.100 --> 08:02.040
So it was also not quite tall enough.

08:02.040 --> 08:03.660
So that's looking pretty good.

08:07.310 --> 08:09.590
If I click up here, I can run up here.

08:09.620 --> 08:10.640
That's looking good.

08:10.670 --> 08:17.540
Now we do have that complication of not knowing where to run if we click on the balusters themselves.

08:17.570 --> 08:24.560
Although if we click somewhere that's not really a valid place to run, no harm done, we can just click

08:24.560 --> 08:26.950
and hold to run to where we need to run.

08:26.960 --> 08:35.360
But if you really wanted your stairs to allow click to move on the stairs part and then ignore the visibility

08:35.360 --> 08:40.100
channel for the balusters, you could just remove the collision for the balusters.

08:40.130 --> 08:48.140
These collision hulls here and then just create a basically static mesh actor that has box collisions

08:48.140 --> 08:54.260
on those balusters and those can block the things you want to block and ignore the things you want to

08:54.260 --> 08:55.000
ignore.

08:55.010 --> 09:01.580
What you'd probably want to block is at least the collision channel for the projectile.

09:04.370 --> 09:12.170
Okay, So these two pillars here, I'm going to generate overlap events for them and that way they can

09:12.170 --> 09:12.890
block.

09:13.960 --> 09:15.460
My fireballs as well.

09:15.460 --> 09:16.640
And that's looking good.

09:16.660 --> 09:17.020
Okay.

09:17.020 --> 09:21.550
So now let's talk about this texture streaming pool over budget problem.

09:21.700 --> 09:23.380
This is a problem.

09:23.380 --> 09:26.140
I'm going to press P to get rid of that green there.

09:26.170 --> 09:35.320
This is a problem when we have too many textures that are too large all on the screen at once and the

09:35.320 --> 09:39.150
textures in this project, much of them are quite large.

09:39.160 --> 09:42.610
And what we're going to want to do is compress them.

09:42.640 --> 09:48.910
For example, if I click on the tile here and by the way, these other static meshes, I can move into

09:48.910 --> 09:51.700
my dungeon folder as well.

09:52.060 --> 09:56.650
So just really quickly moving these static meshes into the Dungeon meshes folder.

09:56.650 --> 10:03.610
But again, if I click on the tile and I browse to the asset or really I could just right click and

10:03.610 --> 10:07.780
edit that asset, here's its material and if I browse to it.

10:08.430 --> 10:10.460
It's using these textures.

10:10.470 --> 10:16.170
And if I double click on one, we can see in the details panel that this is a 4K texture.

10:16.320 --> 10:17.550
Now that's great.

10:17.550 --> 10:18.780
That's really high quality.

10:18.780 --> 10:22.110
But for a top down game, it's probably overkill.

10:22.110 --> 10:27.240
We probably don't need a 4K texture when we're playing top down like this.

10:27.390 --> 10:33.570
If we're going to press play and we're seeing the texture from this far away, you know, 4K is overkill.

10:34.510 --> 10:36.460
So we can compress that texture.

10:36.460 --> 10:43.510
So here in the texture asset, we can take a look at the compression section, we can expand the advanced

10:43.510 --> 10:49.410
settings and we can set our maximum texture size to the desired resolution.

10:49.420 --> 10:56.500
For example, if we wanted half of 4K, which would be 2048, we can put that there.

10:56.500 --> 11:00.400
If it's a nonzero value, it's going to compress to that.

11:00.640 --> 11:04.570
Now, two K is also probably overkill.

11:04.810 --> 11:14.440
In fact, we could probably get away with one K that's ten, 24 or even half k 512 So we can see what

11:14.440 --> 11:17.980
that looks like by putting 512 in here.

11:18.370 --> 11:22.270
Notice that the texture is smaller if we save that.

11:25.450 --> 11:28.840
We're now using a half K texture instead of 4k.

11:28.990 --> 11:34.240
Now, going through each individual texture is going to be a pain, but there's a faster way.

11:34.840 --> 11:41.650
Well, we can do is we can select multiple textures at a time and we can bulk edit via property matrix.

11:41.650 --> 11:43.600
We go to asset actions.

11:44.740 --> 11:47.180
Bulk edit via property matrix.

11:47.200 --> 11:51.100
Now there's more textures in the project than just these three.

11:51.100 --> 11:58.150
So if we really wanted to do this on a massive scale, we could go up to the all folder and we can click

11:58.150 --> 12:01.990
on the dropdown here to filter by texture.

12:02.560 --> 12:05.740
Now we're seeing all the textures in the entire project.

12:06.390 --> 12:09.630
And we can cut those textures all down.

12:09.630 --> 12:11.520
Now, we don't have to cut them all down.

12:11.520 --> 12:15.780
Some of these are used for UI, some of them are the character.

12:15.810 --> 12:16.710
This one isn't.

12:16.710 --> 12:18.750
This is just a picture of aura.

12:18.780 --> 12:24.420
But a lot of these are used for environment and the environment.

12:24.450 --> 12:28.890
We don't really need high res 4K or eight K textures.

12:28.890 --> 12:31.740
So what we can do is search for certain things.

12:31.740 --> 12:36.990
If I search for tile now, I see all the textures for my tile assets.

12:37.020 --> 12:39.450
Now I can compress all of these.

12:39.660 --> 12:45.420
Now there's a couple things in here that are not used by my tiles, like these noise textures.

12:45.420 --> 12:50.280
I'm not too concerned about those, but I will compress all the rest of these.

12:50.280 --> 12:53.430
So with all of them selected, I can right click on them.

12:53.460 --> 12:58.050
I can go to asset actions, bulk edit via property matrix.

12:58.050 --> 13:02.310
And we have quite a lot of textures that we're editing here, right?

13:02.340 --> 13:09.940
We can go into our compression section, we can go to our maximum texture size.

13:09.940 --> 13:13.900
It says multiple values, but we can enter five, 12, enter.

13:14.260 --> 13:18.160
Now give it a second because we're changing quite a few textures here.

13:18.310 --> 13:22.570
In fact, we're changing 77 total once it's done.

13:22.570 --> 13:25.720
We now have compressed all of those tile textures.

13:25.720 --> 13:34.090
For instance, if I select, say, this other tile here and I click on edit and browse to its folder

13:34.090 --> 13:39.520
with its material and open up those textures, we can see maximum texture.

13:39.520 --> 13:41.380
Size is 512 for it.

13:41.530 --> 13:43.440
Now that's just the tiles.

13:43.450 --> 13:46.000
There are other assets as well.

13:46.030 --> 13:53.860
So what I'm going to do is close out of some of these tabs as I'm done with them and little by little

13:53.860 --> 13:56.500
we can get the other assets.

13:56.530 --> 14:02.440
Now, if I press play, notice that things are looking quite blurry now, but our texture streaming

14:02.440 --> 14:04.870
pool isn't so high over budget anymore.

14:04.870 --> 14:08.770
Now this blurriness can go away if I restart the engine.

14:08.920 --> 14:13.780
So what I can do is I can go ahead and we can save those changes.

14:13.780 --> 14:18.430
We've made close the engine and we can relaunch.

14:19.660 --> 14:25.850
Okay, So relaunching, I see that I'm back into this level that I'm not too fond of.

14:25.870 --> 14:34.030
So before continuing, I'm going to go to project settings into maps and modes and change the editor

14:34.030 --> 14:38.080
startup map to Dungeon and the game default map to dungeon for now.

14:38.500 --> 14:40.930
And then we'll move over to the dungeon.

14:43.110 --> 14:46.050
And notice that our textures do look better.

14:46.050 --> 14:48.240
So they still look pretty good at 0.5 K.

14:48.270 --> 14:55.590
We can zoom in close and see this is really what they look like up close, but for a top down five K

14:55.590 --> 14:57.510
is probably okay, right?

14:57.510 --> 15:02.490
We probably don't need 4k, so we've got our tiles taken care of.

15:02.520 --> 15:06.120
Those are nice and compressed down quite a bit.

15:06.240 --> 15:11.310
You can of course compress them less, you can use one k, two k or leave them at 4k.

15:11.310 --> 15:14.340
Just depends on your game and its needs.

15:14.340 --> 15:18.330
But we can do this same thing for some of the other textures.

15:18.330 --> 15:20.940
So let's just really quickly do it again.

15:20.940 --> 15:23.400
I'm going to set the filter to texture here.

15:24.310 --> 15:27.130
And we have other types of assets.

15:27.160 --> 15:30.430
Now, what I'm most interested in are these dungeon assets.

15:30.430 --> 15:31.900
For example, the stairs.

15:31.900 --> 15:37.540
If I right click on the stairs and I just click edit, I see that we have these materials.

15:37.540 --> 15:41.260
This has multiple materials, they all have stairs in them.

15:41.260 --> 15:48.910
So we can compress those stairs materials by searching here we can click on all.

15:48.940 --> 15:52.750
We still have texture filtered and we can search for stair.

15:53.170 --> 15:56.320
So I had to uncheck texture and recheck texture.

15:56.320 --> 16:00.700
And I accidentally checked something else here that I'd like to uncheck.

16:00.820 --> 16:03.280
Now I have all my stair textures.

16:03.280 --> 16:07.150
I can bulk edit those via property matrix.

16:11.430 --> 16:16.410
Go to compression, maximum texture size, we can set that to 512.

16:17.440 --> 16:18.670
Now, this is 12 textures.

16:18.670 --> 16:20.070
It won't take that long.

16:20.080 --> 16:21.280
And there we go.

16:21.370 --> 16:24.010
Same thing for these corners.

16:25.880 --> 16:32.210
We have tile set corner and I think anything with tile in the name has already been compressed.

16:33.810 --> 16:35.060
Let's just see.

16:35.070 --> 16:37.020
Yeah, those are all compressed.

16:37.020 --> 16:41.790
And, you know, if we get any issues moving forward, we can always compress more.

16:41.940 --> 16:45.420
Now, that's one way to fix that texture streaming over budget.

16:45.420 --> 16:47.470
Sometimes we'll still be over budget.

16:47.490 --> 16:54.260
Another way, which is a little more drastic, but you can do it, is we can change that budget limit.

16:54.270 --> 17:01.350
And if you have a higher end PC and you're planning on releasing your game to higher end PCs, then

17:01.350 --> 17:04.200
you can increase this texture budget.

17:04.230 --> 17:06.330
We're going to close the engine for this.

17:06.340 --> 17:11.740
We're going to open up our config folder and we're going to go into default engine Ini.

17:11.790 --> 17:14.610
If you don't have one, you can always create one.

17:14.610 --> 17:21.150
And here in default engine Ini, we're going to go into script engine render settings.

17:21.270 --> 17:28.440
So if we search for render settings, if it's not there, then we need to add that section so we can

17:28.440 --> 17:30.900
add that really anywhere in here.

17:31.170 --> 17:32.820
We'll go down to the bottom.

17:32.820 --> 17:42.550
So we need square brackets, forward slash capital script, forward slash engine dot and its render

17:42.550 --> 17:43.450
settings.

17:43.960 --> 17:48.430
Now that we have this section, we can set the streaming pool budget.

17:48.460 --> 17:53.870
We can say r dot texture streaming equals true.

17:53.890 --> 18:02.420
So we first have to do that and then R dot streaming dot pool size and we can set that here.

18:02.440 --> 18:04.360
We're going to set it to a thousand.

18:04.720 --> 18:08.110
So quite a lot more than what it was before.

18:08.110 --> 18:09.090
What was it before?

18:09.100 --> 18:09.880
Let's find out.

18:09.880 --> 18:11.140
Let's copy this line.

18:11.140 --> 18:19.810
R dot streaming dot pool size without the equals 100 and we'll open writer or your ID and we'll do a

18:19.810 --> 18:23.200
project wide search for R dot streaming pool size.

18:24.780 --> 18:27.980
And notice we have something here in base scalability.

18:28.410 --> 18:34.650
And I if we click on that, you'll see that there are different streaming pool sizes based on context

18:34.650 --> 18:35.220
here.

18:35.250 --> 18:38.340
But we're going to set it for our project to a thousand.

18:38.340 --> 18:40.260
And if you're asking me why a thousand?

18:40.260 --> 18:43.500
Well, that number depends on your project and your needs.

18:43.500 --> 18:46.200
We're just going to use 1000 for this project.

18:46.230 --> 18:48.150
Now we can restart the editor.

18:49.400 --> 18:51.200
So we're back in the editor.

18:52.020 --> 18:54.330
And things are still looking good.

18:54.330 --> 19:00.840
I'm okay with half k textures, but you may feel like that's not quite enough for you.

19:00.840 --> 19:04.440
If you zoom in on certain things, they may look a little blurry.

19:04.440 --> 19:11.280
So feel free to change things if you really want to go back to say, one K or two K for your stairs,

19:11.280 --> 19:13.500
you know, maybe your tiles aren't that important.

19:13.500 --> 19:15.770
They're everywhere, but stairs are more rare.

19:15.780 --> 19:21.720
You can go back to all I have texture filtered.

19:21.720 --> 19:26.070
I can search for stair and maybe I want these back to one k.

19:26.160 --> 19:33.960
I can go to asset actions bulk edit via property matrix, go to compression and change this from 512

19:33.960 --> 19:36.390
to perhaps 1024.

19:36.390 --> 19:45.090
We'll go to one k hit enter, give it a second and perhaps that looks better for you and say stairs

19:45.120 --> 19:49.020
are rare enough in your game that you're okay with 2048, right?

19:49.020 --> 19:50.310
Two k textures.

19:50.340 --> 19:52.900
You can just change them there if you like that.

19:53.710 --> 19:56.080
And you can see that they're even more detailed.

19:56.080 --> 20:00.070
So that's how you can set the texture compression settings.

20:00.070 --> 20:06.430
And keep in mind, when you're looking up close, yes, things will look pretty bad when you're compressing

20:06.430 --> 20:07.270
them a lot.

20:07.300 --> 20:13.420
Don't go by, you know, looking at things from a foot away, unless that's how close you'll be in the

20:13.420 --> 20:18.070
game for a top down, you never really will be that close to something.

20:18.070 --> 20:20.380
So, you know, be realistic about it.

20:20.380 --> 20:25.060
You don't have to go over your budget if you don't have to.

20:25.690 --> 20:29.620
So that is how to handle the texture streaming over budget.

20:29.620 --> 20:33.250
That's how to handle the compression settings for your textures.

20:33.250 --> 20:38.770
And this is a really good way to optimize your game and really improve on your performance.

20:38.920 --> 20:41.800
Excellent job and I'll see you in the next video.
