0
$\begingroup$

I have (1) a .obj file in which I specified the UV coordinates for each vertex, (2) a .mtl file pointing to a diffuse texture map, and (3) the said texture map.

When I import the .obj into Blender Internal, the object is correctly and automatically textured. However, when I import it into Cycles, there is no texture. This post seems to suggest I need to manually set the texture, which is actually fine for me.

What confuses me is, if I am to manually set the texture, how can I use the UV already specified in the .obj file instead of doing another UV unwrapping?

$\endgroup$
  • $\begingroup$ UV maps and textures are independent entities. You can manually pick which UV coordinates to use when creating a material, regardless of whether the texture is imported automatically or not $\endgroup$ – Duarte Farrajota Ramos Mar 28 '17 at 15:01
  • $\begingroup$ @DuarteFarrajotaRamos right, but how do I pick to use the uv coordinates specified in the obj file? $\endgroup$ – Sibbs Gambling Mar 28 '17 at 15:05
1
$\begingroup$

When you imported the .obj file, it should have also imported the UV Map that was stored within it. You can verify this under the mesh tab of the properties panel. With the object selected, go to the properties panel (bottom right by default) and click on the mesh tab (looks like a triangle made up of three dots joined by lines).

If you scroll down to UV Maps, you can see all UV Maps applicable to your object. If you have just imported your object and done nothing else, you should see one entry, being the UV Map that you imported along with your object.

Cycles will use that UV Map by default for any image texture in any material that you assign to the object. If you have more than one UV Map on an object you can select the relevant UV Map using the UV Map node, but you should not need to do this unless you have created a second UV Map.

$\endgroup$
  • $\begingroup$ Right, I do see that one UV map appearing, but the texture doesn't get rendered somehow: imgur.com/a/u9RyO $\endgroup$ – Sibbs Gambling Mar 28 '17 at 17:05
  • $\begingroup$ Have you actually created a material for the object? $\endgroup$ – Lewis Mar 28 '17 at 17:13
  • $\begingroup$ You need to create a material consisting of a Diffuse Shader with an Image Texture node plugged in specifying your image file. $\endgroup$ – Lewis Mar 28 '17 at 17:17
  • $\begingroup$ Like this: imgur.com/a/KVvAK? I think it works now! Many thanks. Although I still don't get it why this way of setting up the nodes makes it work. I mean, the node tree knows which image to use as texture, OK, but how does it know the UV mapping? It's not surprising that somehow it knows -- after all, the UV mapping is specified in the .obj file which has been imported. Just wondering where this piece of info is saved... $\endgroup$ – Sibbs Gambling Mar 28 '17 at 17:22
  • 1
    $\begingroup$ Yep like that. Any image texture node defaults to the UV map if there is one. It is automatically selected for you and its presence is invisible. If you want you can plug in a UV Map node into the vector slot of the image Texture and you will see nothing changes. $\endgroup$ – Lewis Mar 28 '17 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.