Home Adobe Substance

Substances look vastly different inside UE4

interpolator
Offline / Send Message
Zack Maxwell interpolator
I have a bit of a problem. The render given in Substance Designer is wildly inaccurate compared to the final result inside UE4. It's forcing me to do a lot of back and forth. Does anyone know of a good solution? I know a UE4 shader exists for Painter, but not for Designer I think. I don't think you can even change the shader in Designer.
I'm exporting .TGAs and creating a material with them inside UE4, so I know the textures are identical between the two of them without any distortion.
The problem is purely just a massive difference in shaders.

Replies

  • Jerc
    Offline / Send Message
    Jerc interpolator
    Do you have screenshot showcasing the difference? There should be little to no difference in similar lighting conditions.
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    Here's a shot of both. SD on the left, UE4 on the right. In UE4 the colors are much more vibrant and varied, darker, and has much more intense normals.
    This is from the default sidescroller project in UE4, with the material replacing the ground.



    Here's an image of the base color map below for reference.


  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 10
    Saturation and value will differ between SD/SP and UE4 until support is added for the ACES colorspace/tonemapper in the Substance toolset. 

    But as Jeremie said, as long as you're matching lighting conditions and exposure, there shouldn't be any differences aside from the lack of ACES and how the two programs sample reflections. 

    If your texture in the UE4 texture viewer is identical to the exported texture, then the import settings are correct(sRGB is all that's needed). If the UE4 gbuffer Base Color visualizer(Lit > Buffer Visualization > Base Color) is off from what you exported, then whatever you're doing in the shader is altering the color. If that's identical as well, then it just comes down to the lighting/post-process. 
  • Jonas Ronnegard
    Offline / Send Message
    Jonas Ronnegard polycount sponsor
    did you un check sRGB for roughness etc?
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    did you un check sRGB for roughness etc?
    Yes, it is. Only Base Color and Normal have it checked.
    Also, I've looked at it in a few lighting conditions, and the difference is consistent.
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    I too would say that the difference is very likely due to the context being different (could be the HDRs, could be inconsistent aperture settings, and so on). Now it is also true that this is a bit of a catch-all answer, since this topic can be quite complex given how many different factors can impact the result.

    I would suggest two things to debug this particular case : 

    1 - taking the time to compare the results on a simple color checker material/object.
    2 - Having a look at this writeup and talk, which gives a lot of tips on how to calibrate UE for predictable lighting : 

    http://www.tomlooman.com/lighting-with-unreal-engine-jerome/

    https://youtu.be/ihg4uirMcec

    Good luck.
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    Try setting the outputs in designer to 8bit/channel, I have seen a few instances of UE4 acting weird when it comes to 16bit textures.
  • Froyok
    Offline / Send Message
    Froyok greentooth
    Grimwolf said:
    did you un check sRGB for roughness etc?
    Yes, it is. Only Base Color and Normal have it checked.
    Also, I've looked at it in a few lighting conditions, and the difference is consistent.
    sRGB should be uncheck for the Normal channel too.

    m4dcow said:
    Try setting the outputs in designer to 8bit/channel, I have seen a few instances of UE4 acting weird when it comes to 16bit textures.
    16bit textures should work properly starting with UE4 4.16. :)
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    Froyok said:
    m4dcow said:
    Try setting the outputs in designer to 8bit/channel, I have seen a few instances of UE4 acting weird when it comes to 16bit textures.
    16bit textures should work properly starting with UE4 4.16. :)
    Good to know.
  • gnoop
    Offline / Send Message
    gnoop polycounter
    We don't use U4 but our renderer is pretty similar in theory.  Still I've   never been   able to get similar appearance in SD. 
      Highlight intensity,  contrast of normal map shading , white colors intensity are never same and always off at any lighting condition.      It's probably because of static sun angle in SD  never matching any  specific game scene.     
       Would be so much easier  if SD would just allow to change sun altitude, color and intensity   and  have separate  skydome and  direct light sources, preferably with  an  animated day/night cycle    instead of HDR images which is always a huge pain in the a... to tweak.

    I have zero problem to make close looking lighting in Blender Cycles for  example.  Would love to do same in SD
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    What we did was look at the substance Shader, change it to suit our needs and then use the same sums in engine. 

    Things like not using importance sampling  and differences in brdf can have a significant effect and that's before you get started on whether your lighting system is "correct" or just a mash up of random numbers (like most) and whether your exposure and color grading are set up the same way.
    Just cos you're chucking the same maps in doesn't mean you'll get the same results ... 

    It's also worth noting that substance doesnt compress or mip its inputs and uses pretty high resolution ibls.

    To my mind,  IBLs are safer than allowing configurable lighting - as soon as that sort of thing is available to an artist they'll mess with it and youll end up with borked values in your textures because theyve ramped the sun up to 11 and compensated by darkening everything. 
  • gnoop
    Offline / Send Message
    gnoop polycounter
    Yeah,  damn artists would do everything wrong :)       So we have a static inflexible  IBL and  PBR which gives us a headache when we need to make a workaround  in case  it's not exactly 100% physically correct evrywhere  and all those artists for movies who  have their own PBR version  with gazillion ways to abuse  and do anything they want in regular 3d soft.
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    I'm starting to think my particular problem is caused more by Unreal Engine. I think it's screwing with the textures on import.
    I've found out that UE4 botches .png textures through some sort of gamma correction, which is what causes them to look all bright and washed out.
    After examining it, I think the problem here is the opposite; I think UE4 is driving the gamma down instead of up, making everything darker and distorting the colors.
    I tested the material inside Marmoset, and the result was much more similar to Substance Designer.
  • GreyJke
    Offline / Send Message
    GreyJke polycounter lvl 2
    Grimwolf said:
    I'm starting to think my particular problem is caused more by Unreal Engine. I think it's screwing with the textures on import.
    I've found out that UE4 botches .png textures through some sort of gamma correction, which is what causes them to look all bright and washed out.
    After examining it, I think the problem here is the opposite; I think UE4 is driving the gamma down instead of up, making everything darker and distorting the colors.
    I tested the material inside Marmoset, and the result was much more similar to Substance Designer.
    Dude! I almost went insane try to solve this problem! Solution in my case was so simple! Just turn off tonemaper in UE4... it is located in render settings in viewport... show-post procesing-tonemaper.


  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    Holy crap, you're right. Disabling Tonemapping fixes it. That really should not be on by default.
  • Klawd
    Offline / Send Message
    Klawd polycounter lvl 7
    Makes sense, disabling the ACES filmic tonemapper in UE4 makes it match Substance which does not yet support it.
  • olmax3d
    Offline / Send Message
    olmax3d polycounter lvl 9
    I login here, only say THANKS, it is really work, just switch off tonemaping in viewport
  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 10
    Disabling tonemapping is a really bad workaround. Not only does it create a usually undesirable crunched, over saturated highlight, but it also removes a majority of Post-Process Effects in UE4 like exposure, bloom and color grading. You're setting yourself up for issues down the line with lighting.

    Instead of taking a few steps back to make Unreal match Painter, make Painter match Unreal. There are a few options that should give you a very close match(disregarding shading model differences and how Painter renders).

    This adds ACES to the shading model as well as some fake light actors from Allegorithmic's own Jeremie: https://share.substance3d.com/libraries/4450

    This is my own solution which packages the ACES RRT/ODT into a LUT(with one standard version and one with UE4's gain of 1.45 applied): https://www.artstation.com/artwork/mrqd8

    This is a similar solution with a LUT and accompanying Painter Filters that transform source content to the proper color space, which is not necessarily required for game engines: https://www.artstation.com/artwork/2xkEbY

    Edit: Also as noted above, exporting out of Painter as PNG applies a separate gamma transform where importing into Unreal generally reverses the needed gamma setting(i.e. PNG Albedo is imported as Linear, when it should not be).
  • benjamintrout
    Offline / Send Message
    benjamintrout polycounter lvl 5
    In reference to the last comment. Just something that I was noticing, while exporting two separate textures;

    (Basecolor/Difuse/Albedo) Textures exported from Substance Designer as PNG files had that weird gamma transform issue that leleuxart had mentioned. Saving out of Substance Designer as a targa or other suitable file type fixed that issue for me.

    (Basecolor/Difuse/Albedo) Textures exported from Substance Painter as PNG were completely fine for me, however my Roughness and Metallic maps had to be manually changed from sRGB to Linear inside UE4.

  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    leleuxart said:
    Disabling tonemapping is a really bad workaround. Not only does it create a usually undesirable crunched, over saturated highlight, but it also removes a majority of Post-Process Effects in UE4 like exposure, bloom and color grading. You're setting yourself up for issues down the line with lighting.

    Instead of taking a few steps back to make Unreal match Painter, make Painter match Unreal. There are a few options that should give you a very close match(disregarding shading model differences and how Painter renders).

    This adds ACES to the shading model as well as some fake light actors from Allegorithmic's own Jeremie: https://share.substance3d.com/libraries/4450

    This is my own solution which packages the ACES RRT/ODT into a LUT(with one standard version and one with UE4's gain of 1.45 applied): https://www.artstation.com/artwork/mrqd8

    This is a similar solution with a LUT and accompanying Painter Filters that transform source content to the proper color space, which is not necessarily required for game engines: https://www.artstation.com/artwork/2xkEbY

    Edit: Also as noted above, exporting out of Painter as PNG applies a separate gamma transform where importing into Unreal generally reverses the needed gamma setting(i.e. PNG Albedo is imported as Linear, when it should not be).
    Those are Painter solutions; I was using Substance Designer, which doesn't allow custom shaders. At least, as far as I'm aware.
    Plus, it's been a little while, but I recall finding out that UE4 was creating actual artifacts in the texture upon import. They were difficult to notice here, but much easier to notice in a different material I had been working on.
    It's some sort of compression error. If the colors are too similar, UE4 merges them into a single color and creates a lot of flat details.
    The larger issues here with the darkening and saturating are not identical, but I'm assuming they're related.
    I never found a solution, but luckily I haven't had to work with UE4 in a while  :/
    I'm sick of all UE4's longstanding bullshit import issues. Next time I work with a game engine, I'll probably try Unity.
  • leleuxart
    Offline / Send Message
    leleuxart polycounter lvl 10
    Yeah, you're right. I don't think Designer supports LUTS at the moment either unfortunately.

    The import issues are with DXT compression, not necessarily Unreal. 

    If you're importing a color texture(or packed texture), you can try compressing with BC7. It will increase your texture size on disk though.

    And if you're importing a grayscale(single channel) texture, you can try the Greyscale option which is a full 8 bits for the single channel iirc. This will also increase your texture size on disk, but the compression is fairly good in that you could potentially drop the texture resolution down to the next level and not see any difference.
Sign In or Register to comment.