Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Simplest flat shading?

Discussion in 'Shaders' started by darkhog, Nov 30, 2014.

  1. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    For art style I'm going for (untextured polygons, very simple shading) I need some flat shading shader. None of shaders in Unity cut it for me, all give too much of a shading (too smooth). I've tried all shaders bundled with Unity and none makes the cut. The closest thing are Toon shaders, but those don't work exactly as I want as well.

    This is the effect I'm (roughly) going for:


    (look at that spike/mine thing), though obviously with AA applied.

    This is closest I could get:



    Not very impressive and I'm afraid that without flat shading shader I can't get effect I want.

    It's funny how I need a shader for a thing that is within capabilities of OGL 1.0
     
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    You maybe want a vertex-color-only shader
     
  3. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    On your mesh, just set the Normals to Calculate and Smoothing Angle to 0.
     
    darkhog and hippocoder like this.
  4. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    OK, Farfarer, that worked and I'll remember this tip for future, but what about Unity primitives? Due to simplicity of my level design I'll rarely need real models for building levels (except maybe for enemies/pickups), primitives will be enough in most cases.
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Import a capsule, sphere and box, use those instead. You can't change the unity primitives.
     
    darkhog likes this.
  6. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    I guess I'll have to. Thank you.
     
  7. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Yeah, there's no real benefit to using unity primitives over a simply pre-made mesh with the same geometry. It all winds up looking like the same thing as far as the engine's concerned.
     
  8. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    If you are not going to be using lighting in your scene, then you don't technically need the normals at all.. and should just go with vertex colors... but it's probably not a big deal.
     
  9. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Yeah, I'll use lighting and since there will be some complicated meshes, vertex colors won't fit (longer time "painting" models).

    The main reason I've decided to go with untextured meshes aside of that I like this art style, is how easy it is to make art.