《Unity着色器圣经》1.0.2 | 顶点

目录索引

译文

物体的顶点,相当于在二维或三维空间中定义曲面面积的点集。在 Maya 和 Blender 中,顶点表示为网格与物体的交点。

这些点有两个主要特征:

  1. 它们是变换组件的子节点。
  2. 根据物体总体积的中心位置,它们有一个确定的位置。

这意味着什么呢?假设在 Maya 中,一个对象有两个相关联的默认节点。这两个节点分别称为 “变换(transform)“和 “形状(shape)“。变换节点与 Unity 中的一样,定义对象围绕轴心的位置、旋转和缩放;形状节点是变换节点的子节点,包含几何属性,即对象顶点在模型中的位置。有了这两个节点,我们就可以移动、旋转或缩放对象的顶点集,同时也可以改变特定点或顶点的位置。

上一段中举例说明的 POSITION[n] 语义正是可以访问顶点位置与模型关系的语义,也就是说,可以访问由 Maya 的形状节点导出的配置。

图片[1]-《Unity着色器圣经》1.0.2 | 顶点-软件开发学习笔记
Fig. 1.0.2a. 左图为Maya中的transform节点,右侧为Maya中的shape节点

原文对照

The vertices of an object, corresponding to the set of points that define the area of a surface in either a two-dimensional or three-dimensional space. In Maya and Blender, the vertices are represented as the intersection points of the mesh and an object.

Two main things characterize these points:

  1. They are children of the transform component.
  2. They have a defined position according to the center of the total volume of the object.

What does this mean? Suppose, in Maya 3D, there are two default nodes associated to an object. These are known as transform and shape. The transform node, as in Unity, defines the position, rotation, and scale of an object about the object’s pivot. Instead, the shape node, child of the transform node, contains the geometry attributes, that is, the position of the object’s vertices concerning its volume. It means we could move, rotate or scale the set of vertices of an object, but at the same time, we could change the position of a specific point or vertices.

The POSITION[n] semantics exemplified in the previous paragraph is precisely the one that gives access to the position of the vertices concerning the volume of the same, that is, to the configuration exported by the shape node from Maya.

图片[1]-《Unity着色器圣经》1.0.2 | 顶点-软件开发学习笔记
Fig. 1.0.2a. On the left, we can see the Transform node coming from Maya, and on the right, it's the Shape node
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容