Setting up a material in UE4 made in Substance Painter

Ok, so I painted my mesh of a cage in Substance Painter and it looks great so I export all channels (except for the Unity stuff) then I import everything into UE4. I set up the material for the mesh in UE4 using what I got from Painter but it just doesn’t look right at all. The coloring is off, it looks very dark and the normals don’t look the same (rust and other bumps are not as sharp).

What is the correct way to put what Substance Painter exports into a material. Some of the textures are obvious because of the name, but I have multiple textures left over, and I’m not sure which I should connect to the Ambient Occlusion channel of the material. Also of what to do with the seemingly extra ones. The textures that I’m not sure about are height, gloss and diffuse.

As for the lighting, I’ve tried turning the lighting in Unreal up all the way and adding additional lights but it still looks dark, but I’m assuming this problem is caused by the previous one.

Hi,

So the first thing to realise is the difference in lighting between Substance Painter and UE4.

Substance Painter uses Image Based Lighting. This is very high quality lighting and makes the render of your assets look really nice. However UE4 by default does not have IBL enabled. You can match the lighting through use of a skylight in UE4 and add in a HDRI image to get the same effect. This should help match the two for the most part.

More here: https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/AmbientCubemap/index.html

However if you are not using IBL then you have to see what works best lighting wise. Materials should be the same. There is a chance that sRGB might need to be disabled where the export has not properly flagged it for whatever reason, I have run into this being an issue with the normals so make sure sRBG is disabled on the normal map especially. Also if you are using a packed map for AO, Metallic and Roughness, also make sure sRBG is disabled.

This should be the material set-up:

  • Diffuse/ Albedo = BaseColour
  • Height*/
    Normal = Normal (*In substance
    Painter you paint normals through
    height information, don’t worry about
    exporting height, just the normals.
    The height will then be converted to
    Normal information for use in the
    material)
  • Gloss/ Roughness = Roughness
  • Metallic = Metallic
  • AO = AO

Hope this helps a bit.

I’ve the same issue: color, roughness, metalic and normal. I’ve tried with sRGB but without any luck. I don’t want to load substance plugin because my game is mobile based.

Here’s screen from painter:

And here from UE4:

24612-barrel_ue4.png

I’m having the same problem myself. It is clearly indicated in my image.

I’m using an ambient cubemap and tried with both the PostProcess and skylight versions, which both appear to be the same.

What it feels like to me is that the definition of roughness between the two applications is dramatically different. Looking at my screenshot, you can see how I’ve marked it.

In Painter, medium roughness values are all but completely wiping out the reflectivity. We expect higher roughness to widen the specular and blur the reflections. This does happen in both applications. However, in UE4, that same roughness map is an almost mirror-like surface and feels like the maps are extremely underpowered.

I had to multiply the roughness values by about 8 and then clamp it. This basically removes all details above a value of .125 and results in a huge amount of data loss.

http://www.ratsarmy.com/RoughnessQ.jpg

I feel like there’s something wrong here.

http://www.ratsarmy.com/RoughnessQ.jpg

Confusion is normally between the main 4 different PBR methods, which Substance Painter exports 3 methods, but most commonly either the default UE4 Base Color or the older RGB based Unity/CryEngine version.

UE4 uses the Disney BRDF version using BaseColor(Albedo), Metallic and Roughness.

Old Bridged PBR:
Unity 4 it’s and CryEngine 3 it’s Diffuse RGB and Gloss Alpha.

New PBR Those Engines are Using:
Unity 5 and CryEngine 4 it’s Spec RGB and Glossiness Alpha.

Substance Painter using the environmental IBL type lighting just to display the model while painting and exports the options available in the exporter dialog window which can be confusing if you don’t know how the textures are wired up and the PBR difference in specific engines, they should’ve just setup a platform selection to target specific engines to alleviate any confusion. The rest in background is fundamentally the Disney version that’s in Unreal Engine, so when painting in Substance Painter you’ll immediately notice the basic Albedo/BasicColor/Color, Metallic and Roughness format of the materials, it’s a variation with the Heightmap being used to create the Normal Map, like in Unreal Engine you can use the normal map and height information to create a World Space Displacement Map for finer grit details, such as for micro surface skin pores, dirt, or rock surfaces.

27129-pbr+in+substance+painter.jpg

This is from the main Unreal Engine Documentation on PBR Materials:

UE4 can use the older PBR methods as well and like with UDK, but a good example that may help is how the PBR textures from GameTextures are added, that should help you properly wire up the textures and know which ones to export.

Game Textures PBR Texture Setup in Unreal Engine 4:
http://gametextures.com/blog/2014/09/30/using-gametextures-in-unreal-engine-4/

You may also use UE4 tools to view the texture channels and compare that to the individual channels in Substance Painter to verify they match when rendered.

Such as if the roughness isn’t shiney for scratches on a texture, the scratches may not show up at all, or the values may seem inverted, so the dark areas end up being light instead, so you’d need the invert the colors is all to show it up properly.

You can also use Unreal Engine’s Buffer Visualization tools to see the individual channels of material applied to an object in your scene, this can be very helpful in troubleshooting. And you can adjust the textures in the texture editor and/or material editor with nodes.

If interested, here’s an Unreal Engine Forum discussion on the PBR:

For Material Texture Troubleshooting
An example of using the tools to solve a texture problem, take for instance these 2 Metallic textures, the right part of image is in Substance Painter, and then exported from Substance Painter and imported into Unreal Engine (the left part of image), there’s nothing really wrong with the texture or any real difference between the 2, it exported exactly as needed, it’s just the way the data is read in the Texture file is set for import as sRGB.

