Announcement

Collapse
No announcement yet.

trying to make Toon Shader Material on UE4

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

    trying to make Toon Shader Material on UE4

    I have done one from the UDK Version and was trying to replicate it to UE4.

    The Problem is that the Material editor Does not take Light Vectors on Surface Material Domain.

    So Now I'm trying to figure out how to make Toon Shader Material that takes some type of reference of the Light Actor.

    (So that What I'm basicly working on)
    Unreal-Chan v1.2 is ready!
    Link

    Twitch:/jvthewanderer Twitter:@JvtheWanderer

    #2
    UE4's shading is deferred, this means that all lighting is done as a postprocess. This means there is currently no Custom Lighting path like there was in UE3. If you want to investigate a stylized look I suggest looking at PostProcess Blendables. This allows you to create a material that applies to the whole screen as a postprocess. There you have access to all of the Gbuffer channels and can do some really neat things.

    https://docs.unrealengine.com/latest...als/index.html
    Senior Technical Artist - Epic Games

    Comment


      #3
      Originally posted by Jordan Walker View Post
      UE4's shading is deferred, this means that all lighting is done as a postprocess. This means there is currently no Custom Lighting path like there was in UE3. If you want to investigate a stylized look I suggest looking at PostProcess Blendables. This allows you to create a material that applies to the whole screen as a postprocess. There you have access to all of the Gbuffer channels and can do some really neat things.

      https://docs.unrealengine.com/latest...als/index.html
      Try doing the outlines as Jordan explained and check out these tutorials for the stylized cell-shaded look: https://docs.unrealengine.com/latest...zed/index.html

      Comment


        #4
        Originally posted by grigor View Post
        Try doing the outlines as Jordan explained and check out these tutorials for the stylized cell-shaded look: https://docs.unrealengine.com/latest...zed/index.html
        Neither of these tutorials actually go through the whole process, they only show certain functions of it. So I'd like to continue this thread to help figure out how to create a cartoon look like this in UE4.

        What I have played with so far, is UDK tutorials such as this. But before I simply port that over to UDK, I'd like to experiment with what Jordan explained with the outlines, so far I have turned on CustomDepth and used it to visualize the depth as he shows in his tutorial. But now how do we use that Depth information, to create an outline around the object?

        I'll be working on this all weekend so I'm open to all suggestions.

        Comment


          #5
          Thank y'all for responding and suggesting me to use the post process.

          With That I was able to get a Cel shade going.



          What I did was first make the lighting for the post processing. I used a SceneTexture:SceneColor and a 4Vector and Dot Product them. This will saturate the color in the scene.
          Then added a Ceil and divide by a number constant Constant Scaler. This Constant Scaler will give that number of bands (as I called them) to the lighting. I chose 1 because I wanted to go for and anime style Cel shade.
          Thand I added a clamp to it having it about around 0.0 or 0.5 in min and 1 on max just to get rid of the Black shadows.

          After that I multiply a SceneTextureiffusetexture (SceneTexture:BaseColor will also Do too) to it to bring bring back it base colors.

          This is not perfect to say at least because the Emisive textures will be missing, So I'll be continuing on making it better.

          p.s.: also I made this Weird post process happen.

          Last edited by JvtheWanderer; 03-22-2014, 01:25 PM.
          Unreal-Chan v1.2 is ready!
          Link

          Twitch:/jvthewanderer Twitter:@JvtheWanderer

          Comment


            #6
            Could you share your blueprints so I can follow it visually at all? I tried using the tutorials, but they don't seem to be follow-a-able and I can't find the things you've explain in your mini-tut.
            KITATUS
            "Information shouldn't be behind a paywall, It should be free for all!"

            Comment


              #7
              Originally posted by KitatusStudios View Post
              Could you share your blueprints so I can follow it visually at all? I tried using the tutorials, but they don't seem to be follow-a-able and I can't find the things you've explain in your mini-tut.
              I'm using the Material editor, Not a BP. I Don't want to give out the visuals. I want people to figure this out on there own. (I know that mean, but that how I'm doing this.)
              Unreal-Chan v1.2 is ready!
              Link

              Twitch:/jvthewanderer Twitter:@JvtheWanderer

              Comment


                #8
                Fair play, I'll see what I can come up with and I will post a tutorial to help others when I figure it out.

                EDIT: Cleaned up post.
                Last edited by KITATUS; 03-22-2014, 02:32 PM.
                KITATUS
                "Information shouldn't be behind a paywall, It should be free for all!"

                Comment


                  #9
                  I was toying with the CustomDepth and was able to create a pretty cool itunes kind of effect.



                  Still trying to figure out how to do the outline effect using CustomDepth. I know how to put it together I just don't know which parts to use because honestly...some of these functions are greek to me. Will post more as I find it.

                  --To KitatusStudios: To be fair,JvtheWanderer did point into a direction we can try, asking him to share the exact details would lower the value of his work since then anyone could replicate it by copying the steps. If you get stuck though, I'm sure he'd be willing to nudge you in the right direction, just not draw a perfect step by step instruction manual.

                  Comment


                    #10
                    Been trying to put together what Jvthewanderer did, in hopes that I'll learn something about the material functions...Starting to feel like Homer Simpson "Le Grill!?!? What the hell is that?!?"

                    Okay SceneColor...that's the color of the scene...4Vector that's a number for each color channel? Dot? That makes it into dots? Ceil? What is a Ceil? Is that like Veil? I don't eat veil...Aw ****. Time to read UE4 documentation some more.

                    Think I have a good handle on Clamp, that restricts the value of things to a range, no idea what ConstantScaler is or where to find it...At the very least I hope my struggles documented here amuses someone.

                    Comment


                      #11
                      In the Material editor if you hold down the '1' key and click it you ill get you Constant scaler. Its just a value you can input.
                      Unreal-Chan v1.2 is ready!
                      Link

                      Twitch:/jvthewanderer Twitter:@JvtheWanderer

                      Comment


                        #12
                        See I would have just called that a Constant, but then I realized a solid texture could be called a constant, so when you say scaler you mean specifically a number you could SCALE!! oooh okay....I am learning things now lol.

                        Thank you, I'm still way out of my element here but I appreciate the help.

                        Edit - You said you did SceneColor, 4Vector and Dot and that saturated things...for me it's turning everything into black and white noir look. Am I doing something wrong?

                        One infuriating thing I am wondering, is where are these Showcases that are mentioned so many times in here? Did I do my install wrong?
                        Last edited by BallisticGE0RGE; 03-22-2014, 06:14 PM.

                        Comment


                          #13
                          Originally posted by BallisticGE0RGE View Post

                          One infuriating thing I am wondering, is where are these Showcases that are mentioned so many times in here? Did I do my install wrong?
                          I asked over on UnityAnswers, they accidently released the doc without the showcase as it's not ready yet (It will be out on the Marketplace "Soon")
                          KITATUS
                          "Information shouldn't be behind a paywall, It should be free for all!"

                          Comment


                            #14
                            Thanks Kitatus!! I thought I might be crazy. Well the good news is if I can't figure it out I can just wait until then...but I'm not giving up yet!

                            Comment


                              #15
                              You got it right. That is going to be used to make the Band. All you have to do now is place a ceil with it then have it divide to a constant Scaler number. The Constant Scaler be divided can be any number you like because it define how many bands you want. Once you have that, you can then place a clamp to set the min and max number that define how dark the shadow or how light the light that is bouncing of the mesh. Then After that you will need to multply a SceneTexture: DiffuseColor or a SceneTexture:Colorbase and you should have you toon shader minus the emissive. (Still figuring out how to bring back the Emissive Color)
                              Last edited by JvtheWanderer; 03-22-2014, 06:33 PM.
                              Unreal-Chan v1.2 is ready!
                              Link

                              Twitch:/jvthewanderer Twitter:@JvtheWanderer

                              Comment

                              Working...
                              X