Getting An Anime Effect in Blender 3D (2.5)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Getting an Anime Effect in Blender 3D (2.

5)

In this tutorial, you will learn to get a type of ‘cell-shading’ texture on your character along with
learning multiple methods to add an edge to the character to get that anime/manga look to it. For
this tutorial, I’m going to be using a sphere to show how to get the texture and what it will look
like, but I will also be including characters that I’ve made to show end results.

First you’ll want to open up Blender. I will be doing


this in version 2.5, but it’s
nearly the same thing for
previous versions, you
may just have a harder
time finding the correct
panels. So, once you open
up Blender, delete the
default cube and add a UV
Sphere, and set smooth.

Setting up the Material:

Now lets head over to the material panel (1) and add a new material
(2). Then under the diffuse options, check the box that says
‘Ramp’ (3). Now a ramp is basically a gradient that you are adding
to the overall effect of the material. So in essence, you could have a
transparent material, but have a ramp where there is color on one
part of the mesh that fades into transparency. Although we will not
be covering that in this tutorial. So, now that you added a ramp, we
need to change the effect of the ramp. So, next to the word ‘Input’
there’s a little selection box and we are going to change the input
type from ‘Shader’ to ‘Result’, saying that we want our material to
be the result of the gradient.

This next part will vary depending on your character and the type of shading that you are trying
to achieve. First, I like to choose the diffuse color that I want, for this I’m going to pick a light
blue (5) (RGB: .357, .635, 1.000). Once you have your color chosen, you are going to have to
select the ‘cursor’ #1 in the gradient and change it to your diffuse color (6). Once that is done, we
need to create the cell shading shadow. So, select the ‘cursor’ #0, and change the color to a
darker shade of your diffuse color. I prefer to simply subtract .200 from each of my RGB values
to keep it within the same shade and family color. So, for my example, my darker end will be
(RBG: .157, .463, .800). Now if you’ll notice, the image of
the gradient did not change when you changed the color. That
is because the alpha value is currently 0.000, making the
material, no matter what the color, transparent. So, simply
change the alpha value to 1.000, making the transparent end
of the gradient opaque.

By now you may be thinking how in the world is this going to


end up looking cell shaded. The next couple of steps we are
going to finish it up and show you how to do more than just
two tone shading, which is what we are currently focusing on.
Now, you should have ‘cursor’ #0 selected and the Po number
(Position number) should be at 0.000 (7), well let’s change
that to .065. Select ‘cursor’ #1 and it’s position should be at
1.000, let’s change that to .07. Now when you look at the
gradient, it should no longer be a subtle change. The whole
point of the cursors is to allow more control over the
gradients. The material preview should now look more like a
toonish or anime type shading, except that it’s too shiny. So
now, we scroll down past the diffuse options to the specular
options. You should see a white box with a set intensity
underneath, probably at 0.500, change it to 0.000 (8) since
most anime don’t have shine to their materials. Now you
might be in business.

Now if you’re style of anime/cartoon texturing involves more than just a normal color and a dark
color, add 2 ‘cursor’ with the ‘Add’ button under the diffuse option pane, set them close together,
but note that one of the cursors has to have the same color as one of the other colors you’ve used,
otherwise you might end up with a subtle gradient happening in your material. Here is an
example of a tri-tone.
Sample of just material on character:

Different Edge Effects:

Blender Default Edge:

Within Blender there is the default edge setting, most commonly seen
when toon rendering. By far this is the worst method of creating an edge if
you plan to be animating. The reason being is there is very little control
over the edge options, leaving the user at the fate of Blender of what to
place edges on.

Simply go to the ‘Render’ Tab, scroll down to the ‘Post Processing’


options, check the box labeled edge and change the Threshold to 0. The
reason I choose 0 is that Blender will then add edges mainly to outlines,
where the higher the number is, the more geometry lines it starts to add
edges to and it ends up looking like a bad wireframe render. Another issue
you may encounter is that your line thickness is too thick, well if you want to fix that, you are
going to have to increase the resolution of your render, a big set back if your scene already takes
a long time to render.

Here is what I end up with when rendering with Blender’s default edge setting, alright but
lacking a line in areas.:

