Announcement

Collapse
No announcement yet.

A different kind of cel shader

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

    A different kind of cel shader

    An advanced realtime cel shader project. Questions and suggestions welcome.

    Download

    Standalone shader project and presents can be found at GitHub: https://github.com/antidamage/CelShader

    Quick start

    * Migrate the CelShader folder from the sample to your target content folder.
    * In your project create a global (unbound) post-processing object.
    * Go to the Misc tab and add the CelShader instance as a blendable.

    It's that easy.

    Documentation
    Right here: http://skull.co.nz/cel-shader-introduction/

    Overview

    Colour
    Debug your shader here. You can enable/disable the shader entirely, or force it to only draw lines. This in itself is a neat effect.

    Cel Detail Shading
    This manages the lines drawn when detail in the scene and in textures are outlined. These lines default to light. Cel detail always shades near to the camera and you can control the falloff as distance increases.

    Cel Outline Shading
    These are the lines drawn around objects based on differences in screen-space depth. These lines default to heavy and can have a mask texture applied to roughen the edges. Cel outlines have a band in the scene depth that can be targeted for shading. Offset is the distance from the camera. Ramp is the linear fade-in and fade-out distance.

    Distance overbright
    This controls a blend_overlay fog that is useful for colour-grading the scene. In the screenshot above it's used to give distant objects a warm desert-feeling glow.

    Shadow Shading
    This controls the cross-hatching on your scene. The cross-hatching will target areas with AO shadows. You can also posterize your AO to give it a more cartoony feel. The values in this section have a quite narrow window where they look good, I'd recommend only adjusting them by a tiny bit at a time.

    Print dots
    Passes the colour channel through a filter that simulates web offset printing, allowing you to set the paper colour and the ink density.

    Saturation
    Self-explanatory.

    Posterize
    Posterizes the colour channel to a specified number of colours.

    Final tip
    If you're getting too many lines drawn, try either lowering the resolution of your textures or go into photoshop and apply a smart blur. The cel shader will pick up even tiny amounts of detail with the right settings, so go nuts and blur it a lot. If you're after a kind of water-colour fill effect, then smart blur is the way to go.

    Presets

    Anime shader


    Anime shader


    Newsprint shader


    Sumi shader


    Coloured pencil shader


    Oil painting shader
    Last edited by Antidamage; 10-28-2014, 03:30 AM.

    #2
    May just be a cel shader, but I'd love to see it in a game. Cuz I want to go there. Really really cool original look!

    Comment


      #3
      Oh it's gonna be. Thanks for the feedback!

      Comment


        #4
        I've figured out some of the steps in my mesh texturing and export and so it was time to try meshes at various sizes and in various positions:

        http://i.imgur.com/6BIdlYD.jpg

        http://i.imgur.com/PjXtKW1.jpg

        Water accidentally looks great. It's actually 100% opaque but the cel shader draws the lines as if the water wasn't there while maintaining the surface colour of the water. End result: stuff under water looks really cartoony.

        Comment


          #5
          Originally posted by Antidamage View Post
          Water accidentally looks great. It's actually 100% opaque but the cel shader draws the lines as if the water wasn't there while maintaining the surface colour of the water. End result: stuff under water looks really cartoony.
          Looks great, love it when things accidently work out.
          FluidSurface Plugin: https://github.com/Ehamloptiran/UnrealEngine/releases
          TextureMovie Plugin: https://github.com/Ehamloptiran/TextureMoviePlugin

          Comment


            #6
            Looking good, man.

            Comment


              #8
              I've been working on mastering a workflow for rigged meshes, etc. MakeHuman is pretty darn cool.

              http://i.imgur.com/YJ7ucCF.jpg

              Comment


                #9
                Very nice shader effect, reminds me a fair amount of Borderlands.

                Comment


                  #10
                  Beautifful, thanks for this great contribution.

                  Comment


                    #11
                    Yeah that looks very good
                    Godz for UT '99 / UT 2003

                    Comment


                      #12
                      That shader looks fantastic Antidamage! As many people have already stated, it definitely has that Borderlands feel to it. Nevertheless, keep up the great work and be sure to keep us updated as you progress with your project.

                      Comment


                        #13
                        Hehe, I reckon it's better than Borderlands! Thanks.

                        Have you guys tried speedtree yet? It's freakin' amazing. Everything you do with it automatically looks great!





                        Last edited by Antidamage; 07-17-2014, 06:22 AM.

                        Comment


                          #14
                          Sweet man! That looks fantastic!

                          Water accidentally looks great.
                          Don't you love those happy accidents?

                          Comment


                            #15
                            Made a huge number of improvements today. Discovered the Sky Light object, so got rid of my second fill sun, which basically doubled the framerate. Fixed up all the trees, added some objects to help the flow of the arena and optimised the way I'd done the foliage. Lost the entire level a couple of times due to foliage/editor bugs, thank goodness for Git. Remembered that I wanted to try grass instead of sand and it turned out rather nice; looks less good in stills than the sand but feels nicer when it's in motion.

                            If I can get it to package, I'd really like to throw up a demo for people to try. There's no gameplay yet, but it's still kinda fun to walk around.

                            Comment

                            Working...
                            X