Sometimes we need to open old Blend files and if the textures are not packed and we moved the textures from their original location, we may find out that our scene will display in pink when we try to render it.
In this article we will explore how we can solve this problem.
Pink surfaces means that Blender could not find the texture file. In most cases, you can go to file -> external data -> find missing files and browse for the location to retrieve them. Blender will search the folder you select and its sub-folders to find the missing textures by file name.
Related content: Blender pack external files: How, Why When?
Another time this happens is when you exeed the number of supported image textures in a material node tree. This is different for different platforms, for instance, on Windows you can have 24 image textures in a material, but on Mac OS the supported number of textures in a material in Blender is 8.
This is a scene I created in 2016. When I recently opened it it looked like this.
Let's dive in to solve these kind of issues.
If your scene has one or two missing texture files, you may just browse for them. But if there are anywhere between a handful and a hundred scattered across your hard drive, that could be challenging work to find through browsing.
Instead of just browsing and looking through the interface to find the files that may be missing. Go to the file -> external data -> find missing files and hit “report missing files”. Blender will search through the external files it is sourcing and list them in the info editor.
Keep in mind that these are the file locations where Blender thinks the files should be, but they are not there. However, we can learn a few things from this report.
Related content: What is a blend1 file and how do we use them?
We see the filename, and we see where the textures used to be. This might be useful if you at some point moved your texture library to a different location. Then you at least know where they moved from.
There are two kinds of file paths. Relative and Absolute. An absolute path is probably the one you may be familiar with. On windows, an absolute file path may look like this:
It includes the whole file path from drive-letter to the final file. A relative file path is a path that is in relation to some other file or directory. It may look like this:
The double backslash showing that the path is relative. The full absolute path for this file could then look something like this:
The blend file is configured to use an absolute path or a relative path. By default, blender uses relative file paths. You can change this by going to File->External data and click ether “Make all paths relative” or “make all paths absolute”.
There are advantages and disadvantages to both types of paths. We should use a relative file path when we have a project with all the files associated with it contained in one folder. One or more blend files and sub-folders for our textures, hdri maps, and rendered images could act as a self-contained project.
However, if you are like me and have been using Blender for a while you may have a library of assets you want to bring into your project and source directly from the library. If that is the case, we should use absolute file paths.
Related content: Install and manage multiple versions of Blender
I will now describe the setup I used to avoid pink textures while using a local library for speed and be able to export projects that are self-contained.
I prefer a local asset library. I store it on a NAS device since I work with both my laptop and desktop and want to reach the library from both machines.
I map the NAS folder where my library to the same network drive letter on both my machines. This way I have the same absolute path on both machines. In my case, I use K:
Related content: How to do Asset management in Blender
Related content: How to use the asset browser in Blender
I then have Blender setup to use absolute paths by default. This way, I am free to move the Blend files around and they won't lose contact with external assets.
With relative file paths, I would lose the link between the assets and blend file if I moved either the assets or the blend file. With absolute paths I can move the blend file without losing track of the library.
I use a folder structure like this to keep organized.
First, I have the type of asset, then the name of the service or provider, either from myself or some library on the Internet.
The reason for this is that within each provider, there may be different licensing, and for some projects, I may not be able to use a certain license.
Then, within each provider I try to stick to their own naming scheme. So if a texture is categorized as wood in the original library, I will categorize it as wood within that provider folder.
Now, I don’t download full libraries of textures. When I need a texture, I will just browse around on the websites I know and think has good textures and just download the ones I need. When I find what I need, I just search my local library for the asset and if it is there, I just use the local copy. If not, I download.
This is the basis of the library structure. The next problem is whenever you want to share a self-contained project.
There are two ways.
The first is to pack the external files into the blend file. The blend file will then act as a container and store all external files within itself.
The blend file can become huge, but the benefit is that it does not depend on any other external files. To do this, go to file->external data and select “pack all into .blend”.
You can also check the “automatically pack into .blend” but this would defeat the purpose of not having duplicate files when we don’t need to. Now we can share the blend file. I use this for quick shares when I just want to get the file sent.
For more professional projects and long-term sharing goes like this.
This way I get duplicate data. But it is only temporary. When I archive this project, I can delete any shared versions and keep my original files sourcing from the library.
I also have the possibility to add notes and change project details before I share it.
We started with blenders pink textures and ended up with a complete system. Having a good structure for your assets is simply good practice, and it helps to avoid more problems than just textures not sourcing correctly.
Just being aware of relative and absolute file paths can get you a long way to understanding why life sometimes feels like an untangled mess of corrupt data paths.
I hope you enjoyed reading, and as always, please share this so that others may benefit. It also helps me to grow the website and provide more and better content.
If you want more, you can also consider subscribing to the newsletter and for feedback or questions, comment below.
Thanks for your time