Copy UV tex coordinates copies what, exactly?

I’m trying to do some experiments with Penrose tiling (see http://www.uwgb.edu/dutchs/symmetry/penrose.htm and Wikipedia for more info on that subject). I used Inkscape to create a .svg file, which I then imported into blender. A few tricks later and I have one material for the large (72 degree) rhombuses and a second material for the small (36 degree) ones. What I now want to do is to color these tiles different ways, and using texture mapping to see what happens when I do. Using Edit mode, I select all the Material 1 nodes, switch to UV Face Select, pick a random large rhombus, hit “Copy UV+Tex” to copy from my arbitrary face to all other of the same type of faces. I do the same for all the material 2 nodes.

(n.b. Would be cool if, when it UV face select and looking at the Edit menus I could hit the “Select” button and select all the faces that are assigned the material in question, but for the mean time I can switch back and forth between edit mode and UV face select to get what I need.)

The problem is that sometimes the red/green lines of the UV coordinates span the acute angle of the rhombus, and sometimes the oblique. How can I get every identical rhombus to share identical UV coordinate information?

Hi,

my first impression was, that “copy UVs & Texture” should indeed do what you want to. If it doesn’t work as expected, it would be helpful if you could show a screenshot.
It’s kinda hard to figure out what the problem exactly is.

Oh and to select all faces of a certain material, that can be found in the editing buttons (F9) on the “Links and Materials” Tab. You’ll see a counter with the current and the available material number, below it are some buttons for select, deselect, assign and new, all of them doing what they say.
Regards

Here are three screenshots. In the first, notice these things:

  1. There are a damn lot of faces to manage–more than I’d like to manually fix up.

  2. The buttons window shows the edit mode. You can see that I’ve successfully selected all the faces that correspond to my “small” texture. It is easy to select and deselect faces based on their material.

  3. In the UV Image viewer, you can see the texture I intend to apply to my “small” rhomus faces–a simple line right across the middle, bisecting two opposite corners (not bisecting two opposite edges). The question is–which corners will be bisected…the acute or obtuse corners?

In the second, we’ve switched to UV Face select. The faces I selected via the materials selection function of edit mode remain selected. In the upper left hand area of the 3d view, you can see one of my faces selected. The Red/Green lines showing the UV coordinates have chosen to lie across two edges separated by an obtuse angle. Since my rhombuses are symmetric in two dimensions and since my pattern is also (but for my sloppy hand) also symmetric in two dimensions, it doesn’t matter to me which of the two obtuse angles it picks. What does matter is that if it’s going to pick obtuse for this face, it should not pick acute for other faces.

In the third, we select a different rhombus, which clearly has the UV parameters running along edges separated by an acute angle. Now the stripe runs across the narrow width of the rhombus instead of down the long skinny length of the rhombus.

I have noticed that in source/blender/src/editface.c, there is code to orient cubic UVs in relation to the longest normal of the cube. I see no code in the flat case trying to pick anything other than the first pair of edges in the face. I think this is my problem.

SEPARATELY…regarding the UI, the third window also shows how well it works to hit the “Select” button in the Links and Materials buttons when in UV Face select: not at all. Seems to me there’s no reason to disable this functionality. If I want to select a bunch of faces and then select my active face, why should I have to switch to edit mode, do the select, and then switch back in order to do uniform changes to my UV faces?

Finally, I have a larger problem that I don’t know how to solve yet. The pattern for my “large” rhombuses is not symmetric in two dimensions, but only one. Assuming I can figure out a fix for the acute/obtuse angle selection, I don’t yet know how to choose which one of two similar angles should anchor the UV coordinates. I’ll worry about that next.

Attachments




Hi,

I’ve been poking around a bit on that penrose/symmetry website. It’s quite interesting and full of beauty, although I don’t have a grasp of the math behind it. Looks like M.C. Escher spent a lot of time figuring out these patterns!

Back to topic: I think I understand the problem, but I don’t know of any automatic solution. The culprit appears to be the svg import script, which assigns the UV coords according to the wrong criteria for your purpose.

One attempt is to select all shapes of a kind, go into UV select mode and unwrap (key U) -> reset. But I assume you already tried that with no success. Another method is to select only the faces with wrong UV coords, go into UV select mode, hit (key R) and choose “Rotate / UV coordinates”. This will switch U and V direction for the selected faces, thus exchanging the long and the short diagonal.

I know, none of this is an ideal solution…

Regards

I haven’t played with Unwrap before. It’s nice, but it doesn’t solve my problem at all.

I didn’t realize that svg import would set UV coords. I don’t find the script doing that in an obvious way. The fact that all the faces start off with no UV coordinates at all (and thus the reason I create one then copy to all the others) suggest that the real blame is inside of blender. Also, there are just too many faces for me to attempt a manual rotation fix.

I’m going to try a small change to editface and see what happens. Wish me luck!

Good Luck! And, you can convert curves to meshes when you are ready to unwrap.

I have a feeling that the copying of UV co-ords is not very smart, and based on the internal vertex index ordering per face. So if one face has vertex indices going 1-2-3-4 or one has them going 3-4-1-2, then they’ll get rotated UVs to match. A quick workaround I can think of is just to select the bad faces in UV faceselect mode, and press R to rotate the UVs around the faces.

As for the material selection, yeah that’s annoying, and just one of many of the ugly things going between edit mode and face select mode, which use different data structures. I doubt there will be any work done on this until the new mesh system ‘Bmesh’ is ready, which perhaps might integrate the two. I’ve definitely heard talk of people being interested in getting rid of UV/face select mode (which was around long before Blender even had face selection in edit mode) and just using edit mode for everything. I think that would be great, but it’s probably a little way off yet…

There are too many faces to review and fix, so I proposed a source-level change: https://projects.blender.org/tracker/?func=detail&aid=6626&group_id=9&atid=127