Running in Unreal 5.4 the blendable location part I have that as the "Scene Color Before DOF" since the option in this video doesn't exist. It gets rid of the dancing effect that was happening for me.
May not be a chance you'll see this but ive set the blendable location to 'Scene Color Before DOF' and im still getting the dancing issue. any chance you'd know whats up?
I love the whole "no point making it if you don't understand it"... I'm a vfx artist and it's such a shame we don't have anyone on youtube in the rt vfx side of things that has that mentality (thank i know of)!
I know we talked about this but I’m definitely intrigued on how you set up the armor. I love how far this game has come. When the game drops on steam I’ll be buying for sure. I appreciate how dedicated you are to this game is already looks great in it’s early stages...The final product will amazing I know !
This texture made me realize how dim my test map was lmao. 10/10 Love it! Seriously man, I'm new to this and so many tutorials don't explain the little steps. I am very appreciative of not only your tutorial content but the fact you add the little stuff too
It took this comment to make me realize why this just wouldn't work for me... my lights at their strongest points were producing the 'shadow' light threshold (using the values from the vid). Some tweaking later and things are looking lovely, lol. In case that helps any other dim light enthusiasts...
If anyone else was having problems with the Custom Depth Pass affecting colour (by removing its existence on anything not affected by the Custom Depth Pass), you need to mask the Post Process Input 0 with not only the R channel, but G and B as well. R G B all need to be masked for the scene to gain normal colour again.
Something about shader logic has always gone over my head. I just cannot seem to retain any useful information whether I follow tutorials or get direct lessons. I have no idea what the difference was, but watching this video I feel like I've actually learned a bit! Gonna have to look through more of your videos 👀
Yo, maybe I'm 3 years late, but this cel shader is THE cel shader. The only tutorial making the shader work with coloured lights, this is awesome. I'm pretty new with this and I'm getting some trouble with adding textures and using an inverted hull outline, the outline goes pure white when I want it to be pure black (It's just a black material with specular and roughness value as 0) and the textures go white too where I use black. I'm trying moving some parameters, but everything seems pretty logical as you explain on your video, I don't get a clue about what I'm missing. Again, congratulations on this video, after 3 years still the best one
If I'm not mistaken it should be this: Desaturated(PostProcessInput0)/Desaturated(DiffuseColor) = Shadows (Gradient from white to black) PostProcessInput0/Shadows = True Color (Diffuse Color + Color from lights without the shadows) True Color - DiffuseColor = Light Color (Only the color added from lights) You shouldn't need this stuff with the normalization
@@PrismaticaDev I think I figured it out (at least a functional demo)! It needs work and it's rough around the edges, but I'd be down to share in the discord if interested
@@PrismaticaDev Lol, do you guarantee that you'll "learn" me, mate? Just subbed today. I've been messing around with UE4 for about 2 months now and it's really hard to find a channel that doesn't try to teach you how to open some door with a trigger volume or crap like that. This is refreshing. Thanks.
That was really cool :) I had never used a cell shader before so decided to look it up. found your vid and love cell shading now. Keep up the good work :)
OI, you in the comments! Having trouble with this shader making everything noisy? Getting black shading around unlit materials, even? Here are some solutions for you! Disclaimer: I may not know how much more expensive these solutions really are. 1) Okay, so you're dealing with awful noise. To fix this, go ahead and make sure you've set the "Blendable Location" value inside your Cel Shader material to "Before Tonemapping". From documentation: "It fixes issues with temporal anti-aliasing (TAA) and GBuffer lookups." 2) Okay, so you're dealing with your unlit materials in the scene being shading completely black. To fix this, tell the shader to mask those out. How I did this is I replaced any "DiffuseColor" SceneTexture node with these collapsed nodes: Take the node SceneTexture:BaseColor (for lighting), desaturate that, and plug its color output it in for A in an IF statement node. plug "0" in for B, then the BaseColor Color output goes into A>B. Finally, PostProcessInput0 can be plugged into the == and < inputs for that if statement. The result is your scene's base colors after masking out unlit areas.
Fantastic video!!! Even with a very basic understanding of computer graphics I was able to follow along and adjust and troubleshoot as needed :) Exactly what you want out of a tutorial!!! fantastic!!
Hey again! Just wanted to ask about the ambient occlusion. You masked it (RGB) which is float3 and when I multiply it by the whole thing, it gives an error where it cant multiply. "Arithmetic between types float4 and float3 are undefined". Also the skybox isnt visible anymore
Hey Kurva! For the Ambient occlusion if you're getting that error then you might not need to mask the AO channel at all - I think because I was doing some other processing before that I ended up with a float3 output. As for the skybox, try this imgur.com/a/oKLcmAa It basically says "If anything is over 200,000 units away, display it without the cel-shader" I think the reason it goes a bit funky with the Cel Shader by default is because it uses very bright values which clip at 1 in the cel-shader. You could get around this by using a custom skybox material but the above solution will work for the default skybox :)
@@PrismaticaDev Thanks so much again! I will try to fix that. Also do you have a discord server or something I can join? Would love to try out the game when its gonna be ready for playtesting and stuff!
@@kurvaosobne3897 sure do! It's full of extremely helpful and nice people so if you ever have any UE4 problems don't be afraid to ask in the doscord :) discord.gg/4HGySTDcCm
if anyone is having problems with this working with paperflip book sprites just do the thing he says to do about metal in the description it fixed my sprites
It may be too late to ask this question since the video is 2 years old but... When you set it up to receive color from the point light, this also allow the material ambient occlusion to subtly bleed in as a gradient on the dark band. This prevents the dark area from being flat (at least for my set up) If I set AO to zero on the material I get a harsh black band. If I bypass the step to let lighting color in this isn't an issue. Is it possible to let the point light color have it's influence without getting this AO bleeding in? (I appreciate any response, I am super new to using UE).
Hey hey! If you mean the sort of "smooth colour gradient" that happens on top of the luminosity bands, it's not really possible with this method of post process. If you look up Divivor's cel shader stuff, is that more what you're looking for?
@@PrismaticaDev Hey Thanks for the response! It's basically the bounce light from the materials ambient occlusion making my dark band less flat. It also blends with the band color in a very subtle way. If I skip the steps that allow the point light color to work, I don't see it. Something about Desaturating the whole thing, and multiplying it with the PPI0 to get that point light color in is also letting in the bounce light from the ambient occlusion. It's not a super obvious thing but I'm after a very specific look. Unfortunately I can't find anything on Divivors, there's a lot of broken links out there. Thanks again for any help, even if what I want isn't possible it's good to know what the limits are.
@@PrismaticaDev Looks like Lumen is off, I think I'm using default lighting with AO. I removed the skylight, the only light source in my scene is a point light. If I delete that I can still see the environment though it's dim, it doesn't go completely black. Setting AO on the material to 0 is the only way I can make it go away.
@@sirgwindortvinuel So that means somewhere in there, one of the A inputs is a Vector of some sort when it should be a Scalar. Might have plugged something that was supposed to go into the > or < into the A instead
"today i'm gonna learn you how to make a CEL shader" Teach you is a little more accurate In all seriousness thank you very much for this tutorial I suck with Unreal Engine
Fantastic video. However I'm having some odd issues where enabling coloured lights causes everything else to no longer be cel shaded and be very dark in tone? The strangest thing is that this issue only crops up in one of my projects whereas the others work perfectly fine. Must be something up with an external factor I suppose.
@@Eu_Claire I think the issue was that the Normalize function in UE5 will force an output of a 4vector - try adding a ComponentMask RGB after the normalize and see if that helps
I cant seem to get the ambient occluion to plug in without an error like you showed in the bonus but otherwise i got everything else going, looks great!
Awesome! I am having some jittering in the light bands (I am using lumen so that may be contributing to it) usually changing to before tone mapping works but in this case there is still a fair amount of jittering. Any tips on why this may be would be a great help!
Jittering is usually caused by floating point inaccuracies. You can try rounding the value before running computations on it? Also did you remember to set the post process to before tone mapping?
Hi! The cel shading tut helped me alot. Thank you so much for that. But, the trick/workaround you mentioned for the colored lighting (11:03) is not working for me it looks exactly like the normal PostProcessInput0 but just brighter. Could you please lend me a hand on this one?
For those looking for a solution, I found a fix by comp masking the PostProcess0 before normalizing. I ended up giving up on the work around as I just didn't like the look and colored lights is not that beneficial for me.
@@rishabg5583 Yeah thanks! Masking the alpha channel out between PP0 input and normalize node somehow works. Do not forget to append the channel after multiplication.
Hey hey - you could do this with normal maps on the meshes themselves, or you could try adding in some noise in to the luminosity value in the post-process itself
@@PrismaticaDev No the material works nice. I don't think I'll use it in my project because the assets that I have already got stylized materials. But it was very instructive ;)
Hey man, thanks for the tutorial! I've got to create an environment in UE4 for one of my university projects and I'm super excited to experiment with this! Def subbing 👍
Awesome to hear that! I'd love to see your project when it's finished. If you have any questions about Shaders/Materials/Meshes our discord server is full of some big brains that are always happy to answer any questions big or small!
@@PrismaticaDev I really really did. Either way though, I have a small problem: my skybox becomes completely black when using the shader. Is it a problem of the skybox I'm using?
@@fr4lty309 Ah yes, the ol' black skybox issue haha. So, since we're using Diffuse colour in our operation and Unlit materials have a diffuse value of 0, there are 2 solutions. The easiest way is to add an IF node at the very end of your chain with these settings: A = Scenedepth B = Big number (200,000 will do) A > B = PostProcessInput0 A < B = the cel shader The second way is to change the material from unlit to Default lit, although this can bring a tonne of other issues with it haha
@@PrismaticaDev That solved it, you're the best. I just thought I'd let you know, seeing this tutorial really boosted my motivation, as I'm just starting to learn the engine, and seeing how "logical" even these particular things are really does help. I hope you create more tutorials like these in the future
@@fr4lty309 Perfect! Glad it worked :) I just explain things from my point of view, there must be lot of people that think the same way I do about things :)
This is a great tutorial! Hi! I'm a newbie, and I would like to ask a newbie question. Can we achieve the same result by using Substance Painter and just paint the whole thing anime style?
5.2 I followed the the tutorial until 5:30 from then I have weird artifacts, weird thin white outlines and jittering. it caused by putting on diffuse color node and not as smooth as yours. any idea how to fix this?
I love this tutorial! I have a couple of questions though. Is there a way to add sort of a toon outline effect? And what settings would you recommend using for a wind waker inspired scene? I hope you see this, and again, this is amazing!
Hello! You sure can add an outline effect, however you'd need to follow another tutorial haha. It can be added -on top- of this one. As for Windwaker, it uses only a few steps of luminosity. The outline method used in old games is called Reverse Hull outlines, where you duplicate the mesh and turn it inside-out
@@PrismaticaDev Once I applied the shader, some really black matte objects turned completely white. I don't dislike it, but it's completely beyond me why it happens. Would you happen to know why? :)
@@theSMAKgame yep yep - if an object has a value of 0 or close to 0, when we divide the PPI0 by the Diffuse Colour we get infinity as a result. There’s a fix in the description of the video which should fix the issue :)
Great videos, thanks a lot for sharing your experience. Regarding cel shading - when I decided how to proceed with it, found several mentions that post process approach has issues with distance rendering (even with infinite borders), layering other effects and rendering with translucent materials. So I took surface material based solution - have single cel shaded master material (example in marketplace "Cartoon Cel Shader"). And it's "cheaper" than post process. Did you check this approach?
@@impdgart Hey Anton! I do believe a material approach would be cheaper if only select objects are doing to have the effect (ie. most games haha) I personally haven't had any issues with distance rendering since I use a "fake" scene-depth based fog but I imagine using volumetric fog/atmosphere could yield funny results, although maybe with my colour-injection method it might look half-decent. I haven't tried yet. I'm sure that both methods have their pros and cons, and it depends on the project at hand :)
If you hold "1" and left click, you will get a constant scalar value. If you press 2, 3 or 4 you will get vectors. Holding S will give you a Scalar Parameter. Many many shortcuts that I forgot to mention haha
In case anyoe else is getting the same issue. Where my material had 0,0,0 values, I was getting strange white and color blobs (especially when the camera is closer to the material) if the "Brightest Value" was set to anything othe than 0, but setting it to 0 removed some color. It looks like it has to do with light reflecting off of black. I found replacing the "Brightest Value" parameter with a "SceneTexture:SpecularColor" allows you to keep the color but clears the additional random values.
really weird coming from unity URP to see a post process shader just access all the individual material data of stuff in the scene like that and pretty much recalculate all the shading
Love this tutorial, followed through using unreal's webinar cel shading process (Since I wanted visible comic lines) and was able to plug in the method you used in the end with it working perfectly. on an unrelated topic, what are some good rules of thumb for limiting resources for hardware and storage so that cartoony game can even run on a toaster? Would like to know so that when performance testing on other systems they just don't crap out immediately.
I've watched that same webinar - I love that they include 2 methods of finding the outlines! A good rule of thumb is to always check the Instruction count + use the Shadow Complexity viewmode. Also try to use as little texture samples as possible (very easy with a cartoony game) as sampling a texture is one of the most process-intensive instructions but will only come up as 1 instruction so going solely off instruction count can be a little misleading at times. The best thing you can do is to actually test and profile on your target machine as early as possible :)
Random note unrelated to shaders and textures: Polygons are where most people tend to think performance lies BUT.... Nowadays maintaining a low poly count is almost irrelevant as GPUs breeze over them, it's the "draw counts" that matter aka the number of 3D models the game is displaying on screen at a time. 1. you can view draw counts with console command "stat scene rendering" 2. foliage and other forms of Instanced Static Meshes group multiple similar meshes into 1 draw call 3. Multiple materials = multiple draw calls per mesh 4. dynamic shadows are made by another camera creating a depth texture which = another set of draw calls. Limiting shadow distance helps a lot 5. this is all a balancing act, not a "don't do certain things" kinda thing 6. Is an issue since CPUs have to send a draw call to GPUs. The GPU will just sit there idling with all its massive power while the CPU is processing a bunch of draw calls.
Hello, nice tutorial thanks for sharing your knowledge with us. I followed the the tutorial but i have weird artifacts and jittering on my leaves or foliage in general, i am using unreal 5.1 do you have a fix for that?
That seems to be an issue with Lumen global illumination. If you aren't using world partition, you can turn global illumination to None in the Project Settings and that will fix it. If you are using world partition, I'm not sure. Still looking for a solution myself.
@@GitGudOrDieTrying This is an issue with Lumen I think, I ended up removing the cell shading on my game, which fixes most of the jittering artifacts. You might try upgrading to Unreal Engine 5.3 if you haven't already. There are some improvements to Lumen that might help fix some of this. But otherwise, I'm not really aware of a true fix. I played with the cell shader settings a lot trying to account for this in different lighting situations, and I never really found settings that worked for everything. Good luck!
Great Tutorial but expect "7 Deepest Shadow" and "8 Black" resulting weird unwanted very Black Areas were slowly goes away if your camera goes to it atleast in Unreal Engine 5.0.3 happens this
That's due to the exposure. You can add a post processing volume and reduce the exposure levels, or turn it to manual to turn it completely off if you want to get rid of this. I also ended up turning up the black level from 0 to something really small, like 0.007 or something like that to make the shadows less intense. Hope that helps someone.
I was able to make this work a few months ago, but now it doesn't ruclips.net/video/RkFwe7JI8R8/видео.htmlsi=CgfhwIIhrpf_U_oO&t=654 I did upgrade to 5.4. Did something change?
Hi! Great tutorial, I really love this look and it worked great with what I'm working on. However it seems to break my VFX. The fx does not use unlit materials and for some reason just displays black when using the cel shader. Any idea what I can do to fix this? EDIT: Material issue: Emissive doesn't work with the cel shader. If I use base-color + emissive it works. Interesting, but idk if its ideal.
Set Blendable Locaton to "Before Translucency" so particle effects are not affected. Also if "PostProcess0 / Diffuse" is greater than some value (e.g. 10), you can just output PostProcess0 color to emissive. I do this for very bright material effects on opaque meshes so they are not affected by cell shader.
Hi Prismatica, always loved ur videos! I have a question... atm I'm making a post process where I need to extract the lighting from the scene (similar to ur cel-shading) however I found that this method of dividing PostProcess0 by DiffuseColor breaks once objects which are not rendered to depth are in the scene (for example volumetric fog). I was wondering have you found a workaround for this? It seems what would be needed is a version of PostProcess0 which does not include transperant objects. Any tips appreciated !
Hello! I've been using this in UE5 for a project I'm working on and it's been super helpful with achieving the style I want However I'm trying to set up the fix for the black/white skybox you detailed in the description and I was confused by if you meant setting the IF up just before it's plugged into the emissive? Or after the IF node for the black segment of the shader? When I try the former I get an error when plugging in the values and then plugging it into the emissive, saying "Arithmetic between types float4 and float3 are undefined" as well as saying "Cannot force a cast between non-numeric types". Is this due to plugging it in at the wrong spot? Or is there something I haven't accounted for yet? I wanted to make sure this was fixed before moving on to part two, as I want to make sure there are no issues. Thanks!
The Arithmetic error means that one of the inputs somewhere is a Float4 (RGBA) and the other is a Float3 (RGB). Try putting a "ComponentMask" node with RGB ticked in front of your Buffer inputs (the red nodes) or just before the IF node
Great tutorial, thanks! Did you test it in terms of performance? Lots of post-process materials could be costly. I'm wondering if the method you presented has some performance quirks one should be aware of?
From my initial tests I found 0 FPS difference - I may do some actual profiling to see the performance impacts in finer details but playing at 2K Ultrawide resolution I can't see any FPS difference on my machine. I think since the post process only does simple math and doesn't reference and textures/recursion (like a Bloom or Blur post process would) it should function great on even lower-end machines.
@@PrismaticaDev Would this post-process be practical for a medium-sized open world game? I'm prototyping a game that is heavily inspired by Wind Waker, including a relatively large open world.
I need help ,the scene texture node with diffuse color selected not working on mobile platform .Is there any work around for this shader used in mobile.
Hey Ram - unfortunately using Forward Shading (required for Mobile) we're unable to access the Gbuffer in the PostProcess, meaning we can't manipulate the separate Scene texture passes. If you're looking for a Cel-Shading solution for Forward Rendering, search "Material Cel-Shader" or "Material based Cel Shader" or "Cel Shader for Mobile" or "Forward Rendering Cel Shader"
Hello thanks for the video ! I'm quiet new with unreal engine 4, and in my scene i can't have the same good locking scene as you. I have some strange shadows demarcation, i would like to smooth the transition (especialy for the dark color / shadow effect) i read something about LUT, but i can't manage to add this to the post process. Any tips ? (I use 4.25 and a lot of my character are "ghosts" so i'm using a lot of translucent mat)
Hey there! I find in order to smooth out the transition between cel-shader bands it's good to use detailed normal maps since the light will "catch" around the bends of the objects. If you'd like to share some screenshots of your issues specifically in Discord you can find me there and I'll try give some more in-depth advice :)
When I add the cell shade material to the post process volume. My sky becomes super over exposed. I’m not entirely sure why this is happening seeing as it doesn’t seem to change your sky at all
Hi! Thanks for making the tutorial! I tried to follow you every step in the video, but however, at the Ambient Occlusion part at the end, my multiply node got an error when it connected to if node from the previous step, saying that "[SM5] (Node Multiply) Arithmetic between types float4 and float3 are undefined"
Hello! You’ll need to use a ComponentMask node to make sure both inputs have the same number of floats (ie. both are just RGB instead of one being RGBA)
Thank you so much! This helps me so much! I can't wait to learn the nodes and what it does. Do you perhaps have any advice when it comes to learning the nodes? This is the part I am most confused of.
Hi! I tried this tutorial and it works great. However, I'm trying to build a level that takes place on a moon like planet with little atmosphere. Problem is that the cel shader brightens the light that comes through so much that I can barely see the space skybox I made, it looks like I'm back on earth. Any settings I can change in the shader to fix this?
This generally works very well in my game, thank you for the tutorial! I just have an issue where as you walk around the object the material sort of shakily updates its shading borders, which looks odd. I'm on UE5, not sure if that could cause the difference. Do you know what could be doing this?
Hey mate - You should be able to see results in any of the default projects, although it won't look very pretty :P There are a tonne of free assets on the Marketplace that you could try it with. I'd advise looking for something "stylized" to begin with that has little to no colour texture. The simpler the colours the cleaner the effect will look!
Running in Unreal 5.4 the blendable location part I have that as the "Scene Color Before DOF" since the option in this video doesn't exist. It gets rid of the dancing effect that was happening for me.
Yeah, not sure why it changed in 5.4. Seems like something to do with the RHI upgrades? Who knows haha. Good fix either way!
I wish I knew where you were talking about. I am getting this dancing dither effect... I thiink that is what you're talking about.
disregard, I literally found it right after I submitted that comment.
@@HeIsGreaterThanUs Ok good news
May not be a chance you'll see this but ive set the blendable location to 'Scene Color Before DOF' and im still getting the dancing issue.
any chance you'd know whats up?
3 years later and still no other cel-shader competes! To top it off you're the only one that has made a metallic version!
I love the whole "no point making it if you don't understand it"... I'm a vfx artist and it's such a shame we don't have anyone on youtube in the rt vfx side of things that has that mentality (thank i know of)!
1:13 - What is a cell shader
1:46 - Setup
5:03 - Nodes
9:18 - Values sheet
10:11 - Workaround for colored lights
12:20 - Adjusting to scene
13:24 - Bonus tips
Not gonna lie, this is pretty epic.
Thanks legend, love you work!
Indeed, this is a epic game
I know we talked about this but I’m definitely intrigued on how you set up the armor. I love how far this game has come. When the game drops on steam I’ll be buying for sure. I appreciate how dedicated you are to this game is already looks great in it’s early stages...The final product will amazing I know !
This texture made me realize how dim my test map was lmao. 10/10 Love it!
Seriously man, I'm new to this and so many tutorials don't explain the little steps. I am very appreciative of not only your tutorial content but the fact you add the little stuff too
It took this comment to make me realize why this just wouldn't work for me... my lights at their strongest points were producing the 'shadow' light threshold (using the values from the vid). Some tweaking later and things are looking lovely, lol. In case that helps any other dim light enthusiasts...
If anyone else was having problems with the Custom Depth Pass affecting colour (by removing its existence on anything not affected by the Custom Depth Pass), you need to mask the Post Process Input 0 with not only the R channel, but G and B as well. R G B all need to be masked for the scene to gain normal colour again.
You're literally the best channel explaining how to use shading, And this is most certainly the best post-process cel-shader nowadays.
Something about shader logic has always gone over my head. I just cannot seem to retain any useful information whether I follow tutorials or get direct lessons.
I have no idea what the difference was, but watching this video I feel like I've actually learned a bit! Gonna have to look through more of your videos 👀
You are amazing! I've watched every cel shading tutorial and all of them have problem with colored lights, finally thanks to you found a solution!!!
Thank you so much for this man! This is the best tutorial on a cel shader post-processing on RUclips!!
Always welcome my man
Love these tutorials. Quick and concise, needs more ranting but still amazing.
More ranting? I could do that... ;) Hahaha thanks for the kind words!
Beautiful tutorial, great humour, same CPU.
I'll be watching your career with great interest
Thanks very much! Hope you learned a bunch :)
Oh man... That joke just took a byte out of my soul.
Jokes aside brilliant tutorial and really helped me out for my gamejam!!
Yo, maybe I'm 3 years late, but this cel shader is THE cel shader. The only tutorial making the shader work with coloured lights, this is awesome. I'm pretty new with this and I'm getting some trouble with adding textures and using an inverted hull outline, the outline goes pure white when I want it to be pure black (It's just a black material with specular and roughness value as 0) and the textures go white too where I use black. I'm trying moving some parameters, but everything seems pretty logical as you explain on your video, I don't get a clue about what I'm missing. Again, congratulations on this video, after 3 years still the best one
Hey hey! There are a couple of fixes in the description that should help with the Divide by 0 errors (hot whites)
thank you SO MUCH for this amazing tutorial, I learned a lot !
Thanks so much Soph! If you ever need any help feel free to ask in the Discord :)
@@PrismaticaDev Hello is there a way to make it work for translucent water material
this may be the best tutorial about cell shading i ever seen, thanks man for the effort
My man...once again beautiful work
i have spent so long trying to find a video for this kind of cell shadier and holly shit i found it
If I'm not mistaken it should be this:
Desaturated(PostProcessInput0)/Desaturated(DiffuseColor) = Shadows (Gradient from white to black)
PostProcessInput0/Shadows = True Color (Diffuse Color + Color from lights without the shadows)
True Color - DiffuseColor = Light Color (Only the color added from lights)
You shouldn't need this stuff with the normalization
This is fantastic info thank you, not sure why but just running the base render through the normalization wasn't working for me so this info saved me!
I would KILL for a tutorial like this that covered Bayer / Blue Noise Dithering to really achieve that "3D Pixel art" aesthetic fully
Amazing suggestion - I'll look in to it for sure!
@@PrismaticaDev I'm tinkering with it as well; if I don't see anything about it here I'll drop it!
@@PrismaticaDev I think I figured it out (at least a functional demo)! It needs work and it's rough around the edges, but I'd be down to share in the discord if interested
@@jak3legacy Yes please! Chuck it in the On-Topic chat if you want to show off/get feedback on it from everyone :)
i just starting making games and your videos really helps me a lot, thanks!
Happy to hear it! :)
Du du dude da, dududududeee
Indeed!
@@PrismaticaDev Lol, do you guarantee that you'll "learn" me, mate? Just subbed today. I've been messing around with UE4 for about 2 months now and it's really hard to find a channel that doesn't try to teach you how to open some door with a trigger volume or crap like that. This is refreshing. Thanks.
As always, great work!
This guy here saves my development with EVERY single video. Go donate!
That was really cool :) I had never used a cell shader before so decided to look it up. found your vid and love cell shading now. Keep up the good work :)
Really glad to hear it mate! Let me know if you ever need a hand :)
@@PrismaticaDev will do man :D keep up the awesome work
OI, you in the comments! Having trouble with this shader making everything noisy? Getting black shading around unlit materials, even? Here are some solutions for you! Disclaimer: I may not know how much more expensive these solutions really are.
1) Okay, so you're dealing with awful noise. To fix this, go ahead and make sure you've set the "Blendable Location" value inside your Cel Shader material to "Before Tonemapping". From documentation: "It fixes issues with temporal anti-aliasing (TAA) and GBuffer lookups."
2) Okay, so you're dealing with your unlit materials in the scene being shading completely black. To fix this, tell the shader to mask those out. How I did this is I replaced any "DiffuseColor" SceneTexture node with these collapsed nodes:
Take the node SceneTexture:BaseColor (for lighting), desaturate that, and plug its color output it in for A in an IF statement node. plug "0" in for B, then the BaseColor Color output goes into A>B. Finally, PostProcessInput0 can be plugged into the == and < inputs for that if statement. The result is your scene's base colors after masking out unlit areas.
Thanks so much for 1) I was wondering why everything was jittering and looking horriffic.
Fantastic video!!! Even with a very basic understanding of computer graphics I was able to follow along and adjust and troubleshoot as needed :) Exactly what you want out of a tutorial!!! fantastic!!
Great Tutorial!Not only Im learning UE but having a crush on you on the process hahaha!
This is beautiful work and is going in my game
Hey again! Just wanted to ask about the ambient occlusion. You masked it (RGB) which is float3 and when I multiply it by the whole thing, it gives an error where it cant multiply. "Arithmetic between types float4 and float3 are undefined". Also the skybox isnt visible anymore
Hey Kurva! For the Ambient occlusion if you're getting that error then you might not need to mask the AO channel at all - I think because I was doing some other processing before that I ended up with a float3 output.
As for the skybox, try this imgur.com/a/oKLcmAa
It basically says "If anything is over 200,000 units away, display it without the cel-shader"
I think the reason it goes a bit funky with the Cel Shader by default is because it uses very bright values which clip at 1 in the cel-shader. You could get around this by using a custom skybox material but the above solution will work for the default skybox :)
@@PrismaticaDev Thanks so much again! I will try to fix that. Also do you have a discord server or something I can join? Would love to try out the game when its gonna be ready for playtesting and stuff!
@@kurvaosobne3897 sure do! It's full of extremely helpful and nice people so if you ever have any UE4 problems don't be afraid to ask in the doscord :) discord.gg/4HGySTDcCm
if anyone is having problems with this working with paperflip book sprites just do the thing he says to do about metal in the description it fixed my sprites
Good point! I've noticed that it doesn't seem to like anything that is "unlit" either but don't have a fix for it currently.
YOU'RE BREATHTAKING!
no u
It may be too late to ask this question since the video is 2 years old but... When you set it up to receive color from the point light, this also allow the material ambient occlusion to subtly bleed in as a gradient on the dark band. This prevents the dark area from being flat (at least for my set up) If I set AO to zero on the material I get a harsh black band. If I bypass the step to let lighting color in this isn't an issue. Is it possible to let the point light color have it's influence without getting this AO bleeding in? (I appreciate any response, I am super new to using UE).
Hey hey! If you mean the sort of "smooth colour gradient" that happens on top of the luminosity bands, it's not really possible with this method of post process. If you look up Divivor's cel shader stuff, is that more what you're looking for?
@@PrismaticaDev Hey Thanks for the response! It's basically the bounce light from the materials ambient occlusion making my dark band less flat. It also blends with the band color in a very subtle way. If I skip the steps that allow the point light color to work, I don't see it. Something about Desaturating the whole thing, and multiplying it with the PPI0 to get that point light color in is also letting in the bounce light from the ambient occlusion. It's not a super obvious thing but I'm after a very specific look. Unfortunately I can't find anything on Divivors, there's a lot of broken links out there. Thanks again for any help, even if what I want isn't possible it's good to know what the limits are.
@@Ohbowz Hmmmmm. Are you using Lumen? Or just default lighting with AO? Also, are you using both screen space AO and Distance Field AO?
@@PrismaticaDev Looks like Lumen is off, I think I'm using default lighting with AO. I removed the skylight, the only light source in my scene is a point light. If I delete that I can still see the environment though it's dim, it doesn't go completely black. Setting AO on the material to 0 is the only way I can make it go away.
9:35 i get an error when i plug it to emessive color the error is:
[SMS] (Node If) Missing ALessThanB Input.
Hey Alim! Make sure that something is plugged into every A < B plug in the chain :)
@@PrismaticaDev ohhhh thanks but..😅 i deleted the whole thing… oops!
@@PrismaticaDev now it is a different error it says: If input A must be of type float.
@@sirgwindortvinuel So that means somewhere in there, one of the A inputs is a Vector of some sort when it should be a Scalar. Might have plugged something that was supposed to go into the > or < into the A instead
@@PrismaticaDev OH MY GOSH ! IT WORKED THANK YOU!
Really great tutorial, it definitely helped!
Very happy to hear that :) If you ever have any issues, there are a few fixes in the Description and you can always get help in our Discord server :)
Great stuff mate! Cheers from chilly old England!
INVALUABLE EXPLANATION! thank you so much
omg you're so funny dude. I cracked up a bunch during this vid, nice work. I love laughing and learning!
"today i'm gonna learn you how to make a CEL shader"
Teach you is a little more accurate
In all seriousness thank you very much for this tutorial I suck with Unreal Engine
I’ll learn ya a thing or two!!
Glad you’re finding it useful :)
@@PrismaticaDev You reply fast lol but once again thank you so much for all of the tutorials
jesus that background music gonna give me a seizure
Just saw the update for black objects in the description, thank you so much it solved a lot of the issues I had
Glad it helped! Was really bugging me for a while as well so I decided it was time to fix it haha
For some reason my shadows turned white, how could i fix this?
Hey hey - you might have your PPI0 and Diffuse colour going into the Divide the wrong way :)
Thanks a lot man
Just tried the very first part in UE5 and its going craaaaazyyy
Great tutorial! I actually feel like I know how the whole thing works now.
Why don't I see the option for before tonemapping at 4:50
Fantastic video. However I'm having some odd issues where enabling coloured lights causes everything else to no longer be cel shaded and be very dark in tone? The strangest thing is that this issue only crops up in one of my projects whereas the others work perfectly fine. Must be something up with an external factor I suppose.
Heya Edward! Could you double check if the PostProcess material is set to Before or After Tonemapping?
@@PrismaticaDev same problem for me too, i'm using ue5.
@@Eu_Claire I think the issue was that the Normalize function in UE5 will force an output of a 4vector - try adding a ComponentMask RGB after the normalize and see if that helps
@@PrismaticaDev It works if i add the componentmask RGB before normalize ( not after ) . Thx for the help !
@@remyl8685 Thank you for this. I was encountering the same issue on UE5 and this and PrismaticaDev's comments resolved it!
I cant seem to get the ambient occluion to plug in without an error like you showed in the bonus but otherwise i got everything else going, looks great!
same
Awesome! I am having some jittering in the light bands (I am using lumen so that may be contributing to it) usually changing to before tone mapping works but in this case there is still a fair amount of jittering. Any tips on why this may be would be a great help!
Jittering is usually caused by floating point inaccuracies. You can try rounding the value before running computations on it?
Also did you remember to set the post process to before tone mapping?
Did you found a solution to that? 🙂Having the same problem on my landscape, removing the fog didn't helped 😅
Hi! The cel shading tut helped me alot. Thank you so much for that. But, the trick/workaround you mentioned for the colored lighting (11:03) is not working for me it looks exactly like the normal PostProcessInput0 but just brighter. Could you please lend me a hand on this one?
Same issue here.
For those looking for a solution, I found a fix by comp masking the PostProcess0 before normalizing. I ended up giving up on the work around as I just didn't like the look and colored lights is not that beneficial for me.
@@rishabg5583 Yeah thanks! Masking the alpha channel out between PP0 input and normalize node somehow works. Do not forget to append the channel after multiplication.
Thank you man. Helped a lot. The Diddy Kong Racing playlist was awesome too
thanks so much man! helped a lot from my simple shader to being able to customize :D
hi! i was wondering if was possible to add a "noisy" edge between each shading value
Hey hey - you could do this with normal maps on the meshes themselves, or you could try adding in some noise in to the luminosity value in the post-process itself
@PrismaticaDev thank you! I will try it out
Nice one.
Thanks for sharing ;)
No worries at all! Let me know if you run in to any issues :)
@@PrismaticaDev No the material works nice.
I don't think I'll use it in my project because the assets that I have already got stylized materials.
But it was very instructive ;)
Hey man, thanks for the tutorial! I've got to create an environment in UE4 for one of my university projects and I'm super excited to experiment with this! Def subbing 👍
Awesome to hear that! I'd love to see your project when it's finished. If you have any questions about Shaders/Materials/Meshes our discord server is full of some big brains that are always happy to answer any questions big or small!
This tutorial is fantastic, thank you so much.
No worries at all! Glad you found it useful :)
@@PrismaticaDev I really really did. Either way though, I have a small problem: my skybox becomes completely black when using the shader. Is it a problem of the skybox I'm using?
@@fr4lty309 Ah yes, the ol' black skybox issue haha.
So, since we're using Diffuse colour in our operation and Unlit materials have a diffuse value of 0, there are 2 solutions.
The easiest way is to add an IF node at the very end of your chain with these settings:
A = Scenedepth
B = Big number (200,000 will do)
A > B = PostProcessInput0
A < B = the cel shader
The second way is to change the material from unlit to Default lit, although this can bring a tonne of other issues with it haha
@@PrismaticaDev That solved it, you're the best. I just thought I'd let you know, seeing this tutorial really boosted my motivation, as I'm just starting to learn the engine, and seeing how "logical" even these particular things are really does help. I hope you create more tutorials like these in the future
@@fr4lty309 Perfect! Glad it worked :) I just explain things from my point of view, there must be lot of people that think the same way I do about things :)
How do I make things that are too far away look normal?
I have a serious flickering issue, I have before tone mapping enabled, I've googled it and nothing I've found is any help
Hey Devolius, chuck me a message on Discord with some screenshots and I'll try give you a hand :)
i have the same problem
Is that diddy kong racing music? 🤣 anyway nice work man! 👏
Sure is hahaha. RareWare games have the BEST soundtracks.
@@PrismaticaDev Maybe so but for tutorial it's a bit wild(( so hard to watch(
Thanks a lot for the tutorial :)
This is awesome!
Glad you think so :) Hope you're enjoying your results!
Dude, you are power!🦾
This is a great tutorial!
Hi! I'm a newbie, and I would like to ask a newbie question.
Can we achieve the same result by using Substance Painter and just paint the whole thing anime style?
Heya Ken - the trouble with using baked textures is that they won’t be able to take the direction of the light in to account :)
5.2 I followed the the tutorial until 5:30 from then I have weird artifacts, weird thin white outlines and jittering. it caused by putting on diffuse color node and not as smooth as yours. any idea how to fix this?
it still the same when I switching to the base color node
nvm, i switched the blend something to "after translucency" and i think it works. but my particle for some reason is gone..
Amazing, huges from brazil
Hope it helped you! :)
@@PrismaticaDev safe my life
I love this tutorial! I have a couple of questions though. Is there a way to add sort of a toon outline effect? And what settings would you recommend using for a wind waker inspired scene? I hope you see this, and again, this is amazing!
Hello! You sure can add an outline effect, however you'd need to follow another tutorial haha. It can be added -on top- of this one. As for Windwaker, it uses only a few steps of luminosity. The outline method used in old games is called Reverse Hull outlines, where you duplicate the mesh and turn it inside-out
Thank you! I have always loved stylized art so this will help a ton. Loved your vid!
very nice explained !! Thanks for sharing
Thank you! Very informative video! It really helped me in making my game look less shit :D.
Haha why can't game engines just have a "make game look good" button already???
@@PrismaticaDev Exactly!
@@PrismaticaDev Once I applied the shader, some really black matte objects turned completely white. I don't dislike it, but it's completely beyond me why it happens. Would you happen to know why? :)
@@theSMAKgame yep yep - if an object has a value of 0 or close to 0, when we divide the PPI0 by the Diffuse Colour we get infinity as a result. There’s a fix in the description of the video which should fix the issue :)
@@PrismaticaDev So that's what happens :o. Thank you very much!
Great videos, thanks a lot for sharing your experience.
Regarding cel shading - when I decided how to proceed with it, found several mentions that post process approach has issues with distance rendering (even with infinite borders), layering other effects and rendering with translucent materials. So I took surface material based solution - have single cel shaded master material (example in marketplace "Cartoon Cel Shader"). And it's "cheaper" than post process.
Did you check this approach?
Still in doubts, that I chose right way, post process looks simpler and more powerful.
@@impdgart Hey Anton! I do believe a material approach would be cheaper if only select objects are doing to have the effect (ie. most games haha)
I personally haven't had any issues with distance rendering since I use a "fake" scene-depth based fog but I imagine using volumetric fog/atmosphere could yield funny results, although maybe with my colour-injection method it might look half-decent. I haven't tried yet. I'm sure that both methods have their pros and cons, and it depends on the project at hand :)
everyone complaining about the music i honestly didnt even notice it until i actually paid attention to it
06:28 what happened here? Where did that node spawn from?
If you hold "1" and left click, you will get a constant scalar value. If you press 2, 3 or 4 you will get vectors. Holding S will give you a Scalar Parameter. Many many shortcuts that I forgot to mention haha
great tutorial! does it work with day/night cycle using directional light?
Sure does :) That's one of the reasons I made it
In case anyoe else is getting the same issue. Where my material had 0,0,0 values, I was getting strange white and color blobs (especially when the camera is closer to the material) if the "Brightest Value" was set to anything othe than 0, but setting it to 0 removed some color. It looks like it has to do with light reflecting off of black. I found replacing the "Brightest Value" parameter with a "SceneTexture:SpecularColor" allows you to keep the color but clears the additional random values.
Do you think i can do this in ue4.27?
Hey hey - this was originally designed in 4.26 so there shouldn't be any issues :)
@@PrismaticaDev awesome thank you for the reply!!
When I check the custom box for the assets, they just go black, except for one metal wall I have.
15:43 I don't understand what is multiplying ambient occlusion, what is A ?
A is the end product of what you have already done up to that point. Whatever was going into emissive color should now go into A
really weird coming from unity URP to see a post process shader just access all the individual material data of stuff in the scene like that and pretty much recalculate all the shading
Love this tutorial, followed through using unreal's webinar cel shading process (Since I wanted visible comic lines) and was able to plug in the method you used in the end with it working perfectly. on an unrelated topic, what are some good rules of thumb for limiting resources for hardware and storage so that cartoony game can even run on a toaster? Would like to know so that when performance testing on other systems they just don't crap out immediately.
I've watched that same webinar - I love that they include 2 methods of finding the outlines!
A good rule of thumb is to always check the Instruction count + use the Shadow Complexity viewmode. Also try to use as little texture samples as possible (very easy with a cartoony game) as sampling a texture is one of the most process-intensive instructions but will only come up as 1 instruction so going solely off instruction count can be a little misleading at times. The best thing you can do is to actually test and profile on your target machine as early as possible :)
@@PrismaticaDev Thanks! Will check this out with the various projects I've started up for my college finals! \(*o*)/
Random note unrelated to shaders and textures: Polygons are where most people tend to think performance lies BUT.... Nowadays maintaining a low poly count is almost irrelevant as GPUs breeze over them, it's the "draw counts" that matter aka the number of 3D models the game is displaying on screen at a time.
1. you can view draw counts with console command "stat scene rendering"
2. foliage and other forms of Instanced Static Meshes group multiple similar meshes into 1 draw call
3. Multiple materials = multiple draw calls per mesh
4. dynamic shadows are made by another camera creating a depth texture which = another set of draw calls. Limiting shadow distance helps a lot
5. this is all a balancing act, not a "don't do certain things" kinda thing
6. Is an issue since CPUs have to send a draw call to GPUs. The GPU will just sit there idling with all its massive power while the CPU is processing a bunch of draw calls.
Hello, nice tutorial thanks for sharing your knowledge with us. I followed the the tutorial but i have weird artifacts and jittering on my leaves or foliage in general, i am using unreal 5.1 do you have a fix for that?
That seems to be an issue with Lumen global illumination. If you aren't using world partition, you can turn global illumination to None in the Project Settings and that will fix it. If you are using world partition, I'm not sure. Still looking for a solution myself.
@@storeboughtrocketgames2560 Did you found one? 🙂 Having the same jittering issue on my landscape
@@GitGudOrDieTrying This is an issue with Lumen I think, I ended up removing the cell shading on my game, which fixes most of the jittering artifacts. You might try upgrading to Unreal Engine 5.3 if you haven't already. There are some improvements to Lumen that might help fix some of this. But otherwise, I'm not really aware of a true fix. I played with the cell shader settings a lot trying to account for this in different lighting situations, and I never really found settings that worked for everything. Good luck!
@@GitGudOrDieTrying Try making your sky light static. I remember that was having an effect.
Great Tutorial but expect "7 Deepest Shadow" and "8 Black" resulting weird unwanted very Black Areas were slowly goes away if your camera goes to it atleast in Unreal Engine 5.0.3 happens this
That's due to the exposure. You can add a post processing volume and reduce the exposure levels, or turn it to manual to turn it completely off if you want to get rid of this. I also ended up turning up the black level from 0 to something really small, like 0.007 or something like that to make the shadows less intense. Hope that helps someone.
I was able to make this work a few months ago, but now it doesn't ruclips.net/video/RkFwe7JI8R8/видео.htmlsi=CgfhwIIhrpf_U_oO&t=654
I did upgrade to 5.4. Did something change?
Do a stylized water shader tutorial!
Hi! Great tutorial, I really love this look and it worked great with what I'm working on. However it seems to break my VFX. The fx does not use unlit materials and for some reason just displays black when using the cel shader. Any idea what I can do to fix this? EDIT: Material issue: Emissive doesn't work with the cel shader. If I use base-color + emissive it works. Interesting, but idk if its ideal.
Set Blendable Locaton to "Before Translucency" so particle effects are not affected. Also if "PostProcess0 / Diffuse" is greater than some value (e.g. 10), you can just output PostProcess0 color to emissive. I do this for very bright material effects on opaque meshes so they are not affected by cell shader.
Dude Thank you so much!
No worries at all :) Hope it serves you well! Don't forget to check out part 2
Hi Prismatica, always loved ur videos! I have a question...
atm I'm making a post process where I need to extract the lighting from the scene (similar to ur cel-shading) however I found that this method of dividing PostProcess0 by DiffuseColor breaks once objects which are not rendered to depth are in the scene (for example volumetric fog). I was wondering have you found a workaround for this? It seems what would be needed is a version of PostProcess0 which does not include transperant objects. Any tips appreciated !
Hello! I've been using this in UE5 for a project I'm working on and it's been super helpful with achieving the style I want
However I'm trying to set up the fix for the black/white skybox you detailed in the description and I was confused by if you meant setting the IF up just before it's plugged into the emissive? Or after the IF node for the black segment of the shader? When I try the former I get an error when plugging in the values and then plugging it into the emissive, saying "Arithmetic between types float4 and float3 are undefined" as well as saying "Cannot force a cast between non-numeric types". Is this due to plugging it in at the wrong spot? Or is there something I haven't accounted for yet?
I wanted to make sure this was fixed before moving on to part two, as I want to make sure there are no issues. Thanks!
The Arithmetic error means that one of the inputs somewhere is a Float4 (RGBA) and the other is a Float3 (RGB). Try putting a "ComponentMask" node with RGB ticked in front of your Buffer inputs (the red nodes) or just before the IF node
@@PrismaticaDevplease do a video on this fix please I’m having the issues with the skybox as well
Great tutorial, thanks! Did you test it in terms of performance? Lots of post-process materials could be costly. I'm wondering if the method you presented has some performance quirks one should be aware of?
From my initial tests I found 0 FPS difference - I may do some actual profiling to see the performance impacts in finer details but playing at 2K Ultrawide resolution I can't see any FPS difference on my machine. I think since the post process only does simple math and doesn't reference and textures/recursion (like a Bloom or Blur post process would) it should function great on even lower-end machines.
@@PrismaticaDev Would this post-process be practical for a medium-sized open world game? I'm prototyping a game that is heavily inspired by Wind Waker, including a relatively large open world.
I need help ,the scene texture node with diffuse color selected not working on mobile platform .Is there any work around for this shader used in mobile.
Hey Ram - unfortunately using Forward Shading (required for Mobile) we're unable to access the Gbuffer in the PostProcess, meaning we can't manipulate the separate Scene texture passes. If you're looking for a Cel-Shading solution for Forward Rendering, search "Material Cel-Shader" or "Material based Cel Shader" or "Cel Shader for Mobile" or "Forward Rendering Cel Shader"
@@PrismaticaDev okay, thanks again, found the video I will give it a try on a mobile platform. And best of luck with your game.
Hello thanks for the video ! I'm quiet new with unreal engine 4, and in my scene i can't have the same good locking scene as you. I have some strange shadows demarcation, i would like to smooth the transition (especialy for the dark color / shadow effect) i read something about LUT, but i can't manage to add this to the post process. Any tips ? (I use 4.25 and a lot of my character are "ghosts" so i'm using a lot of translucent mat)
Hey there! I find in order to smooth out the transition between cel-shader bands it's good to use detailed normal maps since the light will "catch" around the bends of the objects. If you'd like to share some screenshots of your issues specifically in Discord you can find me there and I'll try give some more in-depth advice :)
When I add the cell shade material to the post process volume. My sky becomes super over exposed. I’m not entirely sure why this is happening seeing as it doesn’t seem to change your sky at all
Hey there :) There's a fix in the description just for you!
On UE 5.5, I'm having an issue where it isn't affecting my sky at all. I was hoping to get a cel-shaded effect on my volumetric clouds.
Hi! Thanks for making the tutorial! I tried to follow you every step in the video, but however, at the Ambient Occlusion part at the end, my multiply node got an error when it connected to if node from the previous step, saying that "[SM5] (Node Multiply) Arithmetic between types float4 and float3 are undefined"
Hello! You’ll need to use a ComponentMask node to make sure both inputs have the same number of floats (ie. both are just RGB instead of one being RGBA)
Thank you so much! This helps me so much! I can't wait to learn the nodes and what it does. Do you perhaps have any advice when it comes to learning the nodes? This is the part I am most confused of.
Sure thing :) I have an entire series dedicated to exactly that!
@@PrismaticaDev gotta check it out. Thank you so much! I love your work by the way, it looks so gorgeous! ❤️😊
Hi! I tried this tutorial and it works great. However, I'm trying to build a level that takes place on a moon like planet with little atmosphere. Problem is that the cel shader brightens the light that comes through so much that I can barely see the space skybox I made, it looks like I'm back on earth. Any settings I can change in the shader to fix this?
Thanks alot, for sharing!!, great!
Awesome ❤
This generally works very well in my game, thank you for the tutorial! I just have an issue where as you walk around the object the material sort of shakily updates its shading borders, which looks odd. I'm on UE5, not sure if that could cause the difference. Do you know what could be doing this?
Im having that issue too
no clue
In post process volume
Ambient Occlusion
advanced
Static Fraction = 0 (by default its 1)
This helped me at least.
Can I add an outline material too, what do you think? Thank's and great work! awesome 👍
Sure can :) I would recommend doing it in a separate PP material and applying after this one
Do you know of a template project that's good to test this effect on?
Hey mate - You should be able to see results in any of the default projects, although it won't look very pretty :P There are a tonne of free assets on the Marketplace that you could try it with. I'd advise looking for something "stylized" to begin with that has little to no colour texture. The simpler the colours the cleaner the effect will look!