the question seems quite simple but I can't find the solution : I generate an image from ia with a depth map associated. I want then to deform a subdivided plan with this map. No problem with displace node. However, I would like the direction of distortion to be relative to the camera rather than relative to the normals, which means that the rear of the projection would be larger than the front, depending on the focal length.
Please refer to the attached image.
thank you for your help!
-
$\begingroup$ Hello and welcome. Please use a title that matches the content of the post. It should read like a question, be descriptive but succinct, unique and identifying, summarizing the problem so anyone searching for similar issues is likely to find this. Remove anything superfluous, avoid vague words like "this", "help with", "issue", "like in image" "question about", instead describe what "it" is. Your title is the first thing visitors see, answers you get depend heavily on it. See What is the problem of asking “How do I do this?" $\endgroup$Duarte Farrajota Ramos– Duarte Farrajota Ramos ♦2025-09-10 20:58:35 +00:00Commented Sep 10 at 20:58
1 Answer
It's hard to do the full calculation in a Shader node network, because while you can get a Camera "View Vector" in camera coordinates, it's difficult to convert that to a world space displacement that you can feed to the Material Output node.
So, I think the right approach is to create a Geometry Nodes modifier on the plane, to calculate an appropriate unit vector displacement toward the camera and store it in a named attribute (here, "from_camera")
and a separate shader node network on the subdivided plane to scale these displacements by the depth map to calculate a world space displacement:
Note that the Geometry Node portion can run on a low-poly version of the plane (even just a 4-point plane) because its results will be interpolated. The subdivided geometry of the plane doesn't need to be "real" -- it can be generated by a Subdivision modifier placed after the Geometry Nodes modifier in the stack:
In my testing, I used a "Grid" instead of a "Plane", but the results should be the same.
Here's my result:
If I move the camera closed and exaggerate the depth map with the "Map Range" node, you can see it's deforming in the direction of the camera:
Here's my Blend file with an example setup.
-
$\begingroup$ thank you very much,but I can't still manage to obtain something good...! $\endgroup$chistophe binse– chistophe binse2025-09-10 16:10:44 +00:00Commented Sep 10 at 16:10





