Announcement

Collapse
No announcement yet.

Toon shading model

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Here we are...stylize bounce light(WIP)
    Click image for larger version

Name:	stylize-bounce.png
Views:	580
Size:	139.0 KB
ID:	1448197

    Comment


      Does anyone know what happened to the pull request back in the day?
      the one talked about in this thread ( https://forums.unrealengine.com/unre...Shading-Model= )

      did the changes to plugins kill it? just asking because i saw the training stream and it was pitiful compared to this. to be honest i think it is a disgrace this isn't in the engine yet.

      Are they afraid of this look being too easy to achieve with this? (because games using a good toon shader would not stand out as much or something like that)
      Do they have a deal with another plugin and its vendor?
      Can't we do anything?

      oh and by the way:

      it took me much too long to find this thread again for what a good solution this is, so i am going to say something now:

      celshading is easy in this cel shading celshader , or cel-shader if you want. the shade or shadow can look like in a cartoon , anime or manga with this. this is easy to use and can be controlled in materials , you don't need to create a pp-volume in unreal engine blueprints to achieve a stylized indie look with this. and to beginners wanting to learn how to get this free addition: just read page one and to learn how github works + help add this to the engine by upvoting the pull request wherever you see it (that is if the creator is still interested after epic has ignored this for about 3 years now)
      Last edited by wabun; 03-27-2018, 10:40 AM.

      Comment


        Originally posted by wabun View Post
        Does anyone know what happened to the pull request back in the day?
        the one talked about in this thread ( https://forums.unrealengine.com/unre...Shading-Model= )

        did the changes to plugins kill it? just asking because i saw the training stream and it was pitiful compared to this. to be honest i think it is a disgrace this isn't in the engine yet.

        Are they afraid of this look being too easy to achieve with this? (because games using a good toon shader would not stand out as much or something like that)
        Do they have a deal with another plugin and its vendor?
        Can't we do anything?
        They don't need a deal. Anyone can implement this since the engine source code is there for anyone to see. It is a matter to implement it yourself or anyone who want it. Day after day more and more people are learning how to write plugin code, global shaders and shader models, I do recommend people to get there too.
        Nilson Lima
        Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
        Join us at Discord: https://discord.gg/FUwTvzr

        UE4 Marketplace: Cloudscape Seasons
        supporting: Community FREE Ocean plugin

        Comment


          tl;dr Imo, for PBR use UE4. For Stylized use Unity. You can get a new "shader model" by writing 1 single file in Unity. UE4, you have to edit at least 9 different engine files.

          Arnage's shader model is still the best one out there that's open source. IOChair has made massive improvements to it, but that's closed source.

          He's just wondering why Epic hasn't made an official Toon Shader model. Anyone can implement one, sure, but no one (no matter how good you are at C++/UE4/hlsl) can implement it as easy and quick as it can be implemented in Unity. Unity's going to get an even more flexible rendering solution soon (like the material editor) and it makes me sad...

          I've followed and read all the tutorials and documentation out there on toon shading spanning the life of UE4. Most of that is easy to implement, but it doesn't look great. GG and DBF arguably look the best, but what they're doing really only works in controlled environments with very few actors (i.e., fighting games).

          Btw, I've only used Unity for about 20 hours. UE4 4800+ hours. I got something better looking in Unity after spending 1 day. What I got in UE4 still looks worse. 4 hour build times don't give me much incentive for enduring. I'm torn because Niagara is going to be incredible, while on the other hand stylized rendering (custom light models) is such a pain to achieve..
          Last edited by kusogaki77; 04-02-2018, 10:25 PM.

          Comment


            Originally posted by kusogaki77 View Post
            I'm torn because Niagara is going to be incredible, while on the other hand stylized rendering (custom light models) is such a pain to achieve..
            It's never easy to make stylistic rendering, especially when your artist always asks for more control. And you can't give them, because you've used all GBuffers.
            Adding new GBuffers will at least change the code of hundreds of files (which is too hard for me).

            And, even worse, even if you have all the necessary mathematical programming knowledge that you need(I don't have), it's still very difficult to find the function you need in the huge shader file structure that lacks code annotations and help documents.

            It took me a week to find the indirect light related functions of dynamic objects, and to figure out which macros in the function worked at the same time took me two days.

            Finally, about Anime style rendering, English information is so lacking (and I can't read Japanese). It makes me wonder how many people in the world are really concerned about this problem.

            Comment


              @IOchair.

              Believe it or not there's far more info out there on toon shader models/materials in English than there is in Japanese. The vast majority of Japanese developers don't explain how they achieved something. They just show screenshots.

              Those that do provide details don't provide much, and the authors don't update their info either.

              Here's a guy who looked for all the info he could find on Toon shading in UE4 (https://qiita.com/com04/items/a7895160df8d854fe924) Last updated 2017/10/14. He explains how to add a shadow color pin/parameter for a Toon Shading model (that uses forward shading). He made it in an older version, so you have to make additional changes he didn't specify in order to get it to compile. In the end I managed to get it work, but it's nothing special. It just simply adds a pin to change the color of shaded areas.

              I understand Japanese fairly fluently so if you happened across a thread that you feel contains valuable info, by all means PM it to me. I'll translate it so we can (edit ALL use it.
              Last edited by kusogaki77; 04-08-2018, 11:54 PM.

              Comment


                There is also this: https://twitter.com/JKashaar/status/946586092026892288

                https://github.com/LuggLD/UnrealEngi...25d32ee52793ec

                I wish someone cleaned toon shader, ported it to forward rendering so toon shading can be used in VR (mobile and desktop) and made it a plugin.

                Comment


                  motorsep
                  I checked that one out, and the vids on it look cool but it's got some issues (jagged shadows, no access to shadow color, and it's no longer being updated). He said he made it just for fun and has no plans to add more features.

                  I've never made a plugin before, but I'd undertake that task if someone smart could fix all the issues and add some more features to one of those custom shader models that are available.

                  Comment


                    Hey so I'm running into this weird visual bug whenever my game drops in framerate, it happens as high as 55-60 fps so this is not an acceptable bug. I have the 4.18 version of this Toon Shader and I've never seen this bug on any other version of Unreal so I assume this is where it's coming from. When the framerate drops there are missing/black pixels that pop up randomly over the screen. They stay in the same location if you don't move the camera, however new ones jump up and old ones disappear when you move the camera. I have a video here demonstrating it https://youtu.be/D0KxwhvSQZc Hopefully someone can help me, thanks!

                    EDIT: So I found the problem, it isn't this toon shader at all and I'm sorry I posted here about it. I had my Pixel Depth Offset constantly set with a scalar parameter to zero, and that would cause problems. I figured this out by moving the project to vanilla unreal and realizing the problem still happened, so it's all good now! Sorry to bother
                    Last edited by Chef_Seth; 04-08-2018, 02:31 AM.

                    Comment


                      Anyone else having probs with Marynate's 4.19-toon-release? Tried building it from scratch twice, and it runs so bad it's unusable.

                      Edit: I integrated marnate's 4.19-toon-release changelist into the official 4.19.2 release (https://github.com/EpicGames/UnrealE...4.19.2-release) and the terrible performance issue is gone.
                      Last edited by kusogaki77; 05-13-2018, 09:55 PM.

                      Comment


                        Dynamic skylights and reflections have been stylized now(in fact, removing the normal influence in the relevant shader and removing the specular color)
                        It has just been found that using deferred decals can achieve better results than any shadow casting technique. This makes me feel that it is necessary to think more about the shadow of stylized rendering.
                        Click image for larger version

Name:	Upload.jpg
Views:	356
Size:	71.5 KB
ID:	1476616

                        Comment


                          Originally posted by IOchair View Post
                          Dynamic skylights and reflections have been stylized now(in fact, removing the normal influence in the relevant shader and removing the specular color)
                          It has just been found that using deferred decals can achieve better results than any shadow casting technique. This makes me feel that it is necessary to think more about the shadow of stylized rendering.
                          Click image for larger version

Name:	Upload.jpg
Views:	356
Size:	71.5 KB
ID:	1476616
                          Im not sure if better with decals (maybe cheaper?), because the right foot and knee are not showing the correct shadowing.
                          Nilson Lima
                          Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                          Join us at Discord: https://discord.gg/FUwTvzr

                          UE4 Marketplace: Cloudscape Seasons
                          supporting: Community FREE Ocean plugin

                          Comment


                            Originally posted by NilsonLima View Post

                            I'm not sure if better with decals (maybe cheaper?), because the right foot and knee are not showing the correct shadowing.
                            In fact, the shadow of cel-shading has nothing to do with "correct".
                            Check out this link
                            https://mayshing.deviantart.com/art/...onts-319918527

                            Look at the results of those "wrong way to do it".
                            They are so similar to the results of using shadow casting techniques in rendering.

                            The result of the deferred decal is closer to what you would see in the anime when the character leaves the shadow of the building: a nearly parallel line.
                            (Yes, the projection shadow of the character on the ground is missing, and I'm trying to use other techniques to simulate it)

                            Comment


                              Does this still exist? If so where do I get it? Wherever I get it, does it support 4.18? Does this only modify engine code? Can you use this within custom rendering so it only applies to certain models? A lot of questions -- if this doesn't support 4.18 and above, is there another way to achieve an effect like this? Perhaps make it into a plugin?

                              Comment


                                Originally posted by TomoyaHamasaki View Post
                                Does this still exist? If so where do I get it? Wherever I get it, does it support 4.18? Does this only modify engine code? Can you use this within custom rendering so it only applies to certain models? A lot of questions -- if this doesn't support 4.18 and above, is there another way to achieve an effect like this? Perhaps make it into a plugin?
                                Yeah, Nate kindly ported it over to 4.18 and 4.19 for us. I recommend this one: https://github.com/marynate/UnrealEn...8-release-toon

                                4.19 is unusable. Last I checked, if you want it for 4.19 you have to manually port over his 4.19 changelist (here: https://github.com/marynate/UnrealEn...9-release-toon) to the latest stable 4.19 release (here:https://github.com/EpicGames/UnrealE...4.19.2-release).

                                I recommend these simple settings to start:
                                Metallic: 0
                                Specular: 0
                                Roughness: 1

                                Toon Blend: 1
                                Toon Roughness: 0
                                Toon Step: 1

                                Ambient Occlusion: v3(0,0,0) This way you can stick a texture map or v3 or whatever you want into emissive to get different color for shaded areas.

                                Edit: I'm not exactly sure what you mean by custom rendering. It's not a post process. It's a simple material, so you can use it on whatever you want just as you would any other material. It doesn't work as a plugin, because, simply put, the code changes are too extensive.
                                Last edited by kusogaki77; 05-22-2018, 04:32 AM.

                                Comment

                                Working...
                                X