I am creating a stylized animation in which everything takes place on a 2D plane.
I have a complex geometry node setup that applies some stylized effects but they are all made to work in 2D. I quickly discovered that working with just flat planes makes doing camera moves not very feasible.
For example I want to fly through some mountains having their profiles change as they get closer to camera. So I had the idea of modeling a 3D scene and then flattening it onto the camera plane, thereby allowing for a traditional 3D pipeline. Basically there is a "Witness" camera and a "Render" camera.
The Witness camera moves while the Render camera is static. Using geometry nodes I am flattening 3D objects onto the Witness camera-plane, but then I need to transform them to my Render camera-plane. I will then apply a slight offset in Z to separate elements.
This is where I'm having some trouble.
I understand the concept, I just don't know the proper maths get my flattened geometry into the same position relative to the new camera. I can get the matrix of both cameras and the location of the center (Bounding Box) of my flattened geometry, but how to calculate where that geometry should be in relation to the new camera?
If I were just doing this in the 3D view it would be as simple as parenting the flattened geometry to my Witness camera and then setting it's transforms to be identical to the Render camera.