Edge through Nodes:


The next method is through nodes, and you won’t get a nice clean edge, but it makes a rather
nice edge effect, although this method depends entirely on camera angles. You’ll probably want
to split your screen in half and then go to the node editor. It is not necessary, but you might be
switching back between your model and your nodes. Once in the node editor, select the material
nodes button, and check the box that says ‘Use Nodes’.

Now two boxes should have popped up in your node window connected to each other. The larger
one is where all the information from your current material comes from and the smaller one
shows you what the end product will look like. To keep the next part simple, I’m going to say
what node you have to add at a time, what changes in that node you have to do and then show the
overall node setup at the end.

Material Node (large one they gave us): click the button that looked like the Material Nodes
button you had to click to activate the nodes for materials, from there it should pop up with a list
of all the materials in the file, select which one you want to apply this node to.

Camera Data Node (Add -> Input -> Camera Data): Leave this be for the time being.

Vector Math Node (Add -> Convertor-> Vector Math): Change ‘Add’ to ‘Dot Product’. Then
connect the Normal of the Material Node to the first vector of the Vector Math Node. Have the
View Vector of the Camera Data Node hooked up to the second vector of the Vector Math Node.

Color Ramp Node (Add -> Convertor -> ColorRamp): Now, this should have its Fac (Factor)
input connected to the output Value from the Vector Math Node. The Color Ramp itself you have
to change to the amount of shadow you want, the bigger the black, the bigger the shadow. Just
remember that it needs to be a sudden shift and not a subtle gradient.

Mix Node (Add -> Color -> Mix): Change Mix to Multiply. Change the Fac (Factor) from .500
to 1.000. Have the color output from the ColorRamp Node attach to the color2 input for the Mix
Node and have the color output from the Material Node attach to the color 1 input for the Mix
node. Attach the color output from the Mix Node to the color input for the Output Node (small
box the initially gave us).

At this point in the Output Node, you should see a black edge around our material. The thickness
of that line depends on the changes you make in the Color Ramp Node.
Simply render and you get the following results:
Edge with Freestyle:
The last method and possibly the best method is to render using Freestyle which is currently
being integrated in Blender. Certain versions are still a little buggy, but it’s being worked on and
it’s well worth it to put up with a little bugs since the results are great. First, you will need to
download the newest build of freestyle at graphicall.org. Once downloaded, you can either use
pre-made scripts or make your own. First though you need to enable your render for Freestyle, so
in the Render panel, simply click the two boxes labeled Freestyle. One is located at the bottom of
the Post Processing section of the Render panel and the other is located under the Layers section
of the Render panel.

Towards the bottom of the Layers section of the Render Panel, you will see a little section
labeled freestyle. There will be a button named ‘Add Style Module’, click it and it will bring you
to a list of pre loaded style modules (post processing effects), so just pick one and then render.
Be careful though since not all of them are working yet, so if you notice that nothing is
happening to your render, you may want to try another.

The .py script that I use is:

import freestyle_init
from logical_operators import *
from PredicatesU1D import *
from shaders import *

Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectionalChain(ChainSilhouetteIterator(), NotUP1D
(QuantitativeInvisibilityUP1D(0)))
shaders_list = [
    SamplingShader(5.0),
    ConstantColorShader(0, 0, 0, 1.0),
    ConstantThicknessShader(1)]
Operators.create(TrueUP1D(), shaders_list)

The line: ConstantThicknessShader(1)] defines the thickness of the line, so if you


want to make the line thicker, increase the number, and smaller, decrease the number.

The line: ConstantColorShader(0, 0, 0, 1.0) defines the color of the edge, so by


having (0, 0, 0) the color is black (measured in RBG), and the 1.0 is the alpha value so it will be
all the way opaque. However, if you want the edge to be a darker color of the mesh and not black
or one unison color, change this line to:  pyMaterialColorShader()

To use my script, simply go to the text editor in blender; copy and paste the code into the text
editor and save it as a .py. Just make sure you save it in a location where you can find it when
you want to select it as a style module. Finally, these are the results I got when using freestyle
and the first version of the code:

I believe that’s all I have to say, if you have any comments or questions please post them.

You might also like