I have an object, and an image which will appear on the object. The image is not square, and the uv map cannot be distorted. In other words: The pixel space and the object space must match.
The answer to this question is given everywhere as:
apply scale> orthographic view> project from view.
However, this is not correct. For me, Project From View preserves the linear 0…1 uv map in x and y, regardless of the image dimensions. Projections onto nzonsquare images are distorted accordingly.
In the screenshot, I have an arbitrary image which is taller than it is wide. The Uv unwrap plainly stretches the geometry, relative to the texture. I want to project from the view, onto the texture. The two viewports should show geometry of exactly the same dimensions. How do I do this?
Thank you for any advice. I’d prefer a solution using the UV and texturing tools, rather than Cycles nodes.
Does your object already has a material with that texture on it? If so, remove the texture node and unwrap again.
Another quick option, instead of deleting the texture node, you can add a new one, with a new image 1x1px. With this new node selected, unwrap your object.
You can then revert the changes in the material, to what it was before.
I’m helping my housemate with a work project, and it did the same thing to her.
So I started a blank project from scratch, just the cut cube. I created no materials. I marked the seams, added the image, and unwrapped. I tried several different options. All giving the wrong result.
Nevertheless, a default texture had been added. I read your post, found and removed it, reprojected, and it worked.
Are there things I mustn’t do, to avoid starting over? I think the blank material came from accidentally toggling Cycles Render on and then back off.
Is there a way to change the coordinate source for a uv mapping without ditching the material it’s attached to? I’m confused why the uv mapping would be locked in automatically, at the material level, and not exposed to me in the explicit uv mapping tools. I feel like I’m missing something important.
Basically, the unwrap functions first look to the texture node in the material (the active one, in case of more than one), and rescales the unwrap by the ration of the texture… If none was found, it defaults to the unit square.
And UVmaps are dependent of the mesh, not the material. Even if you change the material, or even remove all of them, the UVmaps will stay.
Secrop’s giving you some useful advice, I just want to add to it from a totally different angle.
If the UV map cannot be distorted, then those planes must be planar, because there is no way to map a non-plane onto a plane without distortion (or seams).
You’re concerned about discarding the view Z with a project-from-view. That indicates that your view is oblique to the plane you’re mapping.
It doesn’t have to be, though. Select a face in edit and shift numpad 7 and your view will become aligned with the plane. Now, you can safely discard the camera Z in your UV map, because your object has no extent in the view Z.
@bandages I did not ask for an oblique projection. In the image above the right viewport is plane-aligned to the face, and orthographic.
This is not about z-value. Both results – the incorrect (above) and the correct (attached here) – were identical uses of Project From View, from an unaltered viewport.
In the first case, Blender appears to have mapped the uv square to the image bounds, thus compressing the v direction, with respect to the image (more pixels, same 0…1 space).
In the second case, Blender did what I wanted: it took the texture space as the coordinate space: uvs scale to match.
Deleting the default material reset the (EDIT:) unwrap function. I then reprojected . The result was different with respect to the image.
So my next question is, is there a way to set the base mapping in the uv tools.? I got locked into a mapping determined by a material blender created, and added this image to, without me even knowing.
@Secrop Then… it’s the unwrap function? It scales the uv islands automatically; I can’t alter its base coordinate space in the uv tools?
Thank you for clarifying my uv unwrap is intact. I was approaching this from a workflow point of view. For me, sitting behind the viewport trying to unwrap, an unwrap function scaling my uv islands as I go is exactly the same thing as altering my uv space. I can’t rectify that? Except by deleting stuff?
The Unwrap operators work based on some settings, like type of projection, selected faces, and selected/active texture (the culprit here).
They then produce UVmaps, which can be further manipulated by other operators like drag, scale, rotate, reduce distortion, etc. They also have their settings, like mouse input, stress factors on edges, again selection, and so on.
It’s possible in this phase to scale by the ratio amount, for example a 2x1 texture would need a scale of 2 in X, as a 1x2 would need a 0.5 in X.
No need to delete anything as long as you keep Data, Operators and their setting, separated in your head.
Note that UVmaps don’t care about the textures ratio. They are representations in the unit square. If you constantly changing the texture ratio, but still using the same uvmap, than it’s expected that you don’t get the same ‘squared’ pixel everytime.