4
$\begingroup$

Instead of a solid "pen" line, I would like Freestyle to use a custom brush, that is an image file (e.g. PNG) that I create. I found this post:

Blender Freestyle Brushes

And read his link:

Help doc

But it does not work. I added a LineStyle Texture layer and selected my PNG image as the Single Image Source (Mapping = Along stroke). But when I render it is the same default "pen" line and not my custom brush image.

How do you do a custom brush?

---- updates below (after trying T.K.'s suggestions):

First, I try to copy all of the settings from the teapot and then use my own brush. But that did not work at all. Here is what that looked like:

attempt 1

Here is what I am trying to do:

enter image description here

So, next I try to just use the teapot file and change the brush image to by brush image and this is what I get:

enter image description here

It seem to be repeating the texture instead of sliding it along like a brush?? And it is also opposite (invert?) color? The round flat part is see-through instead of the black part. So I try the “invert” under image sampling and that did not work.

It seem to be filling the line with a texture instead of using the image as a brush. How do I use an image as a brush, like in the example picture I give?

$\endgroup$

2 Answers 2

4
$\begingroup$

Have you looked into example .blend files for using textured strokes? If not, try a couple of example .blend files available within the Blender 2.71 release log you cited, i.e.:

enter image description here http://wiki.blender.org/index.php/File:Teapot_pencil.blend

enter image description here http://wiki.blender.org/index.php/File:Mouse.Blend

Start from one of these existing line styles for textured strokes, and customize it with your texture PNG image.

EDIT: In reply to the updated question (22 May 2015)

Freestyle textured strokes always use a texture image as non-overlapping tiles repeated along stroke. Internally, textured strokes in Freestyle are rendered using UV texture mapping (that is a general functionality of Blender). Freestyle strokes have its own UV coordinates along stroke to map a 2D point in a texture image on to another point in the 2D stroke space. This means that the texture image cannot be mapped in such a way that one tile overlaps on top of another. (I guess this is a general limitation of UV texture mapping.)

I believe you need to rely on other Freestyle options to achieve what you are intended to do. How about using the Calligraphy thickness modifier instead?

enter image description here

$\endgroup$
5
  • $\begingroup$ I try your suggestion and then update my post above. I try all the options and none of them work to make a simple brush like I show above. Any more suggestions? Thanks $\endgroup$
    – Xuan
    May 22, 2015 at 2:37
  • $\begingroup$ Thank you I read your updates. It looks like the Calligraphy modifier just changes the thickness of the line and does not use my specific brush? It will not look right unless I can use the exact brush. It looks like custom brushes are beyond the capabilities of the built-in Freestyle options? Will I have to learn code a custom module to make this work? I am a programmer, I can probably learn it. Or is it impossible, even in a custom module? $\endgroup$
    – Xuan
    May 22, 2015 at 21:39
  • $\begingroup$ I think it is possible to write a custom style module in Python so that a brush texture is applied exactly in the way you like. Basically, you will need to split a stroke into very short pieces (splitting operation), extend them (as in the Backbone Stretcher modifier) to make them overlap, rotate them (as in the 2D Transform modifier) and apply a brush texture. Using textures in Freestyle scripting is a bit of hassle but is possible. Take a look at the scripting example .blend file mentioned in "Using textures in Python scripting" in the Freestyle section of the Blender 2.71 release log. $\endgroup$
    – T.K.
    May 23, 2015 at 0:17
  • $\begingroup$ FYI, here is the direct link to the scripting example .blend file: wiki.blender.org/index.php/File:Texture_scripting_test.blend $\endgroup$
    – T.K.
    May 23, 2015 at 0:18
  • $\begingroup$ I added an answer with my closest solution that I am going with for now. But I check yours as answer because you the only one who helped me out $\endgroup$
    – Xuan
    May 25, 2015 at 5:56
2
$\begingroup$

It seems that Blender Freestyle does not support brushes currently, so this exactly effect cannot be achieved. But I was able to achieve a similar effect by adding a Calligraphy modifier in the Thickness section for the thick and thin effect and a Perlin Noise 2d modifier under Geometry to make the shakiness.

enter image description here

$\endgroup$

You must log in to answer this question.

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