6
$\begingroup$

I am rather new to using blender, and I have run into a bit of a problem. My boss has been using a 3D scanner, and I am supposed to import the results of the scans. I am able to import them into Blender, however there are no textures or materials. It just shows up as White. How do I import the textures onto the mesh?

$\endgroup$
  • 1
    $\begingroup$ do you have a separate JPG file as texture? Or do you have vertexes with colours? $\endgroup$ – MCunha Oct 26 '16 at 11:38
  • $\begingroup$ I have a seperate jpeg $\endgroup$ – Naushad Oct 26 '16 at 11:48
  • $\begingroup$ Might be that you simply need to set the material to Shadeless, or use the "Material" view. Related: blender.stackexchange.com/questions/5283/… $\endgroup$ – TLousky Oct 26 '16 at 11:54
  • $\begingroup$ You'll need to apply the textures later, as an obj file doesn't hold textures (only the mesh). $\endgroup$ – JakeD Oct 26 '16 at 11:56
8
$\begingroup$

Go to material, and activate "use nodes" use nodes then on "color", click and select "image texture" image texture then at left of "open", click and select your texture enter image description here then at right of "object mode" change viewport shading to "material" or "texture"enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ you... are an absolute legend! $\endgroup$ – Naushad Oct 26 '16 at 12:00
  • $\begingroup$ thank you. If it worked, accept the answer. If your scanner has vertex colours instead of a texture, the process would be completely different. I suggest you, to remap your UV (usually scanned objects have strange UV maps), and bake the texture to your new UVmap. It is easier to then edit it in external software, like gimp or other, and reimport back. $\endgroup$ – MCunha Oct 26 '16 at 12:03
  • $\begingroup$ See this answer for the Blender >= 2.80 version of this. I've also made a video. $\endgroup$ – nh2 Feb 23 at 19:46
3
$\begingroup$

Blender imports obj files with textures just fine with Blender Internal renderer as the active renderer. But importing obj files with texture while Cycles is the active renderer is currently not supported. With Cycles you have to create a new material with your texture, as shown above by @MCunha.

So first idea is to check what renderer you use while trying to import the mesh.

Then there was the file format itself.

The Obj file format is made of two files, not one. The *.obj file contains the mesh data. The *.mtl file contains one or more simple phong material(s) with the associated texture paths. And the good news is Obj is a super simple file format in text form. You can open the files in a text editor and edit them to your needs.

When the *.mtl file is missig then there is nothing to import for Blender. No mtl file means no material and no texture available.

When the *.mtl file exists, but the texture paths in the file are absolute, and the texture is at another location, then there is nothing to import for Blender since the textures are not found.

So first thing to check: does the *.mtl file exist? And if that's the case and the textures doesn't import: are the texture paths in the *.mtl file relative or absolute? Open the *.mtl file in wordpad for example. Have a look at the line(s) with map_kd at the front.

For example, an absolute path would be

map_Kd C:\UserX\myfolder\mytextures\mytexture.png

When you change it to

map_Kd mytexture.png

then this path becomes relative. And when you put your texture besides the obj file, then the texture gets usually loaded - when Blender Internal is the active renderer. As told, Cycles is not supported at this point.

| improve this answer | |
$\endgroup$

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.