Home Technical Talk

(Solved) [Maya Shaderfx] channel packing and roughness

polycounter lvl 6
Offline / Send Message
bitinn polycounter lvl 6
Hi all,

So I ran into this problem, I created a test asset (for each channel I am going to pack):



Which is exported as Albedo(RGB)+Opacity(A), Normal(RG)+Glossiness(B, 1 - roughness), Emissive(RGB)+Metallic(A).

Now I try to make a simple shader that takes and display these values:



Everything works, except for Roughness, I can't see the it in effect:



Here is my normal+glossiness map (which I believe is correct):



Any idea on why this might be? (I am using the same environment map in SP and Maya).

Thx in advance.

(Side question: I am passing B channel of normal without changing, is it a problem? do application ignore B channel for normal map?)

Replies

  • bitinn
    Offline / Send Message
    bitinn polycounter lvl 6
    After a bit of testing, I realize texture sampler for normal map (aka normal encoding) is likely different from other encoding such as linear and sRGB, and hence messing with B or A channel on normal map is a bad idea as sampler is likely doing something special with compression (much like many game engine)...

    But it means if I want to maintain a 3-texture material, I will to have choose between Opacity, Emissive, Metallic and Roughness. Fun constraint to work within.
  • radiancef0rge
    Offline / Send Message
    radiancef0rge ngon master
    youre still using the b channel - which contains your roughness - for the normal input. 
  • bitinn
    Offline / Send Message
    bitinn polycounter lvl 6
    youre still using the b channel - which contains your roughness - for the normal input. 
    I did notice that. But even replacing the B channel later won't work: the issue is upstream at the texture sampling node - B and A channel are already dropped or ignored as soon as I select normal map encoding (selecting other encoding will preserve B/A channels, but affects the R/G channel's result; hence my previous reply).

    I end up packing channels different and leaving normal map as it is.
Sign In or Register to comment.