UNITY – Add 3D Lights

Ambient Light

MAIN tOP MENU> Edit> Render Settings> Ambient Light

Dynamic Light – Realtime

MAIN TOp MENU> GameObject> Create Others>

– Directional light -> sun

– Point Light -> bulb lamp

– Spot Light -> spot light

Hierarchy> Select the light> Inspector:

– Color

– Intensity

– Cookie: you can create a pattern of shadow with the alpha channel of a Texture

– Shadows: No / Hard / Soft

– Halo
-> può essere sostituito da ‘Add Component’> Effects> Halo, poi deselezionare il vecchio “Draw Halo” assegnato di default

– Flare: click over the small icon on the right> Assets> select a Flare
-> può essere sostituito da ‘Add Component’> Effects> Flare> click over the small icon on the right> Assets> select a Flare, poi svuotare lo slot del vecchio “Flare” assegnato di default
To render Flare Component you need Hierarchy> select Camera> ‘Add Component’> Rendering> Flare Layer

Backed Light – Pre Render and Baked over textures

ONLY BACKED LIGHT:

– MAIN TOP MENU> GameObject> Create Others> Area Light

– Shaders> Self Illumination

Render Mode

– Vertex Lighting
-> fastest
-> it interpolare lighting over the surface of the mesh
-> it NOT allow Normal mapping / Light Cookies / Real Time Shadows

– Per pixel Lighting
-> best quality
-> it calculate lighting in every screen pixel
-> it allow Normal mapping / Light Cookies / Real Time Shadows

Setup:

MAIN TOP MENU> Edit> Project Settings> Quality> Pixel Light Count, maggiore valore, maggiore qualità, minore velocità di rendering

Hierarchy> select Light> Inspector> Render Mode> Important (Per pixel Lighting) / Not important (Vertex Lighting)