4
$\begingroup$

Looks like a total beginner question and i apologize for being a shader beginner...

but i thought, if i do a project from view, i would get a non distorted result, but i didn't get it.

Why is that and how can i solve that?

enter image description here

i just took a simple cube, deleted one side face and expanded it in edit mode in x-direction. Then i changed the view so that i can look inside and used "project from view" with this shader:

enter image description here

$\endgroup$
7
  • $\begingroup$ Hi,Chris, with no disrespect, I think we may call this a duplicate of blender.stackexchange.com/q/213542/35559, where @creativecoding gives a couple of excellent self-answers, including a method which does not require subdivision for better interpolation. The root of the problem is that barycentric interpolation used in texture look-up is not the same as Cartesian interpolation in the view, so with few fixed data-points, the interpolations differ significantly. $\endgroup$
    – Robin Betts
    Sep 12, 2023 at 8:57
  • $\begingroup$ .. But since @Gordon has given an accepted answer, we'll let it go ... $\endgroup$
    – Robin Betts
    Sep 12, 2023 at 8:58
  • $\begingroup$ @RobinBetts I have to admit, it is a duplicate... didn't come across the other question back then. However, a couple of excellent self-answers is a bit exaggerated ;) One is the same as mine - adding more vertices. The other which does not require more subdivisions is probably not applicable here, since the texture coordinate Window will not work in Chris' example, because the view he wants to project from is not looking through the camera. $\endgroup$ Sep 12, 2023 at 9:19
  • $\begingroup$ @GordonBrinkmann , Hehe... OK :D . I guess I was impressed because I'd never seen any method to avoid subdivision, anywhere, and the second answer came across as an Aha! moment, for me. (Most workflows would want to map through a matched camera) $\endgroup$
    – Robin Betts
    Sep 12, 2023 at 9:24
  • $\begingroup$ @RobinBetts: i have no problem if you call this a duplicate! just do it as you think. I am only interested in solving problems ;) $\endgroup$
    – Chris
    Sep 12, 2023 at 9:27

1 Answer 1

5
$\begingroup$

The problem is, since you have simple quads with only four vertices at each corner, Blender has a hard time to figure out how to distribute the image on those faces. The solution (not ideal to keep a low polycount, admittedly) to this is subdividing the mesh and then unwrap it again with Project from View:

subdivided mesh

And the result looks like this. I've set the Scale in the Mapping node back to 1 and scaled the UV map up so that the lion fills the mesh mostly. You have to experiment for yourself how many subdivisions are necessary to get an acceptable result:

result

There is an older tutorial by Default Cube where he explains this: Realistic 3D? EASY

$\endgroup$
3
  • 1
    $\begingroup$ thanks for that additional link and of course for the answer! $\endgroup$
    – Chris
    Sep 12, 2023 at 8:44
  • $\begingroup$ +1 but worth noting: @creative coding shows here that you don't have to subdivide in the geometry to reduce the discrepancy between barycentric interpolation across triangles used by texture look-up, and the natural per-pixel interpolation in the view. Default Cube missed that one :) $\endgroup$
    – Robin Betts
    Sep 12, 2023 at 9:09
  • 1
    $\begingroup$ @RobinBetts Right, but as mentioned in my comment above: the method without subdividing requires that you want to project the image on the UVs by looking through the camera, which is not the case in Chris' setup. Also it works probably best if the image you want to project onto the UVs has the same aspect ratio as the render size from the camera. $\endgroup$ Sep 12, 2023 at 9:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .