Engine Tools for Performance on Open World Games | Unreal Fest Europe 2019 | Unreal Engine

Engine Tools for Performance on Open World Games | Unreal Fest Europe 2019 | Unreal Engine

>>Andreas Suika: Okay. I think
we just start, because we just did
our last rehearsal now, and we figured out
we are much over time. This will be fun. We want to talk about
Engine Tools for Performance
on Open World Games.>>I am Mario Palmero from
the Unreal Engine team for Evangelism
for Southern Europe, and here is—
>>Andreas. I cover Western Europe,
also Evangelist. Yeah, what we want to talk
about is those things. Some disclaimers up front—
We are both not artists, okay? What you see is maybe not
the most beautiful thing ever. We want to cover
basically the tools.>>Mario: Yeah. We will be
covering these tools, and how those performs
with Open World games. This question
that everybody ask us when we are traveling
and visiting the studios, it is, how can I improve
the performance of my game if I am trying to do
something more or less open? That is a question
that everybody asks us. We are trying to address
that with this talk right now.>>Andreas: So one
question first. Who of you has shipped
an Open World game? Much more than I hoped for. You might know
some things better than us. Who of you is working right now on something you could call
Open World-ish? Okay, why is the rest here?
No, sorry. Just joking. Only to manage
expectations here, we are talking about the stuff
that is currently in the Engine. We do not talk about
the stuff that will come. Nick talked about a little bit
on the road map, so we will not cover that. Especially the ones who have
shipped already might have— You saw
who raised hands— ask them afterwards
the really hard questions. Let us dive into it.
>>Mario: Yep, let us start. I will start talking
about those tools that are about creation
for Open World. For example, Landscape.
What the Landscape tool does is to create grids of quads
that can be modeled in Engine. They are very good
for creating terrains and outside environments.
They are composed by layers, so we can create different
layers of different terrains, and they are also built
by components. We are going to see quickly
how this works. Let us go to my map. For example,
we go to the Editor, we say Create New,
and this is a Landscape. How can we create a Landscape? We can create them from scratch,
like that one. We say Create New, we select the resolution
of the Landscapes, and click Create,
and there we have it. We will have light— I am going to
bring light here— Sorry. Directional light.
Okay, sorry. We also can create Landscape
from height maps, like this other one
that we have here. This is an imported height map
that we created beforehand, and we also can add
new components to existing Landscapes.
We can extend our Landscapes, once we have created them,
just like this. We come here and select Add, and we will be creating new
pieces for this Landscape. Okay? We also, if we are working
with World Composition, can bring in tile height maps, and its tile is going
to be a new Level, and each Level will contain
a new Landscape with the selected height map, or we can create
adjacent maps to another Level with the same resolution
and the same scale. As I said,
it is important to know the Landscapes have components, because we can delete them,
add them— but this is important
for Open World, that we can split them
in different Levels. For example, I imported
this as a whole height map, but then I split it
in different Levels. For example, I can just hide
it to see that all the foliage and everything in this Landscape
went off. We also can change
the resolution of our Landscapes once created. As I said, if we use the Move
to Level tool that is right here, Manage>Add>Move to Level,
I can bring another Level in. If I select the new Level
and I say, let us move this
to another Level, it will automatically bring
those components of the Landscape
to the new Level, okay? In this way, we can plan our
streaming for our Open World, and it will carry
our foliage with it. The important thing
about components is that they are going
to behave like a single Mesh. The more components we have, the more draw calls
we will have. Landscape also comes
with autoLOD capabilities, so for example, I am going to change
my mode to View Mode, Landscape to 5—
What I am doing— Landscape.DebugViewMode 5 it is changing the View Mode so I can see the LODing
of this Landscape. LOD, sorry. I can see what
LOD Level is using. But if I turn to Wireframe also, I will see that it is
tessellating in the first Level, so it creates Mesh automatically without me
doing anything at all. It gives us more resolution
as we approach the Landscape. That means that we are not
using extra memory or any extra draw
calls for that. Another cool thing
regarding Landscape is, they handle collision
very well. It is really optimized
for collision, and very optimized
for the movement component that we use for characters. Good things about
using Landscape for our games: AutoLOD, Tessellation,
collision optimized— Something that these equal
on other methods is the draw calls increase with the number of components
for Landscapes, but the drawback
of this technique is that we have a limited
control over creation of Meshes. For Landscape we have to
balance our component number, so we have to plan ahead when we
are starting to do our Levels, to know the number of components
we are going to use. Because the more components
we are getting, we will have more control
over our Landscape, but also we have
more draw calls. We also have to have in mind,
what kind of usage are we going to do
with this Landscape? Because if, for example, we are doing big spaces
of open terrain, we can probably afford
to have larger components with less resolution, because we are going to have
a lot of draw calls around if we increase the resolution. If, for example,
we are in a city, and the builds now are
occluding our Landscapes, that will allow us
to have better resolution, because we will be
occluding those, and the draw calls will reduced, unless we are swinging
from building to building. Some useful commands
for debugging when you are working
with Landscape, Show Landscape that will hide
or show the Landscape. That is good to have in mind
because this way, you can quickly see
if the Landscape is being a problem with your performance.
Also the Debug View Mode that I used to see
the LOD distribution, or the wireframe on top. We can print the number
of Landscape shadows, so we can print the Landscapes that are being processed
for shadowing. We can enable or disable cascade
shadows on Landscapes to see if that is an issue.
We can also change the LOD bias, and also the distribution
scale of LODs. To make beautiful our Landscape,
we want to use foliage. Foliage will allow us to place
big amounts of Static Meshes in our Landscapes,
or in bigger Static Meshes. It will group all those
Static Meshes together so they will be handled
like one single entity. Instancing those will reduce
the draw calls. It manages Static Meshes
in chunks. Those chunks, as I said,
are a whole entity. Though we can manipulate
instances one by one, the bad thing about being chunks
is that for occlusion, we are going
to have problems with that. The whole chunk
is going to disappear if we do not set
the occlusion properly. Being instances, the Engine
can handle thousands to millions of Static Meshes,
depending on the platform. Again, it decreases drastically
the number of draw calls, though it does not reduce
polycount or overdraw, but it is managed as chunks,
so for occlusion purpose, it is a problem. One cool think that the Engine
has for foliage is, you can set the scalability. That will reduce
the number of instances, depending on the power of the
machine the game is running on. We can set density scaling
for each type of foliage, so we decide
what type of foliage is going to be disappearing, and in what amount, depending
on the power of the machine. But be aware that if we have
Static Meshes with collision, the collision is not going
to be removed. It will only remove
the visual representation of the Static Meshes. There are three ways
of creating foliages; Brushes is the most common one, the Grass Tool, and
Procedural Foliage Volume. All of these techniques allow us
to put particular foliage types, depending on the layer
that we are working on. For example, we can put
obsidian spikes only when the floor
is infested by alien things. The most common one,
as I said, foliage Brushes. I am going to come here, and most of you
already know this, but you come here, Foliage,
just like painting, and placing instances just like
painting a layer of any other software. We can select the foliage
that we want to play, and just play them.
We can select the density here, so we reduce it,
it will have less density. But the thing is,
this is the most common one. This, again, allow us to—
If we select the instances, it will allow us to modify them
and place it one by one. But that is not ideal
for foliage. We also have the Grass Tool.
This is not so common. Grass Tool will allow us
to spread foliage type to all the extension
of our Landscape. But again, if we filter—
For example, we are filtering here the flowers and the grass,
on the grass layer. This was used
to make this Landscape, so if we go this Asset>
Environment>Landscape>Foliage, here is the Asset that sets the density
for each foliage type. Here in the Materials
of the Landscape, you set it up just like this. You select the layer
that you want to use, and here just reducing
the amount of density, and I am saying that it will use
this grass type. This will spread grass
all over our Landscape. The other tool is the
Procedural Volumes. A disclaimer on that:
it is still experimental, it has been experimental
for a while, but it uses
a very organic algorithm to place Static Meshes
in our Landscapes. We can control, for example, I have a blocking
Procedural Foliage Volume, and placing bushes here using this Volume here,
sorry— This Volume here
is placing these trees. But I do not want these rings
to be out there, and I do not want
to place here trees. So I created a blocking Volume. We can have control
over this algorithm. This technique
will also allow me to modify the instances,
once it has been simulated. But by the way, this does not
allow to modify instances. But the problem
with this one is, it ignores foliage scalability. How it works:
I plant some seeds, I define the distance
between seeds and the amount of seeds, and I define
the range of the collision for those instance Meshes. So no instance is going to be
a spawn inside this red circle. Then from those instances,
I spread some seeds, and again, more instances
around the yellow circle is the shape of that instance. That means that
I can define foliage that will only grow
inside the shade, or foliage that will never
grow inside the shade. For example, if I want pine cones
to be underneath pine trees, I can define that those
are only going to be placed on the shade of the pine trees,
and so on. We can define
the number of steps. As we can see here,
it creates very organic looking foliage. These bushes have been placed
with this technique. As I said, foliage is
very good to reduce draw calls, but it is not that good
for overdraw or polycount, because foliage
is using masked Materials. We have to find a good balance
between overdraw and polycount, so we can increase
the polygons to reduce the overdraw
of the masked Materials. But again, we have to plan ahead
how much it will cost us. Like we see here, the bushes
on the left have no overdraw, because all the leaves
are modeled. But the grass is causing
some overdraw when we have several amounts
of them, one after the other. As we can see here, grass has
a lot of transparent pixels. Some useful commands
for foliage, show or hide foliage— Again,
if we are having troubles, the first thing that we can try,
if the foliage is causing some trouble,
we can change density scale as in the scalability settings. We can log what foliage
is being rendered at one frame, we can freeze or unfreeze
to see the occlusion. We can change to Dithered LODs, so they have a better
smoothing transition. We can force an LOD Level.
We can set a minimum LOD Level, or we can set
the distance scale. Now, for creating Levels, I am going
to talk about World Composition. World Composition is a system,
it has been there for a while, and allows us to have Levels
by distance. When we are close to a Level,
it will load up, and when we get far away,
it will be streamed out. When we activate World
Composition in our system, that will load all the Levels that we have in
our content folder. For example, here we can see
all the Levels in our Level tab, when we are using
World Composition. World Composition
looks like this, okay? We can select Levels
and see where that Level is. It works with layers,
so we have here layers. We can define here a layer
for the interior— We do not have interior here,
but for example, imagine that I want some Levels
to be a stream map only if we are
really close to them. We can create
that kind of Level, or one for Levels
more based on Landscape that can be seen
from the distance. As I said, if I unload this, this does not mean
that the Levels are not there. If I hit Play,
the Levels are going to stream automatically
by World Composition. Again, I am going to load
everything so it is easier for us to do the talk. The problem with World
Composition is, it is a very horizontal tool. It means that it will take only
in consideration distance in the X and Y axis, and it will take into account
the boundaries of the Level that we are looking at.
For more verticality options, we still can use
the traditional load Level, so it is not one or the other.
We can have both. For example,
if we want a Level not to be streamed at all
by World Composition, we can come here and create
a layer that is not streamed, and check this out.
If I place this Level, I move this to this layer,
not a stream, it is never going to be
a stream in play. That means that I will
have to load it in the traditional way
of using a Blueprint or a C++ function
that loads that Level. World Composition
is seamless, as long as we have cooked
content, so in the Editor is not going
to a synchronous loading, and as long as we use
background Level streaming that is now enabled by default
in the Editor, in the product. My favorite part
of World Composition is that it can
create Level LODs, so that means that
for our whole Level, it will create a new Level that is a simplified version
of the Level, and will gather all
the Static Meshes together, and will create only one
Static Mesh for all that, and one Static Mesh for all
the Landscapes in that Level. We will have draw calls
for the LOD Level. We can have a look
at one of those; for example, here, maps. It finds them automatically
because of this LOD suffix. These were generated
by World Composition. It is just this mass,
and if we had had, for example, a Static Mesh on
it, we will also have
another Static Mesh and put them on this new Level. To do that, we have just to go
to Level Details, and put these settings, like, what distance
I want this LOD to be loaded. This is relative to the already
Level streaming distance that World Composition is using,
depending on the layer. I can set the number
of LODs, for example, and some settings,
and just click Generate. Depending on the amount of
Static Meshes and the Landscape, it can take some time,
but it is pretty cool. The only thing
I can say about this is that it does not have dithered transition
like we have in foliage. That will be critical. This works more or less this
way. If we have a Level that we are going to approach
with some Meshes, and that Level has
a streaming distance of 50,000, and we have created a Level LOD
at a distance of 50,000, until we get closer to 100,000, then no Level
is going to be loaded at all. But once we get closer,
still farther than 50,000, we will have the LOD Level
with these two Meshes, the LOD Mesh that we created
for all the Static Meshes, and the Landscape LOD. When we get closer, because
for example in this example, I am setting also an LOD for
the message I am looking for. We will have the Level
already loaded with all of the Landscape,
and I do not know if you can see the foliage over there,
for example, but we will have
to have a solution between those distances for LOD
for our Meshes. Then when you get closer
to the distance, we will have everything final. World Composition
is very good for managing Levels
automatically. It also reduce,
if we use Level LODs, it will reduce
a lot of draw calls, polycount and Material
complexity. It is asynchronous
as long as we activate it. But has no verticality at all, and we will have to handle
that by hand. It has no dither transition. A couple of commands for
stat Levels: This is the key for Levels. This shows when a Level
has been streaming, and the time
that it took to stream. Then when a Level is loaded
but not visible, that is the yellow one. When a Level is not loaded
at all is the red one, and the purple one
is when Level is being loaded. We also can force
the Garbage Collector to recover the memory
the streaming out Level left, and we also can again
ask the Engine to do the Level
streaming in the background. Now I am going to hand
over the stage Andreas. Thank you.
[Applause]>>Andreas: Oh, that’s a bad idea
to clap in between, because then we have to compare
afterwards who clapped better. Okay, so my part is more about
traditional things you might already know. But the door is closed,
you cannot leave. I talk about the death
of 1000 cuts. What I mean, most of
the time we are talking about seeing a lot of stuff on screen, so you have to figure out
how to minimize on the mass, so it is not like,
oh, we have this one Object that is a problem, it is, like,
oh, we have a lot of Objects that are a problem. We want to lower
the footprint. How we do that,
first of all, we figure out that maybe some things
we do not even have to draw, because we want to control
the visibility, we want to reduce the polygon a little bit for the
Landscape, but we will see that
for Objects, and hope to optimize that. Actor Merge is something
I will talk about, and a short thing
about Instance Static Meshes. Occlusion, I think
everybody knows about that. In order of effectiveness,
we have Distance; it is the easiest check. Then we have Frustum;
this is actually from UE3, and it is from the real-time
rendering master class Sjoerd did, I stole that.
I did not tell him. Do not tell. We have
the possibility to do Pre-calculated Visibility,
but I do not cover that here because it
is not really applicable for open world, it is more for mid-size
and smaller Levels. What it basically does,
it makes cells, and for each cell
it checks before and bakes it. Then the camera
is asking the cell, and then saying, what do I see?
All of this is actually done because Dynamic Culling
is the most expensive one. What I can show, you can actually see
this is pretty nice. I already⁠— Ooh, my God,
this is fast. I like that, so for example
when you go here, you can say Freeze⁠—
That is, again, an English keyboard
for a German guy. After this conference,
I think I get a new keyboard. Now you can see what actually
was rendered, which is a pretty cool tool
to figure out what is going on. You see here,
I have some stuff, for example. Let us bring that back. That is basically
what is done after all this. For Distance Occlusion, I want
shortly to talk about that. You can set it up per Object, and that is actually
a good idea to do, because otherwise you have
cockroaches somewhere at the beach crawling around,
and they are still there. It is checked. So as I check,
it is there or there. This can be costly
if it is a lot. This Cull Distance Volume,
I have an example here. For the volumes, you can set up
some things like which size, and which distance
it should get culled. If I enable this,
I do not see anything. That is something that happened
to me actually quite often. You have to do it either in-game
or press G to go to the Game Mode. I was searching for that
for half an hour before I realized
I have to go to Game Mode. I did this
with big Objects here, so that makes no sense,
actually. That is not what you want. But you get the basic idea
about that. One other thing is,
use large occluders. What does it mean?
Actually, make your map in a way that you maybe cannot look
everywhere from everywhere. You can actually design
your World in a way that you have the
possibility to occlude stuff. Occlusion, basically,
is not checking for polygons, it is checking for the Object. It is using the Bounding Box
for that. You can manipulate
the Bounding Box scale, but we do not recommend that. It is also used for all
the lighting stuff. What we did here is,
this is fully dynamic lighting so we do not bake,
Fortnite is doing the same. Maybe that is not
your main thing. But if you tinker around
with this, it is hard to find afterwards. Some artists figure out,
oh cool, it is occluded too much or too little,
so I change the value. Half a year later,
nobody will find why this Object is suddenly appearing
or disappearing, so that is actually not
the best idea. But I tell you anyway. There are also some commands
that help you with that. One is, as a visualize thing,
so let us see. Visualize Primitives,
if I set that to 1, you actually see all the stuff
that is occluded right now. It is really funny,
when I tested that, I figured out, oh, I copied
some stuff below the Landscape, which is actually a waste of⁠— I should delete that. Okay, let us bring
the Landscape back if I find it. Let us go⁠— That is something
in rehearsal we always do wrong. We stick to State
and then some slides later, we do not know where we are. Some more stuff
that is occluding⁠— For example, maybe you want
to check the Particles as well. I want to talk about
Mesh reduction. I think everybody knows
about that, but still, there are some cool
things I really like. We used a lot of other art from
other projects in this Project, some of the stuff
was just too big. It is pretty easy
to just go there, and for example, let us take
this tower here and open it up. Maybe show it with⁠—
Where is it? It was wireframe⁠.
It currently has 2060 vertices and maybe this is just too big
for my project, so let us make it 50 percent,
and then it is reducing already. I can use this, this is the good way
to frame the content without going through
the whole process. It still looks nice. I switch on the environment, so that is the reason
it looks like that. Okay, that is one way you can
just reduce it pretty easily. How do you find out which of
this stuff is a problem for you? What you can do is, get rid
of the pixel shader costs by lowering
the screen percentage. Then you can capture
and then you can profile GPU. Then you get a really nice list,
which you can see here, about all the stuff
that was a base pass. Then you can see, for example,
our biggest one is actually a flower
right now in this project. Then you can figure out
where you want to focus on. One thing that is really⁠—
If you have a lot of stuff, especially when it is really
different things, or it is procedurally
generated, or whatever, you maybe do not want to do this
all by hand. What you can do is,
there are groups, LOD groups. For example,
this one is a Level architect. But here are different ones. You can define them by yourself,
I will show that later. Then with that, you can generate,
for example, more LOD. Let us do, for this tower,
let us do four. It is generating four of them. What I wanted to show, actually,
is more this one. What you can do is,
you can define all LOD groups. You can do that either
in the base Engine, but maybe it is better to do it
in the project.ini file. What you also can do, which is pretty nice,
for scalability, you can set the minimum
LOD per platform, so I can say, for example, I do not know
if I will switch⁠— We go for the minimum of 2. That helps for scalability
on different things. The next step I can do,
I can use a Blueprint Utility to actually generate the LOD
for a lot of Assets at once. What I did here
with the Blueprints is, here is a Blueprint for that, so it is basically checking
is what I have selected, and the Editor
is checking it out⁠. I am not connected, so that is the reason
why it is acting like that. Then I either remove the LODs,
or I generate them. Let us bring that up. What I can do now is, let us go in this folder
where the stuff is, Select All,
and now I can say Generate LOD. What it is
currently doing is, it is checking out everything. We are not connected,
so I hope it works. Then it is generating
the LODs for them. It takes some time,
but it should not be too long. When I tested it, it was nice. Then we can then directly
see it in the Viewport. It is a lot of effort. I choose the wrong folder,
but whatever. Let us wait for that. Here are some additional
commands while it is running. You can forceLOD,
we show that, and you can set
a distance scale. But the commands, those are for the whole scene,
not for single Objects. Let us see, is he done?
It looks good. I hope now it worked.
Yeah, it does not. I do not know what we have
changed here in this Level, but here you can see it
on the bushes. It should work like that.
It should look like this. I do not know what we messed up
when we tried this on stage. But whatever,
I think that is fine. What does it do? First of
all, it decreases the GPU load. It does not reduce
the draw calls, obviously, but it can increase also
the load times and memory usage. It is always like that
when we go to others and try to help with a project, there never, ever is
a golden answer for everything. You have to see
what tradeoffs you want to do. I want to talk about
Merge Actors very fastly. It is actually
combining multiple Actors in a single Mesh. That is something
we prepared here. Here, we have a thing
that is one, two, three⁠— I think it is
nine different Meshes. You can select them,
and then you can go to Edit>Window Developer Tools
and then there is Merge Actors. Here, I can set up some stuff. I can say which
LOD Levels are used. I can say, Merge with Materials.
Then I get that. What you can notice is,
if you do this, I reduced only from seven
draw calls to five draw calls. The reason why it even reduced is because there are some of
the Meshes that share Material. This is actually pretty good if you have something
that you have shared Material, and you have a lot of different
instances, and this is a good thing. Actually,
you want to go further, and that means you can
also merge with the option
of merging the Materials. That is something I did here.
This one actually is one model, and you can see here
is only one Material. It looks nice. What you basically
get there is, now I have one draw call, and that can be
a big difference, when we talk about
a lot of different Objects. Even when you reduce
from nine to one that means maybe not much
for the single Object but if you have a lot of them,
that means a big difference. The next one I want to cover
is Proxy Geometry Tool. This one replaced recently
a third party tool, so what it basically does
is taking the Meshes, voxelizing them, and making a new Mesh
and a new Material out of that. You can set up some parameters, so that is something
that we did here. This one, for example, it consists
of three different ones. When I select those
and I go to the Merge tool, then there is a second tab here, and there you have
a lot of settings. I do not go into detail
too much here, but basically you can set
the screen size. That is what I did,
and then build it. I have here one,
which is one screen size of 300, so it still looks pretty good. This one, okay,
our angel here is⁠— Okay, this is really beautiful.
But you have to imagine this is made for kind of
this kind of distance, then it does not make
a big difference visually, but it makes a big difference
in polygon count. What you can see here
at the end, the ugly one is 551,
it has 1 Material. The other one is 4,850.
It can make a difference. What you also can do if you have
a building or something that is hollow inside,
and you cannot see, you do not have to watch inside,
it is a really nice thing. You can use a parameter called
Merge Distance, which is here. You can pump that up.
You can also put a color for the Geometry
that is generating, because in this case,
is generating new vertices. What it is doing⁠— And I really
like this picture⁠— Is blowing it up like a
balloon and then
shrinking it down again, and then merging as a result, the voxelized
new Static Mesh. Then you see here,
the entrance got blocked. So what does it do? The render
call gets, obviously, reduced. But there is some possibility, and that is something you have
to be aware of if you overdo it, if you do it with big things,
an Asset, it is checked with occlusion
for the whole Object, and not for a single vertices, then maybe the whole thing
is loaded, and wanting to be displayed. The combination of all that
is the hierarchical LOD, which combines multiple
Static Meshes. It is not destructive.
It lives in the Level, and it is done in two steps,
it takes some time. I do this really quick now, because we are running
out of time. I am loading the map,
we have a second POE here⁠. Let us go to Unlit mode
because it has no light, and then you see
our temple again. It is based⁠—
It is a per Level setting. First of all,
you have to enable it to use, Enable Hierarchical LOD System. Then you go here and you have
Hierarchical LOD Outline. What you want to do is, first you want to build
some clusters. I think on this machine,
it should be pretty fast. I choose a small one. You can even say
you have different HLOD, so let us put,
just for fun, the second one. I generate the clusters, so now you can see
what it wants to class together, or it is depending
on the distance you have between those Objects. That is what it wants to do.
You can manipulate that. I can move stuff around,
but I go with that. Then I say,
Generate a Proxy Image. It takes some time,
and it is advised. I mean, if you move stuff
around the Level still, you should test that. But each time you move something
around, you have to reboot. You have to see it
a little bit like baking lights. Maybe you do not want
to do it each day, maybe you do not want
to do it on your PC. You want to do it, maybe, in the big process
during the night, and maybe you want to distribute
it to different machines. But basically,
what it is now doing is making all
these different chunks. I am waiting until it is done. There are some things
you have to take care of, so Mask and Opacity
is not working there. Maybe you want to uncheck
Merging Textures in that case, and then the original Material
is used for that. That is important to know. What is also important to know,
as it says, it is referenced by the Level, so maybe you want
to check your memory. It needs rebuilding,
I said that. Maybe you do not⁠— You have to think about how
to include it in your workflow. Basically,
it is the same for LOD, but in advanced,
here is a little bit more, and you have to
be aware of that, increased loading times
and memory usage, because you have more models now
which you have to take care of. I think this one⁠— Is it ready?
No, it is not. Okay, do I wait?
It is interesting; we tested this on this machine
before we⁠— There it is. It is best to see,
actually, in the map. I hope it is showing. Mario, whatever, right?
We never need this again, okay. I load the Levels,
and now if I⁠— I can show it here. That is the reason, by the way,
why the LOD did not show up, because here the LOD
is already covered by the HLOD. That is the reason. Here
you see the HLOD now in place. Here is the highest one
I made, and when I get closer,
it is loading in, it is replacing
the chunks by the⁠— Now the LOD would take over
if I would have one. I think the temple
is somewhere⁠— Actually, we did not fly
with a drone. I worked so much
on this nice drone, we should fly with a drone. It is even taking the height,
you see? Ooh. Sorry. Where is it?
There it is. I teleported it. It is a nice idea.
Here we are. Okay. Here is our temple.
Now it is loaded in. The first stage
is what Mario said, you have maybe the full Level
with the Static Mesh with everything really,
really far away. As an HLOD goes over, then you
have it as the LOD we did. Automatic Instancing,
I do not say much about that, because I think
Nick is giving a talk about the refactor
of the renderer. He can do that much better.
While working on this project, we figure out there is a really
good command, you can disable and enable it right now
in real-time, so we tried that, and for us
it is of the scene of the ruin you see there,
the difference is this. It is quite significant. Only a side note, there is a Foliage system
that is also using Automatic Instancing, but you can do stuff
by your own. For my last game, we made
planets with stuff on that. We had to also generate cities,
and they were also, they were no game
play implication with those, so we did an automatic system,
and instanced that. That can help greatly. How about time? That is okay.
The last bonus I want to say is a little bit
looking into Garbage Collection, because it can be an issue
when streaming in and out stuff. Basically, what you experience
is hitches through Garbage Collection.
The reason why that is, you have temporarily
a lot of stuff in the memory, and many of those Objects
have to be deleted at once. The really rough⁠—
If a programmer is here, I do not go⁠— This is really
a rough idea of how that works. There is an array,
there is a UObject, and the cost you can
basically say is about checking and then deleting them. When you take a look
at deleting, it is also
about dependency check, and then actually
deleting the thing. The actual deleting
actual Objects, we can take that a little bit
out of the equation, because in 4.20, there is Incremental
Begin Destroy Enable, so it is distributing
the destroy over time, and not doing it at once. Basically,
we have to check the cost and detect the dependency cost. When we talked with people, some really did not know
how to approach that. One thing first is profiling. This is a mouthful⁠—
Log loggarbage log⁠— What this basically does is,
you log garbage, and put it into a log.
Then you can look that up, and there is stat dumpages
which you can use. There is a startfile/stopfile,
and the CPU profiler. This is all documented. You can go in-depth there
in the Documentation. There is also something
many people did not know. There is a Blueprint stats
Plugin you can use to figure out which maybe of your Blueprint
is causing the problems, and what kind of problems
you have there. How do you optimize? You can split further Levels,
but as Mario showed you, you have to consider
that pretty early. It has a high impact, that is
completely an obvious one. You can figure out which of
the stuff you have in your game, is permanently there and needed. You can make them
permanent resident Objects, so you can actually, in the area
you can block stuff that is not even checked.
You can figure that out. That is also part
of Documentation you can check. You can cluster, you can decrease
the number if UObjects. For example,
one we saw quite often is, you have macro
and macro and macro, that means you have a lot of
local variables flying around, which are generating UObject. It is maybe good
to look into that, and seeing if you make function
of that. There is, when you look in
the Project settings, you find some stuff there,
so what you basically can do, I give all these idea
about the basic concept, please check the detail
and the Documentation. What you can basically do is,
when you load up your games, you can set the amount of time,
the amount of the Object pool, you can reduce it
so much that the game is telling you in the log file
how much it would need after init view. That is the one you can log.
But the Asset, I encourage you to read more about that,
if this is your thing. So have you⁠—
Oh, now I am alone. Okay, cool. That
is what we wanted to cover. As I said, it was meant to be
a little bit of an overview, and we really hope that you find
some stuff that was interesting for you,
if you want to dive deeper in. Also as I said,
it is about the stuff that is currently there, not about the stuff
that is coming up. I am personally really looking
forward about the stuff we do in open world this year. Okay? Thanks a lot.
We hang around. If you have other
hard questions, we try. If we cannot answer them
by ourselves, then we try at least to push you
in the right direction.>>Mario: Yes, feel free to ask. [Applause] ♫ Unreal logo music ♫


  1. Why are there so many evangelists working at epic, and why do they feel it necessary to always make sure people know

  2. @8:53 Landscape.DebugViewMode
    0 = Normal
    2 = DebugLayer
    3 = LayerDensity
    4 = LayerUsage
    5 = LOD Distribution
    6 = WireframeOnTop

  3. I don't get the point about open world since 99% of them are boring walk simulators or they have the same 6 trees and 6 rocks clone all over the place! The current generation of juveniles wannabe devs don't have access to a 100 and + team to populate any large area so open world is just a big joke! I will prefer linear game with decent size map that have content and nice design over any of these ridiculous so call open world since walking will eventually lead to a mountain or sea barrier. Just start by being able to populate a 64 km square and then come back to me if you still want to populate a bigger world!

  4. Whenever I use world composition, the game hitches badly when unloading landscape tiles, basically making it unusable

Add a Comment

Your email address will not be published. Required fields are marked *