当前位置:网站首页>Unity3d tutorial notes - unity initial 04
Unity3d tutorial notes - unity initial 04
2022-07-28 21:00:00 【Small digital media members】
Here is finishing unity The fourth day of tutorial notes ! Another day full of harvest !!!
( I did an example yesterday , Tomorrow is also expected to be an example !)
One sentence per day : Hide the knife into the sheath , It's gentleness , Also for the moment of swing , Cold knife light
【 Lighting system 】+【 voice 】
Catalog
Ambient Source Environment light
Ambient Intensity Ambient light intensity
Reflection Intensity Reflection intensity
Light Components Mode attribute : Baking mode
Audio Listener Audio monitor :
Audio Source Audio source component
GI
Global Illumination,GI Global illumination
Can calculate Direct light 、 Indirect light 、 The ambient light as well as Reflected light Lighting system , adopt GI The algorithm can make the rendered lighting effect more realistic and rich
Direct light :
Light emitted directly from a light source , adopt Light Components Realization
Type type :
The current type of light object
——Directional Light Parallel light : Emit light in parallel , It can illuminate all objects in the scene , be used for Simulate the sun
——Point Light Point source : Emitting light around the light position can illuminate all objects within its range , be used for Analog bulb
——Spot Light Spotlights : Emit light to the conical area at the light position , As for the objects in this area will be exposed to light , be used for Analog searchlight
——Area Light Area light : Emit light from one face in one direction ( Form a face , Go to Z Axis emission ), Only irradiate objects in this area , Valid only when baking , Used in areas where light is concentrated .
Light that can only be used for scene baking , There is no real-time illumination , Because this light is extremely performance consuming
Hierachy( Right click —>light—>Area Light)

attribute :
Range Range : The range of light emitted from the center of an object , Only applicable to point lights and spotlights
Spot Angle Spotlight angle , Only for spotlights
Color: The color of the light
Intensity Strength : The brightness of the light
Culling Mask Choose a cover : Select the layer to irradiate Layer
Shadow Type Shadow type :Hard Hard shadow 、Soft Soft shadows
——Strength hardness : The degree of detail of the shadow
——Resolution The resolution of the : Set the detail level of the shadow
——Bias The offset : The offset of the object from the shadow
adopt Mesh Renderer Component enables or disables shadows
——Cast/Receive Shadows: Whether the current object is projected / Accept the shadow
There are many times when shadows need to be generated , But individual objects do not need to produce shadows , What do I do ?
—— All objects produce shadows , Look for light
—— Individual does not produce shadows , Find objects
object —>Mesh Rederer—>Lighting—>Cast/Receive Shadows

——Off Do not cast shadows 、On cast Shadows 、Two Sided sided shadows 、Shadows Only Hidden objects , Cast shadows only
—— Shadow culling : Set the distance to display shadows

Edit—>Project Setting—>Quality—>Shadows Disdance
Ambient light ;
The illumination that acts on all objects in the scene , adopt Environment Lighting in Ambient control
Ambient Source Environment light
——Skybox Set ambient lighting by skybox color
——Graduent Gradient color
Sky Sky Color 、Equator Horizon color 、Ground Ground color

Ambient Intensity Ambient light intensity
Ambient Mode
——Realtime Real time updates , The ambient light will change. Select this
——Backed Bake , The ambient light will not change. Select this item
Reflected light
Calculate the reflection effect acting on all objects according to the sky box or cube map , adopt Environment Lighting in Reflection control
Reflection Source
——Skybox Sky box
Resolution The resolution of the 、Compression Is it compressed?
——Custom Customize
Cubemap Cube map
Reflection Intensity Reflection intensity
Reflection Bounces Use Reflection Probe After that, the number of bounce back and forth between game objects is not allowed .

( Ambient light )( Reflected light )
Indirect illumination
The light reflected from the surface of an object after receiving light
adopt Light In the component Indirect Multiplier Rebound strength control
Be careful : Only the mark static—>Contribute GI The object , To produce indirect rebound light
( Mark the stationary objects in the scene as static )
real time GI
Realtime GI
“ real time ” It refers to any modification of the light source during operation , And all changes can be updated immediately
step :
- The game object is set to static

- start-up Lighting panel Realtime Global Illur
- Click on Generate Lighting( If you check the Auto Generate, The editor will Automatic detection Scene changes 、 Fix the lighting effect )

