Blender: Freestyle render engine
If you're looking for a good, open source renderer, look no further than Freestyle for Blender. Looking for a photoreal finish or a cartoon? Freestyle can do both.
Every day, 3D artists spend hours working on their computers trying to get photorealistic images, but sometimes we need to have images styled more like a comic; luckily Blender can do them, using the Freestyle option! Freestyle is an edge and line based non-photorealistic render engine. It generates 2D line drawing from a set of objects; lines can be stylized in a lot of ways (different line colors and thickness or by adding random displacements) to produce artistic (hand drawn) or technical (blueprint) styles. Freestyle for Blender has two complementary modes for line stylization: the Parameter Editor and the Python Scripting mode. In this tutorial we'll use the first one.
Step 1: Model setup
For this tutorial we will use a Vespa Special model (the file is here).
Open Blender and load the .blend file. Change the render engine from Cycles Render to Blender Render, then select emission planes on the top of the scene and delete them. Add a Sun Lamp (Shift+A > Lamp > Sun) and rotate it about 60 degrees along the y axis and 45 along the z axis. Select the camera and turn off depth of field in the camera options tab.
Step 2: Materials setup
Now we'll change all the materials (created with nodes) from photorealist Cycles materials to Blender internal Toon shader. Select the body of the Vespa, go into the material tab and uncheck Use Shader Nodes. Select Toon shader, set smooth as 0,9, enable ramp (change white color to red) and set specular intensity to 0. Change all the others materials to Toon shader, (smooth = 0,8–0,9 and specular intensity = 0) and make a render test (see image). Now we're ready to play with freestyle.
Step 3: Freestyle line set options
Enable Freestyle in the render tab and select relative line thickness. Open the Layer tab and let's see the main options: you can control the amount of crease lines; culling enables you to mesh out of 3D view (improve performance); face smoothness makes smoother silhouette lines of objects (more render time).
For Visibility there are three choices: Visible (only visible lines are rendered); Hidden (lines occluded by at least one surface are rendered) and QI Range (Quantitative Invisibility); lines occluded by a number of surfaces in the given range (start/end) are rendered.
In the Edge type tab we have to choose one or more edge to render: Silhouette draws silhouettes around objects ¬– very good for organic models (it works only with a close mesh). Border is for open edge meshes (Suzanne's eye socket is an open edge). Contour draws the outer edges and inner open border. External Contour draws only on the outer contour edges. Material Boundary draws a line where 2 materials meet on the same object. Crease draws only edges whose adjacent faces form an angle greater than crease angle. Edge Marks renders marked edges (jump into edit mode, select the edges you want to be marked then Ctrl+E > mark freestyle edge).
Freestyle lines setting
Step 4: Freestyle line style options
Line style settings define the appearance of lines; we have 5 main menu choices: stroke, color, alpha, thickness and geometry.
In the Geometry tab control, there are thirteen modifiers available that add some 2-dimensional offsets, displacement or noise at lines (geometry image). The Thickness tab has five modifiers available, we can simulate broad and flat pens for calligraphy or change line thickness using the distance to the active camera or mesh material (thickness image). Alpha and Color tabs control the transparency and color of the strokes (alpha-color image). In the Stroke tab we can tweaks lines: remove the ones longer/shorter than the threshold; change types of line caps or enable dashed lines (stroke image).
Step 5: Render setup
For our render, we'll use 2 sets of lines; the first one will be a black line with a calligraphy (orientation 60 degree, min thickness=1, max thickness=2) along with the stroke modifier (curve mapped, min value=1, max value=4). The second set of lines will be white with a calligraphy modifier (60 degree, min thickness=1, max thickness=3) and a spatial noise (amplitude 2, scale 20) and perlin noise (frequency 30 and amplitude 15). Set camera and hit F12 to render.
Top tip 1: Postproduction with Gimp
I usually use material index before I start the render; in this way, when I work in Gimp, I can easily select the different materials of my models and the post-production workflow becomes quicker and more efficient.