# How does Blender deal with partially textured .obj object?

I have a .obj file that specifies a partially textured object. More specifically, not all vertices have UV coordinates (that is, I have more v entries than vt entries in my .obj).

The face entries f look like this.

f 2045/631 2164/742 2119/700
f 2119/700 2164/742 2165/743
f 2259/834 2120/701 2165/743
f 2165/743 2120/701 2119/700
f 2260 2261 2259
f 2259 2261 2120
f 2205 2262 2124


As you can see, some faces are textured, while others are not.

My model looks reasonable in MeshLab -- it has some faces with texture and some textureless faces.

However, when I import the .obj file into Blender, the faces that are supposed to be textureless have a texture, which is the entire texture map. Why is this happening, and how can I stop this behavior?

• I think that is blender's way of "resetting" a uv map. I would grab all the untextured faces and set their uvs to be collapsed on a single point on whatever software you used to make the mesh. I can't think of any simple solution since the blender obj importer is fairly simple with not many options. – Sebastián Mestre Mar 28 '17 at 0:57
• @SebastiánMestre Thanks! I see. Probably I will just set the untextured face's UV to (0, 0)? Let me try it now. – Sibbs Gambling Mar 28 '17 at 1:00
• @SebastiánMestre This kinda works in the sense that the untextured faces are uniform now, but they are of a certain color, the color of the point where I set their UV to... It would be wonderful if there is a better solution, but your solution is really handy. Thanks mate! – Sibbs Gambling Mar 28 '17 at 1:12
• No problem! i had the same problem a few months ago. A dirty fix for that new problem would be to have a few white pixels on your image and place the UVs there. Not very elegant and it adds some extra work but it's better than having half of your mesh be red (or whatever color the point where the uvs are is). I tend to keep the background of WiP textures white so it is not an extra step for me but "your mileage might vary" – Sebastián Mestre Mar 28 '17 at 1:24
• @SebastiánMestre Maybe you could write a quick answer that I can mark accepted? Would love to help more people. :-D – Sibbs Gambling Mar 28 '17 at 1:28

My solution to this would be to move all the uv coordinates of the non uv-mapped faces to the very same point.

Having a few pixels set to the color that you want your mesh to be and putting your uvs there instead can be a way to get rid of unwanted colors.

• Say, I want my untextured faces white. How many pixels need setting to white? Currently I am only setting one corner pixel white and set untextured vertices to that pixel. However, the untextured faces don't look like white... I'm wondering maybe I need to set more pixels white? – Sibbs Gambling Mar 28 '17 at 14:48
• I think setting the 4 pixels on each corner of the image to be white should do it – Sebastián Mestre Mar 28 '17 at 18:31
• And setting untextured vertices to be all at one corner? Why does this work? Intuitively, I think this is because the interpolation at the corner wraps around the other corners? But why 4 pixels? – Sibbs Gambling Mar 28 '17 at 18:36
• Yep, that is exactly why. The uv coordinate (0,0) doesn't quite match up with the coordinate of the pixel at the corner, the pixel data is actually mapped half a pixel away from the corner on eaxh axis. So when it fetches that texture what it gets is the interpolated value for the color between the 4 corner pixels, instead of a single one – Sebastián Mestre Mar 28 '17 at 18:42
• You can also set your uv coordinate to (1/width , 1/height) to make it match up with a single pixel – Sebastián Mestre Mar 28 '17 at 18:43