Blender Freestyle



Blender 2.91 Manual. Files & Data System. FBG Dutchie -'Put Inna Blender Freestyle'(Official Music Video) Produced by: JakFor4 For Booking Inquiries Contact: BillyKauck23@gmail.com.

I needed a reliable way to render wireframes and came across freestyle rendering. I realized that freestyle was a lot of fun and had multiple uses. Everything from cartoons, to blueprints and wireframe rendering, can be made with freestyle.

What is freestyle rendering and How to use it in Blender? Freestyle rendering is an NPR(non-photo-realistic) render engine that adds a layer of lines above your render based on the geometry in your scene. In the render settings, check the checkbox on the freestyle section to enable it. In the view layer tab, you will find all the related settings to customize freestyle to your needs.

In the rest of this article, we will dive deeper into freestyle and how we can use it to do some common rendering effects like wire frame rendering and cartoon styles.

What is freestyle rendering?

Freestyle rendering is a Non-Photorealistic-Render(NPR) engine that was added to Blender in version 2.67. With it, we can create a line layer above our render based on the geometry we created.

What this means is that we can create a lot of different kinds of art that would not be possible without it. For instance, it can be used to make cartoons in different styles. We can also do more technical renders like blueprint renders and wire frame renders if we want to showcase how our original 3D renders were modeled.

If you want to create cartoon style renders but find freestyle to be a bit too complex, I would recommend to check out toonkit. It is an add-on that adds some shader nodes to Cycles as well as lamp, and world settings. Much easier to set up and work with. It also renders almost real time.

You can find it here:

Blendermarket Toonkit for Cycles

How does freestyle rendering work?

Freestyle rendering is enabled in the render settings of either Eevee or Cycles. Both renderers are supported but they differ slightly in features.

Freestyle is enabled for the entire scene. But it can then be controlled on a view layer level. The scenes 'global settings' for freestyle are in the render settings, then we have some freestyle settings that are related to a view layer.

When freestyle is enabled, each view layer has two additional layers of settings. After the 'global settings' that are in effect for the entire view layer, there is the 'Freestyle Line set' settings and the 'Freestyle line styles'.

Let's start with line sets. We can have multiple line sets. The basic idea is that they will determine where a set of lines will be drawn. For example, we can have one line set that is selecting the silhouette of our objects. Another line set could be the internal lines of objects and the third set of lines could be any object that is behind one or more other objects.

There is also an option to mark any edge to be detected by freestyle manually if we want full and ultimate control.

Blender

The next layer is the line style. The line style will determine how a freestyle edge will be drawn, or how a line will look. Each line set can have a line style attached.

So if you can see the pattern, we first had some global settings. Then we had one or more line sets that will actually be a kind of selection of edges. Then the line style will give us the power to tell Blender what that line should look like.

How can we set up freestyle rendering?

We established three levels of settings for freestyle. What I like to call the 'global settings' followed by line sets and line styles. Now let's dive into a more practical example.

Blender

Here is a low poly scene that I made to test this. We have some basic geometry. Then there are some reshaped cubes, water with quite a bit of movement and waves as well as some cloth made with a cloth simulator. We also have some flat planes for the vegetation.

Related content: More than 30 Blender modeling tools explained

The scene is rendered in Eevee with some post-processing effects like bloom and depth of field.

Related content: 5 cool camera tricks in Blender

Let's get exploring. In the properties panel and under the render tab, check freestyle. We have two settings here. Generally, I never touch these.

Line thickness mode will use the line thickness setting when set to absolute. When set to relative, the line thickness is dependent on the resolution of the image. 480 pixels in height will correspond to 1pixel line thickness. Double that to 960pixels and the line thickness will be 2pixels.

The line thickness can be adjusted on the line style level instead.

Go to the view layer tab and you will find three sections related to freestyle.

  • Freestyle
  • Freestyle Line Set
  • Freestyle Line Style

