Study Notes for beginners, please correct me if you have any mistakes. The number is also please point out, thank you.
In 3D development, it is necessary to simulate a lot of real-world effects, such as a steel ball that reflects the surrounding picture, and in unity, it can be done by setting the properties of the material.
Reflective Sky Box
Create a new scene creates a sphere sphere new material and gives the sphere
Set the two parameters of the material to reflect the sky box the metallic of the material is set to 1 (that is, the metal property is maximum), the smoothness is set to 1, the smoothest
Reflective Sky boxes and scenes
Just reflecting the sky box is not enough, like the car in the racing game of the glass and body, if it can reflect the surrounding environment will greatly improve the game's graphic performance, which can be achieved with the help of reflection probe reflex probe
Create scene add terrain and trees click the Navigation menu bar Gameobject Light Reflection probe Create a reflection probe
The probe is like a camera shooting around the scene, the difference is that the probe is shooting at all the angles around the screen, and then the picture exists in a cube map
We can create several such reflex probes in the scene, and when the object needs to reflect the scene, take the nearest number of reflection probes and mix their cube map to show the area shown in the cube wireframe, which is the area of the reflection probe, and the object beyond the area cannot acquire this probe.
We create a capsule that creates a new material and gives it a capsule body,
Set the metallic of the material to 1
Set smoothness to 1,
Set the reflection probes property of the capsule mesh renderer component to blend probes and Sky Box
Baked: Generates static cubemap based on objects marked as reflectionprobestatic, baking is done only in editor, which means that the dynamic object is not detected by the reflective probe
Custom: To manually generate a cube map for each reflection probe, when manually click on the Inspenctor interface under the Reflectionprobe Bake button, the save path of the brake cube map and save, you can also specify other cubemap in the CubeMap bar
Realtime: Generates a cube Map in real time based on static and dynamic objects in all regions, very efficient
Size: Objects within the area can receive the cubemap of the probe, displayed in a yellow wireframe in the scene window
Intensity:cubemap applied to the intensity of the map, the default value is 1
Resolution: Resolution
HDR: Whether to turn on HDR High Dynamic range mode
Boxprojection: Box projection, when the approximate cube is reflected in the environment, open the box projection can get the correct results, effect (Shader model3.0 above support)
Select the capsule body and set the blend type of the reflection probe in the reflection probes under the mesh renderer bar in the Inspector interface
OFF: Do not mix, just reflect the sky box
Simple: Easy mixing of sky boxes and recent reflection probes
Blend probes: Interpolation between nearby reflection probes, excluding sky boxes, for indoor objects
Blend probes and Skybox: interpolate between nearby reflection probes and mix with Sky box, suitable for outdoor objects, take probe Cube Map when located in the probe area, switch to Sky box after leaving the area
Illumination--06 Reflective Environment