6
$\begingroup$

I'm currently trying to use Freestyle with Cycles to render a toon shaded image of a robot. The robot is holding a sword, which uses a separate material, and since it glows, I don't want freestyle to draw edges on its blade. However, I can't figure out how to make freestyle ignore specific edges. The sword does have a separate material and is a separate object, so perhaps I can disable freestyle just for that sword's material/object?

Ideally I'd love to know how to disable freestyle for edges, materials and objects.

$\endgroup$
1

1 Answer 1

9
$\begingroup$

You can exclude Freestyle lines on a per-edge, per-face, or per-object basis.

For edge-by-edge exclusion, you first mark specific mesh edges using Freestyle Edge Mark, and then use the Selection by Edge Types options in combination of the Exclusion flag.

By the same token, you can mark mesh faces using Freestyle Face Mark, and use the Selection by Face Marks for face-by-face exclusion of Freestyle lines.

Per-object line exclusion can be done by first adding objects to a group and then using the Selection by Group options.

See the Freestyle Line Set section of the online Blender manual for more detail on the three approaches:

https://www.blender.org/manual/render/freestyle/parameter_editor/line_set.html


UPDATE: Additional notes on edge-by-edge exclusion of lines

For example, if you want to draw silhouette lines except for those flagged by Freestyle edge marks, then follow the instructions below:

  1. Enable the Inclusive option (that is the default).
  2. Enable the Logical AND option (as opposed to the default Logical OR).
  3. Turn on the Silhouette and Edge Mark toggles and also enable the X button next to the Edge Mark toggle.

The combination of these options indicates a condition like "silhouette lines AND NOT edge marks" as in a programming language.

There is a limitation in the Freestyle GUI that Logical OR and Logical AND cannot be used at the same time.

For example, suppose that you want to draw silhouette lines and crease lines but not those flagged by Freestyle edge marks. In this case, you would need to specify a condition like "(silhouette lines OR crease lines) AND NOT edge marks". This condition cannot be expressed by a single line set because the condition uses both logical AND and logical OR at the same time. Instead you define two line sets, one for "silhouette lines AND NOT edge marks", and another for "crease lines AND NOT edge marks". The two line sets are drawn one on top of another, so they are treated as if the two conditions were combined with logical OR.

Indeed edge-by-edge exclusion using Freestyle edge marks is a bit tricky to apply. Inclusion of more lines by edge marks is much easier, and that is the most typical use case of edge marks.

$\endgroup$
3
  • $\begingroup$ I just can't seem to get the per line exclusion working. In the end I just disabled it by material using the per group setting mentioned in the manual link you posted. I will try again in a simple scene and see if I can get it working. $\endgroup$
    – MrFlamey
    Commented Jul 28, 2015 at 9:45
  • $\begingroup$ I have updated the answer with additional notes on edge-by-edge exclusion of lines. Hope this update helps. $\endgroup$
    – T.K.
    Commented Jul 28, 2015 at 13:48
  • $\begingroup$ "define two line sets" was the key in my case. I wonder if an advanced option can be added to the GUI for these rare cases. $\endgroup$ Commented May 23, 2018 at 0:59

Not the answer you're looking for? Browse other questions tagged .