The freestyle section has some overarching settings. I seldom touch these settings. But we will talk briefly about them. The control mode is a switch between using the parameters set here in the interface or to use a python script file to make the freestyle settings. We will stick to parameter editor.

Let's jump down to the edge detection options. The Crease angle determines the degree at which a crease is considered a crease. This becomes important when we dive into edge types. Edge types are a big deal when it comes to selecting edges with a line set.

If face smoothness is ticked the faces that belong to the same smoothing group will not get a line even if the crease angle says that it would.

Culling will ignore any edge that can't be seen from the camera, even if it is within the frame.

Ticking the advanced options and using these settings can help if we don't get smooth lines on curved surfaces.

Freestyle Line sets

So far we mostly covered concepts and some lesser used settings. But this is where we start to set up freestyle for real.

We can have multiple line sets, each 'selecting' a different set of edges. We then apply a single line style to each line set.

We have 5 different selection modes, we can have 1 or more of them enabled at once and it is the combination that creates the final selection. When multiple selection modes are used, the most restricted will apply.

  • Visibility
  • Edge Types
  • Face Marks
  • Collection
  • Image border

Image border is really only a performance setting and will mostly be on. So in reality we only have 4.

Visibility

Visibility determines what edges will be rendered as freestyle by visibility. Set this to visible and freestyle will use the edges that we can see from the camera.

Hidden will use the lines that are not visible from the camera, but is hidden behind some other object or geometry.

QI Range lets us set a range from how many layers of geometry should be between the camera and the first object that gets rendered and how many layers after the first rendered lines that will be considered for freestyle drawing.

Edge types

Edge types is where we do 90% of our line set settings. It allows us to more dynamically select edges based on some criteria.

Before we look at the different types we have inclusive and exclusive, this just dictates if the freestyle lines should be drawn on the marked edges or on everything else.

The 'logical or/logical and' can be a bit hard to understand at first, so I will try to explain it simply. With 'logical or' we say that the edge need to be at least one of the selected criteria below to be marked. For instance, it has to be 'Silhouette OR Border OR Contour'. With 'logical and' we say that the edge has to be 'Silhouette AND Border AND Contour'. This means that 'logical and' will remove any edges from the selection that does not comply to all the edge types that we select.

These are the edge types:

  • Silhouette
  • Border
  • Contour
  • Suggestive contour
  • Ridges & Valleys
  • Crease
  • External Contour
  • Edge mark
  • Material Boundary

You have probably noticed that there is both a checkbox and an 'X' for each of them. The checkbox tells Blender that it should be 'included in the calculation' if you will. The 'X' gives the edge type a 'NOT' in the calculation. This is confusing, yes I know. Let me try to explain.

We are dealing with Boolean operations here, and it gets a bit confusing to know what edge is actually being drawn. We will look at two example.

Let's say that we are set to inclusive and 'logical or'. We also have Silhouette, Crease and border selected. That would give us this formula:

An edge will be marked if an edge is:

Let's now say that we press the 'X' on Border. Then it looks like this:

This formula will still draw an edge if 'it is not' a border. Pressing the 'X' may then actually still add more lines to the line set. It just means that lines that 'are not' borders will be selected.

If you use 'logical and' it may look like this if border is set to 'X':

We can't have both 'OR' and 'AND' in our Boolean math. We need to go to python scripting for that.

Let's leave the math for now and look a bit more at what the different edge types actually mark.

To help you see this a bit better I made an info graphic showing how each setting looks on our test image. You will notice how edge mark and Material Boundary is left out. I want to cover these separately.

Other than the edge type settings I use the default settings to show how these different edge types work.

Click on the image to open in new window and click it again to enlarge.

With edge mark we can mark an edge to be drawn as freestyle. This is very handy when we want ultimate control over what edges gets drawn. To mark an edge follow these steps:

  • Go to edit mode
  • Select the edges you want to mark
  • hit 'ctrl+e' and chose 'Mark Freestyle edge'
  • In the freestyle line set options, make sure that 'Edge mark' is selected in the edge style settings.

