Grease Pencil & Geometry Nodes Integration - Design Proposal

a question please concerning GP 3.0 and geometry nodes, will there Tilt data in the new structure when we convert a curve to grease pencil? and that to preserve the tilt data if we revert it.

maybe Tilt data will be usable in GP object to assign GP strokes as a path restriction while it’s an Gpencil object along strokes or around fills like curve object in Geometry node level :thinking: (and/or
in constraints level).

eg: bunch of stroke follow path along a stroke and/or bunch of strokes by jumping from one path to next path depending on stroke index,eg: stroke 1 = path1 stroke 2= path2 …etc
the bunch of stroke selected as a path by layers or attribute? or vertex group: any stroke have a point in the vertex group will be selected …,or strokes that use a materials, eventually by pass index like @antonioya montioned above…

the tilt will be useful to make strokes turn around the stroke path (follow curve) without forgetting radius of the stroke.

2 Likes

Hi, thanks everyone for the feedback. Due to schedulling (we have a Nodes Tools workshop this week) I won’t be able to work on this design proposal until next week.

That said, Curve Instances as proposed by Hans may be a good way forward. In particular if they can be more performant and allow for the simplicity of simply using Curve nodes directly in the Grease Pencil data (e.g., Curve Trim).

It is still not clear to me what we get from “instances” itself though.

2 Likes

To add a few thoughts to this exciting ‘GP meets GN’ topic:

Stroke and layer order
In a 2D workflow stroke and layer order matters: it determines which stroke is painted on top of which. So a design decision has to be made to support this principle in GN or not.

  • When supported, a mechanism must available to control/preserve layer and stroke order.
  • When GN will only support strokes in 3D space, the consequence is that GN can’t be used as a replacement of existing GP modifiers, because preserving stroke order is a clear requirement for these modifiers.

What are layers?
Layers are mainly mentioned as input selections so far, but the output side is equally important. Generated strokes in GN must be assigned somehow to a layer, otherwise they don’t exist in the GP data structure.
And layers have transform attributes (location, rotation, scale). This is important for the evaluation of strokes to curves in world space. And for the other way around: assigning strokes in world space to layers.
We have to ask Falk about layer groups. Layers groups are added in the new GP data structure – I don’t know if they can have transform attributes as well.

Stroke = curve?
GN curves are GP strokes when they can handle this:

  • For stroke points: position, radius, strength (alpha factor) and vertex color.
  • For strokes: thickness, hardness, material.

Typical for GP worth mentioning here: the color of a stroke point can be defined by material color (applied to the entire stroke) or by vertex color (applied to the point). That differs, I guess, from the 3D curve.

5 Likes

I work on a web-based game that heavily relies on 3d assets for the map, however we actually export them as SVG via grease pencil.

Problem is, if we want to change the model at all, we have to edit the mesh, convert to grease pencil, then make all the changes we had on the previous version, in our case we need to actually paint on emulated lighting because SVG exports don’t support lighting.

So, if there were a way to programmatically generate a grease pencil object based on a given mesh, that would be be everything I’ve ever wanted from blender truly. What was the outcome of this proposal?

1 Like