How do I use the textures in the "textures" folder?

First of all: I know a couple of things about Blender but in the end I’m still pretty much a beginner, especially when it comes to textures and that’s exactly what I’m currently having problems with:

I downloaded a couple of free models (a plant (.fbx), a bench (.blend) and a door (.blend)) that all come with texture files (.jpg/.png) in the extra “textures” folder. I want to import these models in Blender, then export them as .obj files that I can then use in Unity but so far I haven’t managed to texture even one of the models properly.

1. Plant (.fbx): When I import the .fbx file (“source” folder) there are no textures and the leaves of the plant are rectangular sheets. There are 14 .png files but how do I apply them? I also downloaded the .glTF archive and the textures show up in Blender with “Viewport Shading” active but when I open the exported .obj file in Blender or Win 10’s 3D Builder, the leaves are just rectangular sheets with the texture mapped onto them (.obj supports alpha afaik, so not sure what happened there). Same thing in Meshlab (plus the actual pot partially uses a leaf texture) and even in Win 10’s 3D viewer the textures are all over the place.

2. Bench (.blend): In Blender the main wood texture was missing but I managed to set the right file through the shader editor. The nails are the bigger problem - they don’t use an actual texture file but are textured by the shader. Exporting this model as .obj file got rid of the main texture again and I had to add it back as “map_Kd” in the .mtl file but in the end the nails are still missing their texture. I tried to work with the .glTF export instead and even though the nails’ color shows up correctly in Blender and the 3D Builder, the resulting object is huge (much bigger than the original)!

3. Door (.blend): As with the bench the textures are gone and this time there are no nodes in the shader editor but 3 textures (for 3 model parts). I managed to set the frame’s texture through the “Materials Properties” but this setting section doesn’t exist for the other 2 parts (actual door and lock). How do I set their textures properly?

Is there a general approach for models downloaded from Sketchfab? Unfortunately so far none of my downloads just worked as-is.

Hi Nefthys,

It sounds like the main issue you’re bumping up against is the non-standard way that every file format, 3D editor and even platform handle texturing / shaders. It’s a real minefield when starting out, and this really isn’t helped by the ‘loose’ and interchangeable terminology used across the editors either! Since you said that a bit of a beginner, I’ll try and shed some light on a few things before getting to the specifics of what to do about your model situation.

Textures
You probably already know this, but it is worth repeating, all image files used on a model are textures and they may have different purposes. Taking Plant model as an example, this has 3 sub-meshes, with 6 textures for leaves, 3 for the pot, and 5 for the soil. Some are to do with how light interacts with your model, others have extra non-geometry details or transparency info.

Shaders
A Shader is the programmatic way of taking the various textures, calculating there interaction with the lighting in your renderer, and producing the desired end result. Of course this a vastly simplified explanation, as Shaders can be made to do a lot more than this, but since you’re just starting out it’s best to keep things a bit simple. A lot of editors have a Shader Editor / Graph where you deal with assigning the function of the various textures to a particular Shader.

Material
This is probably the most confusing term as it means nothing… and everything. At it’s core, it used to the term for a Shader (it’s where MTL files come from), but these days it really has no fixed meaning and is used to mean all kinds of things depending which editor / platform you’re on. For example, a Unity Material is a Shader, but a Substance Material is a program specific feature, and you’ll often see people using Material when talking about a single texture. It’s a minefield :man_facepalming:

The big take away from this is that there is no standardisation in how textures are handled across applications in the 3D world. Getting something to work as-is is fairly rare, and that mostly depends on what the specific artist has done in terms of naming conventions / folder structures. Quite an archaic approach!