Edge marking can be very useful for wire frame renders, where we need to show how our geometry was built. For instance, I use this when I sell stock 3D models to show that the wire frame is of good quality.

Magix driver download for windows. Edge marks is not useful when we want to draw the silhouette of an object that does not have an edge. This is most prominent on round objects where we may not have an edge right at the silhouette line.

Left for last is the material boundary setting. It is simple, it draws the freestyle line where there are two different materials of either side of the edge. I was just not smart enough to include an object with more than one material in the render I did for the info graphic.

Face marks

Facemark is something that I never use, and I imagine few others do as well thanks to where it is in the interface. It is similar to edge mark, but instead of marking an edge we mark a face and the edges holding up that face are being marked.

To mark a face do the following:

  • Go to edit mode
  • Select one or more faces
  • press 'ctrl+f', at the bottom you will find 'face data' and 'Mark freestyle face' at the bottom.

In the freestyle line set options we can choose to include or exclude the marked faces. If we exclude it, the unmarked faces will be drawn.

We also have the 'one face' and 'both faces' option. This determines if both faces on either side of an edge need to be marked in order for the edge to be drawn, or if it is enough if one face is marked.

Collection

Collections are interesting. It allows us to select a group of objects that will be rendered with the given freestyle line set, or be excluded. To use it, select it in the line set options and the interface will expand. Select the collection that you want to include or exclude.

As an example, let's say that we have a background that we don't want to render freestyle lines for, then we can exclude it by placing it in its own collection and using these settings.

We can also do the opposite and only include the foreground in a collection and use that.

Freestyle line styles

Let’s now take a look at what we can do when we combine line sets and line styles. Since Line styles really can be tweaked into the extreme with a huge range of possibilities we will walk through a few examples instead of going over the settings.

These are the examples we will go through.

  • A cartoon style
  • A wire frame showcase setup

Cartoon style

We will start with the cartoon style. I made a short animation of how it turned out that you can watch here.

A little background. I altered the scene that I showed earlier and that I also used in the info graphic above. I used Eevee as the render engine with the toonshader by Paul Caggegi.

The crosshatches on the ground is not freestyle rendering. It is a combination of the toon shader and a cross-hatch texture that I got from this link.

Freestyle line thickness is set to “absolute” and 2 pixels. Drivers bacharach usb devices. The line set is set to “visibility” and “edge type”. The edge types then use “Inclusive” and “Logical OR” and these are the edge types used:

  • Silhouette
  • Contour
  • Crease

Now for the line style. I started with the default settings and tweaked only the thickness settings. For the base thickness I set 2. Then I added two modifiers. One “distance from camera” and “along stroke” below that and started setting up the 'distance from camera' modifier.

By looking at the grid floor in my scene I estimated the furthest distance on the island from the camera. Not taking the ocean into account I came up with 40 meters for the max range. Then I changed the 'min value' to 0.5.

I left all other settings as their default. However, I realized that the value max and value min that determines the thickness based on the distance actually makes the furthest lines thicker and closer lines thinner by default. I meant to have it reversed but did not realize this until it was too late. However, I think it turned out alright anyway since the cross-hatched lines would not be affected anyway it now just looks like there is some variation in the line thickness. Something to keep in mind though.

If you want a more dynamic flow between the lines' appearance based on camera distance, you can change the modifier from linear to curve and you will be able to adjust the thickness however you like.

Next, I set up the “along stroke” modifier. This modifier allows us to set a dynamic line thickness based on a curve. Change the modifier from linear to curve. The curve can then be used to set the thickness from one end to the other.

For me I set both ends to 0 and the middle, close to 1. This set up makes every line taper of and the lines gets a more sketchy look.

These two thickness modifiers combined is a very common setup for cartoon styles and I think it demonstrates some basics of how to get started with a cartoon look in Eevee together with a toon shader that is simple to work with.

Wireframe render

