Hello!
I had an effect that I'm wondering if it is possible or how difficult it may be.
I'd like two-tone cel shader that reacts to light, I know this is doable. I'd like to be able to plug in two texture maps, one for the light color, one for the shadow, if possible, instead of using a material for each object or just darkening the value for the shadows, instead use a particular color.
I'd also like it to have an outline that is two-tone as well. This is something I don't think I've seen done in a video game before. Here's an example of what I'm hoping to achieve...
Just wondering if anyone has seen this done with the two tones for the outline, or if you have any advice or examples.
Replies
As far as the shadowed outline goes, it's nothing new but most artists choose to make the outline full bright. Keep in mind that you'll have to reverse the shadow and highlight because the shading in the outline will be invert that of the model because of the flipped normals.
SF's node suffers from:
- Broken outline based on uv seams. A simple fix by having the shader read from a secondary uv channel where the entire model is planar mapped, but the SF node doesn't read for other uv channels.
- Lack of varying lineweight. Using a black and white texture or vertex colors can easily change the variation of line weight on your model. SF does not support this.
- SF doesn't support per pixel color control on it's outline either. The outline will only ever be one color across the entire shader. This can easily be fixed by allowing an outline color texture.
- SF doesn't allow it's outline to take lighting or be full bright.
Your best bet is to have someone custom write an outline shader for you.It's really sad that people aren't putting as much effort to help advance tech for non-photo realistic rendering for packages like this.
As far as the uv seams go, yes you can planar map uv0, but I'd rather be able to define which uv channel instead of using 0. It's a consistency and standards thing.
You're most likely right on the breaking. Generally, with the models I've been making recently, the uvs are generally broken along the smoothing groups to make sharp edges. Although I remember doing some tests on a smoothed cube that would still break the outlines based on the uv seams.
You're correct on the line weight. The last set of models we made have varying line weight. I have to check on this though because I think we're doing it in a very round about way as opposed to just running the offset through the outline input.
What I do remember is the outline input in SF not being very friendly to customization. We did heavy tests with it at the beginning of the year and opted to just make our own outline shader.
And I honestly don't know what I meant by "SF doesn't allow it's outline to take lighting or be full bright."
That makes no sense. I think I left something out in that sentence.