[UE5] Anime/Toon/Cel Shading Model (WORKS WITH LAUNCHER ENGINE VERSIONS)

I appreciate your previous response. I’m currently rebuilding Unreal Engine version 5.2, starting from cloning your repo again. It’s possible that I made some mistakes in my initial settings, particularly regarding manipulating material graph.

Would it be possible for you to provide some sample materials or resources that are compatible with Unreal Engine 5.2 or 5.3? The previous example you shared via Google Drive was compatible with Unreal Engine 4.25, but it wasn’t with 5.x versions.
Your assistance in this matter would be greatly appreciated. Thank you

Oh, I found a way.
I’ll have to fine-tune the colors and such for each material myself, which isn’t what I was looking for, but thanks!

There is an example project that is compatible with every 5.0 version in the original post.

If you’re going to my shading model from stock Unreal, yeah. You’re gonna have to redo every colour, and turn off srgb in your textures and potentially correct your colours in those files too. This is because stock Unreal actually makes you input the WRONG colours and then “tonemaps” them to entirely different colours that you have basically no control over. With my shading model you simply tell Unreal exactly what colour you want, and it outputs that colour, no tOnEmApPiNg nonsense.

I have pushed an EXPERIMENTAL 5.3 version that WORKS WITH LAUNCHER ENGINE VERSIONS. This one hijacks clearcoat instead of default lit but should behave identically with the exception that static lighting must be turned off in the project settings and metallic is no longer compressed into two inputs. (this might change back later)

It can be found under the 5.3-SelShader-CCTest branch. Simply overwrite Engine/Shaders/Private on a 5.3 launcher installation with Engine/Shaders/Private from that branch.

1 Like

The sphere examples caught my attention. What Pin were you referring to? (What node is MF_SelShader?)

It’s a custom material function, it doesn’t do anything special, just multiplies some colours onto the diffuse input for each output. It’s included in my example project.

1 Like

Hi, Thanks for sharing all your great work. I’ve tried to merge your shader with the custom shading model implemented here without implementing any of their actual shader code, just the shell: https://github.com/ashtonland/UnrealEngine and cordon off all changes to this new shading model to preserve both paths. I’ve managed to get it almost working, but my GBuffer customdata 0 rgb seems to also contain the base color ontop of the rgb I pass through. Do you have any idea where this bug could be?
Here is my fork:
https://github.com/JxFels/UnrealEngine

Heres an example:

Order is Cel Shading - Clear Coat - Default lit opaque

Not a clue. I made no effort to preserve the original shading because there’s no situation where I’d need it, and now that it uses clearcoat I can’t really imagine many situations where someone would actually want to keep that. There are a couple people in my discord (link in the op) who tried to do that, I’d suggest you try asking them.

Been using the Launcher version, and it’s marvelous, but I need some help troubleshooting. I cannot get camera fading to work while the shading model is installed. “Begin Camera Fade” does not seem to work while it’s installed, nor does the Fade track in the Sequencer. This problem is also present in the Launcher version example project, and in default projects where the shading model isn’t in use.

I suppose I just want to know 2 things:

  1. Is this an actual issue with the Launcher version or did I just mess up somewhere?

  2. If it is an issue with the Launcher version, is the issue present in the Engine version? If not, I’ll happily jump to that.

This sounds like a bug in the engine itself, does this only happen after applying my changes? Also using the source version will not solve this, they function nearly identically.

It’s easy enough to work around though. Make a post process material with a couple collection parameters, one for colour, one for alpha and lerp between postprocessinput1 and your colour with the alpha. You can drive those through blueprints and sequencer without issue and achieve the same effect.

Hi, thanks for your work.
I had an issue when using the shader. My project looks darker than the demo. Even though I copied all the files from the content folder in the demo to my project, it still looks weird. Do you have any idea what the problem is?


(This is the screenshot from the demo)

(This is the screenshot from my project)

read the setup section of the op, from the looks of it it I would guess the exposure values are wrong though those should be set in that level itself so idk.

Worse case, just port your project into the demo project instead of the other way around.

1 Like

Would it be possible to get shader working with static lighting enabled in launcher engine or unlikely? :sweat_smile:

You can turn them on if you want, they should still work as regular lightmaps, but I never really found a way to make them controllable in any sort of useful way, but if you want the functionality that they had in older versions you can open up the compare function on github and find the bits that are relevant to lightmaps and insert them into the launcher version.

…or just use the post process approach, I’m pretty sure that should dump the lightmaps too.

this may be a dumb question but I’m kind new to unreal (was in unity). so how do I remove this glowing effect coming from the grass and remove it reflation from the character.




Just wanted to say big thanks for uploading this shader - pretty much exactly what I needed for the look I’ve been chasing after for a while now…

here’s what I’ve got so far from using this on a village environment build:

Happy to help :>

1 Like

Hey, your anime style looks amazing :slight_smile:
I’m still new to this world of gamedev, but I want to pursuit this kind of style.
Why are you using Unreal instead of Unity or maybe Godot?
I thought Unity was better for this kind of anime style and, if you are going over the trouble of changing source code, why not use Godot which is open source instead?

ty

I was already very familiar with Unreal before I started this project.

Unity isn’t better at it, just about anything you could do in Unity you could also do in Unreal. Unreal is just extremely dumb with how inaccessible it makes editing how it renders things to the point that I’m genuinely convinced that Epic does it intentionally because they’d be an instant engine monopoly if Unity didn’t have this one thing going for it. Other than this drawback Unreal is just vastly better in basically every single way.

Godot didn’t exist when I started my project, and has yet to demonstrate that it’s actually a viable game engine.

1 Like

I, for one, am glad that you’re working in Unreal and that you’re sharing your work and knowledge with the public.

3 Likes

Stationary and movable lights seem to work but static lighting results in objects having no textures or colors.

static:

stationary:

Am i missing something perhaps

  • Thanks :sweat_smile:
1 Like