We will now move over and take a look at wire frame renders. For this I have switched to cycles and setup a material override with a clay like material. This is because material override is not currently available in Eevee.

To set up wire frame rendering I have used a thinner line width of 0.5px in the freestyle render settings.

For the line set. I am now only using “Visibility” and “edge types” with “edge types” only set to “Edge Mark”. Then I have gone into edit mode and marked all edges except for the ground, ocean and the plants' particle system.

In line style I set the thickness to 1 and change the base color to white in the color settings.

You can see that on the cloth, not all edges are drawn. This is because of “visibility” turned on. Freestyle does not detect all those edges as visible.

If I remove “Visibility” however we get a result that looks like this.

A quite messy net of spaghetti if you ask me. However, this could be further tweaked by using the “distance from camera” in the thickness section as well as in the alpha section. But this has already been covered in the cartoon style above, so I opted not to go further on this route.

If you are interested in more specific settings and what they do, as well as more descriptions of each modifier in each of the different sections of the line styles, I recommend to check out the blender manual.

Freestyle is not limited to these kind of simple lines, we can dive much deeper into more sketchy and painterly looks. We have not touched on the geometry or texture sections in this brief overview, but you may now be a little bit more hungry to explore those sections on your own.

How to reuse line styles?

To reuse a line style we append it from one file to another. Go to file->Append and browse for your .blend file that contains the line style.

Click the blend file to open it and find the 'FreestyleLineStyle' folder. Inside it you will see the names of your line styles available in the file. Click 'Append from library'.

Go to your line style settings in the properties panel and view layer tab. Find the freestyle line style section and press the pen icon to open the list of line styles. Select your linestyle by name.

How to use freestyle in the compositor with Cycles and Eevee

In many cases when working with freestyle we need to combine it with other tools to create a full effect. This can be toon shaders, compositing nodes and dabbling with multiple scenes and view layers. Hanwang laptops & desktops driver download.

Update: In Blender 2.83 there is now a pass for freestyle. This means that we can go to the view layer tab and find the 'freestyle' section. In there, there is a checkbox labeled 'as render pass'. Check this to have Blender render freestyle on a separate pass that we can control in the compositor instead of combining it with the combined pass.

Related content: How view layers can help you render large scenes with less memory in Blender

To use freestyle with the compositor it is essential to get the freestyle lines rendered on its own layer with an alpha background. This is currently only supported in cycles. We will look at how this is done. We will also be going over a workaround that enables us to use freestyle lines in Eevee as well.

If our scene is made in Eevee, and we want to render a pass of freestyle lines above it with an alpha background that we can use in the compositor. We can do so by using multiple scenes. It is not as complicated as it first sounds.

Start by turning off freestyle rendering under the render tab in the properties panel. In the top right corner of the interface we have two dropdowns. One for scenes and one for render layers.

Press the icon next to the right of the scene drop-down and select “linked copy”. This will create a linked copy of our scene. However, the render settings are not linked between the two scenes. This enables us to set the linked copy to render with cycles.

In your new scene. Find the render tab in the properties panel again and switch the render engine to cycles. Then go to the “film section” and check “transparency”. Also enable “freestyle”.

Next we will need to set up filters in order to render the freestyle lines without the geometry or background. Go to the view layer tab and find the “filter” section. Deselect all except freestyle.

If you have not yet setup your freestyle line sets and line styles, do so now.

Then render the scene. You should get a transparent image with only the freestyle lines visible.

Next switch back to the Eevee scene. Make sure that you disabled freestyle in the render settings so that you don’t get freestyle lines burned into the image. We will use the Cycles freestyle layer to composite on top of our Eevee render.

