Blender 2.8 LANPR [GSoC 2018]

Yiming Wu have just dropped his/her latest build. To witness such line-art NPR come alive (in a real-time environment), it’s an amazing feeling itself.

The scene tested here is the Wanderer from Daniel Bystedt.

From one of Yiming Wu’s tweets, “… Different line types can be adjusted. NPR artists, I need your thoughts on the legacy Freestyle, what is good and what is bad. I’ll plan the render structure based on your feedback!”


Freestyle has a complicated management of ridges, valleys and suggestive contours.
To obtain a pretty result, you have to tweak advanced options like Sphere Radius and Kr derivative epsilon values and split chains according to angle or length limits.

Clamping in Snake is a lot more intuitive.

In Freestyle, we can create dashed lines, variations of thickness of the strokes through many modifiers, variations of lines positions. We have different types of caps, ability to extend or to shorten lines by Backbone Stretcher and Tip Remover modifiers. And with management of color and alpha, all these settings are defining a linestyle.
And this linestyle can be applied to a chosen set of lines : the lineset.

Lines are selected according to their visibility, their types, their marks or belonging to an object included in a collection.

We are not expecting realtime NPR renderer to handle all combinations available with Freestyle or texture patterns.
But I think that assigning differents styles per set of lines is wanted by everybody.
To create regular lines for front lines and dashed lines for hidden lines.
To create different thickness variations for contour lines and crease lines.
To create different colors for different objects or parts of an object.
And ideally, we should be able to combine these properties of a set to satisfy most of situations.
For example, hidden lines on creases of objects inside this collection should have this style made of such color, such thickness variation and such geometry.

If it is not possible to have a lineset in a realtime render, an easy way to make such distinction by compositing should be provided. I mean IDmask passes going more in depth than just object geometry, IDmask passes corresponding to lines thickness.


I very much appreciate the clean summary by zeauro, of the Freestyle line options. The difficulty lies in the ‘language’ based UI aspect of parameter adjustments. Visual example/presets that can be adjusted in a preview window for rapid prototyping and saved off for application to Linesets. Any further development in the more ‘hand-drawn’ aspect of NPR lines is welcomed. Take a look at Sylvain Chomet’s pending animation efforts and past movies for example. Having the ability to have line weights affected by Occlusion and sharp change of angle/direction as well as Light related thin-ness, with a bit of noise for a more hand-drawn look. Having the ability to move more towards ‘Asian’ inspired style calligraphic brush/pen aspect is also valued.
If the underlying calculations are vector based, then some accommodation to victor-blur related developments such as “WDAS Technology Projects: Computer Assisted Animation of Line and Paint in Disney’s Paperman” would be a profound addition. I want the hand-drawn look, but limit flicker between frames, which is what they are doing. I deeply appreciate the work that has already been done on Freestyle and the now dramatic ‘real-time’ line work that Yiming Wu is developing during the GSOC2018 Blender efforts. Combined with Grease Pencil, and NPR cel shading and watercolor filter surface shading, Blender is making great progress.

1 Like

If we are talking about features we would like to see in a line style renderer, then I would like to see this feature from jot added to a render engine. It seems like a really intuitive way of creating unique line styles, and jot was open sourced under the gpl 3 license so it might be possible to actually incorporate the code from it in a renderer.


Looks amazing - anywhere I can grab a build?

You can download a compiled version here, and the installation instructions are here. I think you’ll need to use blender 2.66 to export to it. The plugin hasn’t been updated in a long time.

Also, I should mention that I still haven’t tried it (would have to get it working in wine, or figure out how to compile it for linux), so I won’t be able to help if you have trouble with it. If anyone wants to work on the code for it, someone tried to update it at this github account.


Latest report
Windows build:!AkHWjiagaDuPqC0BhcdfILmZi9nZ from a twitter link.


2nd to-do item for next week:

