UV texture everywhere

I’ve been meticulously following the “Unwrapping a Mesh” manual page with v2.46RC and I end up with my map being replicated on every patches on my model and every models in the scene. The specific patches I seected for the UV map are mapped correctly (except for two patches) but how come all the patches in the scene also have the same image mapped on them?

Attachments


Did you create a new material (index) for the selected verts?

Well, I was following that “Unwrapping a Mesh” Manual page and there was this instruction:
First, Add New material for the object. In the Material Texture tab, click Add New and a texture called “Tex” will be created and assigned to the top channel.

In my “Material” -> “Texture” tab, there was no “Add New” button or whatever to click onto but the “Tex” entry at the top channel was already there so I proceeded with the rest of the instructions. I’m pretty sure this is the cause of my issue but I repeated those instructions a few times now and this “Add New” button is nowhere to be found. I’m stuck there.

A new material “index” you say. Do I have to go into the “Editing” -> “Links and Materials” and click on “New” material there? I’ll try that.

In the Editing Tab (F9) you can create a new material index. You have to assign it afterwards to the selected verts.
If you don’t then the uv-mapped material s the material for the whole mesh, even when the uv layout is not done for other parts.

Ah-ha! So that might explain a mistery I was observing Do I get this right? If a create a material index and do not assign any vertices to it, then this material will affect the whole model by default?

Another question: In “Editing” -> “Mesh” -> UV Texture, there is a new button (v2.46RC) to the left of the UV texture name. Its tooltip description is “Set Rednering UX texture” but when I click on it, it does not seems to have any effect. Do you know what this new button is for?

Thanks for your help BTW.

If you create a material index (or create a vertex group), clicking “New” will give you a new group but no vertices are member of the new group, even if there were some selected when clicking New. So without assigning all vertices still belong to material index 0 and are affected by that material. Intuitively I would expect a different behaviour, creating a new group and automatically adding all selected vertices, forgetting the assigning was a quite common mistake I made often.

I don’t know about your second question, sorry.

My latest result is just marginally better.

I clicked on the “Editing” -> “Links and Materials” and click on “New” material button and then on “Assign” to assign the vertices I had selected to that material. Then I went to “Shading” -> “Material buttons” -> “Link & pipeline” I renamed the material databloc just to make sure I select the right one later. Then I went to “Shading” -> “Texture buttons” -> “Texture” tab. There, I’m not sure what to do. There is this “TE:Tex” selected but still no “Add New” button. The link number indicates “11” so, intuitively, that does not seem right. I select “Image” for “Texture Type” and then load the texture file. But attached is the result I get.

Thank you for helping. There must be some very fundamental concepts that I just can’t wrap my mind around.

Attachments


If you already have a texture, the ADD NEW button is hiding behind the double arrowhead to the left of the current texture name box. I think that, once you get started with a partial texture, Blender assigns the other untextured faces and you can’t really get rid of the default assignments without making an actual assignment in the UV Editor, or deleting the UV texture completely and starting over. But I am not at all sure about that. However, once you do assign a texture to the messed up building facade, they will take on the newly assigned texture, and will display and render properly. You can even use a different texture image if you have a second material index.

The material indexes are the way to assign more than one material to a mesh. You create the index, then add the vertices to the index, then assign a material to the index, then make the material tex face, then UV map it. I think it works best if you create all the material indexes you’ll need starting out, then assign all the materials, etc.

It seems that I found a serie of incantation that works. I’m not sure why it works. I mean I like to understand what I’m doing but right now, I don’t. It looks like it just worked because I had the right abracadabra this time.

I started trying to do this UV mapping thursday night and here I am, saturday night, with a mitigated success and still not too sure how to do it again. I must have tried 8 times, every time following meticulously and slowly the instructions I found in tutorials and in the manual, double checking every step and then being completly puzzled by the result. This is by far the most difficult task I had to do in Blender. Two months ago, I had a friend tell me “You should see how easy it is to do UV mapping in Bender”. Now I think he was being sarcastic.

I don’t think I would have been able to go through that without your help Inmare. Thanks.

Orioco, Thanks for your explanation, I will have to reread it once I cool down from my frustration. The problem I was having is that I could quite easily get the UV map to render correctly on the actual mapped faces. But I could not make any sense as to why I had all the faces in my model and in the other models to be also mapped. And this is what was driving me crazy. This house is made of many separate models. The windows, the door, the handrails, the lanterns, are all separate models. Yet, they were all affected by the same UV texture.

Attachments


I think what you are running into is a result of how Blender handles texture assignments. Look at the “oops” view of the outliner to see how the texture that you have used for your UV map has also been applied to other models that use the same material you created for the UV mapped part.

This is due to the data block structure Blender uses. Look at the first screen shot, you can see how the objects all use the same material data block and by extension the same texture data block is also applied. To take control of the behavior you will need to make each material/texture link separate like the second screen shot.

Pappy

Attachments



Here’s an example Blend that might help you understand what has been happening.

http://clipsandscripts.com//tutorials/blender_tuts/uv.blend

Pappy

And the resulting test image.

Thanks Pappy for the blend file. I’ll go examine it right away.

It’s that damned link number. You have 11 separate models, but they are all connected to the same material. Click on the number, you’ll get a pop-up asking if you want a single use copy. Answer yes or ok. Then that mesh will be uniquely connected to that material, and nothing else will be affected. Except the texture, which can be connected to many materials, but there is a link number there, too, so you can make the UV texture unique to the material which is unique to the mesh.

