[4.3] How to get surface normal vector from drawn surface side of Grease Pencil in Geometry Node

Hi, I’m a beginner who is just getting into Blender for the first time.

I’m very interested in software, especially game editor tooling, so I was looking at the Geometry node and saw that since Blender 4.3 I can use the Grease Pencil as input, so I started exploring.

At first, I was successful in getting the Grease Pencil to create faces with each stroke as input.

However, in order to use it as a three-dimensional face, I realized that I needed to make it procedurally generate in the direction I was always drawing, and in order to do that, I needed to know the normal of the surface where the stroke was ‘drawn’.

Is there a way around this?

@Creta_Park

Hi,

I’m not entirely sure what you’re aiming for, and there may be a better solution, but if you want to get the normal direction of the grease pencil stoke here’s a set up that lets you do so and visualize it:

Providing the grease pencil line is truely ‘flat’ then all it’s points lie on a plane that can be used to create a single triangle. The normal of this single triangle face is also the normal of that grease pencil object.

I’ve set up the GN to show this in action, and used the linear Gizmo as the tool to visualize it. It will also allow you to move the GP mesh along that normal direction.

This only works in Blender version 4.3+

The 3 points you choose for the traingle are done crudely here with a modulo of the indices, you only need three points but dialing the modulo will produce more if you go too low. However only the first three selected indices are used, so ideally you want a value that gives you the largest triangle for the most accurate ‘maths’. A straight line grease pencil will probably fail, as will less than 3 available vertices.

My file . . .

GreasePencil_Normal.blend (1.1 MB)

Hope that provides some useful information for you to continue you explorations of Blender.

Cheers,
Dj.

1 Like

Thanks to afford about this tricky problem!
I never thought about that way, much appricheate of solution!

1 Like