Exporting Opacity Maps From Substance Painter To Unreal: A Guide

how to export opacity in substance painter to unrea

Exporting opacity in Substance Painter to Unreal Engine 4 can be a tricky process. While Substance Painter offers a translucent and masked shader to handle opacity, it does not have a glass shader, which requires both opacity and refraction to achieve the desired effect. Users have reported issues with exporting opacity maps, receiving warnings about missing opacity channels, and experiencing unexpected transparency in Unreal Engine 4. To address these challenges, it is recommended to add a fill layer with white opacity colour to avoid unintended transparency, and to consider using two mat IDs and assigning two different materials in Unreal Engine to achieve the desired glass effect.

Characteristics and Values Table

Characteristics Values
Difficulty exporting opacity from Substance Painter to Unreal Engine Common problem
Possible solutions Add an opacity channel in SP, set up window with 2 mat IDs and assign 2 different materials to the object in UE, combine exported textures in Photoshop or Substance Designer, play with lighting mode in Translucency tab
Substance Painter's limitations No glass shader, only translucent and masked shader to handle opacity
Unreal Engine's limitations Issues with alpha blending transparency

cypaint

Ensure the 'Opacity' channel is available in your texture set

To ensure that the Opacity channel is available in your texture set, you must first confirm that you are using the correct shader. To do this, click on the sphere with the cog icon and check that your shader settings are set to use pbr-metal-rough-with-alpha-blending.

Once you have confirmed that you are using the correct shader, you need to check that your materials are set up correctly. Go through each material and check if it has an opacity channel in its texture set settings. If a material does not require transparency, you should remove the opacity channel by clicking on the "X" button to the right of the gear icon.

On the other hand, if a material requires transparency, you must ensure that the Opacity Channel is present in the Texture set settings. This is because the presence or absence of an Opacity Channel in a material's Texture Set Settings will determine its alpha blend mode on export. If the material has an Opacity Channel, it will export with its alpha mode set to "Blend". If it does not have an Opacity Channel, it will export with its alpha mode set to "Opaque".

After ensuring that your project's material settings are set up correctly, you can proceed with exporting your textures. To export a .glb file from Substance Painter, go to File -> Export Textures or use the shortcut ctl+shift+e. Set your Output Directory and change your Output Template to glTF PBR Metal Roughness before clicking Export. Substance Painter will then export all textures associated with the scene, along with the necessary .gltf, .bin, and .glb files.

cypaint

Add a fill layer with white opacity to avoid fully transparent parts

When working with Substance Painter and Unreal Engine, it's important to consider the way opacity is handled to avoid unexpected results. One common issue is encountering fully transparent parts in Unreal Engine when you haven't explicitly made them transparent in Substance Painter. This can be resolved by adding a fill layer with white opacity.

Here's a step-by-step guide to achieving this:

  • Create a Fill Layer: In Substance Painter, create a new fill layer and place it at the bottom of your layer stack. This fill layer will serve as a base to ensure that only the desired areas are transparent.
  • Set White Opacity: Select the fill layer and adjust its opacity settings. Set the opacity color to white. This will ensure that any areas without paint will appear white instead of black and fully transparent in Unreal Engine.
  • Paint or Mask: Use paint layers or masks to define the transparent areas. Paint on the fill layer or create masks to designate the sections you want to be transparent. This way, you have precise control over which parts will be transparent when exported to Unreal Engine.
  • Export and Review: Once you've set up the fill layer with white opacity, export your substance file and import it into Unreal Engine. Review the model to ensure that the transparency is applied as expected, revealing only the areas you designated for transparency.
  • Fine-Tune in Unreal Engine: If needed, make any final adjustments within Unreal Engine. Depending on your project's requirements, you may need to set up multiple materials or adjust the shader to achieve the desired transparency effect.

By following these steps and adding a fill layer with white opacity, you can effectively control the transparent areas of your model and avoid unexpected fully transparent parts when exporting from Substance Painter to Unreal Engine.

cypaint

Export textures with the Unreal Engine 4 package

When exporting textures with the Unreal Engine 4 package, there are a few things to keep in mind. Firstly, make sure that you have added an opacity channel in Substance Painter (SP). This is important because the opacity in the translucent material represents the transparency amount. If you don't add an opacity channel, your entire object may turn transparent, even if you only want specific parts, like windows, to be transparent.

