StrokeGen - A Realtime 3D line art renderer: Info & Feedback

Overview of the project
StrokeGen is the first real-time renderer that generates high-quality feature curves from 3D surfaces.
Download release at Releases · JiangWZW/strokegen-releases (github.com)
Documentations at Index - StrokeGen 1.0 Documentation (jiangwzw.github.io)
Join the development at Strokegen Discord Server



(Models from ucupumar)

The videos above showcases the current capabilities of StrokeGen.

As you can see, there are flickers, which is common in every line art renderer.
I’m working on a temporal stabilizer to reduce flickers within stylized curves. It will come out when StrokeGen is out of beta.

Introduction

StrokeGen has superior performance to any existing alternatives in the market (Pencil+, Freestyle, etc.) and offers comparable or even better curve visuals.
I believe this represents an important step in the field of stylized rendering.

Given an input mesh, StrokeGen traces 3D feature curves and then resamples them to 2D curves.
It currently only supports contour curves, but in the future, more feature curves, such as boundary, intersection, crease can be supported.

The core algorithms have never been proposed anywhere else, whether in industry or academia.
Due to its novelty, StrokeGen still needs many improvements, and I’m inviting you to join me in further developing this project.

For more, see Index - StrokeGen 1.0 Documentation (jiangwzw.github.io)

Roadmap
I mentioned merging the renderer into Blender several times, but internal friction prevented this from happening.

I understand their concerns about the stability, compatibility, and interoperability of such a prototype project. Then, I decided to maintain a custom patch for some time.

There are still many things to be done until StrokeGen is practical enough for serious projects. After that, I might propose merging it into Blender.
If they still disagree, I’ll make it standalone software like Pencil+4 — in that way, you can use it in any 3D software.

For more, see Roadmap - StrokeGen 1.0 Documentation (jiangwzw.github.io)

Implementation details
The algorithm is based on my old paper, however it has changed significantly since then.

The renderer is written in C++ and GLSL and integrated into Blender source code.
No Cuda or other platform-dependent tools are used, only GLSL.
All runtime procedures are done on the GPU, and the CPU is only used for initialization and data transfer.

It has the same framework as built-in Blender renderers, such as Eevee and Workbench.

In general, the rendering pipeline contains two stages.

  • Per-object phase:
    Iterate through each mesh object, collecting its vertices, faces, and edges. Convert the mesh into a GPU-friendly representation. Dispatch massive parallel GPU kernels to remesh / tessellate/analyze the surface. Finally, generate the feature curves.

  • Per-feature-curve phase:
    After all feature curves are generated, the renderer batches them together for further processing and resamples them to 2D curves.
    Then, the line art style will be applied to the 2D curves and rendered on the screen.
    Two methods are supported when rendering the curves: stamping and stroking. The former is similar to brushed drawings in Photoshop, and the latter is identical to vectorized curves in Adobe Illustrator.

I’m also working on a temporal stabilizer to reduce flickers within stylized curves, a common issue in all line art renderers. It encodes the tessellated surface into a tree structure and then uses the tree to track the curves on the surface.

For more, see Documentation - StrokeGen 1.0 Documentation (jiangwzw.github.io)

Acknowledgement
I want to thank @fclem and @Miguel for refactoring the draw/GPU module into a fairly clean state and helping with some of my confusion about the internal code. I also appreciate the valuable discussions with @Sebastian and @ChengduLittleA. Without your help, StrokeGen would not be possible.

References

  1. GPU-Driven Real-Time Mesh Contour Vectorization (eg.org),
  2. GPU Zen 3: Advanced Rendering Techniques, Chapter 2.
26 Likes

For whatever it’s worth, it will be difficult (for me, at least) to offer feedback on this project without referring to other software that I’m not allowed to mention here.

So, you might consider starting a dedicated thread on Blender Artists so that a wider discussion can happen without posts being flagged and removed.

1 Like

The prospect of having realtime lineart is certainly exciting ! I’m not sure the best way to present it is with a bondage scene featuring some kind of upside-down boobed-up Lolita tied up in a sex dungeon, but I’m enthusiastic nonetheless.

2 Likes