Search Unity

Unity: how to mimic the lighting of a mesh as seen in the editor view

Discussion in 'Global Illumination' started by pjithorpe, Feb 15, 2019.

  1. pjithorpe

    pjithorpe

    Joined:
    Oct 8, 2018
    Posts:
    4
    I have a camera which shows a "bird's eye view" of a procedurally generated mesh like so:



    Currently in the editor view (right), the terrain looks exactly as I would like it to. However, in game (left) I haven't been able to get it to appear as I would like:



    I was using a directional light above, which was causing the effect where the centre of the mesh appears "shiny". So I looked around at some forum posts and questions on here and decided to try using ambient lighting instead by altering the settings in Window>Rendering>Light Settings, but this is the result:



    This is the material I'm using (I'm using a particle shader as the colouration of my mesh is based on altering Mesh.colors.) :



    I have tried fiddling around with different material types but I couldn't get better results. My question is: how do I set up my game to use the same lighting that's being used in the editor?

    Thanks in advance

    Camera settings at runtime:

     
  2. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    Hey @pjithorpe,

    It looks like the main camera is not actually orthographic, the settings in the inspector look correct though. One thing that is perhaps worth checking is the aspect ratio of the game view. Try setting it to a square 1:1. Also, please make sure that there are no other cameras with a higher depth property.