2014-08-08 18:13:22|?次阅读|上传:huigezrx【已有?条评论】发表评论

关键词:Unity3D, 游戏, 虚拟现实|来源:唯设编程网

Don't Clear 不清除

This mode does not clear either the color or the depth buffer. The result is that each frame is drawn over the next, resulting in a smear-looking effect. This isn't typically used in games, and would likely be best used with a custom shader.


Clip Planes 剪辑平面

The Near and Far Clip Plane properties determine where the Camera's view begins and ends. The planes are laid out perpendicular to the Camera's direction and are measured from the its position. The Near plane is the closest location that will be rendered, and the Far plane is the furthest.


The clipping planes also determine how depth buffer precision is distributed over the scene. In general, to get better precision you should move the Near plane as far as possible.


Culling Mask 剔除面具

The Culling Mask is used for selectively rendering groups of objects using Layers. More information on using layers can be found here.


Commonly, it is good practice to put your User Interface on a different layer, then render it by itself with a separate Camera set to render the UI layer by itself.


In order for the UI to display on top of the other Camera views, you'll also need to set the Clear Flags to Depth only and make sure that the UI Camera's Depth is higher than the other Cameras.


Normalized Viewport Rectangle 标准视口矩形

Normalized Viewport Rectangles are specifically for defining a certain portion of the screen that the current camera view will be drawn upon. You can put a map view in the lower-right hand corner of the screen, or a missile-tip view in the upper-left corner. With a bit of design work, you can use Viewport Rectangle to create some unique behaviors.


It's easy to create a two-player split screen effect using Normalized Viewport Rectangle. After you have created your two cameras, change player one's Ymin value to 0.5, and player two's Ymax: value to 0.5. This will make player one's camera display from halfway up the screen to the top, and player two's camera will start at the bottom and stop halfway up the screen.


Two-player display created with Normalized Viewport Rectangle 两个玩家显示利用标准视口矩形创建的。

Orthographic 正交投影

Marking a Camera as Orthographic removes all perspective from the Camera's view. This is mostly useful for making isometric or 2D games.


Perspective camera 透视摄像机.

Orthographic camera. Objects do not get smaller with distance here! 正交摄像机,对象不再获得小的位距这里!

Render Texture 渲染纹理

This feature is only available for Unity Pro licenses (not applicable to any version of Unity iPhone). It will place the camera's view onto a Texture that can then be applied to another object. This makes it easy to create sports arena video monitors, surveillance cameras, reflections etc.

这个特性仅是Unity 专业版本据有的许可(不适用于Unity iPhone的任何版本)。它将放置摄像机视图在一个纹理上,然后可以被用于其它对象。这很容易的去创建体育场检视器,检视摄像机,反射等。

A Render Texture used to create a live arena-cam 一个渲染纹理被用于创建一个实况转播体育场

Hints 提示

Cameras can be instantiated, parented, and scripted just like any other GameObject.


To increase the sense of speed in a racing game, use a high Field of View.


Cameras can be used in physics simulation if you add a Rigidbody Component.


There is no limit to the number of Cameras you can have in your scenes.


Orthographic cameras are great for making 3D user interfaces


If you are experiencing depth artifacts (surfaces close to each other flickering), try setting Near Plane to as large as possible.


Cameras cannot render to the Game Screen and a Render Texture at the same time, only one or the other.


Pro license holders have the option of rendering a Camera's view to a texture, called Render-to-Texture, for even more unique effects.


Unity comes with pre-installed Camera scripts, found in Components->Camera Control. Experiment with them to get a taste of what's possible.

Unity配置了预安装摄像机脚本,在Components->Camera Control里找到。实验它们去获得可能发生的什么体验。

发表评论0条 】