Mobile games generally do not need real-time GI,PC Use it as a tree, and the shadow will follow
Bake GI
Baked GI
When the scene contains a large number of objects , Real time lighting and shadows , It has a great impact on game performance . Use baking techniques , Can be Light effect Pre shading and dyeing Mapping Again Act on an object to simulate light and shadow , To improve performance , Suitable for programs running on low performance equipment .
The object is marked static —>Light—>Mode

Light Components Mode attribute : Baking mode
——Realtime Only real time works
——Baked Only works when baking
——Mixed blend , Baking and real-time lighting work
Can pass Scence panel Baked View lightmaps in mode
Light source detection
Light Probes
because Light Maooing It only works on Static object , Therefore, the moving object cannot be fused with the light in the scene , It seems very unreal , and Light Probes Components can be accessed through Probe Collect light and shadow information , Then, several adjacent to the moving object Probe Perform interpolation , Finally, light is applied to the object .
step :
- Create objects Light Probe Group
- Add detection ball Add Probe
- Click on Generate Lighting( If you check the Auto Generate, The editor will Automatic detection Scene changes 、 Fix the lighting effect )
voice :
Unity Supported audio file formats
Mp3、ogg、wav、aif、mod、it、s3m、xm
The sound is divided into 2D、3D Two types of :
3D voice : There's a sense of space , Near and far away ( Like the sound of game script )
2D voice : Suitable for background music

Generate sound in the scene , It mainly depends on two components :
Audio Listener Audio monitor :
Accept the audio source in the scene Audio Source Sounds made , Play sound through the computer's speakers
Audio Source Audio source component
——Audio Clip audio clip : Audio resources to be played
——Mute Mute
——Play On Awake Wake up play : Automatically play when the scene starts
——Loop Play
——Volume The volume
——Pitch tone : Change the tone value to adjust the audio playback speed .1 It's normal speed
——Stereo Pan:2D Sound set left and right channels
——Spatial Blend:2D And 3D Sound switching
3D Sound Settings

Volume Rolloft Attenuation mode of volume

The larger the distance of this figure , The lower the volume ,x The axis represents the distance ,y The axis represents the volume , The curve is the volume attenuation curve
( You can adjust the curve )
边栏推荐
- Unity gets which button (toggle) is selected under togglegroup
- Two written interview questions about regular
- Introduction to singleton mode
- Explain mesh Collider in unity
- C # basic 3-value type and reference type, packing and unpacking
- Space shooting lesson 14: player life
- Network layer performance test
- How to balance security and performance in SQL?
- unity-shader-1
- Explain the camera in unity and its application
猜你喜欢

Laser slam:logo-loam --- code compilation, installation and gazebo test

Explain various coordinate systems in unity in detail

Random talk on GIS data (VI) - projection coordinate system

Confusing knowledge points of software designer examination

融合数据库生态:利用 EventBridge 构建 CDC 应用

It is not only convenient, safe + intelligent, but also beautiful. Fluorite releases the Big Dipper face lock dl30f and Aurora face video lock y3000fv

JS page black and white background switch JS special effect

Unity3d tutorial notes - unity initial 02

JS win7 transparent desktop switching background start menu JS special effect

Nat experiment demonstration (Huawei switch equipment configuration)
随机推荐
Algorithm interview high frequency problem solving guide [1]
MoCo V3:视觉自监督迎来Transformer
Looking at SQL optimization from the whole process of one query
Use order by to sort
"When you are no longer a programmer, many things will get out of control" -- talk to SUSE CTO, the world's largest independent open source company
Random talk on GIS data (VI) - projection coordinate system
Baklib|为什么说企业需要重视客户体验?
Unity foundation 4 common plug-ins
Redis 3.0 source code analysis - data structure and object SDS list Dict
JS fly into JS special effect pop-up login box
Leetcode:2141. The longest time to run n computers at the same time [the maximum value is two points]
JS drag and drop alert pop-up plug-in
查询oracle视图创建语句及如何向视图中插入数据[通俗易懂]
MySQL修改端口号(修改mysql的端口号会有问题吗)
Unit editor details
Explain the script data transmission and notification in unity
mfc wpf winform(工业用mfc还是qt)
[tool class] util package of map, common entity classes are converted to map and other operations
有奖征文 | 2022 云原生编程挑战赛征稿活动开启
Introduction to singleton mode
