当前位置:网站首页>D45_Camera assembly Camera
D45_Camera assembly Camera
2022-08-05 06:44:00 【Not so simple GG】
目录
4.Dont Clear_The original game object is not cleaned up
5.Clipping Planes_The distance of the camera's field of view
6.Viewport Rect_The position and size of the window
8.Target Texture_Specifies to render content rendered by one camera in oneRander Texture上面
1.摄像机组件
1.Clear Flags_clear target
There is nothing to fill where the game object needs to be rendered
1.SkyBox_天空盒子
We need to build a shader,在Standard上选择Skybox/6 Sided
Then drag the picture of the skybox you found into the six faces(All six pictures I dragged are the same,Mainly to see the effect of the sky box)
Finally drag this shader directly into the scene,This effect is formed (A professional skybox photo should be a continuous sky with no gaps)
The way to restore is here
2.Solid Color_单色填充
3.Depth only_Depth fill only
It is possible to overlay different depth camera renderings(If the content rendered by both cameras is at the same position on the screen,A larger depth value will overwrite the content with a smaller depth value)
This is the depth value,下面会详细介绍(详情看7.Rect_深度)
4.Dont Clear_The original game object is not cleaned up
At this point there is only one game object in the scene,The camera is the choice Dont Clear的模式的,Run it now,Let's see what happens
This is the scene after dragging the object in motion
2.Background_背景色
3.Culling Mask_裁剪遮罩
Controls the camera to render certain layers of game objects
在我们的Unity中,Each game object will have a hierarchyDefault
This level is similar to a label,You can add your own name,But unlike labels,Levels can only be added at most32个
Return to the camera to openCulling MaskYou can see the hierarchy of all settings
If selected, the camera can see the game objects of this level,Uncheck it to see no game objects at this level
How should we set it in the code
Each level is preceded by a label,从0到31,2的n次方(nThe label before the hierarchy)In the code, we use the left shift operator to implement the check operation,如下
4.Projection_投射方式
1.Perspective_透视相机
效果:近大远小
You can see that the camera's field of view is like a cone,But let's zoom in
There is still a cross section,Because the last thing our camera has in front of our eyes is a flat surface,So even set to minimum is a plane,如果是0It becomes a point,There is no such thing as flat vision
2.Orthographic_正交相机
没有近大远小的效果,What he shows is a rectangular field of view,如下
5.Clipping Planes_The distance of the camera's field of view
6.Viewport Rect_The position and size of the window
x y w h All represent proportions 从0 到 1 After adjustments can be found in oursGamesee inside the view
x y 为坐标 The reference coordinates are screen coordinates,左下角是(0,0)
w h 是大小
7.Rect_深度
The depth of the camera is used when there are multiple cameras in the scene,深度值越大,The higher the display is
例如小地图,We can set the depth value of the minimap to be larger than the scene camera,This allows the minimap to exist in front of the scene camera view
Main Camera:Viewport Rect: X: 1 Y: 1 W: 1 H: 1 Depth:1
Camera:Viewport Rect: X:0.5 Y:0.5 W:0.5 H:0.5 Depth:2
8.Target Texture_Specifies to render content rendered by one camera in oneRander Texture上面
This function can realize the projection of the picture seen by the camera onto the game object,例如:电视机,镜子,UIModel display of the interface, etc
首先创建一个Rander Texture
found on the cameraTarget Texture,将Rander Texture拖入
再创建一个材质球,Place the shader on the Shader设置为Unlit/Texture(Remove the effect of lighting on the image)
然后把Rander Texture Drag onto the shader
Finally drag this shader onto the game object,The game object is now ready to display the camera effect
边栏推荐
- selenium学习
- 单片机原理与应用复习
- network issue?Service packet loss?This is enough
- NACOS配置中心设置配置文件
- ROS2下使用ROS1 bag的方法
- BIO, NIO, AIO practical study notes (easy to understand theory)
- Network Troubleshooting Basics - Study Notes
- 滚动条问题,未解决
- [ingress]-ingress使用tcp端口暴露服务
- Come, come, let you understand how Cocos Creator reads and writes JSON files
猜你喜欢
随机推荐
CIPU, what impact does it have on the cloud computing industry?
vs2017关于函数命名方面的注意事项
Xiaodu Xiaodu is here!
el-autocomplete use
The cocos interview answers you are looking for are all here!
Q 2020, the latest senior interview Laya soul, do you know?
D39_ coordinate transformation
vscode笔记
Nacos配置服务的源码解析(全)
el-autocomplete使用
Nacos集群搭建
ES2020新特性
滚动条问题,未解决
程序员应该这样理解I/O
Mina的长连接和短连接
ALC experiment
Insight into the general trend of the Internet, after reading this article, you will have a thorough understanding of Chinese domain names
js判断文字是否超过区域
Tencent greetings function SCF - entry instructions
NACOS配置中心设置配置文件