2. For coding, Many people have asked for intersection line rendering, and it is also one major feature in LANPR. I think I will then adapt the data structure to achive intersection computation. (and because future works also dependes on it)
- One thing about accurate intersection calculation is that it should be pre-calculated on cpu side, and then we can send the cached intersection lines to GPU. so when scene have objet/mesh updates then the intersection cache will be re-calculated. This is a time consuming work.
- But I still remember there's a paper on GPU intersection calculation but can't find it anywhere. If there's anyone happened to be familiar with it please let me know. Thanks

Looks like at long last, NPR will get intersecting geometries detection, which is awesome.

1 Like

Is the lanpr dev even aware of this thread ? so that the feedback present here does not go to waste

1 Like

Unsure, feel free to inform him if you’re (anyone here) on the same networks. Update:

Latest build, now with intersecting line rendering:!AkHWjiagaDuPqC_K62qN2y1MHW-u


Looks like it’s taking shape beautifully. His project report also indicates that this will start running on multiple threads this week (so it will become nice and fast).

The only major thing it needs yet to ensure the obsolescence of Freestyle is an option to make it a layer on top of Cycles and Eevee.

1 Like

I thought freestyle had features this won’t have. For example, will we be able to get an svg output from this? It’s possible to export svg files from freestyle with an addon.

To be clear, I’m not making statements, these are questions I have. Is the goal to duplicate all the features and flexibility freestyle has, or is this just an alternate (and faster) way to produce simple linestyles.

Yes, it will be implemented. When exactly that is going to happen? We are not sure about that yet.

Someone asked this in mid June, when Yiming Wu was about to release the first build.

In response, this is what we get to know.

Remember, Yiming Wu is an amazing LineArt artist himself, besides being a equally talented coder and programmer. So, there is likelihood that most of the features of Freestyle will eventually end up in LANPR as well.

And it looks like he have been working on this particular accelerated algorithm since 2 years back.


We might have that as well as an option in the form of an Overlay.

And yes, the BVH tree generation will be (or already is) multi-threaded. Hence, we can look out for much performance boost in very near future.

i am chinese blender fan, but i can not access twitter, i hope you can put the lastest built version on, thank you in advance.

wrong link. Its not .com. Also, I’m not sure if the student who is working on this reads this thread. He hasn’t posted any messages in here yet.

I just asked him on twitter and we’ll get a new test build next week :slight_smile:
Also I invited him here to join the discussion!

1 Like

Hello guys! I’m here! :crazy_face:

Yeah I’m YimingWu. Didn’t join BA discussion because BA used to have very slow access due to the Internect condition I’m in (the great fire wall). But now it seems very good to me. So anyway, I guess I would post updates here as well.

Let me go through the posts and see what you’ve been discussing. There are sure many things I whould like to share and also a lot of things that users may as well know. I can explain how everything works and what is the best way to make you scene work under specific builds, but yeah, let me read what you have said first.

I can open a topic on this one, but continue on this thread is also ok though:)

Very suprised to see how active our BA community is reacting with this development. I greatly appreciate that! Thank you! Your feedback is very important to development and the user interaction design!


These are no problem. Dash lines or textured lines need some additional processing, but is also ok to go.

Currently all line sets can be viewed and adjusted in real time. software rendering provide more accurate result but from my point of view the real time one now even out performs software rendering because there are some occlusion bugs needed to be solved.

The only thing that is hard to achieve in realtime is more than 1 level of occlusion. by principle we can render normal lines and hidden lines, but it’s hard to get “how many times that this line segement has been overlapped”.

There are also some real time specific tricks available, may bring different line styles that is hard to achieve on cpu side, but not now I guess.

Complex line types like suggestive contours are very rarely used (at least I’ve been told by some Chinese manga makers), because the one in freestyle relys on pure geometry and it produces jaggy lines, many times such requirements can be closely enough satisfied by using textures. So I personally consider this is not crucial, but if there is indeed a strong requirement of this, adding a support of it should’t be very hard though, the algorithm is very clear.