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

I dont remember doing anything that would break static lighting, but I’m not using it anymore so I’m not actively maintaining it either, but as far as I know it should still be working just like regular unreal.

Tested on same project with and without .usf changes from 5.3-SelShader-Launcher

Static lights work fine with vanilla .usf on same project

Static lights stop working after switching to selshader .usfs and they don’t work with both defaultlit and clearcoat, instead some weird glitches with lighting/textures happen

I haven’t tried the compile engine from source version though

Try that or use an older version where I still used it.

5.4 Version is live.

Also, I have a Steam page for my game live now. If you want to support this project consider leaving a wishlist to help me :>

And a big shoutout to Watashideep who helped me track down where light blending occurs in the C++ code for the deferred pipeline. I’m still experimenting with this, but hopefully with figuring this out I’ll be able to open the possibility of effectively using multiple lights. I’ll post here with updates when I have something to share if it pans out!

3 Likes

I remember implementing cel shading in Unity’s deferred renderer.
I did get it working, but we eventuality abandoned it. The limitations of having to cram everything into the gbuffer weren’t worth it.
I wonder if Unreal’s architecture differs enough to make this feasible for a wide range of projects.

Have you seen this thread?

I’ve been using deferred for a while and havent had an issue. You don’t need to use the Gbuffer for EVERYTHING, only things that exist after the basepass, and worst case you can always add more.

nope, ive paid no attention to substrate when I found out it wasnt a nice modular thing you could modify without changing the source like it should have been lol

blending multiple lights (4 points, 1 directional in this case)

3 Likes

the experimental multiple light supporting branch is up.

https://github.com/envieous/UnrealEngine-SelShader/tree/5.4-Selshader-LightBlendExperiment

this version requires you to compile the engine from the source code.

4 Likes

Thank you for your work!

1 Like

Hello, thanks for the project, it looks awesome
I’m actually having an issue when I tried building it in linux, it somehow throws this error
Fatal error: File:Runtime/Core/Private/Modules/ModuleManager.cpp

Do you have any idea what could be the issue that causing the error?
The build itself is fine but it keeps crashing when I try to run it

ty :>

Not a clue. I don’t use Linux, all I can say is it compiles fine on Windows.

I finally able to make this work, I’m using the launcher version and everything looks nice
Next work is the face shadow, I’m still not able to make iot render well, currently I’m using a simple sphere custom normal but it still doesn’t looks right


Left is custom normal using sphere and right is normal mesh

Do you have any advice for good face shadow implementation to use?

1 Like

I do.

This is the approach I’m using for my project, and I’m very happy with the results.

3 Likes

Your models for your game look amazing! Do you happen to be selling them on the asset store? Or if not, can you explain how you made them or who did if it was a separate 3D modeller? There’s all kinds of tutorials for anime 3D model game characters online but I’m specifically curious if the method used for yours differ from the typical approaches. :slight_smile:

ty

i stuck some characters from other games i liked into 3dsmax and studied them while i worked, and then i repeated this and kept iterating for years afterwards until i was happy with the result lol

i didnt learn any specific process and i dont know how my approach differs from how other people do it, i just looked at how the stuff i liked was done and figured out how to reproduce the parts i liked.

2 Likes

I love your work and the style of your game. Thank you for sharing this. :love_you_gesture:
Do I need to compile the 5.4-Selshader branch or can I just download and overwrite “Engine/Shaders/Private”?
Thanks for advance.

1 Like

you can just overwrite the shaders folder in the launcher version without recompiling. :>

So, 5.4 branch is a launcher version, right?
I have a question, I feel like texture colors that goes into MF_SelShader diffusein are getting darker than the texture even if the light color input is perfect white. What can I be doing wrong?

I forgot to say that I got version 5.4 working by overwriting the shaders/private folder.
However I needed to run the following console command for it to appear correctly.
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange 0

However, as stated in the previous post, I feel that the diffuse input is being darkened even in light and with light parameter set to 1,1,1,1

Well you can compile it from source if you want to. Future versions (there’s an experimental branch already there, 5.4 light blend test or w/e) will support multiple lights if you compile from the source, but you will still be able to use launcher versions if you’re only using one light.

There’s a sample project in the OP that has all the settings configured correctly including disabling exposure and example materials.

1 Like