When the render is done, go to the compositing workspace and tick the “use nodes” checkbox in the header. A render layer node and composite node should appear. If not use “shift+a” and add them in.

  • Select the render layer node and duplicate it with “shift+d”
  • Select your cycles scene in the duplicated render layer node.
  • Hit “shift+a” and add an “alpha over” node.
  • Connect the cycles scenes alpha to the fac of the alpha over node.
  • Connect the Eevee scene to the first color slot.
  • Connect the alpha over node to the composite node.
  • You can also add a viewer node and connect the alpha over to that as well to view the backdrop.
  • If the backdrop does not appear, click the backdrop button in the top right corner of the compositing editor.
  • Adjust the bottom color of the alpha over node to change the line color of the freestyle lines.

This is one of the simples possible combinations of a freestyle line render and an Eeevee scene. From here we can use any tool available in the compositor to manipulatea each layer by itself or the combination.

If we want the same kind of setup, but we have a Cycles scene that we want a separate render layer with the freestyle lines above we can use a similar method. In this case though, we don’t need a separate scene. Instead, we use a separate render layer.

  • Instead of adding a new scene, add a new render layer.
  • Select the new render layer and find the render layer tab in the properties panel.
  • Find the filter section and deselect all except freestyle.
  • Setup your freestyle line set and line styles.
  • In the render tab, find the film section and check “transparent”.
  • Also, make sure that freestyle is enabled.

In the compositor you select the correct render layer instead of the scene in the render layer node and that is the only difference.

If you want to learn more about how you can organize your scene, this article can help you to understand the outliner and collections.

Related content: How to work with collections(layers) in Blenders outliner

How can we export freestyle lines as SVG?

Freestyle can be converted to SVG and exported to be used in another application. It can also be imported into Blender again to work at it as a grease pencil object.

To export we need to enable the 'Freestyle SVG Exporter' add-on. It comes with Blender by default.

  • Go to Edit->Preferences and click 'add-ons'.
  • In the top right search box, type 'freestyle' and the list will filter.
  • Check 'Freestyle SVG Exporter' to enable it.
  • The add-on is now available in the properties panel under the render tab. The section is labeled 'Freestyle SVG Export'

You can select if you want to export from a full animation or just a frame. There are also some other output settings that can be useful, like how corners are treated and if we want to fill with the material color.

The SVG files will be exported to the output folder after the frame has been rendered. The output folder can be set in the output tab under the output section. This is the general output folder for animations and sometimes baked data in Blender.

Related questions

What other alternatives are there to freestyle?

Through google summer of code there is an ongoing project called LANPR that will most likely replace freestyle in the future. It is basically freestyle as a real time render engine.

  • LANPR website
  • Blenderartists.org - thread for LANPR

Author

Erik Selin3D artist, writer, and owner of artisticrender.com

My top product picks for Blender artists

Top Blender add-ons
UV Packmaster ProPolygoniq add-onsBaketoolsPro lighting: StudioExtreme PBR EvoDecalMachine
Top Blender courses
Creative shrimp coursesReal Time Motion GraphicsBlenderBros A-Z Environment Design Using Trim Sheets

Recent posts

How to use vertex groups in Blender10 tips for UV unwrapping in BlenderVegetation Blender add-on review and guideHow the color ramp node works in Blender10 Best Movies Made with BlenderBlender add-on review: Pro Lighting StudioIs Blender Used for Games?Blender version: 2.8x

Recent posts

How to use vertex groups in Blender10 tips for UV unwrapping in BlenderVegetation Blender add-on review and guideHow the color ramp node works in Blender

Popular posts

How to sell 3D models using BlenderHow to use alpha transparent textures in BlenderTop 10 material libraries for Blender artists
How to add a texture to an object in Blender

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.

Introduction

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.

Model setup

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.

Blender Freestyle Not Working

Render test of toon material

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).

Geometry

Thickness

Alpha color

Stroke

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.

Render setup

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.

Material index pass

Fetching comments..

Blender Freestyle Line

Newest

Blender Freestyle Alpha

Post a comment

Blender Freestyle Render

Related

Blender Freestyle Not Working

  • Tutorial: Maya

    Linear Color Management
  • News: Video General

    UV Packer for Blender