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物体教程的更多相关文章

  1. [Unity官方文档翻译]ScrollRect

    官方地址:http://docs.unity3d.com/Manual/script-ScrollRect.html 一边学习一边翻译不知效率如何= = Scroll Rect 在小区域里展示大量内容 ...

  2. [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之纹理Textures

    [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之纹理Textures 本篇分享一下第6个已完工的视频,即<beginner Graphics ...

  3. [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之网格Meshes

    [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之网格Meshes 本篇分享一下第5个已完工的视频,即<beginner Graphics – ...

  4. [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之材质了解Materials

    [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之材质了解Materials 既上一篇分享了中文字幕的灯光介绍Lights后,本篇分享一下第3个已完工 ...

  5. [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之灯光介绍Lights

    [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之灯光介绍Lights 既上一篇分享了中文字幕的摄像机介绍Cameras后,本篇分享一下第2个已完工的 ...

  6. [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之摄像机介绍Cameras

    [我给Unity官方视频教程做中文字幕]beginner Graphics – Lessons系列之摄像机介绍Cameras 最近得到一些Unity官方视频教程,一看全是纯英文的讲解,没有任何字幕或者 ...

  7. 对《[Unity官方实例教程 秘密行动] Unity官方教程《秘密行动》(十二) 角色移动》的一些笔记和个人补充,解决角色在地形上移动时穿透问题。

    这里素材全是网上找的. 教程看这里: [Unity官方实例教程 秘密行动] Unity官方教程<秘密行动>(九) 角色初始设定 一.模型设置: 1.首先设置模型的动作无限循环. 不设置的话 ...

  8. Unity 官方 Demo: 2DPlatformer 的 SLua 版本。

    9月份时,趁着国庆阅兵的假期,将 Unity 官方 Demo: 2DPlatformer 移植了一个 SLua 版本,并放在了我的 GitHub 账号下:https://github.com/yauk ...

  9. 源于《Unity官方实例教程 “Space Shooter”》思路分析及相应扩展

    教程来源于:Unity官方实例教程 Space Shooter(一)-(五)       http://www.jianshu.com/p/8cc3a2109d3b 一.经验总结 教程中步骤清晰,并且 ...

随机推荐

  1. python计算机视觉项目实践

    这是一个贝叶斯模型的计算机视觉小项目.希望大家通过这个简单的项目知道一般的计算机视觉项目是怎样操作的. 我先讲题目放在这里希望有兴趣的童鞋花一周的时间思考并用python实现.一周以后我来发布我的详细 ...

  2. 【C】——C利用回调函数实现多态

    案例: 功能:可以根据用户输入的命令完成相应的功能: 例如: 用户输入  hello   完成输出 hello的功能.    用户输入  hi   完成输出 hi 的功能. 一般的写法可能会写两个函数 ...

  3. Struts2、Spring、Hibernate 高效开发的最佳实践(转载)

    Struts2.Spring.Hibernate 高效开发的最佳实践 Struts2.Spring.Hibernate(SSH)是最常用的 Java EE Web 组件层的开发技术搭配,网络中和许多 ...

  4. 解决studio的URI is not registered (Setting|Language&Frameworks|Schemas and DTDs)

    高高兴兴过完国庆来上班,studio一打开发现布局文件跟不进去,点进去就到了R文件里,layout的文件里 xmlns:android="http://schemas.android.com ...

  5. jQuery 时间控件推荐

    My97DatePicker  My97DatePicker是一个更全面,更人性化,并且速度一流的日期选择控件.具有强大的日期范围限制功能:自定义事件和丰富的API库:多语言支持和自定义皮肤支持:跨无 ...

  6. EasyUI 验证

    使用过程中的一积累,备查. EasyUI 验证框使用方法://***************************missingMessage:未填写时显示的信息validType:验证类型见下示例 ...

  7. JBMP学习引导

    好文: 偶然机会,认识了工作流系统,并且在www.open-open.com(相当不错的开源项目站点,极力推荐!)上了解了些相当出色的工作流系统,不过呼声最高的应该属JBoss 的JBPM工作流组件了 ...

  8. 【Python】【Flask】Flask 后台发送html页面多种方法

    1.使用模板: @app.route('/') def home(): return render_template("homepage.html")#homepage.html在 ...

  9. 第三百五十三节,Python分布式爬虫打造搜索引擎Scrapy精讲—scrapy的暂停与重启

    第三百五十三节,Python分布式爬虫打造搜索引擎Scrapy精讲—scrapy的暂停与重启 scrapy的每一个爬虫,暂停时可以记录暂停状态以及爬取了哪些url,重启时可以从暂停状态开始爬取过的UR ...

  10. Mac 创建证书(以 创建gdb证书 为例 )

    open /Applications/Utilities/Keychain\ Access.app/ 打开 钥匙串访问 继续继续 创建完毕. Now that we have a certificat ...