Here is a rough solution for those who are curious.
We will begin with projecting the perspective. If you have ever studied Perspective Drawing or Projective Geometry, then you may have noticed that the point of perspective or camera view is a vanishing point. In other words, all points, lines, planes, and geometry converge at the camera view to create the perspective we see in the picture plane. This can be noticed when modeling in Blender.
For this answer, the geometry node modifier will be applied to a soon to be deleted mesh. We need a picture plane to project our 2D geometry against so, we will use a grid big enough that will fit the projection. Since the picture plane needs to be in front of the camera for the perspective to be visible, we will also offset the picture plane to always be in front of the camera view.
Because we want our 2D geometry to “adjust accordingly” to camera view, we simply need to add Transform Geometry
nodes to where needed. In this case, it is the object (I’m using Suzanne) we want to flatten and the picture plane we are going to flatten against.
To create the projection, we will use the Raycast
node. The target will be our picture plane and the hit will be the object we want flattened. To create a perspective projection, all points must intersect at camera view thus, a Ray Direction
is needed. Our Ray Direction
will be the difference between the camera view and each point of the object.
Grease Pencil
Although it is not mentioned anywhere in this question, but since you are me asking and I am you answering, I know you want to generate this 2D geometry for the purpose of using grease pencil. To do so, convert your object into curve lines and then convert them back into mesh lines. The former is to create lines and the latter is to make those lines usable with the line art modifier.
Additionally, use a Scale Elements
node with Edge
selected to freely control the distance of the 2D generated geometry. The position of the 2D Geometry can be moved regardless of where the original picture plane is set. This will be most useful to use with a Grease Pencil object.
As a final note, when using line art modifier on the 2D generated geometry, make sure to have Loose
Edge Type
selected to create the line art.
I hope this simple answer was intuitive enough to help you curious folks out!