Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Hello, in this video we're going to create a cell shading effect in Unreal
Engine 5.
So games like Zelda Breath of the Wild use this, and this can help make your
game look nice.
Before we get started, shout out to Cadeco. They made a tutorial on Unreal
Engine 4 on how to create a cell shader effect.
I'm going to be updating it to Unreal Engine 5 in this video.
I'll leave a link to their website tutorial somewhere in the description of
video.
Okay, so to get started, what we're actually going to do is create this post
-process effect volume, and then we're going to apply it to areas in our game
which we want to have the cell shading effect.
So, to create this, we just want to find some free space in your project, right
-click, and go Create Material.
And I'm just going to call this the PP underscore Cell Shader. So that stands
for the Post -Process Cell Shader.
We can double -click and open it up.
And the first thing we want to do is just select it.
and go over to the details here, into material, and change this to be a post
-process. So now we're ready to create our post -process cel -shader effect.
So the first thing we're going to do is create a lighting buffer.
This will basically store information about how we want to light our scene. To
do this, we can just right click and look for the scene texture, and we want
this one, the scene texture.
Select it, and just change this to be post -process, and we want this one,
-process input zero.
We want to copy this.
and paste it again and then this time we just want to change this to be diffuse
color then off of the color we're not actually going to be using the color of
any of these we just want to drag up here and look for desaturation then drag
here and look for desaturation and then we just want to divide this
and we'll divide them by each other
and then look for clamp
And this will basically calculate how we want to light our level. So this is
just going to make everything look grey.
So for our cell shader, what we're going to do is we're going to make it so any
pixel on our screen which has a value greater than 0 .5 is going to use the
normal colours.
And any pixel on our screen which has a value of less than 0 .5 is going to use
a colour with half the brightness.
So to achieve that effect, let's just move all these nodes backwards.
Then right click and look for the if node.
We want to connect from here into here.
And for B, we want this to have a constant of 0 .5 because that's the
we're going to be comparing it with. So if I just look for 1 on my keyboard and
left click, this will create a constant.
And make this 0 .5 because that's the value we're going to be comparing this
against.
So if a pixel has a value greater than 0 .5, what we're going to do is just copy
this.
and connect it into here.
And if it doesn't we can drag off here and click multiply and make sure that
this value is 0 .5 and then connect this into B here.
Then just connect this into emissive color here and go to apply, close this.
So next we want to basically apply this post process material onto our level.
to do that we can go over here where it says quickly add things to the project
and we just want to go to volume and look for a post process volume
then make sure selected go to details and then we're going to look for
so under rendering features
we just want to click this arrow and just go add element then we want to
choose and select asset reference then we can just drag our material onto here
and right now this is only going to affect things which are inside of the
to make it affect our whole level we just want to look for infinite and make
sure we just check this and this will affect everywhere in our level now you
notice things don't really look like they're cell shaded and that is because
under engine is applying other effects before our post -processed material in
order to make sure that this basically is applied before those effects we can
just open up this material and then we want to scroll down and we want to go to
post process material and change this to scene color after dos so this will
basically apply this after it's applied the depth of field channel so let's just
select it then go apply and you should see it is applying the post process
effect nicely nice Right now, our post -process effect is affecting everything
on our level. You may want to isolate it so it only affects certain things on
our level.
So, let's go over how to do that.
So, we can do that by using a custom depth.
This will tell Unreal Engine this is the only object we want to be affected by
our post -process volume.
So, if I just select my character here, I'm going to look for render custom
depth. And just check this.
Then we just need to make a few changes to our material that will only affect
things which have the Render Custom Depth path.
So I'm going to open it up.
And then we want to add the following nodes.
So in some free space, we just want to right -click and look for Scene,
For this first one, we want to change this to be Scene Depth.
Then just copy this again.
For the second one, We want to change this to be Custom Depth.
Then we just want to copy this one more time.
And for the third one, we want it to be the Post Process Input 0.
Then we just want to drag off here and look for Mask.
And we want this one, Component Mask.
Click this arrow, and we want to uncheck G. So we'll only be masking the red
color channel.
Copy this again.
Connect it into here.
Then we want to add an if. So if I just right click and look for if.
Connect from A into here.
From here into B.
And from color into here.
This will basically allow the only objects with the custom depth will
have the cell shader effect applied to them.
And then we just want to connect from this if.
into the a is greater than b node and then connect this into emissive color
go apply and if i just close this so now unreal engine will only apply the post
process material to things which have the render custom depth field enabled i
did find that no matter what i did it would always make the sky black although
did find a fix for this so in unreal engine 5 they made it so the sky is this
mesh if we just delete it
Then go over to settings and make sure show engine content is enabled.
Go over to our engine and then just look for the BP underscore sky. This should
be in your project.
This is what Unreal Engine 4 used to use so I'm not sure why they changed it.
I just drag this in and this will give us a sky.
And then just select it and for the directional light actor just change it
this. This is what Unreal Engine 4 used to use so I'm not sure why they changed
it.
Okay, so now we have our sky working as normal. If we want objects to have the
cel -shaded effect, we can just select it and then look for Render,
Custom Depth, and if I just check it,
this will have the cel -shaded effect on it.
Nice. So that is how to add a cel -shaded effect in Unreal Engine.
If you want the project files for this, they'll be available if you're
subscribed to my website. And if you're subscribed, you get access to a bunch of
courses like how to make a 2D platformer, an FPS game, and more.
That's all for this video. If you enjoyed, make sure to like and
I'll see you guys in the next one. Bye.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.