当前位置:网站首页>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
边栏推荐
- Xiaodu Xiaodu is here!
- VRRP overview and experiment
- Problems encountered in installing Yolo3 target detection module in Autoware
- Met with the browser page
- LaTeX笔记
- Take you in-depth understanding of cookies
- [Problem has been resolved]-Virtual machine error contains a file system with errors check forced
- Native JS takes you to understand the implementation and use of array methods
- The future of cloud gaming
- Nacos集群搭建
猜你喜欢
Nacos配置服务的源码解析(全)
从“双卡双待“到”双通“,vivo率先推动DSDA架构落地
config.js相关配置汇总
Into the pre-service, thought they play so flowers
config.js related configuration summary
Alibaba Cloud Video on Demand
Operation and maintenance engineer, come and pick up the wool
vs2017关于函数命名方面的注意事项
network issue?Service packet loss?This is enough
el-progress实现进度条颜色不同
随机推荐
Does flink cdc currently support Gauss database sources?
Collection of error records (write down when you encounter them)
大小屏适配
From "dual card dual standby" to "dual communication", vivo took the lead in promoting the implementation of the DSDA architecture
sql server duplicate values are counted after
Billions of IT operations in the market, the product by strength to speak
Quick question and quick answer - FAQ of Tencent Cloud Server
document.querySelector()方法
config.js related configuration summary
D39_ coordinate transformation
Network Protocol Fundamentals - Study Notes
ALC experiment
Browser Storage for H5
What are some things that you only know when you do operation and maintenance?
初识网页与浏览器
多行文本省略
VRRP overview and experiment
LaTeX笔记
VLAN介绍与实验
Take you in-depth understanding of cookies