Search Unity

Opposite directional lights affecting color on faces which should not be affected

Discussion in 'General Graphics' started by ypoeymirou, May 4, 2017.

  1. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    Hi,

    I noticed an issue with colored lights.
    This forbid us to create an accurate "normal map preview" system, like the one of marmoset: https://www.artstation.com/artwork/ROOJX (see viewer at bottom of the page, selecting 'normals' render).

    I am using Unity 5.6.0f3. The issue can be reproduce in 3 minutes in an empty project.





    Thanks,

    Yvan
     
  2. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    Case 908951 submitted
     
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Not a bug, by default when using the foward rendering path Unity limits the number of real time lights to 4, which can be increased by modifying the Pixel Light Count in the quality settings. Try setting that value to 6 or more.

    However you might want to consider using a custom shader that does this instead of using 6 lights which will be significantly faster to render.
     
  4. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    Thank you ! Do you know where I can get a guide on how to create this shader ? Maybe already one existing ?