Freestyle for Blender

Hello fellow freestyle developers & users :smiley: umm… do you guys know what couse this problem? i set the freestyle options exactly the same between shots, i use append to import freestyle setup from FreestyleLineStyle in one .blend template file. But for this particular render shot is kinda different. is it a bug ?


i provide you with the .blend file, it will missing the all character/assets link in it but i guess the freestyle setup is still there an_taow_01b_16b.blend (298 KB)

johantri,
Thanks for your interest in Freestyle for Blender. The screen capture looks very interesting.
Could you kindly explain what are your expected rendering results? As far as I can see, the render contains invisible lines, as well as lines of advanced edge types such as suggestive contours. Are these line components something that you don’t expect to get?
Could you also please start Blender with the --debug-freestyle option at the command line, and let me see all the messages printed in the console during the rendering. This way I can get more detailed information about the rendering process in Freestyle.

Hi T.K. Thanks for your prompt reply. This is the result i would like to get, a clean anime outline render :smiley:


Is this what you want me to type in the terminal?
johantri@johan-i7:~/Documents/blenderversion/bin$ ./blender --debug-freestyle

i get this messages in the console when rendering :

#===============================================================

Freestyle

#===============================================================

=== Dimensions of the 2D image coordinate system ===
Width : 1280
Height : 720
Unit line thickness : 1 pixel(s)


| Scene|RenderLayer

=== Importing triangular meshes into Blender ===
Scene loaded
Mesh cleaning : 0.280000
WEdge building : 0.480000
Triangles nb : 254042
Bounding Box : 46.441

=== Rendering options ===
Linesets:
1: LineSet - LineStyle_TAOW.001
Crease angle : 0
Sphere radius : 1
Face smoothness : disabled
Redges and valleys : enabled
Suggestive contours : enabled
Suggestive contour Kr derivative epsilon : 0
Material boundaries : enabled

Passes :
Diffuse = disabled
Z = enabled

=== Detecting silhouette edges ===
Feature lines : 3.870000

=== Building the view map ===
Using culled adaptive grid with heuristic density and cumulative QI calculation
Proscenium culling:
Proscenium: [-64, 1344, -36, 756]
Origin: [704, 396]
Bounding box: [1.33127, 1.13394, 19.2241] to [-1.33703, -1.19476, 20.3515]
Proscenium : -1.33703, 1.33127, -1.19476, 1.13394
Finished generating occluders. Rejected 195504 faces.
Total area: 1.97576. Number of faces: 195505.
Building grid with average area 5.05297e-06
1188x1036 cells of size 0.00224788 square.
1305x1139 cells of size 0.00224788 square.
Bounding box: [1.33127, 1.13394, 19.2241] to [-1.33703, -1.19476, 20.3515]
Proscenium : -1.33703, 1.33127, -1.19476, 1.13394
2.6683 x 2.32871 grid with cells of area 0.0015491.
68x60 cells of size 0.0393586 square.
74x65 cells of size 0.0393586 square.
Generate Cell structure
Distribute occluders
Finished generating occluders. Rejected 391008 faces.
Distributed 195505 occluders. Retained 180030.
Reorganize cells
Ready to use SphericalGrid
ViewMap edge count : 46625
ViewMap building : 1.370000

=== Stroke drawing ===
Adding Python path: /home/johantri/Documents/blenderversion/bin/2.65/scripts/freestyle/style_modules
Warning: Thickness position options are applied when chaining is disabled
or the Plain chaining is used with the Same Object option enabled.
Strokes generation : 0.18
Stroke count : 759
BlenderStrokeRenderer: 1 threads
Temporary scene generation: 0.03
Stroke rendering : 0.56

i also provide you with the .blend file in my previous post if you want to investigate :smiley: if it helps, i use this version of Blender Freestyle build http://graphicall.org/815

Hi Johantri,

Just uploaded a new build, whit which I can’t reproduce your problem (though the file you give is a bit void, as we do not have the relevant lib one :wink: )…

Just curious Mont29, can you add suzanne to the file i give you? and try to render it with freestyle and see what’s the result is. Mine is still problematic and i have no idea why… i was render all the shots using the old freestyle build of yours. which is 2.63.14 and haven’t change the version yet due to lack of my knowledge of updating the necesary lib :smiley: until three days ago i managed to install your latest build.

However i delete all the user setting in /home/johantri/.config/blender/2.65/config hoping to refresh all the settings i have. And the overlaping outline render is gone now, with suzanne and plane… but… still a problem with my animation shots render… i think the problem is within the animation shots i have :frowning: well, one problem at a time i guess :slight_smile:

Thanks Mont29 ^___^

PS: i already add suzanne in this blend file, please let me know if you have line render problem like i do an_taow_01b_07.blend (353 KB)

Yes, with your second file I do can reproduce that render.

In fact, it behaves as if you had enabled “Edge Types”’ “Suggestive Contour” and “Ridge & Valley”… Not sure what happens exactly here, would wait for Tamito’s advice. :slight_smile:

Meanwhile, enabling Visibility and Edge Types selections (with standard options) fixes the issue for me.

you’re right :smiley: it fixed the problem :slight_smile: i think the problem is with the Face Marks option. i can’t render the line if it’s enabled. well, i guess i have to turn it off then… so thank you ^____^

I have been unable to build Win32 Freestyle branch since version 54338, despite my problem solving and repeated attempts to make sure that all relevant libraries are updated?? Using Tortoise SVN for years, and “it” seems to find all of the libraries are “updated??!!” so I continue to scratch my head, and comb through the screen fulls of code. Anyone else have any experience with this??
C:\BlenderSVN\build\win32-mingw\bin\blender.exe : fatal error LNK1120: 6 unresolved externals
scons: *** [C:\BlenderSVN\build\win32-mingw\bin\blender.exe] Error 1120
scons: building terminated because of errors.

