简体   繁体   中英

How to get flat lighting in Unity and C#?

I'm pretty new to lighting in Unity, but I've asked on Unity forums and pored over questions like http://answers.unity3d.com/questions/955346/flat-lighting-for-3d-game-with-orthographic-camera.html but I can't achieve the same lighting as Crossy Road - flat, vibrant colors but with shadows 在此处输入图片说明 .

From tutorials I know I need a directional light, but all my directional lights wash out my colors and don't evenly distribute. Right now I have an ambient light, only problem is no shadows:

在此处输入图片说明

What can I do here? Are there specific settings to try?

The shading is "flat" because the objects are:

  • composed of faces that are generally at right angles to one another
  • no curved surfaces
  • shader should treat light sources as being at infinity
  • shader should not vary colour as a function of a point on the face and light angle
  • max diffuse shading
  • zero specular shading

You may also want to turn on hard shadows

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM