Search Unity

What I'm missing?!?

Discussion in 'Shaders' started by Kafar, Jul 6, 2013.

  1. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    Hi guys,

    I need a help about this: I make normal maps and other texture maps with a tool (i.e. MindTex) and then I import the textures files (Normal, Ambient occlusion, Height, Specular, Diffuse, Self Illumination) on Unity 3.x and I create materials using my custom shader too.

    Below I attached a screenshot about a material how I see on MindTex and the same material how I see on Unity.
    I don't understood why there is this big difference.
    Someone has some suggestions to tell me?

    Thanks in advance

    -Kafar


    On MindText
    $ScreenMindTex.PNG


    On Unity
    $ScreenUnity.PNG
     
  2. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Invert the green channel of your normal map.
     
  3. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    In Map exporting settings on MindTex I have this possible parameters to choose about Normal:

    -Format: Gray or RGB or RGBA
    - Channel generation: N.r; N.g; N.b

    Which is?
     
  4. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    I don't know what MindTex is.

    Open the normal map in an image editing tool and select the green channel and invert it.
     
  5. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    In GIMP I selected the green channel and inverted it but when I try to reimport Unity tell me to fix the normal map pressing the button on inspector and the result is the same, not change.
     
    Last edited: Jul 6, 2013
  6. Kafar

    Kafar

    Joined:
    Nov 29, 2012
    Posts:
    220
    UPDATE: Great! I was wrong to select channel, so inverting red and green channel I obtain the best result like in first pic.
    Thank you very much for your support!

    -Kafar
     
  7. MaskedIntrovert

    MaskedIntrovert

    Joined:
    Jun 24, 2014
    Posts:
    1
    We used the channel generation: N.r;1-N.g;N.b
    to fix the inverted green issue with MindTex.