Keep the oops outliner open to see what’s happening to the datablocks when you do this. Takes some of the abracadabra out of blending, although that one of the best descriptions I’ve seen of the under the hood stuff yet.

Yup. You are right. The OOP Schematic shows very well what’s going on.

This is due to the data block structure Blender uses. Look at the first screen shot, you can see how the objects all use the same material data block and by extension the same texture data block is also applied. To take control of the behavior you will need to make each material/texture link separate like the second screen shot.

Yes. I understand that. My problem is I’m having a hard time figuring which buttons of which tabs of which panels or which windows I need to tweak in order to get the OOPs link to link where I want them to link.

That is exactly one aspect that really puzzled me because, you see, this house already have like a dozen materials. At least what I thought was material. Obviously, my mental model was wrong there. But I designed different materials for the dark part of the building walls, for the basement part, for the windows frames, for the glasses, for the door, for the ironwork, for the stair steps, for the stair support, etc. So how come all those different “materials” were still connected to the same material? Puzzling.

Click on the number, you’ll get a pop-up asking if you want a single use copy. Answer yes or ok. Then that mesh will be uniquely connected to that material, and nothing else will be affected. Except the texture, which can be connected to many materials, but there is a link number there, too, so you can make the UV texture unique to the material which is unique to the mesh.

Well, looking at my OOPs, I see that although I had several materials, they were all linked to the same texture. This is where my issues came from. But because the texture “Tex” was set to “none” then it had no effect on any materials until I set it to “Image” then it affected all the materials. Now, I’m starting to differentiate the “abra” from the “cadabra”.

Keep the oops outliner open to see what’s happening to the datablocks when you do this. Takes some of the abracadabra out of blending, although that one of the best descriptions I’ve seen of the under the hood stuff yet.

The OOPs is nice because it shows all the relationships very well I wish the buttons were as as well related as the OOPs blocks.

I wish the buttons were organized in a task oriented manner and that I would not have to go at 6 different panels and figure the relationships between all those buttons, names and numbers, that all buttions related to UV texturing were grouped in one single panel and their relationships were graphically illustrated.

I wish I could just pick a link from the OOP schematic and connect it somewhere else just like I can do with nodes and that I could pull down a property sheet pertaining to each OOP bloc and set their properties there.

Attachments


What a great idea! :yes: Maybe not quite like nodes, since any node can be connected to any other node. But to click on a data block to open a panel with selectable lists of appropriate connections (including “none”) would be great.

I think adding materials actually starts on the Editing Buttons Link and Materials panel when you set up the Material Indices. In the oops schematic, this shows a new “material” datablock added to the mesh. The same thing happens in the Materials Buttons, but you can only add one datablock. That seems like a shortcut to me, but it appears to be the primary way to add materials to a mesh.

I’ve just noticed it’s possible to link an object to one material, but link the object’s mesh to a different material. I wonder how that plays out?

Here is another UV puzzle. Now that I got my first UV map to render correctly, I went on to the next task and added the side of the house extension to the UV map. So I select the patches and “U” -> “Project from view” and there I have my faces ready to position and scale o the UV Map. So I do that.

The puzzle is that the new UV mapping does not show up in the 3D view in textured mode. I repeated the operation a couple times and fiddled with the buttons to no avail. In despair, I just hit F12 and lo and behold, there is my UV map rendered on the side of the house extension. But it still won’t render in the 3D window.

Any idea? The OOPs is not showing what is happening there.

I think only one UV Texture can be “active” at any one time; but that doesnt make sense really why it would not be in 3D view… I also think that 2.46 comes with one texture channel initalized when the material is added, so I will have to update the wiki - thanks for that heads up.

I’ve run into the same thing. The oops schematic doesn’t seem to show links to UV maps. That seems to be a deficiency in the oops schematic. Maybe UV mapping isn’t a datablock. Sometimes, leaving the UV editor, switching from edit to object and back again, will get it to show up, sometimes not. If you turn on show scene data (icon on the border of the outline window) you can see the images loaded in Blender, and connections IF they are linked to textures.

I suspect a timing issue: Blender takes a certain amount of time to load and display the texture in the 3d view, and if you press a button before Blender has finished loading and processing the new image, it simply moves on without complaint, and without showing the new texture.

Then again, you might just not be saying the correct incantation. :wink:

Sorry for replying late. I was away for the Easter. But I’m ba-ack!

OK. I repeated the process a few times and I found a way to solve the previous issue where the UV map would render but would not show in the 3D view. I’m not sure this is a bug. Here is the incantation :

I already have my texture file, in this case named “ExtensionMap.png” displaying in the “UV/Image Editor”. I select the faces I want to add in the “3D View” then “U” -> “Project from VIew”. The new faces display correctly in the “UV/Image Editor” window but still, the selected faces do not display the texture in the “3D view”. I have to go back in the “UV/Image Editor” and re-select the “ExtensionMap.png” and then, the textures display immediately in the “3D View”.

One explanation of that is that I am actually creating two different UV mapping object, so to speak. They both use the same image file but they are actually two sepaate UV objects. That still does not explain why it renders but does not display in 3D View though.

BTW, I saved the previous blend file where the texture would render but would not display in the “3D View”. But when I reloaded that blend file, this particular set of UV mapped faces was lost.

Updte. It actually does not render. It now display in the 3D View but will not render.