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)!
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.
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...
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 👀
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
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 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
@@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
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
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!!
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 :)
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.
"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
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. 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
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
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?
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.
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.
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 !
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 :)
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
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.
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
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.
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?
this is the best cel shader tutorial I've seen thus far. however, my implementation (read: copy) suffers quite a bit from noise in certain spots (inbetween layers). is this something that can be removed by tweaking the shader itself, or should I be focusing on the lighting conditions for best results?
I think I know what you mean - like some sort of scratchy artifacts that mostly appear on flat surfaces? Unfortunately it's just a result of really subtle gradients in the lighting. You miiiight get around it if you add some noise texture to the Lighting Calculation (very start) of the cel shader to break it up a little
@@PrismaticaDev yeah essentially. thing is I don't even mind the artifacts, I think they look quite neat given the overall style. problem is if the surface moves (e.g. tree leaves) or you tilt the camera, it's VERY jittery and breaks the immersion. by lighting calculation, I assume you mean the division of PPI0/Diffuse ?
what I also just noticed is different between my result and yours is that in a scene like yours at 1:29 the different levels are separated by a sharp edge in your implementation, but for me it's rather fuzzy in general. I'm assuming this is related to it
@@xNaxdy maybe double check your Tonemapping settings in the material just to make sure that isn't the cause. Chuck me a message on Discord and we can figure it all out :)
@@PrismaticaDev no material issues... the culprit was actually temporal AA, LOL! now with it disabled, nothing's jittery anymore and I can properly control how sharp / smooth the edges inbetween levels are =)
@@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.
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"
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
I tried replicate this shader, it works perfectly but shading tend to move/flicker, like if it was lightened by a candle, do you know where this can come from ? When I bump up the Lumen quality the issues is less visible but still there Another thing is that when I turn on the shader my sky becomes completely black
Hey there! Lumen tends to be a bit flickery in general, so a hard cel shader will exaggerate it. As for the skybox, there are some fixes in the description for Unlit materials :)
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.
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?
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?
Don't know if you explain this in any video but, Is there any way to not celshade my skybox? because I burning my colors up there and I'm new at Unreal and I don't know hot to fix it :(
@@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
First off -- thanks for a great tutorial! Secondly -- I followed along step-by-step, but whenever I put in an asset that is simply black in color (0,0,0 for a tri constant), it appears a very bright white. Any ideas what the cause could be? Its tripping me up quite a bit.
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!
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 :)
Hello, thanks for the tutorial. There is one thing that isn't clear to me. If you look at the output of the first few nodes you made, meaning after the first division, you get the mask you're using for the cell shader. I noticed that the sky is black, so how comes that after all the if statements it get's colored in white? And second question, do you know what happens when you divide something with 0 in material editor?
Hey! Great question. It's to do with Unlit materials, since they have a diffuse value of 0. This ties in to your second question! When you divide something by 0, the result is infinity haha hence the blinding whiteness. There are a few fixes in the description to fix bright/dark spots and skyboxes :)
@@PrismaticaDev Hello, thank you for the quick answer :D I was guesing it would work the way you described it but what I got after the division with 0 was 0 and that was wird so I thought it was just how ue4 handles division by 0. However when I tried it again today it worked as expected. nyway thanks again for great and entertaining videos
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)
Hi there, thank you so much for this video!! This really is the best cel-shader tutorial on TH-cam, I've done a lot of searching. :) I am having a problem with color lighting tho; When I use SceneTexture:PostProcessInput0 -> Normalize -> Multiply, my scene isn't flat lit, there are what look like ambient shadows in the scene which ruin the flat cel-shaded look once I plug in the cel-shader. Is there perhaps something you're doing differently in your project settings? I believe the issue is reproducible when using the post process shader in a new project
Hmmmmmmm... Could possibly be something to do with your static lighting? If you're using a Cubemap in your Skylight, try setting it to one of the Grey engine cubemaps :)
@@PrismaticaDev Oh yes, I think that might be it! I wasn't using a cubemap before, and fiddling with those seems to have fixed it. Seems this method requires a cubemap. :)
@@PrismaticaDev hmm I see! Thank you again for the help!! If you built the shader from an empty project an put a flat color material on the unreal dude, you’d see what I’m seeing. Where exactly can I find the grey engine cubemaps? I only have one cubemap from the starter packages, and its what’s causing the issue:/ Using realtime calculated lighting or calculating with no cubemap fixes it, but then some weird shadows pop up
"FOR UE5 USERS: You will have to add a Component Mask RGB before the Normalize node - the new Normalize function hates the A channel. " Heads up that I just replicated this without the RGB component mask and it worked. Guess they fixed whatever the issue was.
did u edit this comment? read this like there was a problem then all the sudden there was no problem like why comment if it was fixed got me confused haha
@@runsbuns3675 I think in the latest UE5 update they fixed the issue with a lot of the math nodes outputting a forced 4vector by default but I'm not too sure. It's always good to post a comment if you had an issue and overcame it because other people might find it handy :)
I get this error at the beginning? [SM5] (Node SceneTexture) GBuffer scene textures not available with forward shading. really new at this so im just following along. My scene just has movable directional light, -1.0 Sun height, and static skylight.
Heya Bryll - Gbuffer manipulation is unavailable with Forward Shading (usually used for Mobile and VR) so you'll have to use Deferred shading which is toggleable in the Project Settings menu :)
@@PrismaticaDev Just to clarify, I'm unchecking Forward Shading correct? Alright, It worked wonders, Thank you very much! Love your work. looking forward for more tutorials in the future :))
maybe ive missed the part but does it come with: enable, disable specular highlight and change the radius of that highlight? would love to have some of my objects have a spec highlight that is very sharp
So this system just takes what is in front of the camera and applies the Cel Shader based on that - if you wanted to increase the highlight amount of a certain object/material you could increase the Specularity or lower the Roughness of the material. You could also add a rimlight in the material which would be picked up naturally by the cel shader PP.
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.
I was able to make this work a few months ago, but now it doesn't th-cam.com/video/RkFwe7JI8R8/w-d-xo.htmlsi=CgfhwIIhrpf_U_oO&t=654 I did upgrade to 5.4. Did something change?
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!
After adding the Cel-Shader to my game, my player character's shadows seem very dark. From behind, their back looks almost completely black. I tried adjusting the black tint, but it did nothing. What should I do?
First off, love the way you teach. It's fun, engaging, and you're very entertaining. Second, I followed along in UE5 and, to my knowledge, I have not missed any vital steps. However, the shadows change based on view, as I'm navigating the viewport the shading is sliding around various parts of the model. Any idea what that could be?
@@PrismaticaDev Disabling Lumen did offer some improvement, but overall the issue persisted. Particularly noticeable when zooming in and out, shadows will shrink and expand. For whatever insight this may offer, I'm working on the "Blank Project" template, which is just the floating platform with a table and chairs. P.S. Responding in under 24 hours to a question on a video roughly a year and a half old... You, sir, are a scholar and a gentleman.
@@PrismaticaDev Know how to fix this? Lumen is disabled, and like you said, everything jumps/shrinks and expands when the camera moves etc. ALSO the default shadows are still there, like the realistic ones are there as well.
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 is good, but the lighting gets dark suddenly when the camera changes angles or positions with the Normalize node. I fixed it by using the SafeNormalize node.
Mine doesn't work right, it is very bright. I'm using the ALSV4 demo in UE5. My graphics card is (NVIDIA GTX 1660 ti) if that changes anything, And the shadows are white.
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)!
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.
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...
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 👀
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
You're literally the best channel explaining how to use shading, And this is most certainly the best post-process cel-shader nowadays.
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!
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!!!
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)
Beautiful tutorial, great humour, same CPU.
I'll be watching your career with great interest
Thanks very much! Hope you learned a bunch :)
Love these tutorials. Quick and concise, needs more ranting but still amazing.
More ranting? I could do that... ;) Hahaha thanks for the kind words!
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
Oh man... That joke just took a byte out of my soul.
Jokes aside brilliant tutorial and really helped me out for my gamejam!!
This guy here saves my development with EVERY single video. Go donate!
Thank you so much for this man! This is the best tutorial on a cel shader post-processing on TH-cam!!
Always welcome my man
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 :)
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
jesus that background music gonna give me a seizure
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
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!
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
i just starting making games and your videos really helps me a lot, thanks!
Happy to hear it! :)
i have spent so long trying to find a video for this kind of cell shadier and holly shit i found it
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.
"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
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. 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!
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.
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
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
This is beautiful work and is going in my game
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 😅
Just tried the very first part in UE5 and its going craaaaazyyy
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 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
As always, great work!
Great tutorial! I actually feel like I know how the whole thing works now.
INVALUABLE EXPLANATION! thank you so much
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.
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 !
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 :)
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.
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!
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!
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.
When I check the custom box for the assets, they just go black, except for one metal wall I have.
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!
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.
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.
this is the best cel shader tutorial I've seen thus far.
however, my implementation (read: copy) suffers quite a bit from noise in certain spots (inbetween layers). is this something that can be removed by tweaking the shader itself, or should I be focusing on the lighting conditions for best results?
I think I know what you mean - like some sort of scratchy artifacts that mostly appear on flat surfaces? Unfortunately it's just a result of really subtle gradients in the lighting. You miiiight get around it if you add some noise texture to the Lighting Calculation (very start) of the cel shader to break it up a little
@@PrismaticaDev yeah essentially. thing is I don't even mind the artifacts, I think they look quite neat given the overall style. problem is if the surface moves (e.g. tree leaves) or you tilt the camera, it's VERY jittery and breaks the immersion.
by lighting calculation, I assume you mean the division of PPI0/Diffuse ?
what I also just noticed is different between my result and yours is that in a scene like yours at 1:29 the different levels are separated by a sharp edge in your implementation, but for me it's rather fuzzy in general. I'm assuming this is related to it
@@xNaxdy maybe double check your Tonemapping settings in the material just to make sure that isn't the cause. Chuck me a message on Discord and we can figure it all out :)
@@PrismaticaDev no material issues... the culprit was actually temporal AA, LOL! now with it disabled, nothing's jittery anymore and I can properly control how sharp / smooth the edges inbetween levels are =)
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.
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.
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
I tried replicate this shader, it works perfectly but shading tend to move/flicker, like if it was lightened by a candle, do you know where this can come from ? When I bump up the Lumen quality the issues is less visible but still there
Another thing is that when I turn on the shader my sky becomes completely black
Hey there! Lumen tends to be a bit flickery in general, so a hard cel shader will exaggerate it. As for the skybox, there are some fixes in the description for Unlit materials :)
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.
Do a stylized water shader tutorial!
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 :)
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?
Don't know if you explain this in any video but, Is there any way to not celshade my skybox? because I burning my colors up there and I'm new at Unreal and I don't know hot to fix it :(
Check the description of the video :)
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!
First off -- thanks for a great tutorial! Secondly -- I followed along step-by-step, but whenever I put in an asset that is simply black in color (0,0,0 for a tri constant), it appears a very bright white. Any ideas what the cause could be? Its tripping me up quite a bit.
Hey hey! It would be a divide by 0 result. Check the description for a few fixes :)
@@PrismaticaDev solution in the description worked like a charm! thank you!
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!
Quick question... how to add the redner customDepth pass to this blueprints? so I want only background to be cell shaded, but not my character.
thanks so much man! helped a lot from my simple shader to being able to customize :D
great tutorial! does it work with day/night cycle using directional light?
Sure does :) That's one of the reasons I made it
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 :)
Hello, thanks for the tutorial. There is one thing that isn't clear to me. If you look at the output of the first few nodes you made, meaning after the first division, you get the mask you're using for the cell shader. I noticed that the sky is black, so how comes that after all the if statements it get's colored in white? And second question, do you know what happens when you divide something with 0 in material editor?
Hey! Great question. It's to do with Unlit materials, since they have a diffuse value of 0. This ties in to your second question! When you divide something by 0, the result is infinity haha hence the blinding whiteness. There are a few fixes in the description to fix bright/dark spots and skyboxes :)
@@PrismaticaDev Hello, thank you for the quick answer :D I was guesing it would work the way you described it but what I got after the division with 0 was 0 and that was wird so I thought it was just how ue4 handles division by 0. However when I tried it again today it worked as expected.
nyway thanks again for great and entertaining videos
omg you're so funny dude. I cracked up a bunch during this vid, nice work. I love laughing and learning!
What made the skybox return? My scene looks amazing but the skybox is still blindingly bright :(
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 man. Helped a lot. The Diddy Kong Racing playlist was awesome too
Hi there, thank you so much for this video!! This really is the best cel-shader tutorial on TH-cam, I've done a lot of searching. :) I am having a problem with color lighting tho; When I use SceneTexture:PostProcessInput0 -> Normalize -> Multiply, my scene isn't flat lit, there are what look like ambient shadows in the scene which ruin the flat cel-shaded look once I plug in the cel-shader. Is there perhaps something you're doing differently in your project settings? I believe the issue is reproducible when using the post process shader in a new project
Hmmmmmmm... Could possibly be something to do with your static lighting? If you're using a Cubemap in your Skylight, try setting it to one of the Grey engine cubemaps :)
@@PrismaticaDev Oh yes, I think that might be it! I wasn't using a cubemap before, and fiddling with those seems to have fixed it. Seems this method requires a cubemap. :)
@@acefp7547 Haha he problem is that it DOESN'T require a cubemap or captured scene - hence the grey cubemap works the nicest haha :)
@@PrismaticaDev hmm I see! Thank you again for the help!!
If you built the shader from an empty project an put a flat color material on the unreal dude, you’d see what I’m seeing. Where exactly can I find the grey engine cubemaps? I only have one cubemap from the starter packages, and its what’s causing the issue:/ Using realtime calculated lighting or calculating with no cubemap fixes it, but then some weird shadows pop up
"FOR UE5 USERS: You will have to add a Component Mask RGB before the Normalize node - the new Normalize function hates the A channel.
"
Heads up that I just replicated this without the RGB component mask and it worked. Guess they fixed whatever the issue was.
Eyyy awesome!
did u edit this comment? read this like there was a problem then all the sudden there was no problem like why comment if it was fixed got me confused haha
@@runsbuns3675 I think in the latest UE5 update they fixed the issue with a lot of the math nodes outputting a forced 4vector by default but I'm not too sure. It's always good to post a comment if you had an issue and overcame it because other people might find it handy :)
@@runsbuns3675 Nope. I was referencing the video description. It says there is an extra step required for UE5--there isn't anymore.
I get this error at the beginning?
[SM5] (Node SceneTexture) GBuffer scene textures not available with forward shading.
really new at this so im just following along. My scene just has movable directional light, -1.0 Sun height, and static skylight.
Heya Bryll - Gbuffer manipulation is unavailable with Forward Shading (usually used for Mobile and VR) so you'll have to use Deferred shading which is toggleable in the Project Settings menu :)
@@PrismaticaDev Just to clarify, I'm unchecking Forward Shading correct?
Alright, It worked wonders, Thank you very much! Love your work. looking forward for more tutorials in the future :))
@@braeul9371 Yep yep :) No worries at all! Glad you're finding them useful :)
everyone complaining about the music i honestly didnt even notice it until i actually paid attention to it
maybe ive missed the part but does it come with: enable, disable specular highlight and change the radius of that highlight? would love to have some of my objects have a spec highlight that is very sharp
So this system just takes what is in front of the camera and applies the Cel Shader based on that - if you wanted to increase the highlight amount of a certain object/material you could increase the Specularity or lower the Roughness of the material. You could also add a rimlight in the material which would be picked up naturally by the cel shader PP.
YOU'RE BREATHTAKING!
no u
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! ❤️😊
very nice explained !! Thanks for sharing
Is the environment in this video from an asset pack? Can't get my grass to look like this.
I was able to make this work a few months ago, but now it doesn't th-cam.com/video/RkFwe7JI8R8/w-d-xo.htmlsi=CgfhwIIhrpf_U_oO&t=654
I did upgrade to 5.4. Did something change?
Dude- do you work with that music in the background? Must send your cat crazy.
sorry new to all this, what do you mean by 'A less than B = the cel shader' what do i connect to a less than b as my scene is black and white
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.
After adding the Cel-Shader to my game, my player character's shadows seem very dark. From behind, their back looks almost completely black. I tried adjusting the black tint, but it did nothing. What should I do?
First off, love the way you teach. It's fun, engaging, and you're very entertaining.
Second, I followed along in UE5 and, to my knowledge, I have not missed any vital steps. However, the shadows change based on view, as I'm navigating the viewport the shading is sliding around various parts of the model. Any idea what that could be?
Hey hey! Thank you very much :)
Are you using Lumen, by chance? It's known to be a big pain with post process effects like this
@@PrismaticaDev Disabling Lumen did offer some improvement, but overall the issue persisted. Particularly noticeable when zooming in and out, shadows will shrink and expand.
For whatever insight this may offer, I'm working on the "Blank Project" template, which is just the floating platform with a table and chairs.
P.S. Responding in under 24 hours to a question on a video roughly a year and a half old... You, sir, are a scholar and a gentleman.
@@PrismaticaDev Know how to fix this? Lumen is disabled, and like you said, everything jumps/shrinks and expands when the camera moves etc.
ALSO the default shadows are still there, like the realistic ones are there as well.
@@rhia.1234 Hey, pretty sure I figured it out, you have to click the 'Skylight" object and change it from "moveable" to "static"
@@TwoWayOrbitalStation Heyo heyo! I think the solution was to set the specular to 0 and roughness to 1 (if it's the same issue)
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!
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
Hey! have you got an update on the metallic Materials? I thought about just turning the metallics down to zero.
Turning them to 0 will be good for now - I'm filming a video later tonight about the Metallic hackery to make things look shiny :)
This is good, but the lighting gets dark suddenly when the camera changes angles or positions with the Normalize node. I fixed it by using the SafeNormalize node.
You just fixed my bad lighting! TY
Mine doesn't work right, it is very bright. I'm using the ALSV4 demo in UE5. My graphics card is (NVIDIA GTX 1660 ti) if that changes anything, And the shadows are white.