Four basic light sources in Unity: point light, directional light, spotlight, surface light
1. Point light source
Emits rays of equal intensity in all directions from the light source's position
Continuous attenuation during transmission, when the transmission distance reaches the preset limit distance range, the light intensity attenuation is 0
Suitable for simulating local light sources such as lanterns and torches
2. Directional light
No attenuation, it illuminates all objects in the space with the same intensity and direction
Location information doesn't make sense
It is often used to simulate light sources that are large in size and very far away from the game scene, such as sunlight and moonlight
3. Spotlight
Starting from the position of the light source to illuminate in a specific direction, illuminating a cone of space, attenuating during the propagation process
Usually suitable for simulating human lighting sources, such as flashlights, car lights, searchlights, etc.
4. Surface light source
Using a rectangle to define, the light will start from the front of the rectangle, illuminating an area in front of the rectangle
Suitable for simulating light sources such as advertising light boxes
Cannot be used as a real-time light source
5. Light source properties
Type: used to set different types of light sources
Color: the color of the light source
Intensity: The intensity of the light source
Bounce Intensity: The intensity of indirect lighting
Draw Halo: When checked, Unity will draw a spherical halo at the position of the light source
Shadow Type: Set the shadow to make the scene more realistic.
drawable game object
Most drawable game objects consist of three basic components:
Transform: Describe the position, orientation and scaling of the object
Mesh Filter: Specifies the mesh information of the object model
Mesh Renderer: Specify the rendering method of the object, and the material of the object is set in Mesh Render
material