Primitive and Placeholder Objects

原始的基础物体

Unity can work with 3D models of any shape that can be created with modelling software. However, 

there are also a number of primitive object types that can be created directly within Unity, namely the 

Cube, Sphere, Capsule, Cylinder, Plane and Quad. These objects are often useful in their own right

 (a plane is commonly used as a flat ground surface, for example) but they also offer a quick way to

 create placeholders and prototypes for testing purposes. Any of the primitives can be added to the

 scene using the appropriate item on the GameObject > 3D Object menu.

Unity可以操作3D建模软件创造的任意形状的3D模型。同时unity也有许多自带的可以直接生成的原始物体,例如方块,球体,胶囊体,圆柱体,平面和四边形。这些物体自身通常都很实用(举例来说,平面就常常被用来做成扁平的地表),但是在一些测试目的中它们也可以提供快速改变位置和类型的方法。所有这些物体都可以被作为合适的物体来添加到游戏场景中,通过菜单GameObject > 3D Object。

Cube

立方体

unity地板发光特效 unity地板贴图在哪_文档

This is a simple cube with sides one unit long, textured so that the image is repeated on each of the 

six faces. As it stands, a cube isn’t really a very common object in most games but when scaled, it

 is very useful for walls, posts, boxes, steps and other similar items. It is also a handy placeholder 

object for programmers to use during development when a finished model is not yet available. For

 example, a car body can be crudely modelled using an elongated box of roughly the right dimensions.

 Although this is not suitable for the finished game, it is fine as a simple representative object for

 testing the car’s control code. Since a cube’s edges are one unit in length, you can check the

 proportions of a mesh imported into the scene by adding a cube close by and comparing the sizes.

这是一个边长为1的简单立方体,如果给他进行贴图操作的话,图像会重复出现在每一个面上。一个标准的立方体在许多游戏中并不是会经常使用。但是只要改变它的大小规模,他就可以变成墙壁、哨岗、箱子,台阶和其他类似的物体。当成品模型还没制作出来时,它也是程序员在开发时的一个便捷的替代品。举个例子,一辆汽车就可以用大致相似的尺度的瘦长的立方体盒子代替。尽管这不适合游戏成品,但是作为测试车辆控制代码的代替牌就很合适了。既然标准立方体的边长是一单位长度,那么你也可以添加立方体到场景中去,用它来检验导入场景的网格的比例是否正确通过拿立方体的边长去靠近并比较。

 

Sphere

球体

unity地板发光特效 unity地板贴图在哪_3d模型_02

This is a sphere of unit diameter (ie, 0.5 unit radius), textured so that the entire image wraps around 

once with the top and bottom “pinched” at the poles. Spheres are obviously useful for representing balls

, planets and projectiles but a semi-transparent sphere can also make a nice GUI device for representing 

the radius of an effect.

这是一个单位直径的球体(0.5单位半径),如果贴图的话,整个图像会依据上下两个极点压缩包裹整个球体。球体的一些明显的用途代表是各种球,行星,炮弹。但是半透明的球体也可以制作很漂亮的GUI设备,根据调整半径达到这种效果。

 

 

Capsule

胶囊体

unity地板发光特效 unity地板贴图在哪_翻译_03

A capsule is a cylinder with hemispherical caps at the ends. The object is one unit in diameter and two 

units high (the body is one unit and the two caps are half a unit each). It is textured so that the image 

wraps around exactly once, pinched at each hemisphere’s apex. While there aren’t many real world

 objects with this shape, the capsule is a useful placeholder for prototyping. In particular, the physics 

of a rounded object are sometimes better than those of a box for certain tasks.

一个胶囊体是一个柱体和上下两个半球体的组合。整个物体的规模是直径为一单位长度,高度为两单位长度(中间的柱体的高是一单位长度,两个半球是半径为0.5单位长度)。当它被贴图时,图像会依据上下两个半球的尖端,收缩包裹整个胶囊体。然而现实中这类形状的物体并不多见,但是胶囊体却是一个很实用的占位原型。特别是,对一些具体的工作来说,在物理效果表现上使用了胶囊体的丰满物体要比立方体要好很多。

Cylinder


unity地板发光特效 unity地板贴图在哪_文档_04


柱体

This is a simple cylinder which is two units high and one unit in diameter, textured so that the image

wraps once around the tube shape of the body but also appears separately in the two flat, circular ends.

 Cylinders are very handy for creating posts, rods and wheels but you should note that the shape of the 

collider is actually a capsule (there is no primitive cylinder collider in Unity). You should create a mesh

 of the appropriate shape in a modelling program and attach a mesh collider if you need an accurate 

cylindrical collider for physics purposes.

这是一个直径为1高为2的简单柱体,贴图的话图片会包裹着柱体的表面,包括上下两个底面此时贴图渲染结束。柱体创建岗哨,棒条体,轮子这类物体十分方便,但是你需要注意,碰撞机的形状要选择胶囊体(unity的碰撞机里并没有柱体形状的碰撞机)。如果你想要为了一些物理实验目的需要准确的柱体碰撞机,你需要在建模程序中创建一个合适形状的网格,并把它导入到网格碰撞机中去。

Plane


unity地板发光特效 unity地板贴图在哪_unity_05


平面

This is a flat square with edges ten units long oriented in the XZ plane of the local coordinate space. 

It is textured so that the whole image appears exactly once within the square. A plane is useful for

 most kinds of flat surface, such as floors and walls. A surface is also needed sometimes for showing

 images or movies in GUI and special effects. Although a plane can be used for things like this, the

 simpler quad primitive is often a more natural fit to the task.

这是一个边长为10的只能在局部坐标空间XZ平面调整的扁平正方形。如果被贴图那么整张图片都会出现在这个正方形上。平面对很多类型的扁平表面比如说地板墙壁都很实用。一个处在GUI中的表面在某些时候还需要展示一些图片和影片等特殊效果、尽管一个平面可以这么用,但是另外一个原生物体四边形在这些问题上更适合。

Quad


unity地板发光特效 unity地板贴图在哪_unity_06


四边形

The quad primitive resembles the plane but its edges are only one unit long and the surface is oriented

 in the XY plane of the local coordinate space. Also, a quad is divided into just two triangles whereas the

 plane contains two hundred. A quad is useful in cases where a scene object must be used simply as

 a display screen for an image or movie. Simple GUI and information displays can be implemented with

 quads, as can particles, sprites and “impostor” images that substitute for 

这个原生四边形很类似于上面提到的平面,但是四边形的边长只有一单位长度,并且表面只能在局部坐标系的XY平面调整。当然一个四边形只可以被分成两个三角形,但是一个平面可以被分成两百个三角形。当一个物体必须要展示图片和视频时,那么四边形就很合适了。简单的GUI和信息展示都可以用四边形展示实现,当然还有粒子、精灵图片、伪图片也是可以的。