# Use Geometry Nodes to reproject onto camera view

I want to use geometry nodes to reproject 3-dimensional objects as 2-dimensional shapes against a camera view. Wherever the camera goes or does, the 2-dimensional shapes will follow, change, and adjust accordingly with the camera view.

Being a total novice with Geometry Nodes and most procedural methods, I learned that this task would be no casual endeavor (lol). There were many things to consider such as, how complex geometry should be flattened into 2-dimensions.

I came up with the idea after buying and observing Alan Wyatt's products in his Tradigitalist Toolbag (i.e. Live Paint Filter, Line Art Curve Modifier). I was inspired to see if us ordinary folks could make something similar. It doesn't seem impossible but still extremely challenging, nonetheless.

• Your question is very similar to this current thread: blender.stackexchange.com/questions/293758/… Did you take a look at it? Commented Jun 5, 2023 at 22:14
• I have. I noticed it got activity around the same time I posted this question. There are some good ideas on that thread but, nothing complete. I'm certain if it gets answered, my question will be too. Commented Jun 7, 2023 at 0:03
• depending on what you are trying to do exactly, it may be easier, to find a solution for you. One could for example create a parallel projection against the camera view. But this would not fit exactly to the outline, that the camera sees from the object itself, as the camera is viewing in perspective mode - normally. So, will the object be visible, too, or are you aiming for something like a shadow play. The latter should be possible. Commented Jun 7, 2023 at 21:41
• The line art modifier was a game changing feature for me when it first came out. However, the line art modifier couldn’t project 3d into 2d since it simply drew strokes onto the 3d object. You can only use reproject after applying the line art modifier. I wanted the reprojection without applying the modifier. Commented Jun 9, 2023 at 2:48
• My end goal was to use the line art modifier on procedurally generated 2d geometry of a 3d model. It was so that I could make full use of grease pencil’s features. It doesn’t matter if the original object is still visible in the camera view or if the 2-dimensional geometry is made up of curves instead of flat planes. If it can be procedurally created so that I could use it with grease pencil, then I'm satisfied. Commented Jun 9, 2023 at 2:48

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.