Problems with using toon shaders

I’ve run into a little problem with the toon shader option. I am experimenting with using blender to create a logo. The file contains several simple meshes, all with plain toon shaders. No matter what I try, the rendered output will only draw outlines around the whole set of meshes, rather than drawing lines around each mesh to show the separate images.

This is what I mean.

http://www.bridgesyouth.org.uk/rubbish_files/test.jpg

The meshes don’t overlap and there is clear space between them. I have tried meshes 1 vertex deep, and also extruding them by 0.1. Nothing seems to work.

Has anyone got any ideas.

Did you try rendering with the Unified Renderer option turned on? It’s at the bottom right in the Scene settings (F10). AFAIK, it helps with toon edges.

Martin

I tried it when I was having the same problem. It didn’t work.

click on the edge setting and increase Eint. If that didn’t work: Set each object before or behind the other. try joining-seperating.

theeth. What exactly is the “unified renderer” and what does it do. I have heard about that in the past four years that I have been using blender and YES I read all the docs on it. But I still do not understand what it is(as so much of blender remains a mystery to me) I have always had a feeling that it and the “render deamon” were linux only things so I never paid attentiont to them since I am a windows user.

http://img23.exs.cx/img23/8246/unified.jpg

Text Filched Directly from the Blender Manual

Blender’s default renderer is highly optimized for speed. This has been achieved by subdividing the rendering process into several passes. First the ’normal’ materials are handled. Then Materials with transparency (Alpha) are taken into account. Finally Halos and flares are added.

This is fast, but can lead to less than optimum results, especially with Halos. The Unified Renderer, on the other hand, renders the image in a single pass. This is slower, but gives better results, especially for Halos. Furthermore, since transparent materials are nowrendered together with the conventional ones, Cartoon Edges can be applied to them too, by pressing the All button in the Edge Setting dialog. If the Unified Renderer is selected an additional group of buttons appears in the Output Panel.

Thanks to everyone who posted with suggestions. Unfortunately I had tried all of them before resorting to posting on the forum. It’s obvious from some of the images posted in the gallery that it can be made to work. I just can figure out what I need to do.

FYI all of my meshes are physically separated. I can get a greater degree of edge marking if I increase the distance between overlapping meshes. Unfortunately this then causes angular distortion problems with my 50mm camera settings.

As I need this sooner rather than later I’ve had to give up and do it with GIMP. Maybe I’ll figure it out sometime soon.

Thanks

Mark.

All you have to do is put the Eint value up to about 10 or so like Backiz said.

Examples (you have to click the link then hit return in the location bar when the page fails or copy pste the URLs):

Eint=1,

http://www.geocities.com/ajr650/toon.png

Eint=10,

http://www.geocities.com/ajr650/tooneint10.png

this is a well-known renderer limitation (though i’m not aware of the technical background). for some reason blender tends to accent the silhouette-edges far more then creases “inside” the object(s), as seen from the camera.

there is a work-around for that, but it works only in the game-engine - and is an ugly hack :wink:

you make a copy of your current object and invert the face-normals so that they face inwards. then give this object a black color using vertex-painting. finally go in edit mode an press ALT+S for scaling along normals. this will inflate it a bit, and the amount of inflation is your edge-thickness.

unfortunately this doesn’t work with the regular renderer, and i have no clue why

I’ve tried Eint values varying from 1 all the way up to 255 and it makes absolutely no difference, apart from the entire silhouette edge being darker. There still aren’t any overlapping edge lines. Well not on my machine anyway.

One difference between my image and yours is that in mine the camera is directly perpendicular to the mesh surface. Maybe that has something to do with it.

P.S.

Just fixed it!
Camera -> Ortho -> off

What is the actual mesh like? do you have lots of sepparate figures.

If so then I’d try switching your camera to ortho (or make it a higher number lense) and moving some of the models to get more distance between them. (ortho may be ok only because your models are very 2d).

usually if the distance to the camera differs greatly between models you get the outlines that you don’t get if they’re close together.

The edge function is quite old and not that great… someone programmed it during blender’s youth as a cute addition, but it’s never been optimised seriously.

Tested it and yes I was right.

see here

http://www.alienhelpdesk.com/misc/orthocir1.jpg

pic with Ortho camera

http://www.alienhelpdesk.com/misc/orthocir2.jpg

See how much further from the camera the 2 cirles that are behind the front one are?

I only used an edge intensity of 5 here. And with an ortho camera of course there isn’t really any depth… the only reason the red circle is smaller than the other 2 is cause I resized it.

Another thing about the edge rendering is it doesn’t draw round the edges of objects that have textures with alpha channels like leaves the way I’d like. A square mesh with a map of a leaf will have a square border line and not one that follows the leaf edge.

I think that’s pretty obvious because the edge is marking out geometric edges but it would be nice to select which objects not to draw edges round so that I could add a toon tree with leaf textures that I put a black line round myself and not have the edge renderer also put a square border round.

Yes in the end toon edges should be selectable per material, not per scene or even per mesh. Though then there should be a way to make sure that the edge doesn’t double where materials with edges enabled meet.

There’s lots of potential in edges, though no one seems interested in coding a new/better version.