The Models
So let’s try and handle what’s going on with each of the specific models you’ve mentioned:

  1. Looking at the download for this one, it looks like the artist uploaded the model without textures and then added them in the 3D settings on Sketchfab, which is why the FBX doesn’t open with things assigned. The reason your OBJ export shows the leaves as sheets is because the transparency is handled by a texture (the _Opacity one) which would need assigning correctly in the MTL file. The Meshlab issue sounds like a problem with sub-meshes being given the wrong texture, as the model has been divided into 3 ‘groups’ for texturing (hence the 3 sets of textures by name)

  2. Again the missing texture assignments are down to the artist uploading the model and texture separately, and it appears they’ve coloured the nails by simply applying a colour to them in Sketchfab which is why it’s missing in the original .blend download.

  3. Again, the textures are missing for the same reason, and it seems like the textures are simply repeating / procedural ones. I’m not sure why you can’t assign the 2nd and 3rd textures in same way.

What to do?
I’m not a big Blender user. but personally I wouldn’t bother setting up all the shaders/textures in Blender at all, as Unity uses another different way of setting them up and is unlikely to automatically assign everything correctly (especially if your using OBJ format where texture assignment is handled by the MTL file).

Instead, I would just export the models from Blender and ensure the sub-mesh/object separation is intact and handle the texture setup in Unity (which should automatically create a ‘Material’ for each sub-mesh of your model). Even in doing this, the Bench and Door might still cause you issues with the lack of clean texturing/missing textures by the artists, but you won’t know til you try. It’s also why I’m a bit wary of artists who just upload .blend files :grimacing:

You might have some luck getting the glTF versions to work in Unity with a plugin (as they will be the ‘Sketchfab Viewer’ versions of the models) but i don’t think they have native support for them yet.

Sorry it’s not all good news, but hopefully there’s something useful in there! :sweat_smile:

1 Like

Sorry for the delayed reply and thanks for the explanations!
I know that in Unity a material is like a container for the shader (fancy lighting or even animated stuff like lava) and a texture (among other things).

The plant model is the most important one at the moment (even though the other two would be nice too). I imported it into Unity and I can see the 3 sub meshes. There are also 3 materials (called “phong0”, “phong1” & “phong4”, even though they use the standard shader) but it didn’t let me edit them, so I created a new material, which happened to be applied to the leaves sub mesh. The problem now is that I can’t seem to apply all of the textures to it. The “Standard” shader seems to have the most settings for maps:

“Ambient_Occlusion” texture → “Occlusion” in Unity
“Base_Color” → “Albedo”
“Metallic” → “Metallic”
“Normal” → “Normal Map”

“Roughness” is probably “Height Map”, right? The leaves looks metallic but no idea how to set the “Opacity” texture and the only fields left that take textures are “Detail Mask”, “Detail Albedo x2” and “Normal Maps” (the last 2 are “Secondary Maps”). Btw, the rendering mode is set to “Transparent” but I’m not sure if this shader even supports transparency and the legacy transparent shaders have far less options. :confused:

I wanted to use Blender and then export as .obj file because I can then easily import the file wherever and whenever I want and don’t have to create a new material,… again every time. What would be the best place to ask about this?

Hi again Nefthys,

You’re right with most of your texture assignments, but Metallic / Roughness is a type of PBR workflow, with both representing properties of how light interact with a material - Height map is a bit more like a Normal Map (over simplification again). If you click on the Shader drop down at the top of your material in Unity, you should see “Autodesk Interactive” as an option, that should give you the correct channels for all the textures.

With regards to transparency, the Standard Unity shader doesn’t have a separate channel for transparency, but will take it from the Alpha channel of a PNG used in the Albedo, you just need to change the Rendering Mode at the top of the shader to ‘Cutout’ (transparent mode is used for glass etc.) and you should see the desired result. Just tweak the Alpha cutoff slider to get rid of the whiteness around the edge (0.65 felt good to me)

If you really want / need to use the Alpha mask texture rather than the Alpha from the Albedo, you’d need to look at using Unity shader editing features (it’s quite complex if you’re not a programmer, so best avoided if you can).

As for Blender, texturing there and exporting things correctly as OBJ, https://blenderartists.org/ is probably the best place to find some more specific help. :sunglasses: