I’ve been experimenting with creating cleaner toon edges and found a pretty simple solution using composite nodes that gives reasonable results.
180 eint Before
180 eint After
It’s not perfect but is a vast improvement for just a few nodes
As it works purely from the edge’s alpha channel, the end result is an image where black is no edge and white is an edge. So it’s a flexible starting point for messing with edges. I’m sure I’m going down a well travelled path here so if anyone has any tips on improving the setup, I’d love to hear them :eyebrowlift:
I did some experiments with normals and couldn’t get consistant results that I liked. I was getting a lot more edge bleed causing fat lines and the line width was, somewhat variable…
I had a style in mind for my lines which this setup pretty much nails. It was figuring out that I could use the dilated edges to do a selective blur that helped simplify things. Before that I had a much more complicated setup that didn’t give as nice a result.
As this hasn’t been moved to the correct section, I’ve added my shader setup and some materials so it really is a “Monkey on a crate” WIP now
The nodes are doing the majority of the work in defining the style, that’s why I’m working backwards in doing the composite node setup first, then I can model and do the materials to work well within that style.
The edges is a bit of a subtle effect, so I’m not sure that I’m seeing what you’re talking about. Is the problem that edges aren’t rendering when the edge is seen through the glass? Or that the glass doesn’t have any edges at all?
I can tell you that any material with ZTransp on it isn’t edged, and that RayTransp materials will be edged but will also block the edging of things behind them. If certain edges are hidden from the edge rendered I suppose you could use multiple render layers if we can’t come up with anything more elegant.
The glass is ZTransp but I’m not overly concerned about it’s edges. It’s the edge of the walls that runs behind the glass that shows the problem. The edge is a consistant size across 2 panes, 1 pane and no panes. So what I need is some way to fade an edge that is dependant on how many layers back it is.
How about making another renderlayer set that renders only Ztra. The alpha channel of that layer would tell you how much glass you’re looking through, which could be a third input into your edge alpha clean group. You could take the Ztra alpha, color ramp it, and subtract it from your dilated edge alpha right before you run it into the size input on the blur node. This should shrink your edges based on how much glass they’re behind.
With the noodle pretty much sorted, it was time to test it with a moving scene. I ditched the shadow adjuster from the noodle as it only worked correctly with buffered shadows. This seems to be a current limitation of Blender as raytraced shadows aren’t 100% moved to a shadow pass. Apart from that the noodle used on this is the same as the last picture of them above.
This animation has buffered shadows on the title sequence and ray traced on the main part. And I gave the noodle a name
Had to try one last application of the Instant Toon noodle before I considered it done. This time I wanted a more complex scene with detailed texturing, so I opened up the elevator shaft from Elephants Dream
Due to the low lighting I had to adjust the color ramp to clamp less to black, apart from that, it’s the same setup as used for the animation.
I really like the results I’m getting now, so thanks to everyone who helped me get this done.