"Freestyle" needs upgrades?!

Freestyle needs an upgrade?! As a dedicated NPR artisan, I would welcome some commentary on the development outlines for Freestyle. It is a workhorse who has been neglected, and now over-shadowed by LineArt. I am respondsible to maintain the current build of the LineArt Build on Graphicall.org, glad to help, but it too languishes, now being pushed to possible 2.93 inclusion. It lacks many of the features of Freestyle, still doesn’t render to its own Layer and is painfully slow on large projects.
I am currently trying to render using Freestyle using three(3) work-stations, mostly maxing out the 64GB of RAM on each station. While watching the Task Manager on all three(3) stations I noticed that the Cuda Graph shows no usage, while the GPU graph only shows 10% usage. Freestyle doesn’t seem to use the two(2) 3080 Optix enabled chips, let alone their Cuda capacity, and spins off to my SSD drives as they all approach the 64GB cap.
Freestyle should be multi-threaded, and should use Cuda/Optix resources.
It should also create a ‘cache’ version that could be adjusted in RealTime for more artistic control of LineSets, even if I then had to re-render, once the adjustments are completed.
The ‘next’ Movie Project for Blender should be a full on NPR film, Miyasaki/Chomet style, with fine line work and Watercolor like Shader effects, to push the NPR development to keep up with the rest of the fine Blender Development. It is a neglected area, and despite Grease Pencil progress, the LineArt branch has yet to achieve the Line Quality possible with Freestyle. I no longer bring it up as a question on Blender.Today and I know that the Malt Team is trying to bring some development to NPR with a separate Engine, but Line Work as an easily applied Scene/Collection level is not yet something that it can do.
I am starting this Thread, as I could not find any existing thread with this focus. Please contribute and re-direct me if needed to any resource I may be overlooking. I know that I am in ‘murky waters’ when my Google searches bring me back to my past threads on this same subject, never a good sign??!!


I just crashed, after 2.75hrs, using my three(3) station renderfarm and CrowdRender. It was not Crowdrender that caused the crash, but the Memory hog of Freestyle. It ran close to maxing out the 64GBs of RAM on the three stations, spinning off to SSD when needed, but then it crashed. No idea of why, or how to remedy the situation. I am going to ‘strip’ out any non-essential geometry, or at least try it with the ‘render flag’ turned off to see if it will help. I am using an Override of white and ambient shading, so the texture/images aren’t contributing, as it only stalls in the Freestyle calculation phase. I went for a walk and came back to a ‘blank’ screen. Very disappointing. Blender should have a solution for NPR line rendering that works on larger files??
Trying again, turned off all non-essential geometry and render flags. rendering again. It ramps up to 95% on the CPUs and CUDA graphs on the render phase, then the GPU drops to 0% while doing the Freestyle calculation (understood) but when creating the 'View Map Creation" CPU goes up 11-25%, (expected) but no CUDA/Optix activity at all. Clearly I don’t understand it well enough (Duh?) and it is not optimized for the resources that are available?? Using Ryzen 7 3700X 8-Core with NVidia3080 on two stations, and Ryzen 5 3400G with 2080 and 1070 dual GPUs, so I am no lacking for hardware.

Well. that is the reason of enthusiasm around Lineart.

Freestyle is heavy in terms of memory usage because each freestyle stroke is equivalent to an extruded curve object.
So, an heavy scene is producing heavier one.
The only viable solution I see, is not to get rid of superficial geometry but to drastically split the scene into many smaller ones, to render and composite many viewlayers instead of trying to render it entirely into one.

Tagging along. I need Freestyle to be multi-thead.

Appreciate the ‘tag along’ as any support for improvements is valued. I watched my Task Manager, and only ‘one’ thread of each of my three(3) participating 8 core engines were involved and 0-3%GPU. Really needs help. I trimmed the Scene down to only the geometry that is ‘in frame,’ ran it over-night, 10.2 hours, all of the passes came thru, but the Freestyle pass was utterly empty!!! I am now trying again with only a quarter of the Scene in the Render window (Ctrl-B) still taking forever, hopefully some output in the end?? Not convinced, but still waiting… I will post the results. I watched the LineArt render, and strangely it calculates all of the Lines outside of the Frame, which is fairly useless?? and a waste of energy and time.

Screenshots would be also helpful to find out what’s going on in your scene.
I found out that even if you “transparent-shade” objects, they will still consume freestyle resources.
Clean your scene as much as you can (outliner, blend file filter) and delete unnecesary shaders. I found out the hard way UNUSED MATERIALS drain freestyle power.
The next thing is angles: IF YOU DON’T USE A CUSTOM CURVE, freestyle will go and try to make as much tangents as it can (and it can’t) without proper line assignment from (ctrl+E > add freestyle line). Then: USE A CUSTOM CURVE for strokes.
Basically exclusion/inclusion has to be managed with as much info as you can get. It’s this “filter” selection (what’s to include, what’s to exclude) what takes ages to render. It is far more efficient when you have separate line arts assigned for that specific filtering inside collections.

Yeah, “freestyling” it’s like working in an additional “cycles/light bounce/transparency” sweet spot, all on its own… :roll_eyes:

It will take me some time and exploration to digest/apply what you are suggesting. It certainly amplifies the troublesome nature of trying to get Line Renders out of Blender. I went in, stripped all geometry out that wasn’t in frame, several cycles of Purge. Then I ran the Scene thru LineArt branch successfully, albeit it still calculates ALL geometry, in frame or not, but at least it was able to render. It still lacks the more refined line choices of Freestyle, as it is too uniform. I have sent the results to the LineArt developer along with questions. I may give up on Freestyle as it requires so much care and still doesn’t like some particles (Leaves, Grass, Fur/Hair, etc.) LineArt does seem to Scale lines by Z Depth, as noted in the right-hand vegetation, versus distant fence. It also renders the Leaves correctly! tho it drops some lines and added some extraneous ones??
I wish Freestyle was easier, multi-threaded, faster/RealTime, and did not require the careful hand-holding that you are suggesting.

Every scene (be it to render in 3D or 2D look) has to have planning. One does not simply jump to put everything in 1 collection. :slight_smile:

Freestyle beeing what it is, and lineart beeing what it is… there’s IMHO still space for different approach, this being the Outline Node by Miguel Pozo:
I’m not seeing it as a replacement, just an alternate option, as it does what freestyle cannot do, and vice-versa. But it works in realtime, which is great by itself.

For some reason it’s not in the master branch, which IMHO is a pity. I don’t see a downside of this node being included (apart of the work needed to review the code). Sure it has limitations but so does every other approach.

Looks like Freestyle is being actively updated:

Not really, as I read it, as this is a ‘code cleanup’ for the LineArt branch, which I appreciate, but it is not Freestyle related, unless someone can tell me otherwise?