Wow! Thanks. This is a very useful 2D shading effect for making 2D style in the 3D world. Glad that there's someone able to take the time for showing and making this type of effect.
A nitpick I have when it comes to cel shading discussion is when people say borderlands has cel shading. It doesn't, it just has outlines. Notice how the shadows have gradation. In fact, wind waker doesn't have outlines.
a lil addition to play with ... i agree that the fresnel makes it more pop but in some cases it just looks weird ( to me atleast ) and also for ortho graphic it dosnt have quite the effect ... under your uniform sampler2 color_gradient and fresnel_gradient add an uniform float fresnel_multi/amount; and change: ALBEDO = albedo(_tex).rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * 1.0); into ALBEDO = albedo(_tex).rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * fresnel_multi); you can also clamp it but this should work fine now you can adjust your fresnel effect in your editor and see what works best the albedo_tex suffix is only for when you use a texture for your model and not the albedo color
So, I get the code, but how do you apply this to a 3D model? Like a 3D Model similar to the Godot model that has a skeleton and animation and all, where do you drop in the shader? Do you throw it onto all the mesh instances every time, or can it be applied to a 3D camera? Sorry if this sounds stupid, but I'm entirely new to 3D, even though I've used Godot for a while now.
I got it working which is kinda shocking ngl 😂 but how do i prevent it from overriding my textures of the character. If i place it in the normal material spot placeing textures on the override material will well override the shader and the other way round i just get my textures with no shader
Hey, I definitely appreciate the video, and you've explained what you're doing to get the cel-shaded effect. But could you explain how you added it to the Gobot model? I imported your project and it looks like you created an entirely new material for it? I'm just not sure of the process here.
I implemented the same general idea, but I used a visual shader. It works for the most part, except it doesn't work with multiple light sources for some reason. It just 'snaps' to the nearest light. The logic should be the same, is there something missing that can't be done in a visual shader?
ok took 20 min but easy fix .... change : ALBEDO = albedo.rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * 1.0); into ALBEDO = albedo_tex.rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * 1.0); you see in the fragment shader you have a slot for the albedo_tex but in your ALBEDO you use just the albedo function not the albedo_tex cheers
I'll be honest. Kind of annoying having to go through all of this with coding and not materials. Also starting to feel like this does not work globally but for specific materials or meshes. I know in Unity and Unreal Engine; they have these things called blueprints that they can affect all of the scenes to have cell shading. I wonder if this is possible for Godot.
🔥 GET THE SOURCE FILES ►► www.patreon.com/StayAtHomeDev_
Would be nice if you linked to the actual source files, instead of forcing me to look through all your recent posts on your patreon page...
I'm a big cel-shaded fan. This looks great and gets the mind churning. I'll need to play around with it a bit. Thanks!
Wow! Thanks.
This is a very useful 2D shading effect for making 2D style in the 3D world.
Glad that there's someone able to take the time for showing and making this type of effect.
Yeah, but what kind of cell? prokaryotic or eukaryotic? Ok, that was my worst pun yet, I'll go back in my cell.
Really incredible tutorial. Thank you for explaining what these things mean and why you are doing what you're doing, not just showing how to do it!
You made me understand in few minutes what I struggled for eons 😂 nice work!
Wonderful presentation! TSM for breaking this down one step at the time. Clear and concise.
Awesome, I'm very unfamiliar with shaders in godot and this is a very basic one as well as a very cool one. Great for a first try at shaders
Glad it was helpful!
Whoa, this was way easier than I thought it'd be.
A nitpick I have when it comes to cel shading discussion is when people say borderlands has cel shading. It doesn't, it just has outlines. Notice how the shadows have gradation. In fact, wind waker doesn't have outlines.
a lil addition to play with ... i agree that the fresnel makes it more pop but in some cases it just looks weird ( to me atleast ) and also for ortho graphic it dosnt have quite the effect ...
under your uniform sampler2 color_gradient and fresnel_gradient add an uniform float fresnel_multi/amount;
and change:
ALBEDO = albedo(_tex).rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * 1.0);
into
ALBEDO = albedo(_tex).rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * fresnel_multi);
you can also clamp it but this should work fine now you can adjust your fresnel effect in your editor and see what works best
the albedo_tex suffix is only for when you use a texture for your model and not the albedo color
this is nothing less than awesome! thank you SO much! 🙏🙏🙏🙏🙏🙏🙏
Thx for the tutorial. Do you know if there is an option to do this for ALL meshes do I have to do these adjustments to every single matertial?
Didn’t understand a thing, but it looked cool 😂
Yeah exactly.. I didn't even notice the difference at the start of the video.. I'm starting to get worried about trying to learn game dev 😅
So, I get the code, but how do you apply this to a 3D model? Like a 3D Model similar to the Godot model that has a skeleton and animation and all, where do you drop in the shader? Do you throw it onto all the mesh instances every time, or can it be applied to a 3D camera? Sorry if this sounds stupid, but I'm entirely new to 3D, even though I've used Godot for a while now.
I got it working which is kinda shocking ngl 😂 but how do i prevent it from overriding my textures of the character. If i place it in the normal material spot placeing textures on the override material will well override the shader and the other way round i just get my textures with no shader
Hey, I definitely appreciate the video, and you've explained what you're doing to get the cel-shaded effect. But could you explain how you added it to the Gobot model? I imported your project and it looks like you created an entirely new material for it? I'm just not sure of the process here.
I implemented the same general idea, but I used a visual shader. It works for the most part, except it doesn't work with multiple light sources for some reason. It just 'snaps' to the nearest light. The logic should be the same, is there something missing that can't be done in a visual shader?
Do you have to apply this material to every object for a full cel shaded hame though?
yes
It is okay if I copy the code from the video? or there is something else missing just for patron? thanks for the video!
It's the same!
@@stayathomedev thanks so much!
Thank your very much for sharing! It makes my upcoming game next week so gorgeous!!
🔥
Can you do this with a Visual Shader editor like VisualShader, Shader-Lib, etc.?
For some reason this is breaking when using directional light? Do you know why this might be?
I can't use my own textures in albedo? How does this work?
0:39 Wait, did you say "Go-bot"? Isn't it pronounced "Gob-oh"? 😏
When I convert my material with texture to shader it ruins itself and no longer displays the texture, help.
ok took 20 min but easy fix .... change :
ALBEDO = albedo.rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * 1.0); into
ALBEDO = albedo_tex.rgb +(basic_fresnel * texture(fresnel_gradient, vec2(basic_fresnel,0.0)).rgb * 1.0);
you see in the fragment shader you have a slot for the albedo_tex but in your ALBEDO you use just the albedo function not the albedo_tex
cheers
@@thefufuu3157 thanks this worked for me
You said even a child could do it and i cant do it that means im mature 😅
I'll be honest. Kind of annoying having to go through all of this with coding and not materials. Also starting to feel like this does not work globally but for specific materials or meshes. I know in Unity and Unreal Engine; they have these things called blueprints that they can affect all of the scenes to have cell shading. I wonder if this is possible for Godot.
It is possible! I just didn't create that for the video
@@stayathomedev Wonderful. Thanks, mate. (I'm still learning about Godot Lol)
buty
No difference bro
look at the shadows
bro is blind