[Unity官方文档翻译]Primitive and Placeholder Objects Unity原生3D物体教程
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
立方体
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.
的简单立方体,假设给他进行贴图操作的话,图像会反复出如今每个面上。一个标准的立方体在很多游戏中并非会常常使用。可是仅仅要改变它的大小规模,他就能够变成墙壁、哨岗、箱子,台阶和其它类似的物体。当成品模型还没制作出来时,它也是程序猿在开发时的一个便捷的替代品。
举个样例。一辆汽车就能够用大致相似的尺度的瘦长的立方体盒子取代。
虽然这不适合游戏成品,可是作为測试车辆控制代码的取代牌就非常合适了。
既然标准立方体的边长是一单位长度,那么你也能够加入立方体到场景中去,用它来检验导入场景的网格的比例是否正确通过拿立方体的边长去靠近并比較。
Sphere
球体
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
胶囊体
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
柱体
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.
高为2的简单柱体,贴图的话图片会包裹着柱体的表面,包含上下两个底面此时贴图渲染结束。
柱体创建岗哨,棒条体,轮子这类物体十分方便,可是你须要注意,碰撞机的形状要选择胶囊体(unity的碰撞机里并没有柱体形状的碰撞机)。
假设你想要为了一些物理实验目的须要准确的柱体碰撞机,你须要在建模程序中创建一个合适形状的网格,并把它导入到网格碰撞机中去。
Plane
平面
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.
的仅仅能在局部坐标空间XZ平面调整的扁平正方形。假设被贴图那么整张图片都会出如今这个正方形上。
平面对非常多类型的扁平表面比方说地板墙壁都非常有用。一个处在GUI中的表面在某些时候还须要展示一些图片和影片等特殊效果、虽然一个平面能够这么用,可是另外一个原生物体四边形在这些问题上更适合。
Quad
四边形
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和信息展示都能够用四边形展示实现,当然还有粒子、精灵图片、伪图片也是能够的。
[Unity官方文档翻译]Primitive and Placeholder Objects Unity原生3D物体教程的更多相关文章
- [Unity官方文档翻译]ScrollRect
官方地址:http://docs.unity3d.com/Manual/script-ScrollRect.html 一边学习一边翻译不知效率如何= = Scroll Rect 在小区域里展示大量内容 ...
- [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之纹理Textures
[我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之纹理Textures 本篇分享一下第6个已完工的视频,即<beginner Graphics ...
- [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之网格Meshes
[我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之网格Meshes 本篇分享一下第5个已完工的视频,即<beginner Graphics – ...
- [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之材质了解Materials
[我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之材质了解Materials 既上一篇分享了中文字幕的灯光介绍Lights后,本篇分享一下第3个已完工 ...
- [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之灯光介绍Lights
[我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之灯光介绍Lights 既上一篇分享了中文字幕的摄像机介绍Cameras后,本篇分享一下第2个已完工的 ...
- [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之摄像机介绍Cameras
[我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之摄像机介绍Cameras 最近得到一些Unity官方视频教程,一看全是纯英文的讲解,没有任何字幕或者 ...
- 对《[Unity官方实例教程 秘密行动] Unity官方教程《秘密行动》(十二) 角色移动》的一些笔记和个人补充,解决角色在地形上移动时穿透问题。
这里素材全是网上找的. 教程看这里: [Unity官方实例教程 秘密行动] Unity官方教程<秘密行动>(九) 角色初始设定 一.模型设置: 1.首先设置模型的动作无限循环. 不设置的话 ...
- Unity 官方 Demo: 2DPlatformer 的 SLua 版本。
9月份时,趁着国庆阅兵的假期,将 Unity 官方 Demo: 2DPlatformer 移植了一个 SLua 版本,并放在了我的 GitHub 账号下:https://github.com/yauk ...
- 源于《Unity官方实例教程 “Space Shooter”》思路分析及相应扩展
教程来源于:Unity官方实例教程 Space Shooter(一)-(五) http://www.jianshu.com/p/8cc3a2109d3b 一.经验总结 教程中步骤清晰,并且 ...
随机推荐
- hbase源码系列(二)HTable 探秘
hbase的源码终于搞一个段落了,在接下来的一个月,着重于把看过的源码提炼一下,对一些有意思的主题进行分享一下.继上一篇讲了负载均衡之后,这一篇我们从client开始讲吧,从client到master ...
- maven 从私仓库下载jar包
pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w ...
- 在springmvc中无法使用@value()注解
折腾了一下午,试了很多解决办法,就是死活不能扫描到properties文件.本来打算使用软编码的,尝试更改了全部jar包版本,还是无法解决. 后面想到了,spring和springmvc容器的加载顺序 ...
- PCL中分割方法的介绍(2)
(2)关于上一篇博文中提到的欧几里德分割法称之为标准的距离分离,当然接下来介绍其他的与之相关的延伸出来的聚类的方法,我称之为条件欧几里德聚类法,(是我的个人理解),这个条件的设置是可以由我们自定义的, ...
- ssh 断开解决办法
SSH连接总是隔一段时间没有输入时就断开,解决办法如下: 服务端配置sudo vi /etc/ssh/sshd_configClientAliveInterval 60 #服务端主动向客户端请 ...
- Web服务端开发需要考虑的问题
API设计 是否Restful. 首先需要清楚,Restful是一种风格而不是规范,不存在必须遵守的问题. Restful本质上是对HTTP API进行有效的分类. 分类是应该的,可以让API组织变得 ...
- 【转】一个小妙招能让你在服装上省下好多rmb
朋友们,你们仔细算过自己每年在淘宝上买衣服消费了多少rmb吗?100?1000?10000?甚至更多? 朋友们,你知道淘宝上大多数店铺的衣服是哪里来的吗? 朋友们,你知道怎么在这上面能节省更多的mon ...
- Numpy 的通用函数:快速的元素级数组函数
通用函数: 通用函数(ufunc)是一种对ndarray中的数据执行元素级运算的函数.你可以将其看作简单函数(接受一个或多个标量值,并产生一个或度过标量值)的矢量化包装器. 简单的元素级变体,如sqr ...
- 【转载】linux下的mount命令详解;
以下内容来自:http://blog.csdn.net/clozxy/article/details/5299054 http://linux.chinaunix.net/techdoc/system ...
- C#提高------------------------Attribute自定制概念
C#基础知识梳理系列八:定制特性Attribute 摘 要 设计类型的时候可以使用各种成员来描述该类型的信息,但有时候我们可能不太愿意将一些附加信息放到类的内部,因为这样,可能会给类型本身的信息描 ...