In Unreal Engine I changed the View Mode in Perspective View to Buffer Visualization/Metallic to view the Metallic Channel and see exactly how the engine is reading and displaying the Metallic image/texture pixels on the mesh.

In Substance Painter with the window open showing my mesh in a locked position close to a position of the mesh object and zoomed in, I change to Solo View Mode to view the individual texture channel for the Metallic texture, and I put the windows side by side and compare both.

27132-sp+metallic+channel+view+setting.jpg

In the above example the Metallic needed it’s sRGB turned off, so I double clicked the Imported Metallic Texture in Unreal Engine and unchecked sRGB and clicked Save button in the Texture Editor, then deleted the previous Metallic reference texture object in the Material Editor and re-dragged and dropped it into the Material Editor Window, re-wired the texture to the Metallic channel input for the material, clicked Apply, then clicked Save to save the Updated Material.

Then the appearance of the textures in both Unreal Engine 4 and Substance Painter are identical.

The higher the roughness value, the rougher and less shinier it is, the lower the roughness value the shinier it is, it almost looks and sounds like your roughness values are inverted.

Your roughness values are closer to the lower 0 range.

With the other math it appears the multiplication is simply increasing the roughness value.


EXPORTING TEXTURES FROM SUBSTANCE PAINTER FOR UNREAL ENGINE 4


I recommend exporting these in either PNG 16-Bit or BMP 8-Bit:

  1. BaseColor
  2. Metallic
  3. Normal
  4. Specular
  5. Glossiness


UNREAL ENGINE 4 IMPORTED TEXTURE SETUP


Setup Textures in Texture Editor After Importing Into Unreal Engine 4 (Recommended: Do This First!):
Note: To Access the Texture Editor in Unreal Engine 4, simply double click on an imported texture in the Content Browser.

  • Uncheck sRGB for all textures but the BaseColor texture in Texture Editor.
  • If not using Alpha in any textures then put checkmark in Compression/Compress Without Alpha in Texture Editor.

Other Texture Editor Settings:

Normal Map

  • Normal Map Texture Group: WorldNormalMap
  • Normal Map Compression: TC Normalmap

Specular Map

  • Specular Map Texture Group: WorldSpecular

Example:


SUBSTANCE PAINTER MATERIAL SETUP IN UNREAL ENGINE 4


Substance Painter Texture to Material Input Pins:

  1. SP Texture BaseColor to BaseColor
  2. SP Texture Metallic to Metallic
  3. SP Texture Specular to Specular (Optional)
  4. SP Texture Glossiness to Roughness
  5. SP Texture Normal to Normal


FINAL NOTES


You will probably note the file size and quality difference between using BMP 8-Bit or PNG 16-Bit.

PNG will produce smaller images while retaining color data, but when zoomed into Unreal Engine 4 will appear slightly dithered or filtered smoothly.

BMP version will be much larger in file size, retains color data, but when zoomed in will appear a bit sharper and match more closely Substance Painter’s render window even though the bits are lower due to the CODEC design, as [Jim Morris][4] would probably say.

In Substance Painter, your texture resolution in document settings and SPP value can impact the exported and imported image quality based on the texture/image dimensions and the pixel compression (CODEC/Compressor/Decompressor) used.

In your particular case Specular may not be needed, and it does require some more computational operations to fully compute/calculate.

If you need other channels such as Emissive you can add those in Substance Painter, and also Reload whatever you’ve already exported from Substance Painter and view in Solo Mode Additional/Other then select an Imported Texture Map to load it into channel view so you can see just that texture only, you can use this for comparison and works same as Unreal Engine 4’s Buffer Visualization.

The colored tint appearence of lighting will vary a bit, Substance Painter uses IBL to display the mesh using an HDR environmental image for pre-calculated lighting, so if you find the original version in Substance Painter to be a bit different color wise, it’s simply the light color in your scene in Unreal Engine needs to match the lighting or you’d use the same HDR IBL image and you can produce for outdoor scenes the same color grade on the object.

Also, IBL lighting is mainly for outdoors, even though there’s indoor illumination in some captures.

An example of the difference in lighting, take Unreal Engine’s default light once you add it, the light will be brighter, and so the coloring on the object will have the color of the light applied to it, and that depends on the chosen color.


DISCLAIMER


You may find a better method, if you do or find any issues with this method and have a better solution, by all means feel free to share it, the information may not be perfect and doesn’t feature anything fancy, but you should be able to plug this stuff right in and get it going. I hope this has helped!

Thanks so much everyone.

I have been using the UE4 packed textures I get from SP and was having problems also. Not sure which exports you are using, but it seems like if I hook the blue channel from the roughness/metallic map up to metallic, then the main channel on roughness the results show up great. Attached is a sample.

I think you get this “two in one” texutre becose when you export from SP you chose “unreal engine” texture pack, and SP combine rough and metallic in one texture with different chanels. If you will stay on default settings, you will get metal and rough in different textures file.

Thanks to all for some clarification here. But I have an issue with exporting opacity values that I painted in Substance Painter. Alpha channel doesn’t fill with any information of opacity and Base Color texture become pure black texture when I export the textures. It doesn’t matter if it’s exported as Unreal Engine 4 Packed option or not.

What is the reason for using glossiness instead of the roughness from painter? And will painter understand that the spec he export won’t affect the unreal metalness only the roughness(glossiness) will?

See this: https://support.allegorithmic.com/documentation/display/SPDOC/Unreal+Engine+4