《Unity着色器圣经》1.0.5 | UV坐标

目录索引

译文

你给自己喜欢的游戏角色换过皮肤吗?UV坐标与角色换肤这件事息息相关,因为它允许我们在三维模型表面定位二维纹理。以UV坐标作为参考,可以控制网格中的每个顶点与贴图中的哪些像素相对应。

根据 UV 坐标定位顶点的过程称为 “UV 映射”。这是一个创建、编辑和组织 UV 的过程,UV 显示为模型网格的扁平化二维表示。在着色器中,我们可以访问该属性,以便在 3d 模型上定位纹理或在其中保存信息。

图片[1]-《Unity着色器圣经》1.0.5 | UV坐标-软件开发学习笔记
Fig. 1.0.5a. 顶点可以在 UV 贴图中以不同方式排列

UV 坐标的面积表示为 0.0f 到 1.0f 之间的范围,其中 “0 “表示起点,”1 “表示终点。

图片[2]-《Unity着色器圣经》1.0.5 | UV坐标-软件开发学习笔记
Fig. 1.0.5b. 平面直角坐标系上的UV 坐标

原文对照

We have all changed the skin of our favorite character for a better one. UV coordinates are directly related to this concept, since they allow us to position a two-dimensional texture on the surface of a three-dimensional object. These coordinates act as reference points, which control which texels in the texture map correspond to each vertex in the mesh.

The process of positioning vertices over UV coordinates is called “UV mapping”. It is a process by which UV that appears as a flattened, two-dimensional representation of the object’s mesh is created, edited, and organized. Within our shader, we can access this property, either to position a texture on our 3d model or to save information in it.

图片[1]-《Unity着色器圣经》1.0.5 | UV坐标-软件开发学习笔记
Fig. 1.0.5a, The vertices can be arranged in different ways within a UV map.

The area of the UV coordinates is equal to a range between 0.0f and 1.0f, where “zero” means the starting point and “one” is the endpoint.

图片[2]-《Unity着色器圣经》1.0.5 | UV坐标-软件开发学习笔记
Fig. 1.0.5b. Graphic reference to the UV coordinates in a cartesian plane.
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容