Announcement

Collapse
No announcement yet.

Cel Shading. again. yeah. I know.

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

    Cel Shading. again. yeah. I know.

    Couple quick pictures to illustrate first.
    Working off of a heavily modified version of http://www.hourences.com/book/tutorialsue3mated3.htm Intended to produce only pure black shadows, and a specular highlight, no outline. Network pictured at bottom.

    What I want(ish):

    This is with "Force dynamic lights" on in the point light properties. Black self shadows, but unfortunately no cast shadows, and I suspect that it'll be FAR too expensive to really use. Not to mention MAJOR vertex popping as you change distance from the rock.

    What I get (with use global lighting on) :

    Shadows are blended, colors bounce (don't care so much about that, but it's a symptom I guess.)

    I've tried playing with various different solutions, including using custom lighting (no change, seems it's falling back to default lighting method), and a few other shader constructions. I think what's going on is that LightMass is shading up past the drawn black shadows, which are in the diffuse.

    Current material setup. Linked so as not to blow out the forum width.
    http://stevie.eclexia.net/erin/tmp_i...ader_setup.jpg


    Thanks muchly, I'm going to go faceplant now.

    #2
    Interesting idea.
    Here's the list of things I'd check first. Sounds like you probably know about most of these, but I'll be thorough since I'm not sure what you may have missed.

    1: Ambient Occlusion
    In your World Properties (In the View menu), make sure that your AO is unchecked in lightmass AND in your Post Process effects. Turning it off in PP requires the box to the right of the AO option to be cleared. Not the box to the left. That should clear up your color bounce.

    2: Lightmass Properties
    In the same World Props menu, make sure that your Number of Bounces is set to 0 in your lightmass settings. If the light bounces, it'll change where your shadows are, and how deep they are.

    3: Shadow and light color
    There are settings to adjust tint and darkness of your various light stuff in your light itself, as well as in the World Props lightmass settings and in your Post Proccess settings. Make sure that you've adjusted all of them.

    Note that you can make your own PP chain and asign it in your World Props so that you don't need to worry about PP AO and the Highlight/Midtone/Shadow settings. You can create a chain that simply does not include them as options, or tweak them in the PP itself.

    EDIT: I'm not sure if changing Lightmass settings does much with dynamic lights. If you have all of that set and you know that your Post Process isn't doing anything odd but you still have issues, try it with a static lightsource so that you know for sure that it's taking all of your lightmass settings into account. And, if you want to try it with dynamic shadows to see how bad it really is, you should be able to choose to have your dynamic light cast shadows for static objects. You also need to make sure that your static mesh all have Cast Dynamic Shadows selected, I think. I don't have UDK available to make sure right now...

    Comment


      #3
      Thanks for assuming I don't know anything, I actually don't. ;P

      This is my first foray into UTK, though I've played with the idea of building an engine for a long time, but discarded it as too time consuming to be workable. I'm ok with doing dev work though, for example, learning what it takes to make a custom node that does the lighting, and using that, or figuring out what exactly I'm doing wrong with deconstructing http://www.moddb.com/games/unreal-to...shading-in-ut3 (which is another route I was trying..)

      So! Back to the topic at hand, your suggestions. I'd fooled with most of these individually, but not togeather. After reading yer post though, I looked through every lighting setting I could find in lightmass, and shadow/light settings on both the objects, world, and light itself. No good.

      While writing this post I actually got somewhere with the custom lighting component though. My previous problem had been that the light vector dot product wasn't strong enough to meet any kind of threshold outside of the Mat Editor, so add .25 to it and we are in business. Screen below. Floor is causing me probs, so I had to go to a default texture.

      Comment


        #4
        By the way, for anyone else who might be looking for something on Cel shading (aka cartoon shading) here's my current base material. You if you are looking for multiple levels of shade, you can add additional If's and multiplies in the shadow creation branch.

        http://stevie.eclexia.net/erin/tmp_i...ader_setup.jpg

        Comment

        Working...
        X