Hi TK,

Been trying out recent builds and I love how far this has come! I’m using it primarily for architectural drawings and hidden line perspectives, etc. I was wondering if its planned to also have an edge type composed of the edges that the camera cuts through? It would be amazing for sections, cutaways, plans, etc. so that you could have nicely lineweighted drawings. Also, are intersections between separate meshes on the table as well?

looking forward to merge…

Just wanted to say you guys are doing some very cool work. Thumbs up.

Hi TK

Wondering how the refactoring for inclusion into trunk is going? Awesome piece of work, well deserving of trunk and hoping the increased exposure will attract the attention of developers and users it should. Thanks for your hard work and perseverance. <Kudos/applause!>

johantri and mont29,
When you don’t enable any of edge selection conditions (such as Selection by Visibility, Edge Types, and so on), Freestyle tries to draw as many feature lines as possible by default. These feature lines include invisible lines as well as advanced ones such as Suggestive contours and Ridges & Valleys.

As a rule of thumb, try to specify the most restrictive edge selection conditions that will pick up exactly what you want to draw. The more restrictive your edge selection conditions are, the less feature lines you will get. A smaller number of feature lines to be drawn also leads to a shorter stroke rendering time.

paulhart2,
Thanks for keeping the Win32 build updated. I merged recent trunk changes into the branch. Could you please try the latest revision and see if the build issue is resolved?

StompinTom,
I am not exactly sure what you mean by “the edges that the camera cuts through”, but I guess you want to draw some of hidden lines selectively. In Freestyle every feature line in the 3D scene has a value called “Quantitative Invisibility” (QI) that indicates how much the line is invisible. The value is actually the number of occluding faces. Visible lines have no occluding faces, so their QI is 0. If lines are hidden by only one face, then their QI is set to 1. QI can be any positive integer numbers depending on how many occluding faces reside between the camera and hidden lines. Now in the “Selection by Visibility” section of the GUI, you have the option “QI Range” that allows you to pick up the feature lines whose QI values fall in a specified range.

As an example, the following is a render showing a cube with a monkey in it. Black lines are visible lines. White lines are hidden lines with QI = 1, since they are only occluded by a front face of the cube. The white lines were selected by the QI Range option with both Start and End set to 1.


Dorro,
I keep working on the issues identified by core Blender developers in the first round of branch code review for the upcoming trunk merger. Most issues have already been addressed, and now I am working on several minor details. See also a quick progress report recently posted in the bf-committers list.

Hi TK, thanks for the explanation, I was never sure what that did!

What I mean is when you have camera clipping or orthogonal cameras that sit inside a model, the camera’s clipping plane passes through mesh faces. I’m wondering if it’s possible to get those cut faces as edges? The image below is just a cube with the camera clipping passing through it (same result also if an orthographic camera is placed inside the cube - at an angle in this case). Hope that makes it clearer!


@StompimTom I think T.K mentioned that there will be a more general "edge intersection " feature in the future that might be more useful or is it specifically the camera clipping plane you need?

Apparent intersections between faces / objects (when they intersect, but are not connected by an edge, if you know what I mean) and camera clipping lines would complete the set of lines you’d need for pretty well most things! Pretty excited for it :slight_smile:

For a lot of simple stuff a bit of tracing in CAD or Illustrator afterwards usually does the trick, but that’s difficult to do in animations and for complex models :wink:

taiwofolu, My current build on GraphicAll.org, (version 54598) was built without CUDA support, as the compile terminated, no matter what I have tried, so make sure that you get it and try it, before my next week build?? T.K. Appreciate your continued work. I was able to build, without CUDA.

T.K and Mont29 you guys are Awesome! thank you for your kind explanation :slight_smile: my apology for not reading the whole post in this thread, but is it possible in the future to add freestyle outline for texture with alpha channel? i mean, at the moment the line is broken if i add (for example) a plane with texture (with alpha channel in it) in front of a character geometry.

In the last build (9350_freestyle_r54598_2.65.10.7z) which I downloaded from Graphicall,
it seems that svgwriter_image.py and svgwriter_anim.py produce an empty output.svg.
What’s wrong? Did I miss something?

@paulhart2,
Ssssweeet! Thanks a lot. I’ve just downloaded it and it works great.
@T.K, this project is just too awesome not to be merged with trunk in the next build. Great work- really deserves an award.

Thanks again guys.

StompinTom,
Thanks for the clarification. Indeed when mesh faces intersect with near and far clipping planes, the faces are modified and new edges at the intersection are created. Try to render your example cube and you will get strokes along the new edges. I guess you might want to apply a different stylization to the new edges generated by clipping planes, but selecting these edges precisely is not easy in the Parameter Editor mode at the moment. I think I keep this as a feature request and address it after the upcoming trunk merger is done.

paulhart2,
Many thanks for the Win32 build!

johantri,
As you have observed, Freestyle treats all faces as being opaque at the moment. Line visibility computations need to be substantially extended in the future to properly account for face transparency and textures with alpha < 1. For now you need to rely on the compositor to take account of transparency.

Benkei,
The Freestyle branch has been undergoing a major revision of the Python API in order to address comments and requests from core Blender developers in the first code review in view of the merge into the trunk. This revision is absolutely backward incompatible and all existing Python scripts using the API will break. I will update the SVGWriter package soon after the API updates are finished. For now to get SVGWriter working properly, you need a Freestyle build earlier than revision 54127 (the API updates have been ongoing since this revision).