With the amazing tool fSpy I wanted to reconstruct the interior of a house. I was able to import the fSpy project into Blender, do some basic modelling and UV "Project from view" seemed to work fine.
However, some parts of the image are not correctly UV projected, see image below. The corner of the table in the lower left is not projected to, which is to be expected outside the camera view, but not within camera boundaries! Additionally, when looking at the tray on top of the table, the background image does not align with the UV projected lower portion of the tray.
- Question 1: In the 3D view (right), why does the UV projection not line up with the preview in the UV editor (left)?
- Question 2: How to make it work?
Edit 1: I was able to answer the questions myself, see below. After some more trial and error I found an even better solution than described below. I will notes on that later this week!
Edit 2: Title was updated to better reflect what the solution does. Original title was: "How to project a texture on objects in an (fSpy-imported) scene?"
Additional notes
I suspect this UV coordinates that are off boundaries (x<0
or y<0
) are somehow being automatically translated somehow, but I don't really know.
I made two small additional changes to better see what's going on. Cutting out those changes did not solve the problem.
- In the shader nodes editor, I have set the image texture from
Repeat
toClip
, so image on the right the problematic area is black and not couch-coloured. - For the table object I added a subdivision modifier set to
Simple
(notCatmull-Clark
). Without it the deformation on the table-top would be based on two triangles with even works deformation.
Related questions