Substance Painter 2019 - How to export Textures - Part I: native Presets
This is the first of two tutorials, made using the 2019 version of Substance Painter, on exporting Textures from this program to various destinations: from other 3D software (such as Unity, Unreal, V-Ray and others), to generic Textures sets for the PBR (Physically Based Rendering) paradigm.
In the tutorials I published so far on this website, in fact, I showed how to use Materials, masks, brushes and other tools, but not how to export the results obtained in the form of UV-mapped Textures images to be used, on models, in other software.
This operation may seem simple (in theory, it is sufficient to click on Export Textures in the File menu and proceed), but in reality there are a couple of things to keep in mind, especially to avoid errors in the Export phase (in the Substance Log window ) or, even worse, in the Textures generated for the various programs, which would end up showing materials other than those made in Substance.
Unlike what happens with most of my tutorials on Substance Painter, the Assets (3D models and other resources) used in this tutorial are NOT available; however, you can follow the tutorial and learn without having to replicate the operations with these particular objects!
Ok, done all these premises, let's start!
- THE PROJECT WE WILL USE IN THIS TUTORIAL
- EXPORTING WITH THE PRESET FOR UNITY 5 (METALLIC STANDARD)
- EXPORT ERRORS: MISSING INFORMATION CHANNELS
- THE RIGHT FILE FORMAT, ACCORDING TO CHANNELS
- ADD INFORMATION CHANNELS FOR TEXTURE SETS
- CHECKING THE INFORMATION FOR ALL CHANNELS; USE OF THE FILL LAYER (FILLING)
- TO RECAP ...
I created a new Substance project with the template "PBR - Metallic Roughness (Allegorithmic)", the same one used in other tutorials previously published on this website; after importing a 3D model, I have equipped this model with a couple of Substance default materials, which therefore - with the template chosen - present the following information channels:
- Base Color
Now suppose we want to export the Textures sets (three in my case: one for each Texture Set in the Texture Set List), for example for Unity 2019.
First, we open the File menu and choose the Export Textures item.
In the "Export Document - Export" window we can set some parameters; among these, we have in particular:
- clicking on the button at the top, the path on disk where to store the images Textures to create;
- next to this button, the file format (by default, should be PNG) and the bit depth (by default, 8 bits per channel);
- in the Config menu, the export preset; in our case, we choose Unity 5 - Standard Metallic;
- the resolution of the Textures; as anticipated in a previous tutorial of the Playlist, it is possible to work with a reduced resolution and then set a higher resolution, for the Textures to be generated in export, here.
In theory, therefore, everything should be ready for export, yet by clicking on Export we get the error message "Export finished with some warnings (see Logs)" ...
Let's take a look at the Logs tab, which can be activated from Window - View - Log, if not available.
In this tab, we read that in the three Textures Set there are two information channels missing: OPACITY and EMISSION.
To understand the reason for this error, let's open the Export Textures window again, from the File menu, but this time we move to the CONFIGURATION tab, in the "Export Document" window, then let's select the Unity 5 - Standard Metallic preset to examine it.
As we can see, the export preset for Unity 5 with Metallic workflow involves the creation of 4 Textures images:
- an image of type RGB + A (where A stands for Alpha, the opacity or transparency channel), called “Albedo Transparency”, which will be passed to the Albedo channel of Unity and which will have the Base Color in the three RGB channels and the Opacity map in the Alpha channel;
- an RGB + A image, which in this case will store the Metallic information in RGB and, in the Alpha transparency channel, the information deriving from the Converted Map - Glossiness;
- an RGB image, called Normal, created not from Input Map - Normal, but from Converted Map - Normal OpenGL; this distinction is important because the map generated in this way will not only bring with it the information defined in the Normal channel, but also those defined in the Height channel (do you remember, for example, my tutorial on the belt's stitches?); in this way, Normal and Height will be merged into a single Normal map that can be used by Unity 5;
- finally, an RGB image, called Emission, generated from the Input Maps - Emissive channel, useful for light-emitting materials (light bulbs, flames, led lights, neon lights, etc.).
The existence of RGB + A images, so with the transparency channel, in this preset, makes us understand something else: in the Export tab we will have to choose a file format capable of encapsulating these 4 channels.
The default item selected by Substance, or 8 bit PNG, is fine, because the PNG format already includes the 4 RGBA channels, while a file format such as JPG or BMP would not be good, because those formats only include the three RGB channels, without the Alpha information, so - in the case of the Unity 5 Metallic Preset - both the transparency (Opacity) and the Smoothness of the material (Glossiness) would be missing.
Ok, we said that we need the information also for Opacity and Emissive; already, but how can we add these information channels for our Materials?
The answer lies in the Texture Set Settings tab: here we find the list of information channels present for a material and, next to each channel, also a technical detail: the color or information space to be associated to each channel; for example, for Base Color we have, as default setting, sRGB8, that is a color image in sRGB color space with 8 bits of information per channel, while for grayscale expressable channels (such as Roughness and Metallic) we have a 8 bit number in linear space (the letter L), while for Height we have an image in linear space with 16 bits in floating point (16F) and for Normal Maps we have a color image (RGB) with 16 bits of floating point precision (16F).
It should be noted that for Height and for Normal, as much as 16 bits of information are provided, but keep in mind that in the export phase, with the default settings of the Export Document tab (where, as we have seen, the value set is 8 bits), this information will still be compressed to enter in 8 bits.
To add the Opacity and Emission channels to the currently selected Texture Set, then, click on the + symbol next to Channels and select these channels from the list that appears; Substance Painter will automatically set the type of data to be used for these two channels (for the record, it is an 8-bit number in linear space, L8, for Opacity, which is then expressed with a grayscale image, while for Emissive we have a color image, in the sRGB8 color space, because the light emission can also be colored: it is not therefore a question of the simple intensity of the emission, which we could have expressed with L8, generating an image in scale of gray, but of both color and intensity).
Be careful, though: we have added these two information channels only for the current Texture Set; to avoid errors, we have to repeat the operation also for the other Texture Sets of the project ...
... or, next time, create the project with a template suitable for our purposes; for example, as far as Unity 5 is concerned, Substance Painter 2019 provides the "Unity 5 (Allegorithmic)" Template, during the creation of a new project, in order to find these and other settings already optimized for export to Unity 5. In the next tutorial, in which we will see how to create a custom Preset, we will also see how to create our own Template.
After adding the missing information channels for all the Texture Sets, let's look at these channels separately in the 3D view by choosing them from the selector at the top right in the 3D View or by pressing the shortcut "C" several times, to change them cyclically (shortcut "M" to return to the overall view of the Material).
For some channels we notice that, in reality, Substance is not generating the information: we notice it because of the Checkerboard Texture applied, in my example, to channels like Normal, Height, Opacity and Emission.
The absence of this information can constitute a not indifferent problem, in the export phase: Substance, in fact, will end up giving a value to these channels in the Textures anyway, typically placing the color of some Textures as Opacity or Emission in black; if this is generally good for Emission (because in most cases the materials do not emit light), it is not good for Opacity, because Opacity in black (or 0) actually means transparent object!
There are various possible solutions to this problem; here I tell you what I usually do: for each Texture Set of the project I add, on the bottom, a default Fill Layer, or a fill level; by default, this type of level has Height and Emission at 0.0 (black: no relief or light emission) and, on the other hand, Opacity at 1.0 (white, opaque object, not transparent): settings that, in most cases, go very well.
The Fill Layer must be inserted, as mentioned, at the bottom of the Layers stack of each Texture Set: in this way it will not cover the information of the other levels present and will end only to fill the missing information channels with default values that, generally, will be fine.
In summary: when we create a project, we should start by choosing the appropriate Template based on the target software, in order to have the information channels and other suitable settings.
In case of missing information channels, we can solve the problem by adding the necessary ones (and possibly changing the technical settings) in Texture Set Settings, for each Texture Set present in the List, for the current project.
Before proceeding with the export, we can scroll through the channels with C in the 3D view to identify any missing information and, if necessary, solve the problem with a Fill Layer, ie a fill level to be placed at the bottom of the stack of levels and materials in the Layers tab, for each Texture Set of the project.
Finally, before exporting everything, check the file format, setting one with Alpha channel (for example, PNG) if this information is required, otherwise another format, depending on the needs.
Well, for this first episode of two on exporting Textures from Substance Painter, that's it!
In the next tutorial we will see how to define our own custom export Preset, in order to export the Textures that interest us and, among other things, create them with a custom naming scheme, using the Substance macro variables; we will also see how to create our own Template, with the settings we intend to have for all our new projects. See you soon!