在计算机内存表示一个盒子
顶点坐标;
对象(模型)的拓扑(拓扑学指点如何相互连接形成面);
用一个系统创建盒子的图像(透视投影);
透视投影后的坐标:
投影点的坐标不在(0,1)范围内。这些坐标在NDC空间中定义,NDC空间表示规范化的设备坐标。这很方便,因为不管画布(或屏幕)的原始大小如何(根据使用的设置可能不同),我们现在都在公共空间中定义了所有的点坐标。“正常化”这个术语很常见。这意味着您可以以某种方式将值从它们最初所在的范围重新映射到[0,1]。
您知道您的屏幕的分辨率或尺寸(以像素为单位)是多少吗?
512x512图像是一个数字图像有512行512像素,你更喜欢看它的另一种方式,512列512垂直对齐像素。**由于我们的坐标已经被归一化了,我们需要做的就是用像素来表示它们,就是将这些NDC坐标乘以图像维数(512)。**在这里,我们的画布是方形的,我们也将使用一个方形图像:
计算机图形学的一个很大的领域是用来模拟流体(水、火、烟)、织物、头发等的运动。
渲染在计算上也是很昂贵的任务。花费多少取决于你的场景有多少几何图形,以及你想要的最终图像有多真实。在渲染中,我们区分了离线和实时两种模式。**实时是用于视频游戏的(这实际上是一个要求),其中3D场景的内容需要至少以每秒30帧的速度渲染(通常每秒60帧被认为是一个标准)。大多数实时渲染都是在GPU上进行的,GPU是一种专门设计用来以最快速度渲染3D场景的处理器。**实时渲染技术将在实时部分进行讨论。离线渲染通常用于不需要实时的电影CGI制作(图像在以24、30或60帧每秒的速度显示之前预先计算并存储)。它可能需要几秒钟到几个小时才能完成一个图像,但它通常处理更多的几何图形,并产生比实时渲染更高质量的图像。然而,实时或离线渲染往往重叠越来越多的这些天,与视频游戏将可以处理的几何量以及质量和离线渲染引擎试图利用CPU技术领域的最新进展极大地提高他们的表演。