Another important consideration is to ensure that you have a fill layer at the bottom of your stack with a white opacity colour. If you don't do this, any parts that you didn't intend to be transparent will become fully transparent in Unreal Engine 4 (UE4) as well. Additionally, UE4 has known issues with alpha blending transparency, so it's recommended to set up your window with two mat IDs in your 3D package and assign two different materials to the object in UE4 - one for the window frame and one for the glass.

When exporting your textures, you can either use the *.fbx* file format or drag and drop images directly from your PC into the Content Browser in UE4. Keep in mind that UE4 only supports specific texture formats, such as *.dds* for Cubemap Textures. All textures should have dimensions that are powers of two (32, 64, 1024, 2048), and if you want to use mipmaps, your texture size should not exceed 4096px (4K).

Finally, if you're working with multiple textures and materials, you may encounter issues where some materials disappear after exporting. In this case, ensure that you haven't replaced a texture with a lightmap, as this can cause the issue. Alternatively, you can try texturing the same object using material slots in a 3D modelling program like Blender before importing it into UE4.

cypaint

Combine exported textures in Photoshop or Substance Designer

When it comes to combining exported textures in Photoshop or Substance Designer, there are a few methods you can use. One popular method is to use Photoshop to merge the textures. First, export your textures from Substance Painter with transparency and a padding of 8 or 16 pixels, depending on your texture's dimensions. Then, in Photoshop, go to "File > Scripts > Load Files into Stack". This will load your files into Photoshop layers. Alternatively, you can use Adobe Bridge by going to "Tools > Photoshop > Load Files into Photoshop Layers".

If you prefer to stay within the Substance ecosystem, you can use Substance Designer to process the output data. This can be done by exporting your current textures as document channels, then exporting a plane from any 3D app and creating a new Painter project with this plane as the mesh. Import your textures, set up layers for each, and export. This method allows you to work within the same app, which can be more convenient for some users.

Additionally, when dealing with multiple meshes, you can use Blender to combine them into a single FBX file. By using the Texture Atlas addon, you can create a texture atlas with all meshes unwrapped to the same UV. This allows you to export a single FBX file with all the different meshes, making it easier to manage in Substance Painter.

It's worth noting that currently, in Substance Painter, it is not possible to export the entire texture if you have used multiple texture sets. However, the above-mentioned methods provide simple workarounds to combine these textures effectively.

cypaint

Play with the lighting mode in the Translucency tab to adjust roughness

When working with glass materials in Substance Painter and Unreal Engine, you may encounter challenges due to differences in how these software tools interpret roughness and transparency. To address this, you can play with the lighting mode in the Translucency tab to adjust roughness and achieve the desired visual effect.

In Substance Painter, the roughness of a material is influenced by the lighting in the viewport, which can be adjusted in the Display Settings. When exporting to Unreal Engine, it is important to ensure that the roughness texture is interpreted correctly. By default, Unreal Engine uses sRGB for roughness textures, while Substance Painter uses linear grayscale. Therefore, you should disable sRGB for roughness textures in Unreal Engine to match the settings in Substance Painter.

Additionally, you can experiment with different lighting modes in the Translucency tab of Unreal Engine to fine-tune the roughness of your glass material. For example, changing the lighting mode from Volumetric NonDirectional to Surface TranslucencyVolume can help you retain control over the roughness and other parameters. This lighting mode allows you to use roughness maps and prevent the glass from becoming completely transparent.

It is worth noting that transparency and opacity are related but distinct concepts in Unreal Engine. Transparency defines whether a surface can be seen through, while opacity determines the degree to which a surface transmits light. By adjusting the blend mode from "Opaque" to "Translucent," you can create see-through surfaces with depth and color, such as water or glass.

To further refine the appearance of your glass material, consider checking your UVs to ensure that you are using the same version of the mesh in both Substance Painter and Unreal Engine. Additionally, pay attention to the quality settings, as the default low settings in Substance Painter may cause the roughness to appear differently in Unreal Engine. By following these steps and experimenting with the lighting modes, you can effectively adjust the roughness of your glass material and achieve the desired visual outcome in Unreal Engine.

Frequently asked questions

Export your textures from Substance Painter with the Unreal Engine 4 package selected. Then import it into Unreal Engine 4, link up the material and put the material to translucent. Make sure you add an opacity channel in Substance Painter.

Ignore the warnings about missing opacity and emissive channels. Even if you have these warnings, Substance Painter will still export your textures, just without the mentioned channels.

Substance Painter doesn't have a glass shader, only a translucent and masked shader to handle opacity. Glass shading requires opacity and refraction. You won't get the same look as your glass in Substance Painter because of this.

Written by
Reviewed by
Share this post
Print
Did this article help you?

Leave a comment