Transcripts
1. Introduction to the course: Welcome guys to win
new video series. Today I'm gonna be showing
you how you can create this earth seen in the
Unreal Engine four or five, both of them will work using gray tracing and the Packet
Tracer and the Unreal Engine. And in this scenario, I'm gonna be showing
you how to create the material for the Earth and a quick light set
with the background. And also I'm gonna be showing
how to create the fogging the best Tracer because it
only works on the live mode. And let's dive into it.
2. Project Overview: This is a quick
overview of our scene. We have a few materials here. This is a frog material
that we are going to use, the eraser because this is actually a
post-process material. Also, we have a few
other materials here. This is the background material for all the plane for the stars. I'm not going to be using
Niagara for this one. I'm gonna make it too simple because I can scatter
the stars with Niagara, but not in this case, I'm going to make it
as simple as possible. Also here we have the textures of the earth
that you can download online. I'm gonna be showing the link. And also here's the earth
material that will be a little bit complex because we have so much going on here and
I'll be explaining it. So let's dive right into it.
3. Texture resources: So for the textures, we're going to use this website called Solar System scope.com. And it has actually
few planets here. And one of them will be
the Earth here at the map. There is also the nightmare
of the clouds, whatever. So I'm going to be downloading the day one with the specular
and normal and clouds. Also, we're going to
use this night map also to eliminate the
dark side of the Earth. And also we can go out
for the stars texture. And we have to look for one that doesn't
have any watermark. You can choose any, and you can actually use this. And I desaturated it
India and the unreal. I'm gonna be providing
the files in the section of the files in the course swam to make the
process easier for you.
4. Project Creation: After launching the
Epic Games lunch, or you can download your
own version from here. And for this one I'm
gonna be using 4.27.2. So after launching it from here, we can go to game. We can make it blank. We use ray tracing enabled. We don't need the
starter content. We can put it on maximum quality and name our project here.
5. Project settings required geometry: After launch Genome Project, we can go to the here to the plugins and what we should add as the movie Render Queue. Because we're gonna be exporting some high resolution
images from this one. And I think this is the
only one you need to activate since you are
activated the ray tracing, the beginning of the project so you don't have
more setup to do. And also the second thing that I forgot to mention
in the project settings, you should go for
the auto exposure. And you should disable this
because we're gonna be adjusting the exposure manually from the post-process volume. So starting off with this, you can control S here
and save it to a new map, or you can right-click here
and create a new level. I'm going to be diving directly into my
creative map here. And with Sean have two
simple elements here. So if we go to the, sorry, I forgot
to the wireframe. So we basically have a
plane with a sphere here. You can drag and drop this
sphere from here or so. But the thing is, I think the, the poly count from
this one cannot be adjusted from the engine. So what we should
do it this case, you can see like this, there is some hard edges on the side here because it
doesn't have enough polygons. I can create one actually. On the exterior. Software. I'm going to
be using 3D Studio Max. You can do this in
Blender or anything. You can just drag and drop the sphere and increase
the poly count. And then you export
it as an FBX. I'm gonna be showing
this process quickly. So here we are on 3D Studio Max. We can drag and drop a sphere. We can go on w, put 0 here
for the location for x, y, z. Then we can go to Modify, increase the public come to
a really high resolution. We can put even to 56
segments and then we can export this to
an FBX file here. And yeah, so that's it. And I'm gonna be providing as an FBX also
in the project files. So if you don't use
any 3D software 0, just an unreal user. You'll be able to find this instead of having to go through any for your page, 3D
modelling software. So yeah, moving on
to the next one.
6. Material creation and Light setup: So I'm gonna be
starting here and by importing the
tongue go to textures, you can right-click here, create a new folder. We can go to 3D and
we can add import here, import from desktop. I put them there. And you can download the
maps that you got from the website with
the FBX file here. For the FBX, you just
have to make it simple. And let me show you some. You just press Import once
you import it in that set. So here we have IRA important
this because I think it's easier for me to
demonstrate this in your project that
it's already done. It's because when I showed
the shaders to some people, it's gonna be easier
for them to see the final version instead of having to go
through all the video. So here we're going to
start with our shaders is you can right-click and
create a new material. I've already created a tear. Or you can use one of the texts layers here
that the diffuse map, you can right-click on it and
create a material for it. And then we're going to be
having this material here. So this is the material
that I created. I'm going to go
through all of this now and show you
what I've done here. So I'm going to organize this section to show you guys
how I started with this. So first thing is, I've, I've created here,
you can right-click. You can add a customer
rotator here. So this is the custom
rotator that will allow us to rotate the texture. In this case, I made
two rotators here. These rotators are linked
to the texture maps here. In case you don't know
how to import texture, you can just drag it from the content browser
here and drop it there. So you can drag and
drop all of them. After that, we will be having
the two customer rotators. I have one for the clouds
and I have one for the, for the diffuse
texture for the earth. So here I'm going to
show actually something. We will pick the clouds
here as an example. When you use this
cloud rotation value from register to 0.25, as you can see here, the rotation for
the clouds changes. So this is why I made this. So you can make a constant here, or you can make a
scalar parameter, or you can make a
constant and convert it to a parameter which
becomes a scalar parameter. And you can just name them here. For this one, I named that to Cloud rotation and you can
put a default value here. And then I made this at the
scatter parameters so we can adjust them while having the
scene right in front of us. So by creating a material
instance from it, I'll be showing that later. So scalar parameter
here plugs into the rotation angle with
the customer rotator. So that's the customer
rotator first one. And then we'll be great at
grabbing a texture coordinate. We're going to leave
this one by one, So texture coordinate. And we drag it
into the UVs here. So once you have it, you plug it into the UV is like this. And then from the first row of data for the
Cloud rotation here, you can drag the return value
to the UVs of the clouds. Here, the texture of the clouds. And for the other rotator, we're gonna be using
all of the other maps, which are the normal, diffuse and specular maps. So after dragging all
of these three maps, we'll plug them to the UVs. So the same UVs. And basically because
when we went to rotate the Earth texture, we want to rotate also the
specular texture with it and with the normal map with it. So here when we do 0.1, as you can see, the Earth, the Earth rotates here and the clouds stays in
actually one place. As you can see. So yeah, after that, I needed to make
the diffuse with the the diffuse texture of
the Earth with the clouds. So I had to use an ad here. So dragging out
the RGB from here, I can use add on or I can
right-click and type AD. And I combined both of the
diffuse with the clouds here. I plugged them into the diffuse. So all we also don't know
that the specular map, so we basically take the RGB
and drag it to the specular. For the normal map, we just get the RGB and
drag it to the normal. And at the end now we
have the MS of MSF map. So the emissive map is a
little bit complex here, but it's gonna be fine Totally. So we have this emissive map that we actually downloaded it. What I've done here is you can go to the texture
of the MS of map here, double-click and you
can adjust it here. So I changed it a
few values here. This was set to one. Wanted to have more contrast. Here. For the saturation, it had colors at the
beginning which was disturbing or are willing
to rendering because it had a different
color values here. So I wanted to
make it all white. And I'm gonna make
this white Values turn to the color
that I needed to be. So the shader here is
combined of two elements. I'm going to show you
here what I've done. So this is a sequencer and here, this is what we got
here right now. And I'm going to turn
this to path tracing. So here we go. So we have this right now. And the thing is,
as you can see, there is a blue highlight
on the edge of the earth. And there is the
illumination map here. So we have two glowing
elements here. So we have to integrate it to emissive values
combined together. So it's gonna be the edge here, and it's gonna be the lights of the series here in
the Earth texture. So after dragging and dropping the emissive map that we got, we combine the
tear with a color. This color will
allow us basically, I'm going to show it quickly
on the material instance. So this is the color
and we can actually change the glow of
this series here. Let's see, green,
orange, whatever. So it allows us to
change that color. And for this blue one, it will allow us to change the edge of the illumination
here of the Earth. I'm gonna be showing quickly
what I've done here. So this is the color wheel. We multiplied it by
the MSF map here. So right-click and multiply. You add that node and then you multiply the color by
the black and white. So it will pick up
the white values and multiply them by the
chosen color. Here. We multiply that
also by intensity. So we can have the color that we want and we can adjust the intensity of this
city lights here. So when I go here and
I have this intensity, I can set this to two. Maybe you're, let's
say that the two, and as you can see, it
illuminates more here. So I'm going to keep it down to 1.4 because that's the best, that was the best
cow fig for me. So after multiplying
it by the intensity, this is gonna be
the first section. You could actually
select this also. And also keep in
mind for the UVs, for the, for the texture here. I set it to the
customer rotator here so we're even when the
Earth rotates here, the light is going
to rotate with it. So the lights will keep the same locations at
the same regions there. So we can actually organize this a bit by
selecting this part. So this is the illumination
of the series. We can select it and proceed. And we can put a
city illumination. So here this is section is going to be
the Earth's atmosphere and I'm going to start
explaining it quickly. So here earn most fear. So this one is a
little bit complex, but it's, it's easy
to understand. So here at the beginning
what I've done is I got a custom rotator. And so this custom rotator, as usual, it will allow
me to rotate the texture. But here I took a
linear gradient. So this linear gradient, and we can preview this actually on each one and
see what it does. So when we start
previewing here, I right-click and I
click Start preview. What I've done here is I've got to learn a linear gradient. I can show it here
on the plane, maybe. Yeah. So a linear gradient and I
have the parameter here, I can actually rotate it 0.25. And as you can see,
I have control of the rotation and when
I wanted to go from, and this is also a
scalar parameter. So right-click scalar
parameter or a constant and you can convert it later and you type
the name of it. Here we got the
texture coordinates. We're going to leave it,
leave it to wine by one, and we drag this to
a linear gradient so we can control the
rotation of the gradient. Here. We multiplied it by the. Gradient value,
which will allow us to control the intensity
of the gradient here. So if I set this to
0, it will be black. If I set this to one, it will be bright. If I say that is 0.1, as you can see, it gets darker. So we're basically
multiplying it by one value, which will control the intensity
of the whole gradient. So after that, we combined
both of this element. So we have this gradient
at the beginning, and we have this for now. And the front now is basically, let me open up Very, lets me do a quick
demonstration here. So, uh, for now, if
you have a sphere or any kind of object that
has a specific shape. Or for now is the, basically the value
for the contour here. So you can have this
edge here like this. And wherever you are
just different l values, it goes in, inside to the core. So let me show this a bit. And if I start previewing here, so we have dragged here for now. So, uh, for now, and we got the
exponential exponent, TOM this value with
the reflectance. So both of these values are, will allow you to change
the actual funnel. Elimination, let's
say to the core, I will show it to you
quickly and what it does. You'll understand
it once you see it. So we have the EXP, so you control the amount of value that goes from
the edge to the core with the reflectance
that will allow you to adjust the blending
between them. So as you can see, it gets a little
bit smoother here. If you make this
value a little bit, a little bit lower as you can make it a little
bit sharper here. So after adding that for now, which has the edge, and we subtracted it here by the linear, by linear gradient. And why I did this basically, it's because I have the for now. So the front now has, if it goes by itself, we can test it out here. So if we save here, It's gonna do all of the
edge of the earth here. And what I've done here is I subtracted this part
by linear gradient. So we have one element
on the side that is illuminated that it's that
it's exposed to the light. And we want to have the other one dark because we don't want the atmosphere to be glowing on the dark
side of the earth. So when I save here again, so I subtracted it by
ear. Gradient here. So the gradient is basically now the white values are here
and the dark values in here. And if you asked me how do I, how do I control agile rotation, it's simply here because
I've put the rotator in the linear gradient. So I can basically go to
the material instance here, which I will show you
how to create in a bit. But here, if we change, sorry, let me try to
find this value again. So gradient rotation angle. So here, if I copy this value, set it to 0, for example. I think that was too much. So 0.1. So as you can see here, I have the control of, as you can see even
here in the purview, have the control of
the gradient here. And from which side do I want
it to affect my geometry? So as you can see, where if I drag it to the
left, it goes to the left. If I drag it to the right,
it goes to the right. And here we're going
to set this to the value of that
are found there. And also if we put, if you want this and this is
what I'm going to show here. And I multiplied it here by
the gradient intensity here. Because I can control, actually hear the this
length of the dark side. And I'm gonna be
showing it here. If I set this to two. As you can see, we have less atmospheric
going from that side. If I'm going to
put this the far, as you can see here, it's, it takes a
really small angle. And I think this value
was the best one for me. You can actually copy my
values or anything like that. So you have the
material instance here. So after creating the material, you can right-click and
create the material instance. And from this one you can
actually copy my values here. If you find this to be perfect. Yeah, perfect config. So after having the
front now here with the linear a linear gradient, I subtracted the funnel from the linear gradient
so we can have this dark side and we made the intensity multipliers so we can control the whole
glow of the atmosphere. So here if we go to a density f, We can do ten. Here. As you can see, goes more
and let's put it to 20. And as you can see,
this glows more. So you can have perfect control with this atmosphere intensity. And as you can see at 20 here, I think this looks also fine. It's not that bad. But yeah. So after having
these these values, you can also copy
the hex colors here, or you can do it yourself. And I'm just displaying
the values so you can get a great
start point here. So after doing the subtraction
here on the multiplier, we actually combined
it with the other one because we have the atmosphere
that it's going and we have the cities that
they are growing. So I basically combined
both with the blend screen. Blend screen was the best one. I mean, we can do
ad, but it didn't. But some values get
messed up so are better. If you're familiar
with Photoshop, you can do the blend modes here, which, which are these elements like lightened
screen, soft light. Whenever I chose screen here, I found that to be the best way. So I combined both
of these values and I put them in the MSF color. So this is a very simple shader. And again, but I think
it does a great job. And we can also stop previewing this one so we can
see the actual one. Okay, this is the flat earth, I guess. But yeah. So I'm going to move
now to the next shader, which is the fog value. Because here when we
put it on Lit mode, we can actually do
an exponential fog, fog, and we can have this. But when we use the
packet tracer here, we want to have the frog. And the frog that
I have right now is from the one that I've done. And I'm going to show
you how I've done it. And basically you have to drag a post-process volume
into the scene. And then once you have it here, I'm going to show you the
conflict that are used. It's quite simple. So you got the
post-process volume here, and I'm going to start
with the basic parameters. I don't wanna go through the
shader yet here because we use the post-process
material here. And I want to show quickly what I've
done here on the settings. So if you open path tracing, we set this to 3232
sample sampling here, and we take the emissive
material because we want to have the glow here on the
the bathymetry, sir. So also we have
the noisier here. It's up to you if
you want to take it on for and keep it on. Because I think it
does a pretty good job after sampling the image a lot. And then there is some other conflicts that
they are not quite important, but I just activated
like everything here. I don't think there is
a big of a deal here. So let's run this
and see we're not because we are at
this case not using any translucency or reflections or stuff like that in this case. So you can keep them just
activated, just in case. Just the already
tracing ones here and refraction here at
Tracing whenever. So yeah, so I think that's everything for
the post-process settings. And you can actually go to the exposure here and
adjusted here manually. I've also added a
year, a quick bluer. So we can get this edge too. Glow by intensity. So this is quite
important to use. And here, I guess I've started
by adding a new array. So you click the plus
sign and you get to choose asset reference here. And yeah, So after
choosing asset reference, I'm going to delete this one because I already have this one. And you're going to
create a material that would be your
post-process materials. So you can right-click
create a new material. I will change grid here. And you can create an instance from it and
you can drag and drop it. Here. So this is the instance
you can right-click, Create Instance, drag
and drop it there. So first thing what
I've done is you go, I click on here and you put the material domain
to post-process. And also there is a
second parameter here. This is the most important one. So you put before
tone mapping here, otherwise it won't show
on the path tracer. This is actually a
very simple shader. So you right-click and
put depth fade here. And this is basically
a very simple one. So you make a debit fade and you choose the opacity of the feet. You can see it on the
outside of the sphere. You choose the opacity here. I can adjust it right
in front of you, 0.7. So the opacity and the
distance of the fade. So these are the values
and you can end, you have to use a linear
interpolation with it. And you just drag
this until the Alpha. And here we're going to
need the both colors. The first color
will be the syntax. There's a syntax
error is basically what this your screen is showing here with the combination
of the color of the, of the fog that you created by what the depth
fade. It's so simple. So right-click
seen texture here. And sorry, seem texture. And you put deselect
the first one. And then when you go
here and you select your first process,
post-process input. So post-process 0,
you drag the color to the linear interpolation,
linear interpolation here. As you can see here, be careful pleased with this one because this one is
the most important. That in the beginning I
was like, why is it not, this is not working for
me because I created a constant three vector
and I right-clicked here, as you can see,
it's three vectors, so it has three values. This one has four. It's a four-vector. When I
converted the parameter here, I was actually tracked
because 0 chose four values. So I thought it was
a form vector and it became a four vector here
because it has the four value, which is the alpha. But in this case it's not. You have to right-click and
type four vector constant. And you can choose basically here to the color of your feet. And you can just simply
to put it in here. But if you put four vector
here constant for vector, and I think if you plug it, converted it to a concept
that plug it here, you get an error exactly. So you have to keep
it as a constant, so constant for vector
and you choose the color here and you can save here
to show your final result. So here I can, after creating the
instance, this material, you can actually choose
the feed distance here, as you can see in the
opacity of the feet. So these are my parameters that I found to be perfect
at this situation. And after that, I think we should move to the
stars texture. So after importing the stars, you can just import
it from here, the textures of the stores, or you can just
drag and drop it. So here's the
Import button here, or you can just select these torts texture and
just drop it in there. After doing that, you can right-click create
material from it. But I think this one that
I used, it has colors. So what I've done here is I
drag down the saturation, the RGB curve, and I
changed the use of, I made it as dark as possible. The kind of made it
a lot better here by adjusting the
brightness curve and just simply the saturated
here, and that's it. And after that, you can, you can also just create
a material from it. Take the texture, and
multiply it by intensity. And here you can control the
intensity of the stores. And there is an important
parameter that I've done here, which is the mental illness. Because if the object
is fully metal here, so it's the value you can
make it constant here, or a scalar parameter.
It's up to you. You can test this out and you set the default value to one. Because any metallic material, if it's 100% metallic, when the light hits it, it won't show that
light on the surface. And this is what we wanted here. Because if I check this here
and I change this value to, let's say 0.5, my light will actually affect
the background. And as you can see, there is
a small change in this case. But it's not a big change that at the beginning on
the lightened mode, I think you can
see it more clear. Let me try this. Once again. It's not that visible, but
I'd rather set this to one. Instead of having a
weird looking effect at the end of the stars, the background being enlightened with the sun that I used. I'm gonna go through the
lighting after this one. So here we're gonna
go to the eraser. And also, if you're
wondering how I done the background
here for the star. So after creating the material, you can simply get a plane
here and drag and drop it. Let them own. You can just drag and drop it. I'm pressing, I'm holding, Shift and moving so I
can keep it under View. You can rotate it here and scale it up and down, whatever. And you can just jack the material and it has
to be the instance. Yeah, you can just scale
this up and put it behind the behind the Earth. So until now this is it. I'm going to show how
I've created the light. The light is so simple, I've deleted every single thing. And the only thing
that I kept is the boss versus Of course
with the directional light. So we simply have a
directional mind. You can go in here,
directional might, and you can just drop it
in there and rotate it to the rotation that you
want from this case, I want to delight to come from this side to hit this
surface of the earth. And I've said this simple values here for the
intensity and source angles, so I don't have a
very harsh shadow. And yeah, that's it. This is the basic
parameter here. And after that, we will move to the camera settings
and the rendering. So yeah, we'll move
to the next section.
7. Sequencer setup and Rendering: So after moving to
the next section, or you can right-click
here and you create animation and create
a new sequence of which I've done here. At this case, you'll be
having an empty one. I'm going to set it again
myself so I can show you, create a new camera
here and you have this. I'm going to set this to
path tree so I can get the look that I'm looking
for from the beginning. And so when we select
the camera here, we actually have the
settings on this site. So I wondered the sensor refers
to look white like this. And also here on the, we're not going to have
to deal with the focus now we're just going to
deal with the focal lens. So the thing is with
the focal length, if it gets smaller,
it's wider for sure. But here at this value, I think I took two
or three hundred. Three hundred will make
it look cinematic. And you can increase the camera speed here ands of mild guess to make
things faster. And I just set the
camera position here. So let's say this is our
final camera position. Or a little bit to the back. Skin, get the perfect firm. And if you can not get the
perfect framing can still move the background plane or
just scale it up and down. So let's say this
is the framing. You go to the transform
here and just pin it there. So if we move by
mistake or something, if we move this or
this slider of the, of the sequence, or it will go back to the position
that you saved there. So I decrease this to the just one frame here because I want to
just render an image. And for the aperture
here, the focus, I'm going to set this
up 22 because we don't want to have any depth of field. Because it's a very large
scene and it's weird to put depth of field on a very
large objects in space. So I'm going to click on the
Draw Debug flame for focus. So I'm selecting the
cinematic camera. This is why I'm
seeing the setting. And this will allow
you to control the focus plane and where
you want it to focus. So here when we started the 22, It will not bother a lot. But if you decrease
the systems a lot, you can see that the earth
is out-of-focus here. So you better get the jump plane to intersect with
the earth there. So that will be fine and
take off the jaw Debug Play. And you put this at this
arbitrary value to 22, or you can set it here
to 22. That's it. So we're rendering
one frame here. And if you're wondering if
you imported the camera, but you don't have
that camera there. You can do plus here for the
camera and you can choose the camera that that is here. So we just have this camera
cut for one frame there. And yeah, so this is it, we're going to start rendering. So after activating
the movie Render Queue that we activity, we enable that at the
beginning of the tutorial, you can go here and you can
add your sequence here. I can close and save this. So you can add it there and it shows the map that
you will have saved. And then for the Configure, we're going to create
a preset quickly. So we go here, so I'm going to get rid of
the other stuff for now. I'm going to do with
just the output. You can choose your
resolution here. You can multiply it by two
here and multiply it by two. So you can get high settings,
high resolution there. First thing you must
do is anti aliasing, and you can decrease this to
whatever sampling you want. The preferable sampling for the surrender 16
by 16 and you can, you will get this
warning here and you must do override
the anti aliasing. And also a few other settings that you must
do if you want to export this to PNG or JPEG, it's totally up to you. And we also going to
add the past Tracer, of course, because we're
path tracing here. And the last thing, It's totally up to you to
choose the console variables, because in this case, the scene is actually
so small and it doesn't require such commands. You can go to the Unreal
Engine documentation, engine path tracing,
movie, render queue. This is the settings. These are the settings
that you can get from the underworld
documentation. And there must be
somewhere around here. So here, these are the
kinds of variables that you can actually use to improve
your render settings. So it's totally up to you if
you are going to use this. If you are looking for the best settings
here for the past three. So you can scroll through this documentation in
order to improve it. But they give a lot of recommendations here for
the console variables here. And these are actually
for animation, for the low quality
and stuff like that, but for the stuff like GI and the GI bouncing
and stuff like this, I think it will be
interesting to add, but I think I'm
really satisfied with the final render
that I actually got. And so after putting
all the settings, you can save your config and you can save
it actually there. But I loaded my other
config that I used previously and it's
so simple and I put racing and saying, and with the output of four K resolution and I
saved it here and yeah, so after saving it to you, but except and you can press here render
or local any Wait, hold on a little bit and it
will render out your image. And then I think I'm
just going to do a quick edit on the Photoshop, but I've already done. I'm going to show
you what I did here. That's pretty simple stuff. I actually saved as a PDF. That's where it, but here I've actually
made a mistake worthy. We can edit this together
actually would be nice. So first thing you can add Color Lookup here
and what I've done here, and I'd like to play with the color lookups sometimes here and try to mix
things together. So first thing
around 0, remember, I've added this so you can control the opacity
here for this. You can get a little
bit of bluish tint. And I wanted to get
actually some levels down. I'm not gonna do it with
a curve because there is actually a color
lookup preset that I really like in this case. Let's try to find it. Yes, it was this
one as I remember and I have decreased this a bit. Yeah. I think it almost looks
like our final render, but this horrible, it actually gives it a pretty
interesting look. And also we can go here and adjust the
brightness and contrast. It's totally up to
you if you want to increase the brightness here, the contrast a bit to get the look that you
are looking for. So yeah, I think that's
it for the tutorial. If you have any recommendations, you can comment on the section of the course
and let me know if you while our like looking
for anything else. Beside of this, maybe
if you want me to extend this version doing
animation or anything else, it would be actually nice to do it based on your Chrome
recommendation, guys. And I hope I'll see
you in the next one.