Home Adobe Substance

Proper linear workflow

polycounter
Offline / Send Message
rollin polycounter
So I still don't get it...


For my understanding ( to be able to properly work in a linear manner) I should be able to:

- set each bitmap I load to be handled linear or gamma. I don't find such a setting except the turn-to... nodes. should I use them?

- when using a node for the 3d view I should be able to tell the shader if the node I supply is linear or gamma. Same here: I don't find a way except to use again the turn-to... node

- when exporting a graph I should be able to say which output node is linear and which in gamma. The only hint I read was that "base color" is always gamma and everything else linear. But is this right? A quick test I did didn't reviled such an effect.

I want to build a compound map. A RGBA texture containing 4 different grayscale maps/masks. I import this map into unity and set it to bypass sRGB sampling. But it does not give the same result. If I keep sRGB sampling it looks correct. But I obviously don't want to work in gamma with my masks.

Any insight would be appreciated!

cheers

Replies

  • NicolasW
    Offline / Send Message
    NicolasW polycounter lvl 13
    Hi,

    By default, the PBR BaseColor, Metallic shader interprets the basecolor as sRGB and the other maps (roughness, metallic, normal..) as linear.

    The PBR Diffuse, Specular, Glossiness interprets the Diffuse and Specular as sRGB, the other maps as linear.

    You can force the linear interpretation for BaseColor, diffuse, spec in the material/shader properties. But I don't see a reason why you'd do that.

    SD does not handle color space, so we can say it works entirely in linear space. However, when you work with colors, because the color dialog is displayed with a sRGB correction, we can say you author the textures as sRGB.

    For the unity problem, everything relies on how you preview your maps in both applications, both shaders should interpret the textures the same way to get the same result on both sides.
  • rollin
    Offline / Send Message
    rollin polycounter
    Thank you Nicolas for this information.

    After a quick test I guess it's the smoothness default offset of both shader which don't match. By chance this offset was more or less compensated by the (of course wrong) sRGB sampling in unity which lead to my assumption.


    That SD works entirely linear when we talk about the node network is a very valuable piece of information!

    cheers!!
  • NicolasW
    Offline / Send Message
    NicolasW polycounter lvl 13
    For now you'll get quite different results between Unity5 and Designer for various reasons:
    - in U5 the default PBR shader uses a blinn-phong brdf, we use GGX. Both have a very different specular response. For the same smoothness/glossiness value in both applications, the result will be very different simply because the maths behind are different
    - in U5 their is a bug in the reflection probe / mipmap level sampling in the default shader: a given smoothness value on a material will render dramatically different when the reflection probe resolution is changed.

    These two factor makes the matching with both application (and actually any application because of the second point) impossible..
  • XRA
    You can give this a shot, Unity 5 actually does have code for GGX but it is disabled by default (yeah..)
    I tried the instructions on this blog post (very easy) and was able to get much better results in Unity 5, with a better representation of my Substance materials.

    http://gfxdevunity.blogspot.ca/2015/05/replacing-blinn-phong-by-ggx.html

    also check this forum thread for more info,

    http://forum.unity3d.com/threads/using-ggx-instead-of-blinn-phong.323827/#post-2103011
  • Toku
    Offline / Send Message
    Toku polycounter lvl 6
    Regarding UE4 syncing, Does the Substance Painter prb-metal-rough shader use the same techniques as a generic UE4 material? I am noticing some discrepancies between the two, especially with metals appearing a lot darker in engine than in Paitner. I have made sure to use linear space for all my maps besides albedo, When specifying the output channels of the texture they default to L8 (For Roughness/Metallic), Should they be L32F to correctly sync the TGA format? I've tried importing monochrome files into UE4 previously and it has importing issues.
  • oblomov
    Offline / Send Message
    oblomov polycounter lvl 8
    It is the same mathematical model for reflections (GGX) but not the same algorithm to compute the lighting from the environment. UE4 uses prefiltered environment maps, which is faster but a coarser approximation than the importance sampling method Substance Designer and Painter use. Theoretically, both methods should give similar results, with increasing differences the more the view or lighting directions differ from the surface normal. Metals should not appear darker, unless there is an sRGB/Linear mismatch or a difference in the environment map. Results can also differ because it is probably not possible to get 100% matching responses to roughness, but again that should not make metals appear darker, just more or less "dull" (reflections are more blurred or sharper).
  • Toku
    Offline / Send Message
    Toku polycounter lvl 6
    Ah I see, Thanks for the response. I think it's important to get a similar environment setup and good surface normals for UE4 to replicate the behaviour in the Substance renderer then!
Sign In or Register to comment.