Transcripts
1. Intro: Hi there!: Hi and welcome to the course and the real engine
five for beginners. Understand the basics. I'm really glad to see a here. I want to invite
you to this course and this journey will
be very interesting. You're going to learn basics of Unreal Engine five If you very, very new and if you
don't know anything, that is totally fine. You will learn about projects, levels, acids, actors and
different components. We will talk about
collisions, physical shapes, different types of collisions, and how you can use it for
your game or your projects. We'll also be talking
about materials. Interesting part
is the blueprints, because with Unreal Engine five, you don't need to know
how to write a code. And I'm going to show you
how to work with blueprints. We will create several
blueprints together, and that's a great start. And religion five is the
most powerful tool for building digital worlds
that we have ever seen. But without knowing the basics, you can go further. So this course is for you. You didn't use Unreal
Engine five before, and you want to understand
all the fundamentals. So get ready to start
your journey in the endless world
with the power of Unreal Engine five. Let's start.
2. Lesson 2 Download and Install: It's done to
download and install Unreal Engine and
to download it, you need the Epic
Games launcher. You find the link attached. You can use this one. But Stop, Stop, Stop. Don't try to close this
course and start again. No, no, no. That's not for the
games. Just fine. This tab Unreal Engine here, and click here to
download Unreal Engine. Once you've downloaded
and installed it, you can launch your Unreal
Engine right here from the Epic Games launcher or
Premium desktop right here. Let's launch it.
3. Lesson 3 Projects: So you have installed, then we'll engine five and
you have this beautiful, beautiful icon on your desktop. Let's double-click it and an up. When you launch
in Unreal Engine, Unreal Project browser
opens automatically. This is place where you
can create a new project, open and manage
existing projects that I already have
my several projects here because I did
if you testing before recording
this for you guys, but you don't have
anything else. It's all just empty here. So don't worry about it. Okay, first let's just
look at these categories. We have Games, film, video, architecture, and
even product design. And it means that Unreal
Engine five and in fact, can work not only for
game design, it can work, and it works for production,
for architecture, for product design,
for manufacturing, and a lot of different things. And that's cool because the basics that you're
going to learn in this course are very useful for any task
that you may have. And each category has
its own templates. For example, for the games we have first-person,
third-person, and etc. You also can select
blank to create a blank project without
anything inside, you can click on
different categories and see that every cut category
has its own templates. In this course, we're going
to use the game team played. Because again, the basic
things that you're going to learn here in games, you can use anywhere, anywhere. So we're going to use the
third person template, but later you can check
the other team place. They're very fun. Actually they like gains
prototypes, each of them. So we have select the
third person template. We have this little
description here, and then the project defaults. This project defaults
the settings of your project,
very basic settings. And the first one is the
blueprint or C plus plus. If you don't know what Blueprint
is, that's totally fine. And I'm going to show you later. But in short, it's just a way to program things without
actual code writing. I don't expect you to know
any programming languages for this course or actually to use Unreal Engine
fire up at all. So the target platform is basically a desktop or my while. We're going to use
desktop for this one. Then. And then the quality
preset is maximum or scalable and it
describes itself. So I choose maximum and I'd
recommend you doing the same. But if in, anytime you feel like your computer can't
work with your project, just come back to the
settings and choose scalable because that means that your computer isn't
powerful enough to handle the project, okay? Then they start to content. So they started
content is useful when you want to start learning and experimenting and straight away without worrying
about custom content, you probably don't have any
custom content at this point. Later on, you will create
your own custom content. But for this course, let's check this box. Then the ray tracing. Ray tracing is a technology and your hardware either
supported or not. For this course, we
don't need ray tracing, but for your future
projects you might need it. I just want you to know
that there is a ray tracing chatbox and you can
check it if you need it. Then you give your project
a name and click Create. Once you click Create, it takes some time for
the project to be ready. So let's wait a few minutes and I'll see you in
the next lesson.
4. Lesson 4 Demo Game : Let's see what Unreal Engine
has right out of the marks. Curious the third
person team play. Find this button here and click. Right. Now we are inside the
game, the demo game. You need to click first and then you can move your mouse around. Just take a look around
at the character. Look how beautiful it is. Then you can walk
using the W, a, S, D buttons or the arrows
straight to the left, to the right, and
backwards, just like this. And of course we can jump
using the space button. Okay, I'm not good at
video games. I'm not. Again, here. We also have this boxes that
we can contact with this. So this is our project. And of course, because we didn't select
the blank project, we selected the third
person template. Remember what I said about the maximum quality
for your project? If you feel like it's too much
for your computer anytime, Let's push escape like this. Then go Edit, Project Settings, target hardware, and then to
scalable instead of maximum. Okay, and you might need
to restart the project. After that escape, we can click Play again and the player
will be on the same position. That's because this
prototype game is programmed like this,
designed like this. And let me show you what it has. So you can click f 11 to
open the full-screen mode, f 11 again to close it. And now I want to show
you the following here you have this button. It says detaches from
player, controller. What it does. If you click here, you
can see that you can move around and your character
is not affected. Just move around. If you click again, it attached
you to the player and you just moving with your
player. Just like this. Now, if use shift plus F1
buttons and click detach. What we can do, we can
move around like this. We can select any object with
the mouse and see details. For example, the character. And you can see that we have a lot of different things here. Right now. I just want you to
know how to move from one mode to the other. So again, stop. We click Play, then detach, and then we can select. So I click escape for now, you actually can
see this icon and this means that this is the point where the game starts and it is
programmed as well. For example, I can move
it around like this. When you click play the games going to start
in the other place. Final thing that I'm
going to show you here is how we can
change our objects. For example, I'm going to click detach and then
select the object. Let's take a look at
the settings here. Ok, There are a lot of
different settings, but for now, I just want you to look at this transform section. And it's not very
complicated actually. So we have location,
rotation and scale. Location is the point
where our character is. And this is three axis, x, y, and z. The rotation is the end goal and the scale is the
size of the character. In this case, for example two, you can see that the size of the character changes like this. Let's make it bigger. Oh wow, you are a
big, big woman. Okay. Okay. So
what do we can do? We can attach and even
move around with this big, big, big body that we now have. That's like this and even jump. But when we get this k
and play the game again, you can see that
nothing has changed. That's because all
the changes that you do in this mode
will not be applied. And I want you to know that these character is called actor. You can also see the actor
here in Unreal Engine five, we call it actors. Actors. You also can see it here
we have the camera actor, we have texts, render actor. But for now, I just
want you to get used to the language
that we use here. Or for example,
let's select a cube, this one, and take a look
at this buttons here. So what we have is rotation,
scale and translate. For example, I can
select this cube, make it bigger like this. And if I want to
save these changes, I right-click on it and select
keeps simulation changes. And now when we click
stop simulation, we can see that this
cube is still big. And in the next lesson we're
going to create a new level and see how the game will
look without anything.
5. Lesson 5 Levels: Creating a level. What is a level? A level is all or a part
of your game's world. Levels contain
everything in player can see and interact with
like environments. Usable objects are the
characters and so on. In video games,
it's common to have multiple levels with
transitions between them. For example, once you've read
the final boss and a level, you move on to the next
one through a door. And this can be a new level. So it doesn't mean that
every level that you create a will be the
next level for a player. But if the level is a
part of your game and level of design is a big
and very interesting topic. But what you need to understand
now is that you might use different levels to transition between different
kinds of environment. Levels are also called
maps in Unreal Engine because level file
is, you, map file. Level itself is like a container that holds
everything else, like light, sound, actors, effects, and so on. This is level. And in theory, this can
be a level in a game, or this can be just a very
simple game of just one level. And that's it. All. We can do. Some kind of trigger somewhere. And once the player
is near this trigger, the next level we'll open
to create a new level, go to File, then new level. You also see that you have
this open level option here. And if you have or when you
will have a lot of levels, you can navigate
through them using this open level option here, but for now we just
use the new level. Okay, So we have several
types. Let's take a look. First is open world. Of course, you know, open world games like No Man's Sky rendered
redemption, sky rim. We have there a big, big world to explore. The open world is level with, with sample content
that can create a large stream
mobile open world. Then we have the
empty open world, which is the same thing but
without the sample content. Then we have the basic, basic level with a floor plan, lighting, atmosphere, and fog. That's all that it has. Nothing else but this
very basic level. And we have the empty level. For this course. Let's look at the
basic level, Create. Now you can see this
window and what it does. It asks you if you want
to save the content, because we did a few changes. You want to save it. Actually, we don't
need to save it. So I will click, Don't Save. Right? And here's your new level. You can look around
using the mouse. You can hold Alt to
move the camera, just like this, and you
view just how you want it. And you can zoom in and out. Let's take a look
what we have here. So select, just click on
this objects to select them. So this is a directional light. This is Sky atmosphere. That's a skylight,
and this is Cloud. Wow, Very good. So everything that
is on your level, you can find here in
this folder, okay? Right now, almost
everything that we have is lighting folder. We click here, we
can see that we have the lighting and the floor,
basically, that's it. If you click this I here, you make the object
invisible or visible again. Let's try to turn the light off. Whoop, all dark. It can also open this folder
and click like this just to, to get the idea what
each element does. Everything that you will add to your level you can
find here, okay? Then you have the details for
the actor that you select. For example, this floor has Static Mesh Component or it was like the
directional light. It has the directional
light component. We will get deeper
to this components and actors in the next levels. But for now, I just
want you to get used to the interface. Next, what we have here is
basic settings for the actors. You remember that we
did change the scale for the cubes and
the sample level. And basically the transform
settings are always here. Depending on the type of your actor details,
we can change. For example, you can
see the light has its own light
settings and we can, for example, we can
change light color. Let's try. Wow. Wow,
looks advocate. It looks epic. Okay, let's go back. Okay, Actually, if
you don't know what was the color before, you can just click
here rosette and every level has its
own world settings. You can move to this tab and take a look at the
world settings here. For now. We don't need it, but I just
want you to know that you have your world settings here
right next to the details. So I told you before
that in your game, in your project, you need
to program everything. At least we have the
character that we can test everything with. But for now, if we
go very close to the edge and fall,
nothing will happen. Nothing. It's just fallen and
fallen and fallen and let's, let's click Escape. And we need to go back to
the platform to do it fast. So just click the
cinematic viewport and then the default
viewport again. The last thing in this
lesson is this buttons. I want to show you
how you can move, rotate, and scale your objects. If you click here, you can move it like
this, like this. So you see we have three axises. And if you didn't know what
axes that you're using now, you can take a look
at this corner. We have x which is red, Y, which is green, and that which is blue. Okay, Now let's click here
and rotate so we can rotate. When we are rotating the
light, everything is changing. It's like it's like
when the Sun rotates, you see It's like
a sunset, right? It's a bright, bright day. That's the sun goes down, sun goes down and goes down, and now it is down. Let's select this again to
move the object around. You can not only move on axis, you can actually drag the center of an actor and
just move it around like this. Then we have this
surface snapping. And what surface NAB and
is it the thing that makes actors a line to the
floor or another surveys? And next to it you can see these three things
as grid snapping, we have the drag grid, rotation grid, and scale grid. When the grid
snapping is enabled, an actor will move, rotate, or scale in increments
of a specific value. For example, now
we have ten and I can slightly move the
object just like this. But what happens, really, what happens is here is grid. We don't see it.
And I can move it only in ten unit increments. If I put 100, then and do like slowly, slowly like this, you see, I can't move it like this, but I can move it like this. So this step is now one hundred, one hundred, one
hundred, one hundred. You also can see this
grid right here. If we put 500, now we can move it
only to next 500. Like this. So basically
ten is fine for the most projects and it
is fine for this course. But I just want you
to know that you can change it here and you also can click here to
disable this function. We held the same thing
for rotation and scale. And finally, the chemo speed button in the upper right
allows you to change your movement speed in the
viewport anytime you feel like you need a break from this course and
Unreal Engine fire, you just go file. Save all or save current
level, doesn't matter. So we save, save
all for this one. If you want, you can create a folder, for example, levels. And now we're going to save it. And then calls happening again. Now when you open it, you can see that you
don't see your level, you see this first level. So what do you need to do? You need to click File Open
level and select your level.
6. Lesson 6 Assets: In this lesson, we're
going to talk about acids. Any piece of content in an Unreal Engine
Project is an asset. You can think of assets like building blocks that you use to create your game
and application. For example,
material is an acid, blueprint is an acid. Sound is an asset. Most of the acids are created outside Unreal Engine and
then input to your project. For example, if I need a
3D model of something, I or someone else
can create it in a special program,
blender or Maya. And you can find a
lot of free 3D assets and even more paid ones on web. For example, Sketchfab
or turbo squid. For now, let's go here and
open the content rower. Since we have selected
the starter content, we already have a few assets. Here. We have some audio blueprints, maps, materials, particles. Let's open materials. Material defines the
surface properties of an object in your scene. So you can think of a
material as the paint that is applied to a match to
control its visual appearance. For example, here we
have this 3D floor. And if I open the content driver and select a material,
for example, this one, you can see that the floor changes
to this material. So basically we still
have the floor is the same floor but the
material is different. Let's put stones. Well, that looks pretty good. If you don't want
to click and click, click, click to open
the drawer every time. Let's just click here,
dog and layout like this. And you can adjust it like
this if you need more space. So we have the floor is
selected and if we go here to the details and
go to the materials, we can see that
the material that we have applied is here. And actually if you click here, you can see all the materials
that you have available. So instead of going here
and select a material, you can just click here and select it from this whole list. Not all materials are good
for floor, of course. Now for example, this is just a concrete floor
which works very good. But this one, it's not It's not full
floor, it's four door. But you need to understand that materials don't have a 3D shape. So basically is just a flat
picture on the 3D model. So if you need, if you wanted to be like
real dense and bumps, then you need to adjust the
model, not the material. The material is
just, just to paint. We go to shapes. We have some basic shapes here. We can drag and
drop it like this. When you drag and drop an actor, it appears here in this list. And it's called shapes fear. Then let's do the
pyramid like this. So these are 3D models,
very basic ones. If you selected and go
to Materials again, you can select a
material for this. Don't forget though,
that we have all these 3D models
and materials only because they are
important to the project because we have checked
the starter content. Best practice is
to put a letter or two letters sometimes before
the name of your acid, just to organize them and to understand what type they are. For example, M means Material. Team is texture as M
means static mesh. So for example, let's drag
and drop this cheer and another one and
rotate it like this. And select and
rotate it like this. Maybe. Okay. So now we have two chairs. You can see it here,
share and cheered. Two. It says instance because all those actors are
instances of this chair. If you do anything with
this instance, let's say, for example, we can change
the material for it. Like this. That looks strange, but we, we changed something right? Then I'm going to put
the other instance. You see that our actions
didn't affect the third chair. That's because every chair
is its own instance. If we want, for example, to change the material for
all chairs here, for example, we have several tiers
in our game and then we decide that we want to change
material for every chair. Of course, you can click
on every chair, go here, change the material, go here
and change the material, but it's also time-consuming. Instead, you can just click
here, right-click Edit. You'll see this window. Here are a lot of different
settings, but for now, I just want you to look here
material and I'm going to choose this colorful
material. Okay? So I click save and then close and you see that all
the chairs are now colorful. And even the chair here. If you have an acid that you want to input to your project, you need to click here input, then find a folder
where your object is. Then click or select everything if you want to
input everything open. Then for this window you
usually just click inputs all. And here's the new assets
that you have just inverted. And after you're finished
in Britain, your assets, you will notice
that they are icons are marked with
this star symbol, and that means that the
acids are not saved yet. So what you need to
do is to click Save. All right, here it
shows you the type. We have two static meshes, two materials to textures. And yes, the level is
just our level here. And since I didn't save it, and real asks me if I wanted
to save the level two. So I want to save the level. Okay? Final thing, if you want to move acids from one
folder to another, you can drag and drop. For example, these
textures go to textures. You can move here, copy here. Let's do just move and you
can see that two items moved. Alright? Okay, Very good. That's it for this lesson. In the next lesson, we will talk about actors.
7. Lesson 7 Actor: In this lesson, we're going
to talk about actors. You already know
that everything, almost everything
here is an actor. You also can see the
actor here and that we have 14 actors with
one actor selected. If I select a few actors, I can hold Control button
and select a few objects. Thus, I select file. For example. An actor is any object that
can be placed into a level. If we talk about 3D projects
than actors support 3D transformations such as translation, rotation
and scaling. And when you create a level, you place actors into l
level than move and scale them and add script to make
them behave the way you want. For example, this cheers. I think there are
too many chairs, so I just select
an actor and push Delete button. Just like this. Okay, so now we have big
chair and small chair. So with this chair selected, you can see that we have
this actor selected here. And the type is
static Match actor. And we already know that
mesh means a 3D object. What means static? Static here means that it's geometry can be changed because
in contrast with static, we have Skeletal Mesh actors, and that means animated mesh
geometry can be deformed. For example, when a
player is moving. Let's play the game. So this is Skeletal Mesh
actor and it can be deformed. Geometry can be deformed. For example, you can see
the player is moving and legs bending, arms bending. So geometry of the
match is changing. With chair. We don't have such things
with its geometry. That's why it's
called Static Mesh. Alright? Okay. What do we also have here? We have a lighting. We already know that we have
different kinds of light, and here we have
directional light. It has type, directional light. Directional light is one type of a view and there are
cold light actors, and it's pretty
obvious that you need them to add light to your level. We also have other types
of light available. For example, if you do
right-click anywhere like this, then go to blaze actor
and go to Allied. So you can see that we
also have the point light and spotlight,
wrecked light. All these slides are
different types of light. You can use it for
different things. For the light actors, we usually can adjust color of the light and temperature of the light right
here, light color. You remember, we
have already done that and we have temperature. So if I go back to
just the white color and adjust the temperature
than the lower this number is, the warmer the light is, and we go all the way
down to that side, then the light will be very, very cold, okay, And just
going to revert it for now. If we click Play again and
take a look at this list, we can see that now
we have 23 actors. That's because a
few of the actors are active only
in the play mode. For example, the character, the player start and
all the other things. We go to the content
rower and open the audio way and then put the audio actor
here, for example. And let's go to the particles and add
a particle like that. And then play the game. You can hear the sound. And that sound is
an actor as well. There are audio and sound actors and there is no need
to know all the types. You just need to understand that actors can be different things. Let's just delete these
primitives, dislike this, then go to products and
select this big rock. That is bag. Okay, now enter play mode. That was, that was loud. I'm going to delete this
cell Director for now. Okay. Once again, since we
were testing the edema game, you probably think that it
would be the same this time. You just run and be
blocked by the stone. Like obstacle, right? No. It seems like the
stolen is nothing. It doesn't have any
physical shape. It doesn't look great. So we're going to
fix it and talk about physical shapes
in the next lesson.
8. Lesson 8 Collision: Collision. This lesson we're going to talk about
collisions, right? Let's fix this mess
with the stone. Why it doesn't have any shape. I click Play and then detach, and then select the player. Let's go here to the details. So we have the
character and incited. We have the Capsule
Component, mesh and camera. So Kimara is camera and
we understand that. But take a look here, Capsule
Component, Collision. And the mesh. Mesh itself doesn't
have physics. If we don't want our objects
to just go through each other and we want some real physics than
we need collision. In this case, it has the
Capsule Component only with shape Component
Collision as possible. For example, we have this cheer and this term blocks the
movement of the player. And the stone doesn't
block the movement. So let's take a look at
what the differences are. Select an actor like
this and try to edit it. You know, that it
means that we added only this instance of the actor. If you want to edit
all the instances, you need to find
this object here in this drawer and
double-click on it. Okay? Alright, so this is the
editor, static mash editor. We can see the object,
the chair here. And if you go to the Show tab
and click simple collision, it will show you the simple
collision that it has. This is what the
collision looks like. You can see it's not
the shape of the actor. It's actually a bit bigger. That means that probably this chair does not
designed to be set on it. You also can see that we have all the different things
here, such as material. You remember how we changed it? For now, we don't
need anything else. I just wanted to show you the collision, how
it looks like. So let's just click
here to close it. Now let's open this tone. So again, I'm going to
find it here in the draw, our double-click on it. And here's the stone. If we click Show and simple collision
again, nothing shows. And if we click here collision, you can see that we
can remove or delete collision because
there is no collision. How to add a collision? We have different types
of the collision, sphere, capsule and walks. Let's click sphere first. You can see that it
has sphere shape. Let's click capsule. That is capsule.
Let's click box. It is box. You can see that
new collision does not replace the other collision, but adds to it. And if you need to
delete a collision, you just select it like this. Select this leg the
collision and delayed. So for example, you
want the box collision, it's very simple collision, but you know what NAT box. Let's let's go with the
capsule collision. Okay. I think it's it's more it looks more like
this tone, okay. Change the collision by
moving it like this. If you want, you can
make it smaller, you can make it bigger. Well, let's make it
very big like this. Then we click, Save
and close this. Now let's see what we have. You can see we can go further. We can go through this because
the collision is here. You can see, yes, we're still far away
from the stone, but the stone that you see as just a match and the
collision is what matters. Alright, now let's
open it again. And now let's do, let's make this collision
very, very small. For example, like this. You can see it's not the, it's not the shape of the stone. Let's say we're very lazy and we don't want to
do good collision. Okay. Save closet, play again. Okay. Yeah. You can say we are
going through it, but that's through
all the stone. Just threw a part of it. I think you already
get the idea. Okay. Let's go back and give this boy a nice and good
collision instead. Alright, safe. Okay, but let's take another look at this
collision things. So we have sphere capsule inbox and they work perfectly
for very simple objects. But sometimes you need
something more complicated. So that's why we have
this collision generator. So ten means at logs
with four edges beveled like this, like this. I like this, X, Y, or Z aligned edges. Okay, let's delete those. Then we have 18, That's box with
all edges beveled. It's more complex. And then the 26 is the box with all edges
and corners beveled. Okay, so I think we can
delete the Capsule Component now because this collision
looks much better. And of course, the
more the number, the more precise is your mesh. But for very, very detailed mesh we have this option,
also convex collision. So I'm going to remove this one, go with other convex collision. Here you can see the settings. So what we have the **** count as number of primitives of this, this option lets me
move it like this. So this option
increases or decreases the number of vertices
your collision mesh has. And the last one means number of voxels to use when generating
the collision mesh. The higher these values, the more precise your
collision mesh will be, but also more complex. So let's apply it. Okay, it's not perfect,
it's not perfect. Let's increase it. You can see it, can
take some time. So try to play with it. Alright, So for now, I just going to remove this
collision and put this one. Alright, so let's save
it and play again. Now the stone is just
stone for a fact. But with collision applied
to your static mesh, you can now simulate physics. For example, I'm going
to select this cheer. Go to physics here and click
Simulate Physics checkbox. You also can see that if you
put this check mark here, it says true and
without it false. So you can't go wrong. Alright, let's click Play
and try to move it a bit. This is not only because the static measures
simulate in physics, but also because of
the collision preset. Let's go down to this DTLs
and go to the collision. We have Collision Presets here. And it's a drop-down menu. You can open it up. You can see that
we have a lot of different presets for collision, then regulates the
way Static Mesh reacts to the other
objects in the world. And let's say we grabbed this chair and move
it on top of this tone. Like this. Just like this. Okay? So now it is simulate,
it simulates physics. And if we go to the
collision, pretty sad. Instead of physics actor, we choose overlap all. So we chose overlap all. And then we click and
then we click Play. Whoop. Did you see? Did you see it? What happens is the cheer
overlaps everything else. So basically the
chair is falling down and you can see that
and real reports, the warnings because of that. Let's take a look what
other presets are. So the pond, what is Pon? Pon is this thing, right? So it's the base class of all actors that can be
controlled by players. Or a pawn is the physical
representation of a player or a Thai entity
within the world. Of course, the character
is a special point. For example, if we have
a game with, let's say, a dog and a cat, when you, as a player control the cat
and AI controls the dog. Both of the actors or ponds. But the cat is the
character subclass. So for example, if now we go to the stone Collision Presets
and choose ignore only pawn. And then play. Camera didn't know what to do. But yeah, the basically
it ignores the pond. Alright. And for every and each preset
where you can choose it and you can see in this
table how it works. Although there are many, many presets, we have
just three options. Ignore, overlap, or blog. And you can see here
what every option does. You also can take a look
at this table which describes each and every
type of the preset. Alright, so that
was a long lesson, but it is very important. Don't worry, the next one
will be a bit easier.
9. Lesson 9 Components: Components. We're back to
components, but before that, I didn't mention,
but you can move all the windows around just
like this if you want. I don't know. If you don't want
your Outliner here. I don't know why by or if you accidentally moved the windows, you can just move them back. Or if you close one of them, just don't know how to go back. You click Window and
find your window here. For example, the outliner. Just going to move it
here next to details. So components. Remember that mesh is just one of the
components actors have. There are many. I also need to say that a component is a
piece of functionality that can be added
to an actor and you remember how the shape
component was missing? Yeah, so that's just
one of the components. Components can't
exist by themselves. They must be attached
to an actor. And components are Instance, meaning that each copy of an actor gets its own
unique component. For example, if you have a TV in your game and you're showing something unique on the screen, the display and what is showing will be unique
for this particular TV. Otherwise, all TVs in your game will be
showing the same thing. Just the way we did
with the chair. I can give this chair its
own unique components. This one. And this actor will
not have this. Or you can create a blueprint
that will include many, many things inside it. And in this case, when you create instances
of this blueprint, that means that each and every instance of this
blueprint will be the same. We'll be talking about
blueprints in the next lesson. Bye. Now, let's take a look at
a few components types. Just want you to know that there are a few types of components. Light components. Yes, there are light actors, but what if you
need to add a light to all the actor, like a lamp? Let's go to the Blueprints
folder and select this lab. I'm going to put
it somewhere here. So this is the ceiling lamp. If it's selected, we can see that it has a
few components. For example, the point light is the point light component. In this case, oldest still
enlight is a blueprint. And if we need to edit it, we need to go and
edited and Blueprint. Then I want to talk
about audio components. So if you go to the
audio folder here, you can see that we
have a few sounds, and each sound has a queue. So sound, It's skull with a sound wave and then sound cue. So the sound component
allows you to add sound as a sub
object to an actor, provide an a sound source. The sound cue is a physical
version of a sound. We can select the lamp. And you can see dropped acid
here to add a component. So let's select this sound cue. I just going to drag and
drop this component. And now the sound is the
component of this vector. Let's click Play
and try to hear. I'm not sure if my mike is sensitive enough to record this. I'll try. Yeah. That's the sound. Not very pleasant, but that's
just the way it works. So each component type can be very complicated topic and
deserves a separate video. But for the purposes
of this course, I don't want you to
feel overwhelmed. You're doing your first steps. You don't need to
feel overwhelmed. And four now the understanding that components are attached to actors and each actor has its own unique
components is enough. Okay, then the next lesson we're going to
talk about blueprints. See you there.
10. Lesson 10 Blueprint: All right, Welcome to the
lesson about blueprints. You've heard about them, right? So let's just get into it. Alright, so blueprint is a complete gameplay
scripting system. By saying incomplete, I'm in it because this character
is actually a blueprint. So let's click here, add it. We have this as a
separate window. If you want, you can drag
and drop this window right here next to the level window. So let's take a
look at right now, you see the Event Graph. You can zoom in and out
with your mouse wheel. Use your right mouse button to move around just like this. So we have this
three windows here, Event Graph, Construction,
Script and viewport. Let's start with the viewport. We can see that kinda
similar to the editor, to the mash editor that we
used in the previous lessons. This window where
you can view and manipulate your
blueprints components. So for example, you can
select the Capsule Component. You can see that the
component is selected here. If you select camera, the camera is selected. Here you can see the details for the components
that you selected. Now let's go back
to the Event Graph. So again, zoom in and out with your mouse wheel or
right-click to move around. The event graph contains a node graph that
uses events and function calls to perform actions in response
to game play events. A graph as a network of nodes. Every element like
this, It's called node. So all of these are different
nodes and everything that happens in the Event Graph
happens only at runtime. So if you change something in the scene while
game is not playing, you won't see any changes. Only when you run the
game, you'll see them. With the construction script. You will see the changes because the
construction script is executed when the object is
initiated in the engine, it doesn't sound very easy, but let's take a look
at what we have here. So this blueprint
already has a few nodes. Every node is connected somehow. This connections perform some
actions in the game, right? For example, if you take a
look at this movement, input, gamepad and mouse known graphs, you can see that it starts
with the input, move forward. Then this is function
and movement input. And then to it, it goes to get forward vector
and get control rotation. I don't expect you to understand
how it works right now. It's just your first look
at this nodes, okay? So this sign, this F,
that means function. So we can understand that this
three nodes are functions. Then, for example here, jump. So this node graph
managers or jumps. So if the jump key is
pressed, then jump. If released, stop jumping. Inside this node we
held the function. The function jump inside
this one, stop jumping. You can see that we
have the simulating. If you go back to your
level and click stop, then come back to the Event Graph and
the text disappeared. Again. Let's play. Go back
and you see we have this yellow frame and big yellow word
simulated. Let's go back. Click Stop, right? You remember I said that everything that happens
in the Event Graph happen only at runtime and
you will not see any changes when your
game is not being played. So, for example, now, when the game is not, we're not in the plane mode. We don't see the
character at all. Only when the game is played on. Then we can see the character and we can see how
everything works here. You also can use these buttons here to,
for the simulation. And if you accidentally
close to your Event Graph, hello, top on it, you
go here, event graph. Double-click to open it. And construction script as well. If you need to select
a few nodes together, you can just use your left
mouse button like this. When you select a few nodes, you can usually just
drag them together. But since this is
one group of nodes, we can just drag it
around like this. Now, let's take a look here. We have the Event Graph
Construction Script, and here's variables. Probably you know
what variables are. But if not variables or
properties that hold a value, there are a lot of different
types of variables. For example, let's click plus. To create a new variable, we can give it a name. I'm just gonna give it the
test var variable name. And next to the name you can see the type of the variable. You also can see this type
here on the Details panel. So as I mentioned, variables have a lot
of different types. Let's click here. For example, what
Boolean type means. It means yes or no. So there are a lot of
types of variables, and in Unreal Engine, each type has its own color. So for example, Boolean
is true or false. Float is a float number, meaning something like
this with a point. Also have the integer, and it means a whole number, like 123102025 of
just whole number, no decimal and other types. For example, we have the
string type, a text string. For example, let's do like this. When the play begins, we see a string on the screen. So what we're gonna do, we're gonna add an event right-click and you can see all actions for this blueprint. So I'm going to add event. I'm going to find
something that, that is close to begin play. You can do like this, like try to find, okay, Here this
event began play, or you can type here again. And it will show you
everything that it has. Okay? Event Begin Play here. Now, don't forget
to change the type to this string, like this. Next we're going to
need to print string. Okay? You guys see this
is function print string. So lads connected like this. Okay? If you want to connect
two notes together, you can see it's very simple. If you want to disconnect them, Alt and left-click
connect. Disconnect. Not all nodes can be
connected together. But if they can be connected, you can see this
green check mark. Then we need the variable, we're going to drag and drop it to this blueprint like this. And it will always ask you, do you want to get it all
you want just sat variable. In this case, I need
to set my variable. Here. We can see the text
of the string. So let's put something like if you click here, you can see more options for
this function like this. Also very good thing that
you can hover it like this and read description
of a function, prints a string to the log and optionally to the screen
its development on this. So it's actually just for you to check if everything works. So it says print to screen and checked print to
log, check texts color. Let's change it to red. Okay? Duration. This is how many seconds
we will see in the text. So I'm going to put ten. Okay, let's, let's click
Compile and then Save. Okay. Now I'll go back to the game. Click play. Here is the string. Ten seconds. It should be
here and then after that, just go away. Yeah. All right. Good stuff. And that's how Blueprint works. You see, we started with
the event begin play. We've found this event in this endless list of
different events. There are a lot of
different events here. Then we've found the function
that will print the string. And then we set the variable
with this function. Just like this, using different variables and
functions and events, you're going to create
a logic for your game. Instead of writing the code, you'll be creating nodes
and connect them together. Just like this, you
see, we connected them. And I know it might look scary. But just think about it. This system allows us to program without
knowing C plus plus and learning C plus
plus is way more difficult to leave
me in this course, your goal is to understand how essential elements of
Unreal Engine five works. So let's go ahead and talk about node groups in the next lesson.
11. Lesson 11 Blueprint Node Groups: In this lesson, I would
like to talk about some elements of blueprints. So first let's talk about
events in the last lesson when we have added this
event, begin play. What events do is pretty obvious because for this
one, for example, it means that all
functionality that is after this node will be a
response to this event. In this case, when
the play starts. And I just want to
remind you that we have a lot of pretty
sad events here. And you also can add
your custom event. For example, let's
say you want to set a health for a character in
the beginning of the play. So we're going to need
the new variable. Let's call it health. Since it's health, we need to choose something that
represents a number. We could just float maybe, but that would mean that
the number is decimal. So it's like 5.34 health, I think it doesn't look good, so well, health points, it's usually one hundred
ninety, five, ninety, etc. So integer it is. Let's add the description. So if you wanted to set the health in the
beginning of the play, you need to drag and drop
this to your blueprint and set to whatever
number, let's say 100. And connected like this. So when you do this
and click Play, you don't see any
changes, right? That's because, yes, we set the health but we didn't
say show me the health. We didn't say print the
health Somewhere, right? We don't have any
interface elements on the screen right now, because for a game
you would have some bars for health,
for your weapons. But right now we
don't have anything. So yeah, we did set the
health but we don't see it. If you want to check that the health was set
to this number, what you need is you need to print this information
on the screen. So let's add a function. This is the function that you already know. It's print string. But instead of this, we're going to open this up and connect the health to this side. If you see that when
you do like this, when you hover over this, when you hover it,
you can see it says convert integer to string. That means that it would
add this converter here. You can see the
different colors because this variable is integer and
this variable is string. So we can convert it first. We need to convert it first up. Let's put ten for the duration. Click Compile, Save, and lay. Alright. Here you can see the 100. It's the health points. We ask the system to
show us this variable. It did. That's it. So the print string is
one of the functions and you will use a lot of different functions when
working with Unreal Engine. Basically, a function is a node that is called
from another graph. Functions can be
public, protected, or private, and you can see the description
here on the screen. So the public function, this is default setting. And that means that any
object can call this function protected means
that the function can only be called by
the current blueprint, as well as any blueprints that derive from the
current blueprint. And private function means that only the current
blueprint can call it. So to create a function, you can either use this list. There are a lot of
different functions here. You can take a look. This
sign means function. So all this are functions. Or if you need to create
your own function, then you go here, Functions, click here, function. New function was created. You can rename it and you can
delete it just like this. And the final element
that I want to show you is timeline. Timeline nodes provide
time-based animation based on events, floats, vectors of colors that can be triggered at keyframes along the timeline there
specifically built for simple non cinematic tasks, such as opening doors. We will need timeline nodes for simple time-based animation. And in the next video, I'm going to show you
how to use timelines, but we're going to create our own blueprint and
create some magic. See you there.
12. Lesson 12 BP p1: Alright, so you made
it to this lesson. And in this lesson
we're going to create a blueprint, new one. Let's do it. So what are we going to do? Just going to go back to the content rover and
create a new folder. I would say here in
the content folder, you can click here,
add new folder. And I'm going to call
it blue print Test. Because we have this blueprints here for the starch content, but I just want our blueprints to be
in a separate folder. Double-click to open the folder. Now let's add a blueprint. So Ed, and here we have some basic assets like blueprint level material
and younger system. And we need the blueprint class. So we need to pick
parent class here. And you can see there
are several types and even more here. A lot of them. But for now, I just want you to know that there
is the actor class, which is very common class, character class, which has the blueprint
for the character. You remember that the
character that we have here has this icon
for this blueprint. That means that has blueprint
has the character class. For this lesson, I'm going
to choose the actor class. I'm going to rename it to be p. Remember I told you
that it's best practice to rename your
items accordingly. So BP for blueprint, M for material, and etc. I'm going to call it a ball because my plan is to
create a ball here. Okay? Double-click and drag and
drop it here like this. Okay, so now we have
the viewport opens and there is nothing,
nothing here. That's because our
blueprint is just empty. So we need to add
something to it. So I'm going to add sphere. Since we have some acids
even ported to your project, you'll see this
sphere right here. All right, here's this fear. Let's take a look
at the details. So this here is static mash. It has material which is
basic shape material. So let's click Save, compile, and go
back to your scene. And now I can drag and drop
this ball to the scene. To put this ball on the floor, we need to move it
a bit like this. All right, Let's click Play. Okay? Alright, so we see
this sphere on the floor. And as you can see, it already has a collision. So let's go back
to the blueprint. And you can see that when
you create a new blueprint, there will be these three
events drafted for you. But this node, these nodes
are disabled and will not be called unless you
add a node somewhere. And what I want to do
is I want this ball or the sphere to disappear when
the character touches it. To do it, first, we need some kind of trigger. So let's add a collision, add collision box collision. Make it a bit bigger like this. Much. Okay? We have this box collision and this box collision
is a trigger. So the script that we need is when the character
touches the trigger, then the object
disappears, right? So let's go back to
the Event Graph. And you know what this
event actor begins. Overlap works for us just fine. You can check the
description event when this actor overlaps
and now the actor, for example, a player
walking into a trigger. So what do we need? We need to destroy the object when you're
just experimenting around. And real engine, which you
can do is select this and then just type what
you want to do. In this case it's just Troy. We like and we have
this Destroy Actor function and we also held the destroy component
function, but Of course, if we choose
Destroy component function, nothing will happen because the component will be destroyed, but the ball itself, this fear still will be visible. So we need to destroy
actor function. And we can see the
target, which is self. And that means that this
function works for this ball. Alright, so let's save, compile and try it. That's it. Alright, let's do the other
thing, very simple again. So this time what I want to do is I want the sphere to change its color or change its material when the
character touches it. And again, we're gonna use
this event because touch, in this case means overlap two collisions
or overlap each other. Right now if we click
here to this fear, we can see that it has
the basic shape material, but we have a lot of
different materials here. We can use some of them. So I'm going to select this
node, just click Delete. We're going to
find the function. So what we want to change, we want to change the material. That means we want
to set new material. We want to set material if
you just type material, a lot of different functions. But here, set material. So you see set material walks
out or set material sphere. Actually, that's the elements that we have here is the
components right here. And if I rename one of them, box and go back. And in typeset material, you can see it says box mine. So this not just
as fear or at box, It's the components
that we have created. So I'm going to change the material for the sphere because the box is
just the collision. It doesn't have material. Okay? Okay, Very good. I'm
going to rename the box to just box again. Alright, so let's
select a material, for example, this one. And now I just need to connect this with the
event just like this. Okay? Save compile. So when the character
touches the sphere, it changes its material. Awesome, right? Since we chose the set
material for this fear, the node sphere was
created automatically, so you don't need
to overthink it. The system has created
the set material function and the target node,
which is the sphere. Now it's time for a bit
more complicated script. So I'm going to close this one. You can see this sign, that means that it's not saved. So basically, you can just click Control and S
can click Save All. And then it is saved. But we will not use
this sphere anymore. Instead, we're going to
create a new blueprint. It will be the same class, the vector class, VP. We're going to call it a door, because it will be about door. Okay, again, a drag
and drop it here. Alright. So again, the viewport is empty. And what we need to do is
to add something here. So what this blueprint for, I want the door to open
when the player open set. So we need to add a door here. And you can remember that we have in the folder
prompts right here, we have a lot of different
things such as this door, this door frame, and
the door whom together. Okay. So I'm gonna delete
this for now. But that's what I want
inside the blueprint. So to end this, we first need to add a mesh. So I'm going to type
match and you see we have Skeletal
Mesh, Static Mesh. And yeah, this is
the mesh that we want to create, the Static Mesh. This is door is actually as
just a part of the door. So I'm going to
need another part. I'm going to create
a static mesh. And it's going to
create the door again. But instead of the
door, the door frame. First, we need to rename
it to door frame. Door. And I can drag and
drop it like this. So that now we have the door frame and inside
it we have the door. What do we need to do
is we need to move this door so that it
fits the door frame. Let's do it. Alright, so this is our
door with the door frame. So now we need to add a trigger. Remember the way we
did with the sphere, we need some kind of collision so that when a player
enters the area, we can understand
that it's happening. So let's add color. I'm going to use the
box collision again. We need to adjust its size. That should be okay. Right now, the box is the
part of the door frame. We can just move it like this. And now the box is not a part
of the door frame anymore. Okay, So I'm going to
compile and save this and go to the Event Graph. For this group, we won't need, we don't need these nodes. Some just going to use my
left mouse to do like this. And click Delete. Okay, so first we
need an event, right? So let's create an event. So what do we need to do? We need to select the box
and create a new event. So you can scroll down and see a lot of events
that we have here. In this case, we need this one on component
begin overlap. Let's click. It also says box because
the box was selected. So this event will
be called when something like a character
overlaps the box. And the box is this
collision box that we did. But we don't want all actors to start these script, right? We just need the character. So in this case, we need this over
actor reference and then we need to type cast, cast to third, third
person character. This is the BP
ThirdPersonCharacter. It's the way the blueprint
for the character is called pure Character Blueprint
is called the other name. You will see the
other name here. And you'll see that
this Caz does, it tries to access object
as a blueprint class. It may be an instance
of it will check if the actor that overlaps is
the BP ThirdPersonCharacter. And if yes, then from this
point you can see this. It says exec, exec execute this. If no, then cast failed
and something happens. So if it has the character, I want the player
to push a button, for example, EE button
to open the door. So if the character, which should be this
character, all the labs, the box, then I want
to enable input. So what I want to do is I want
to type in enable inputs. You see that it has
the player controller. So we need a player controller. Okay, just like this. So if something
overlaps the box, then first we check if it's
the BP ThirdPersonCharacter. And if yes, then we enable the input for the
player controller. But we can just
leave it like this. We need to say what will
happen if we end the overlap. For example, the character can touch the door,
touched the box, then run away a few, a few miles, and then the
inputs still will be enabled. And if he pushed the
button that we assign, then the door will open. And that's not what we want. So we need to go back to the box and choose on
components and overlap. So that's this way
we can and all this, and it's pretty the same. So again, we need to
check if it's cast. To be happy. Thirdpersoncharacter. It is. Again, we connect it like this. And this time, if
yes, then disable, disable, and put this
same player controller. Alright, perfect. Let's save and compile. Now it's time to add a
key that we will use to open and close the door so we can choose whatever
button you want. For example, let's
choose the e button, E. Okay? They are all the keys. So this is the E key and you
can see that it has pressed, released and the key, I want the character
to be able to open and close the door
by pressing the E. So if you push, eat, once the door will open, if you push E the second
time it will close. That means that we basically have just the two
positions, right? One is up and one is closed. And to manage them, we can use the flip flop. Flip flop action. Here you go. Flip-flop is just
two alternatives. When you press one, it does the a, and if you press the second
time it does the b. So what Open Door means? It means that this door, which is this part of the door
frame, is rotated, right? So let's sort of dated
like this, 90 degrees C. It can see here that we
have rotated it along, along the z axis, 90 degrees. So okay, let's go back
to this script here. So I'm going to drag and drop the mesh because
I'm going to change its settings and
then go back in bed. We mean the rotation. Rotation. We have set related, we have this set
related rotation. That's good for
cleaning to do that the rotation of the component
related to its parents. Okay, that works. So the target will be this door. Then the a is going here and we change the axis
to 90 degrees. And then let's
just do like this. Select these two nodes. Copy Control, Control C, Control V, and B, like this. And the new rotation
will be just 0. Okay? We don't need this door. I think we just can
connected like this. Alright. Let's check. Can file safe. Okay. Hold on. We need to put the door
on the scene first. So I'm going to our
folder blueprint, test for the door right here. In then play the game. I just I have pressed
E and the door opens and it lets me go through. Now I'm going to
click E again, coast. And from the other side, I think the right
way to open the door from is from this
from this side. This is the right way to
open the door, right? Let's put minus so that it opens not to this side
but to the other side. And I also see that we
need to move the door bit. You see this? You see the space
between the door and the door frame doesn't look
good case and go back to the loop print like this. Okay, and then go to the Event
Graph and put minus here. Again, save compile. It might not be the case
in your case because it depends how you put your door frame to this
angle or to the other, but I didn't want to redo this. Oh, I put the other door. Oh, my God. I didn't want that. I didn't want to play again. Open the door. It opens. It closes. I'm pushing E. Right now. I'm pushing E on my keyboard. If you assign the other button, then the other button will work. Okay.
13. Lesson 13 Blueprint: Practice p2: But if you want to go
even more further, we can smooth this opening. You see right now, it's very, sorry.
It's not natural. It's not natural. We see. And we want to
smooth this, right? Right now we have
only two positions. One is here when the
door is closed and the other one is there
when the door is opened. Let's use timeline to do this. So let's go back
to the blueprint and now we don't need this. So I'm just going to click, I'm going to push out and click
here to disconnect those. I'm going to put this down. So let's add a timeline. So I'm gonna do timeline
from this output. Timeline. Timeline. Timeline.
Timeline provides time-based animation
based on the events. It can really help with. Simple, not cinematic animations and opening doors,
words just fine. So I'm going to name
it door, Open Door. Okay. We have this inputs and outputs. Let's open the timeline
by double-clicking on it. And now we don't
see anything here. There is nothing. So we need to add a
track right here. Track. We have flaw track Vector, Track, event, and even color. For this purposes, we
can use the float track. And Float Track uses values. So right here at 0, and we can set a value, a float value here. Then here we can set the other
value and etc, etc, etc. If you want to make this, make the timeline
bigger or smaller, you can just zoom in and out with your mouse
button like this. And here you can see
that the length, which is five seconds. So what it does by eight
by adding values here, here, here, and here. You are saying, I
want this value to be this number when
it's on 0 seconds. Then on 025, I want
this value to be this. And then this, and then this animation is moving
actually through the timeline. So if you just take your
hand and move it a bit, you can see that when you first start the movement you
had is in some position. Let's say it's 0 position, then you move it a bit higher. That means that in 2.5th, your hand is on
this new position, which is, for example, 1.5. Then you move it a bit
higher and it's two. Your hand goes through
0 to two within, let's say 1 second. And to add the value, you need to right-click
on it and add key. This value is this. We call it keys. Where you click it. It will add the value. For each value. You can click here. When it is selected, it is blue. You can see the
time and the value. So for example here, time is 0.4 almost and
the value is 0.35. Here the time will be one. Let's add here almost one. We can set one. And we can set a
value like this. You can see it. So I'm going to delete these
keys and start from 0. Of course, because for
the very beginning, we want the value to be 0. And what the value is, it's actually will be this
value, this rotation value. You can see we put 90 here
and that's what I want, but I just don't want it
to be just two positions. I want it to be smooth. I put the first key here for
the time to 0. Value is 0. And then in, then
after, after 1 second, I wanted to be, I put 1 second, I wanted to be minus 90. Okay, we don't see it now because the scale
is not that big. So you can click here, Zoom To Fit Vertical. Here you go. Okay. But the timeline
is five seconds long. I think we can just
put 1 second here. Okay, very good. Okay, and then since I
want it to be smooth, I want to add a key
sound waves here and then move the value bit. Like this. It's not very smooth. Let's click here and try
to make it a bit smoother. Let's see something like this. Now when we go back
to the Event Graph, to the Event Graph, we see
the new track right here. Let's rename it open. Here's the door
Movement timeline. So I need this right here. And actually for this one, we don't need the second one. The target will be
the same the door. But if right now, I'll try to connect this timeline to this
new rotation input. It doesn't let me because it is float and this is rotator. And you can see that
it's not competitive. What to do? Good news, we have
make rotator. You go. Now. Let me just move it like this. So now it's going to make rotator from this
float instead of x. I think I'm gonna connected
to the to the rotator. Okay, very good. And I connected it
to z because sorry, because you can see
that we have changed the z axis and we also saw it
here when we open the door. Now we want to update
this timeline. We're going to connect this
update output right here, is going to update in
this and the flip-flop, we have a, we don't have B. So for V, What we want is
just the reverse, right? Let's just connected like this. Compile, save. Let's try how small. I do like it. I do like it. Very good. Very smooth rotation. If you don't like the
animation that she did, you can always open this
timeline and corrected somehow. For example, we can,
instead of 1 second, we can put, let's say 2.5th. And in this case,
whoop, butt Ugly. And in this case the
animation will be faster. So again, compile
save, and let's try. You see a bit faster. Yeah, so you did all this. Congratulations. This is a this is for you. This is for you. You did an amazing job really, and I am proud of you. So let's sum everything up and talk about next
steps in the last video.
14. What's next?: They didn't say,
I'm proud of you and say it again
because I really do Unreal Engine five isn't something simple that you
can learn in 12 hours. But hopefully this course is
give you an understanding of how Unreal Engine tools work. Now you know how
to create levels, you know what actors
are and that they have components like light, you know, what collision is,
and how you can use different shapes of collisions depending on what you need. Do you even know what blueprints are and knowing about variables, functions, and timelines,
you are able to create blueprint for
yourself, which is awesome. What's next? You ask me next, depending on your goals, you choose your next path. Ask yourself, what do you want to create with
Unreal Engine? Because it has so many different
tools that it makes it very simple to get burnout
and that's not what you want. So let me know what you want
to create an AI will decide what to do next based
on your comments. I hope you enjoyed the course and I'll see you
in the next ones.