User Tag List

Results 1 to 31 of 31

Thread: Cell Shading in Unreal

  1. #1
    3

    Lightbulb Cell Shading in Unreal

    So I was messing around with creating art styles for my next game and ended up getting caught up in making a cell shader :P


    Once its done I plan on releasing the files along with a tutorial but first, I want to get a better idea of what people want from cell shading. Any comments would be appreciated

    So far I have;
    Textures supported
    • Diffuse
    • Normal
    • Spec Colour
    • Spec Strength
    • Spec transparency
    • Lighting Banding


    Other
    • One Directional light or point light
    • Skylight/ambient light control
    • Post process to control shadows
    • Sobel Edge (courtesy of Allar's awesome little freebie.)

  2. #2
    0
    Recreated the windwaker style
    Name:  WindwakerTest.png
Views: 6022
Size:  388.8 KB

  3. #3
    0
    Quote Originally Posted by AzzaMat View Post
    Recreated the windwaker style
    Name:  WindwakerTest.png
Views: 6022
Size:  388.8 KB
    This is amazing, I'd love it if you shared the files or released a tutorial for this.

  4. #4
    0
    Quote Originally Posted by AzzaMat View Post
    Recreated the windwaker style
    Name:  WindwakerTest.png
Views: 6022
Size:  388.8 KB
    This is looking great friend. I was wondering if you got any solution to have sharper solutions? Look at below the left eye of the lil guy, the shadow is not sharp. There are a few non-sharp places at other parts of the mesh but its pretty visible there. What do you think the cause of it, or can it be fixable?

    Thanks!
    Fighting Game Template: PROJECT: Unreal Fighter 2D

  5. #5
    0
    Very awesome shader, how do translucent objects behave?

  6. #6
    0
    I was also trying to learn how to create a cell shading material. Did you manage to make it works with shadow casting?

  7. #7
    0
    I think its due to the models low poly count, If it had more geometry it would be smoother. I will experiment and get back to you

  8. #8
    0
    Haven't tested yet, will add it to the list of things to test.

  9. #9
    0
    Quote Originally Posted by AzzaMat View Post
    I think its due to the models low poly count, If it had more geometry it would be smoother. I will experiment and get back to you
    Cheers comrade. ^_^
    Fighting Game Template: PROJECT: Unreal Fighter 2D

  10. #10
    0
    Name:  GeoTest.jpg
Views: 4469
Size:  52.2 KB

    Left is low poly, right is high poly.
    Last edited by AzzaMat; 05-19-2016 at 06:35 PM.

  11. #11
    0
    Quote Originally Posted by AzzaMat View Post
    Name:  GeoTest.jpg
Views: 4469
Size:  52.2 KB

    Left is low poly, right is high poly.
    Thank you for the clarification AzzaMat, well done!
    Last edited by Achilleon; 05-19-2016 at 09:01 PM.
    Fighting Game Template: PROJECT: Unreal Fighter 2D

  12. #12
    0
    Neat! Did you do this with materials or did you modify the shader code in the source?

  13. #13
    0
    I have done two so far. One is a post process, the other is a material and a bit of BP.

  14. #14
    0
    this is awesome

  15. #15
    0
    First version is up! Looking for some feedback This is Post Process only. The material only version will be coming soon.

    http://www.strangelynamed.com/tutorials/2016/5/23/cel-shading-in-ue4-material

  16. #16
    0
    Quote Originally Posted by AzzaMat View Post
    First version is up! Looking for some feedback This is Post Process only. The material only version will be coming soon.

    http://www.strangelynamed.com/tutorials/2016/5/23/cel-shading-in-ue4-material
    Very cool and simple, however it feels a bit finnicky with the banding texture. I tried splitting half and half into black shadows and white hightlights and depending on the distance from the object some artifcats show up like this: https://i1.someimage.com/mM51rMg.png

    would love to see how you solved it in materials tho. We use a toon shader on our characters in our game, currently the build for 4.10 made by another member of this forum (I forget his name atm!)

  17. #17
    0

    Nice! Looking forward materials-only tutorial since I think it would be more suitable for mobile platforms.

  18. #18
    0
    Thank you so much! It'll definitely come in handy

  19. #19
    0
    Hey ZeoZen, there are a few ways to solve that, first make sure your colour band texture has clamped UVs instead of tile. If that doesn't fix it, make sure you are locking the autoexposure in the post process.

  20. #20
    0
    UE Community Manager
    Join Date
    Jan 2016
    Posts
    91
    Followed your tutorial last night and got some really nice results! Looking forward to seeing how it works through a Material

  21. #21
    0
    Awesome Jess, would you be willing to post up the results? I would love to see what people are doing with it

    Added the tutorial to the UE4 wiki, adding images is CLUNKY!
    https://wiki.unrealengine.com/Cel_Shading_Post_Process

  22. #22
    0
    Put the Cel shader into the vehicle example game.

    Cel Shaded.

    Original

  23. #23
    0
    Quote Originally Posted by AzzaMat View Post
    Hey ZeoZen, there are a few ways to solve that, first make sure your colour band texture has clamped UVs instead of tile. If that doesn't fix it, make sure you are locking the autoexposure in the post process.
    Oh right, forgot to clamp the texture thanks

    Any progress on that material setup? The vehicle picture looks good, a few artifacts here and there but possibly just the normals aren't made for this type of shading.

  24. #24
    0
    Any chance to see tutorial about achieving this effect in material?

    Thanks

  25. #25
    1
    material version is up on youtube

  26. #26
    0
    Niiiice! Thanks a bunch!

  27. #27
    0
    So I don't want to act as a necromancer to this thread, but how would one go to not leave sky sphere black? Everything works fine but it left my Sky Sphere completely black.

  28. #28
    0
    Samaritan
    Join Date
    Mar 2015
    Posts
    146
    Quote Originally Posted by BlizzKrut View Post
    So I don't want to act as a necromancer to this thread, but how would one go to not leave sky sphere black? Everything works fine but it left my Sky Sphere completely black.
    yep, same issue here
    "Today a young man on acid realized that all matter is merely energy condensed to a slow vibration. That we are all one consciousness experiencing itself subjectively. There is no such thing as death, life is only a dream, and we are the imagination of ourselves. Here's Tom with the weather."

  29. #29
    0
    Supporter
    Join Date
    May 2016
    Posts
    1
    Quote Originally Posted by AzzaMat View Post
    First version is up! Looking for some feedback This is Post Process only. The material only version will be coming soon.

    http://www.strangelynamed.com/tutorials/2016/5/23/cel-shading-in-ue4-material
    I tried this and my scene looks kind of yellow. Maybe it has to do with what to plug in the "Emissive Color" parameter, but I'm not sure...Name:  Captura Unreal BP.PNG
Views: 2342
Size:  342.6 KBName:  Captura Unreal Map.PNG
Views: 2353
Size:  535.9 KB

  30. #30
    0
    take another look at the tutorial, your component masks are wrong


    If you want to get the skybox back you need to plug it into the base colour rather than emmisive. or take the emmisive channel and add it back in the post process.

  31. #31
    0
    About your non post process material tutorial, you need a little update :

    You connect the "set vector parameter Value" node to the construction script.
    It works fine in the editor and update the light vector when moving the light in the level.
    But when you launch the preview (or a build), the parameter collection is not updated and the material use the default value set in the parameter collection.

    I copy paste the same block (directionnal light -> Get forward vector -> set Vector parameter value) and connect it to the "Event begin Play" too.
    Doing this, the material react to the light vector normally in the game.

    I imagine that if the light vector is rotating during the game (like in a day / night cycle), you'll need to update the parameter collection somewhere too for the changes to take effect.
    Last edited by JoGoiA; 03-23-2017 at 09:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •