An image rendered using  POV-Ray  3.6
An architectural visualization rendered in multiple styles using  Blender

Rendering  is the process of generating a  photorealistic  or  non-photorealistic  image from input data such as  3D models . The word "rendering" (in one of its senses) originally meant the task performed by an artist when depicting a real or imaginary thing (the finished artwork is also called a " rendering "). Today, to "render" commonly means to generate an image or video from a precise description (often created by an artist) using a  computer program . [1] [2] [3] [4]
::染是从输入数据 (如3D模型) 生成光现实或非光现实图像的过程. "染"一词 (在其中一个意义上) 最初意味着艺术家在描绘真实或想象中的东西时执行的任务 (成品艺术品也被称为"染"). 今天",染"通常意味着使用计算机程序从精确的描述 (通常由艺术家创建) 生成图像或视频. [1] [2] [3] [4]

software application  or  component  that performs rendering is called a  rendering  engine , [5]   render engine rendering system graphics engine , or simply a  renderer .
::执行染的软件应用程序或组件称为染引擎,[5]染引擎,染系统,图形引擎或简单地说染器.

A distinction is made between  real-time rendering , in which images are generated and displayed immediately (ideally fast enough to give the impression of motion or animation), and offline rendering (sometimes called  pre-rendering ) in which images, or film or video  frames , are generated for later viewing. Offline rendering can use a slower and higher-quality renderer. Interactive applications such as games must primarily use real-time rendering, although they may incorporate pre-rendered content.
::实时染区分为:图像生成和立即显示 (理想情况下足够快以产生动作或动画的印象),离线染 (有时称为预染),其中图像或电影或视频是为了以后查看而生成的.离线染可以使用更慢和更高质量的染器. 互动应用程序,如游戏,必须主要使用实时染,尽管它们可能包含预染的内容.

Rendering can produce images of scenes or objects defined using coordinates in  3D space , seen from a particular  viewpoint . Such  3D rendering  uses knowledge and ideas from  optics , the study of  visual perception mathematics , and  software engineering , and it has applications such as  video games simulators visual effects  for films and television,  design visualization , and  medical diagnosis . Realistic 3D rendering requires finding approximate solutions to the  rendering equation , which describes how light propagates in an environment.
::染可以产生使用3D空间坐标定义的场景或物体的图像,从特定的角度看.这种3D染利用光学,视觉感知研究,数学和软件工程的知识和想法,并且它具有视频游戏,模拟器,电影和电视的视觉效果,设计可视化和医学诊断等应用.现实化的3D染需要找到染方程的近似解决方案,该方程描述光在环境中如何传播.

Real-time rendering uses high-performance  rasterization  algorithms that process a list of shapes and determine which  pixels  are covered by each shape. When more realism is required (e.g. for  architectural visualization  or  visual effects ) slower pixel-by-pixel algorithms such as  ray tracing  are used instead. (Ray tracing can also be used selectively during rasterized rendering to improve the realism of lighting and reflections.) A type of ray tracing called  path tracing  is currently the most common technique for photorealistic rendering. Path tracing is also popular for generating high-quality non-photorealistic images, such as frames for 3D animated films. Both rasterization and ray tracing can be sped up ("accelerated") by specially designed microprocessors called  GPUs .
::实时染使用高性能光算法处理形状列表并确定每个形状所覆盖的像素.当需要更多的现实性 (例如,用于建筑可视化或视觉效果) 时,使用比较慢的像素对像素算法,如光线跟踪. (光线跟踪也可以在光染期间选择性地用于提高照明和反射的现实性) 一种称为路径跟踪的光线跟踪技术是目前最常见的光现实染技术.路径跟踪也很受欢迎,用于生成高质量的非光现实图像,例如3D动画电影的.光和光线跟踪都可以通过专门设计的微处理器称为GPU加速 ("加速").

Rasterization algorithms are also used to render images containing only 2D shapes such as  polygons  and  text . Applications of this type of rendering include  digital illustration graphic design , 2D  animation desktop publishing  and the display of  user interfaces .
::光算法也用于染仅包含多边形和文本等2D形状的图像.这种染的应用包括数字插图,图形设计,2D动画,桌面发布和用户界面的显示.

Historically, rendering was called  image synthesis [6] : xxi   but today this term is likely to mean  AI image generation . [7]  The term "neural rendering" is sometimes used when a  neural network  is the primary means of generating an image but some degree of control over the output image is provided. [8]  Neural networks can also assist rendering without replacing traditional algorithms, e.g. by removing noise from path traced images.
::历史上,染被称为图像合成[6]:xxi,但今天这个术语可能意味着人工智能图像生成.[7] 术语"神经染"有时用于神经网络是生成图像的主要手段,但提供了对输出图像的一定程度控制.[8] 神经网络也可以帮助染而不取代传统算法,例如通过从路径跟踪图像中删除噪音.

Features
::其他特点

Photorealistic rendering
::摄影现实化染

A large proportion of  computer graphics  research has worked towards producing images that resemble photographs. Fundamental techniques that make this possible were invented in the 1980s, but at the end of the decade, photorealism for complex scenes was still considered a distant goal. [9] : x   Today, photorealism is routinely achievable for offline rendering, but remains difficult for  real-time rendering . [10] : 1–2 
::计算机图形研究的很大一部分致力于制作类似于照片的图像.使这一点成为可能的基本技术是在20世纪80年代发明的,但在那个十年结束时,复杂场景的摄影现实主义仍然被认为是遥远的目标. [1]: x 今天,摄影现实主义通常可以实现离线染,但对于实时染仍然很困难. [2]: 12

In order to produce realistic images, rendering must simulate how light travels from light sources, is reflected, refracted, and scattered (often many times) by objects in the scene, passes through a camera lens, and finally reaches the film or sensor of the camera. The physics used in these simulations is primarily  geometrical optics , in which  particles of light  follow (usually straight) lines called  rays , but in some situations (such as when rendering  thin films , like the surface of  soap bubbles ) the  wave nature of light  must be taken into account. [11] [12]
::为了产生现实的图像,染必须模拟光线如何从光源传递,被场景中的物体反射,折射和散射 (通常是多次),通过相机镜头,最终到达相机的片或传感器.这些模拟中使用的物理主要是几何光学,其中光粒子遵循称为光线的 (通常是直线) 线条,但在某些情况下 (例如染薄膜时,如肥泡的表面) 必须考虑到光的波性质. [1] [2]

Effects that may need to be simulated include:
::可能需要模拟的效应包括:

  • Shadows , including both shadows with sharp edges and  soft shadows  with umbra and penumbra
    ::阴影,包括两种阴影,有尖的边缘和柔软的阴影,有阴影和半阴影
  • Reflections  in mirrors and smooth surfaces, as well as rough or rippled reflective surfaces
    ::镜子和光滑表面的反射,以及粗或纹反射表面
  • Refraction  – the bending of light when it crosses a boundary between two transparent materials such as air and glass. The amount of bending varies with the wavelength of the light, which may cause colored fringes or "rainbows" to appear.
    ::折射 (refraction) 光在空气和玻璃等两种透明材料之间穿过边界时的折曲.折曲的程度随光的波长而变化,可能会导致有色的边缘或"彩虹"出现.
  • Volumetric effects – Absorption and scattering when light travels through partially transparent or translucent substances (called  participating media  because they modify the light rather than simply allow rays to pass through) [13] : 140  [11]
    ::体积效应 光通过部分透明或半透明物质 (称为参与介质,因为它们修改光而不是仅仅允许光线通过) 时的吸收和散射[1]:140 [1]
  • Caustics  – bright patches, sometimes with distinct filaments and a folded or twisted appearance, resulting when light is reflected or refracted before illuminating an object. [13] : 109 
    ::光斑 亮斑,有时有明显的细丝和折叠或扭曲的外观,当光被反射或折射后才会照亮物体时会产生. [1]: 109

In realistic scenes, objects are illuminated both by light that arrives directly from a light source (after passing mostly unimpeded through air), and light that has bounced off other objects in the scene. The simulation of this complex lighting is called  global illumination . In the past, indirect lighting was often faked (especially when rendering  animated films ) by placing additional hidden lights in the scene, but today  path tracing  is used to render it accurately. [14] : 3  [13] : 108 
::在现实场景中,物体既由来自光源的光照亮 (在大多数情况下通过空气无阻碍),也由场景中的其他物体反射光照亮.这种复杂的照明的模拟称为全球照明.在过去,间接照明通常通过在场景中放置额外的隐藏灯光来伪造 (特别是在染动画电影时),但今天使用路径跟踪来准确地染.[1]:3 [1]:108

For true photorealism, the camera used to take the photograph must be simulated. The  thin lens approximation  allows combining  perspective projection  with  depth of field  (and  bokeh ) emulation.  Camera lens  simulations can be made more realistic by modeling the way light is refracted by the components of the lens.  Motion blur  is often simulated if film or video frames are being rendered. [11] [15]  Simulated  lens flare  and  bloom  are sometimes added to make the image appear subjectively brighter (although the design of real cameras tries to reduce these effects). [16] : 12.4 
::为了实现真正的摄影现实主义,必须模拟拍摄照片的相机.薄镜头近似允许将视角投影与深度 (和波克) 模拟结合起来.通过模拟镜头组件折射光的方式,可以使相机镜头模拟变得更现实.如果染电影或视频,通常会模拟运动模糊.[11][15] 模拟镜头闪光和花有时会被添加,使图像主观上看起来更亮 (尽管真实相机的设计试图减少这些效果).[16]: 12.4

Realistic rendering uses mathematical descriptions of how different surface materials reflect light, called  reflectance  models  or (when physically plausible)  bidirectional reflectance distribution functions (BRDFs) . [11]  Rendering materials such as  marble , plant leaves, and human skin requires simulating an effect called  subsurface scattering , in which a portion of the light travels into the material, is scattered, and then travels back out again. [13] : 143   The way color, and properties such as  roughness , vary over a surface can be represented efficiently using  texture mapping . [16] : 6.1 
::现实染使用数学描述不同表面材料如何反射光,称为反射率模型或 (当物理可信时) 双向反射率分布函数 (BRDF). [1] 染大理石,植物叶和人皮等材料需要模拟称为地下散射的效果,其中一部分光线进入材料,分散,然后再次回出. [2]: 143 颜色和粗等特性在表面上变化的方式可以使用纹理映射来有效地表示.

Other styles of 3D rendering
::其他3D染风格

For some applications (including early stages of  3D modeling ), simplified rendering styles such as  wireframe rendering  may be appropriate, particularly when the material and surface details have not been defined and only the shape of an object is known. [17] : 5.3   Games and other real-time applications may use simpler and less realistic rendering techniques as an artistic or design choice, or to allow higher  frame rates  on lower-end hardware.
::对于一些应用 (包括3D建模的早期阶段),简化染风格,如线框染可能是适当的,特别是当材料和表面细节尚未定义,并且只知道对象的形状时. [1]: 5.3游戏和其他实时应用可能使用更简单和更不现实的染技术作为艺术或设计选择,或允许较低端硬件的更高率.

Orthographic  and  isometric  projections can be used for a stylized effect or to ensure that parallel lines are depicted as parallel in  CAD  rendering. [16] : 4.7  [17] : 3.7 
::拼写和等比投影可以用于风格化效果或确保平行线在CAD染中被描绘为平行.[1]: 4.7 [2]: 3.7

Non-photorealistic rendering (NPR)  uses techniques like  edge detection  and  posterization  to produce 3D images that resemble technical illustrations, cartoons, or other styles of drawing or painting. [16] : ch 15 
::非摄影现实染 (NPR) 使用边缘检测和贴图等技术来制作类似于技术插图,漫画或其他绘图或绘画风格的3D图像. [1]: ch 15

Inputs
::输入

Before a 3D scene or 2D image can be rendered, it must be described in a way that the rendering software can understand. Historically, inputs for both 2D and 3D rendering were usually  text files , which are easier than binary files for humans to edit and debug. For 3D graphics, text formats have largely been supplanted by more efficient  binary formats , and by  APIs  which allow interactive applications to communicate directly with a rendering component without generating a file on disk (although a scene description is usually still created in memory prior to rendering). [18] : 1.2, 3.2.6, 3.3.1, 3.3.7 
::在3D场景或2D图像可以染之前,必须以染软件能够理解的方式描述它.从历史上看,2D和3D染的输入通常是文本文件,比二进制文件更容易编辑和调试.对于3D图形,文本格式已被更高效的二进制格式和API所取代,这些API允许交互式应用程序直接与染组件通信,而无需在文件上生成磁盘 (尽管染前通常仍在内存中创建场景描述).[18]: 1.2, 3.2.6, 3.3.1, 3.3.7

Traditional rendering algorithms use geometric descriptions of 3D scenes or 2D images. Applications and algorithms that render  visualizations  of data scanned from the real world, or scientific  simulations , may require different types of input data.
::传统的染算法使用3D场景或2D图像的几何描述.从现实世界扫描的数据或科学模拟的可视化,可能需要不同类型的输入数据的应用程序和算法.

The  PostScript  format (which is often credited with the rise of  desktop publishing ) provides a standardized, interoperable way to describe 2D graphics and  page layout . The  Scalable Vector Graphics (SVG)  format is also text-based, and the  PDF  format uses the PostScript language internally. In contrast, although many 3D graphics file formats have been standardized (including text-based formats such as  VRML  and  X3D ), different rendering applications typically use formats tailored to their needs, and this has led to a proliferation of proprietary and open formats, with binary files being more common. [18] : 3.2.3, 3.2.5, 3.3.7  [19] : vii  [20] [21] : 16.5.2.  [22]
::后台格式 (通常归功于桌面出版的兴起) 提供了一种标准化,可互操作的方式来描述二维图形和页面布局. 可扩展向量图形 (SVG) 格式也基于文本,而PDF格式内部使用后台格式. 相比之下,尽管许多3D图形文件格式已经标准化 (包括基于文本的格式,如VRML和X3D),不同的染应用通常使用适合其需求的格式,这导致专有和开放格式的扩散,二进制文件更为普遍.

2D vector graphics
::两维矢量图形

vector graphics  image description may include: [19] [20]
::矢量图形图像描述可能包括:[19][20]

  • Coordinates  and  curvature  information for  line segments arcs , and  Bézier curves  (which may be used as boundaries of filled shapes)
    ::线段,弧形和贝济尔曲线的坐标和曲率信息 (可作为填充形状的边界使用)
  • Center coordinates, width, and height (or  bounding rectangle  coordinates) of  basic  shapes such as  rectangles circles  and  ellipses
    ::基本形状如矩形,圆形和圆的中心坐标,宽度和高度 (或边界矩形坐标)
  • Color, width and pattern (such as dashed or dotted) for rendering lines
    ::染线的颜色,宽度和图案 (如点或点)
  • Colors, patterns, and  gradients  for filling shapes
    ::填充形状的颜色,图案和渐变
  • Bitmap  image data (either embedded or in an external file) along with scale and position information
    ::位图图像数据 (嵌入式或外部文件),以及尺寸和位置信息
  • Text to be rendered  (along with size, position, orientation, color, and font)
    ::要染的文字 (以及尺寸,位置,方向,颜色和字体)
  • Clipping  information, if only part of a shape or bitmap image should be rendered
    ::剪切信息,如果只需要染形状或位图图像的一部分
  • Transparency and  compositing  information for rendering overlapping shapes
    ::对于染重叠形状的透明度和组合信息
  • Color space  information, allowing the image to be rendered consistently on different displays and printers
    ::颜色空间信息,允许在不同的显示器和打印机上呈现一致的图像

3D geometry
::三维几何

A geometric scene description may include: [18] : Ch. 4-7, 8.7  [23]
::一个几何场景描述可能包括:[18]: Ch. 4-7, 8.7 [23]

  • Size, position, and orientation of  geometric primitives  such as spheres and cones (which may be  combined in various ways  to create more complex objects)
    ::几何原体的尺寸,位置和方向,如球体和 (它们可以以各种方式结合,以创建更复杂的物体)
  • Vertex   coordinates  and  surface normal   vectors  for  meshes  of triangles or polygons (often rendered as smooth surfaces by  subdividing  the mesh)
    ::三角形或多边形网格的顶点坐标和表面正常向量 (通常通过分隔网格来呈现为光滑表面)
  • Transformations  for positioning, rotating, and scaling objects within a scene (allowing parts of the scene to use different local coordinate systems).
    ::转换用于在场景内定位,旋转和缩放物体 (允许场景的部分使用不同的局部坐标系统).
  • "Camera" information describing how the scene is being viewed (position, direction,  focal length , and  field of view )
    ::描述场景的"摄像机"信息 (位置,方向,焦距和视野)
  • Light information (location, type, brightness, and color)
    ::灯光信息 (位置,类型,亮度和颜色)
  • Optical properties of surfaces, such as  albedo reflectance , and  refractive index ,
    ::表面的光学特性,如光 albedo,反射率和折射率,
  • Optical properties of media through which light passes (transparent solids, liquids, clouds, smoke), e.g.  absorption  and  scattering  cross sections
    ::光能传递媒介的光学特性 (透明固体,液体,云,烟雾),例如吸收和散射截面
  • Bitmap  image data used as  texture maps  for surfaces
    ::用作表面纹理图的比特图像数据
  • Small scripts or programs for generating complex 3D shapes or scenes  procedurally
    ::程序式生成复杂的3D形状或场景的小脚本或程序
  • Description of how object and camera locations and other information change over time, for rendering an animation
    ::描述物体和摄像头位置以及其他信息如何随时间变化,以染动画

Many file formats exist for storing individual 3D objects or " models ". These can be imported into a larger scene, or loaded on-demand by rendering software or games. A realistic scene may require hundreds of items like household objects, vehicles, and trees, and  3D artists  often utilize large libraries of models. In game production, these models (along with other data such as textures, audio files, and animations) are referred to as " assets ". [22] [24] : Ch. 4 
::许多文件格式存在用于存储单个3D对象或"模型".这些可以导入到一个更大的场景,或通过染软件或游戏按需加载.一个现实的场景可能需要数百个项目,如家用物品,车辆和树木,3D艺术家通常使用大型模型库.在游戏制作中,这些模型 (以及其他数据,如纹理,音频文件和动画) 被称为"资产".

Volumetric data
::容量数据

Scientific and engineering  visualization  often requires rendering  volumetric data  generated by 3D scans or  simulations . Perhaps the most common source of such data is medical  CT  and  MRI  scans, which need to be rendered for diagnosis. Volumetric data can be extremely large, and requires  specialized data formats  to store it efficiently, particularly if the volume is  sparse  (with empty regions that do not contain data). [16] : 14.3.1  [25] [26]
::科学和工程可视化通常需要通过3D扫描或模拟生成的体积数据.也许这种数据的最常见来源是医疗CT和MRI扫描,需要进行诊断.体积数据可能非常大,需要专门的数据格式来有效地存储,特别是如果体积稀疏 (没有包含数据的空区域).[16]:14.3.1 [25][26]

Before rendering,  level sets  for volumetric data can be extracted and converted into a mesh of triangles, e.g. by using the  marching cubes  algorithm. Algorithms have also been developed that work directly with volumetric data, for example to render realistic depictions of the way light is scattered and absorbed by clouds and smoke, and this type of volumetric rendering is used extensively in visual effects for movies. When rendering lower-resolution volumetric data without interpolation, the individual cubes or " voxels " may be visible, an effect sometimes used deliberately for game graphics. [27] : 4.6  [16] : 13.10, Ch. 14, 16.1 
::在染之前,可以提取体积数据的水平集并将其转换为三角形网格,例如使用行进立方体算法.还开发了直接与体积数据工作的算法,例如染云和烟雾散射和吸收光的现实描绘,这种体积染在电影视觉效果中广泛使用.在没有插曲的低分辨率体积数据染时,单个立方体或"voxels"可能会显现出来,这种效果有时被故意用于游戏图形. [1]: 4.6 [16]: 13.10, Ch. 14, 16.1

Photogrammetry and scanning
::摄影计和扫描

Photographs of real world objects can be incorporated into a rendered scene by using them as  textures  for 3D objects. Photos of a scene can also be stitched together to create  panoramic images  or  environment maps , which allow the scene to be rendered very efficiently but only from a single viewpoint. Scanning of real objects and scenes using  structured light  or  lidar  produces  point clouds  consisting of the coordinates of millions of individual points in space, sometimes along with color information. These point clouds may either be rendered directly or  converted into meshes  before rendering. (Note: "point cloud" sometimes also refers to a minimalist rendering style that can be used for any 3D geometry, similar to wireframe rendering.) [16] : 13.3, 13.9  [18] : 1.3 
::现实世界对象的照片可以被纳入染场景,用它们作为3D对象的纹理.场景的照片也可以被拼接在一起,创建全景图像或环境地图,这允许场景非常高效地染,但只从单一的视角.使用结构光或激光雷达扫描真实对象和场景产生由空间中的数百万个点的坐标组成的点云,有时还包括颜色信息.这些点云可以在染之前直接染或转换为网格. (注:"点云"有时也指一种简约的染风格,可以用于任何3D几何,类似于线框染.) [1]:13.3,13.9 [1]:1.3

Neural approximations and light fields
::神经近似和光场

A more recent, experimental approach is description of scenes using  radiance fields  which define the color, intensity, and direction of incoming light at each point in space. (This is conceptually similar to, but not identical to, the  light field  recorded by a  hologram .) For any useful resolution, the amount of data in a radiance field is so large that it is impractical to represent it directly as volumetric data, and an  approximation  function must be found.  Neural networks  are typically used to generate and evaluate these approximations, sometimes using video frames, or a collection of photographs of a scene taken at different angles, as " training data ". [28] [29]
::最近的实验方法是使用辐射场来描述场景,该场景定义了空间中的每个点的入射光的颜色,强度和方向. (这在概念上类似于全息图记录的光场,但与之不相同.) 对于任何有用的分辨率,辐射场中的数据量是如此之大,以至于无法直接将其表示为体积数据,必须找到一个近似函数.神经网络通常用于生成和评估这些近似值,有时使用视频或在不同角度拍摄的场景照片集合,作为"训练数据". [1] [2]

Algorithms related to neural networks have recently been used to find approximations of a scene as  3D Gaussians . The resulting representation is similar to a  point cloud , except that it uses fuzzy, partially-transparent blobs of varying dimensions and orientations instead of points. As with  neural radiance fields , these approximations are often generated from photographs or video frames. [30]
::与神经网络相关的算法最近被用来找到场景的近似值为3D高斯.得到的表示与点云类似,但它使用模糊的,部分透明的不同尺寸和方向的斑块而不是点.与神经辐射场一样,这些近似值通常是从照片或视频中生成的. [1]

Outputs
::输出

The output of rendering may be displayed immediately on the screen (many times a second, in the case of real-time rendering such as games) or saved in a  raster graphics  file format such as  JPEG  or  PNG . High-end rendering applications commonly use the  OpenEXR  file format, which can represent finer gradations of colors and  high dynamic range  lighting, allowing  tone mapping  or other adjustments to be applied afterwards without loss of quality. [31] [32] : Ch. 14, Ap. B 
::染的输出可以立即在屏幕上显示 (每秒数次,在实时染的情况下,例如游戏) 或以JPG或PNG等图格式文件格式保存.高端染应用程序通常使用OpenEXR文件格式,可以表示更细致的色彩分级和高动态范围照明,允许在后面应用音色映射或其他调整而不会损失质量. [1] [2]: Ch. 14, Ap. B

Quickly rendered animations can be saved directly as video files, but for high-quality rendering, individual frames (which may be rendered by different computers in a  cluster  or  render farm  and may take hours or even days to render) are output as separate files and combined later into a video clip. [33] [24] : 1.5, 3.11, 8.11 
::快速染的动画可以直接保存为视频文件,但对于高质量的染,单个 (可能由集群或染农场中的不同计算机染,可能需要数小时甚至数天才能染) 将作为单独的文件输出,并以后组合成视频剪辑. [1] [2]: 1.5, 3.11, 8.11

The output of a renderer sometimes includes more than just  RGB color values . For example, the spectrum can be sampled using multiple wavelengths of light, or additional information such as depth (distance from camera) or the material of each point in the image can be included (this data can be used during compositing or when generating  texture maps  for real-time rendering, or used to assist in  removing noise  from a path-traced image). Transparency information can be included, allowing rendered foreground objects to be composited with photographs or video. It is also sometimes useful to store the contributions of different lights, or of specular and diffuse lighting, as separate channels, so lighting can be adjusted after rendering. The  OpenEXR  format allows storing many channels of data in a single file. Renderers such as  Blender  and  Pixar RenderMan  support a large variety of configurable values called Arbitrary Output Variables (AOVs). [31] [32] : Ch. 14, Ap. B  [34]
::染器的输出有时不仅包括RGB颜色值.例如,可以使用多个光波长取样光谱,或可以包括诸如深度 (距离相机) 或图像中的每个点的材料等额外信息 (这些数据可以在构成过程中使用,或在生成实时染的纹理图时,或用于帮助从路径跟踪图像中删除噪音).可以包括透明信息,允许染的前景对象与照片或视频进行组合.有时还有用将不同灯光或光谱和分散照明的贡献存储为单独的通道,因此可以在染后调整照明.OpenEXR格式允许在单个文件中存储许多数据通道.像Blender和PixarRenderMan这样的染器支持各种各样的值,称为可

Techniques
::技术

Choosing how to render a 3D scene usually involves trade-offs between speed, memory usage, and realism (although realism is not always desired). The  algorithms  developed over the years follow a loose progression, with more advanced methods becoming practical as computing power and memory capacity increased. Multiple techniques may be used for a single final image.
::选择如何染3D场景通常涉及速度,内存使用和现实性之间的权衡 (尽管现实性并不总是希望的).多年来开发的算法遵循松散的进展,随着计算能力和内存容量增加,更先进的方法变得越来越实用.对于单一的最终图像,可以使用多种技术.

An important distinction is between  image order  algorithms, which iterate over pixels in the image, and  object order  algorithms, which iterate over objects in the scene. For simple scenes, object order is usually more efficient, as there are fewer objects than pixels. [35] : Ch. 4 
::图像顺序算法与对象顺序算法之间有一个重要的区别,图像中的像素反复代,对象顺序算法反复代场景中的对象.对于简单的场景,对象顺序通常更有效,因为对象比像素少.[35]: Ch. 4

2D vector graphics
The  vector displays  of the 1960s-1970s used deflection of an  electron beam  to draw  line segments  directly on the screen. Nowadays,  vector graphics  are rendered by  rasterization  algorithms that also support filled shapes. In principle, any 2D vector graphics renderer can be used to render 3D objects by first projecting them onto a 2D image plane.  [36] : 93, 431, 505, 553 
3D rasterization
Adapts 2D rasterization algorithms so they can be used more efficiently for 3D rendering, handling  hidden surface removal  via  scanline  or  z-buffer  techniques. Different realistic or stylized effects can be obtained by coloring the pixels covered by the objects in different ways.  Surfaces  are typically divided into  meshes  of triangles before being rasterized. Rasterization is usually synonymous with "object order" rendering (as described above). [36] : 560-561, 575-590  [18] : 8.5  [35] : Ch. 9 
Ray casting
Uses geometric formulas to compute the first object that a  ray  intersects. [37] : 8   It can be used to implement "image order" rendering by casting a ray for each pixel, and finding a corresponding point in the scene. Ray casting is a fundamental operation used for both graphical and non-graphical purposes, [10] : 6   e.g. determining whether a point is in shadow, or checking what an enemy can see in a  game .
Ray tracing
Simulates the bouncing paths of light caused by  specular reflection  and  refraction , requiring a varying number of ray casting operations for each path. Advanced forms use  Monte Carlo techniques  to render effects such as area lights,  depth of field , blurry reflections, and  soft shadows , but computing  global illumination  is usually in the domain of path tracing. [37] : 9-13  [38]
Radiosity
finite element analysis  approach that breaks surfaces in the scene into pieces, and estimates the amount of light that each piece receives from light sources, or indirectly from other surfaces. Once the  irradiance  of each surface is known, the scene can be rendered using rasterization or ray tracing. [6] : 888-890, 1044-1045 
Path tracing
Uses  Monte Carlo integration  with a simplified form of ray tracing, computing the average brightness of a  sample  of the possible paths that a photon could take when traveling from a light source to the camera (for some images, thousands of paths need to be sampled per pixel [10] : 8  ). It was introduced as a  statistically unbiased  way to solve the  rendering equation , giving ray tracing a rigorous mathematical foundation. [39] [37] : 11-13 

Each of the above approaches has many variations, and there is some overlap. Path tracing may be considered either a distinct technique or a particular type of ray tracing. [6] : 846, 1021   Note that the  usage  of terminology related to ray tracing and path tracing has changed significantly over time. [37] : 7 
::上述方法各有很多变化,并且有一些重叠.路径跟踪可以被认为是一种独特的技术或特定类型的光线跟踪.[6]: 846, 1021 需要注意的是,与光线跟踪和路径跟踪相关的术语的使用随着时间的推移而发生了重大变化.[37]: 7

Rendering of a fractal terrain by  ray marching

Ray marching  is a family of algorithms, used by ray casting, for finding intersections between a ray and a complex object, such as a  volumetric dataset  or a surface defined by a  signed distance function . It is not, by itself, a rendering method, but it can be incorporated into ray tracing and path tracing, and is used by rasterization to implement screen-space reflection and other effects. [37] : 13 
::射线行进是一种用于射线射的算法,用于在射线和复杂物体之间找到交点,例如体积数据集或由符号距离函数定义的表面.它本身不是染方法,但可以纳入射线跟踪和路径跟踪,并通过光实现屏幕空间反射和其他效果. [1]: 13

A technique called  photon mapping  traces paths of photons from a light source to an object, accumulating data about  irradiance  which is then used during conventional ray tracing or path tracing. [6] : 1037-1039   Rendering a scene using only rays traced from the light source to the camera is impractical, even though it corresponds more closely to reality, because a huge number of photons would need to be simulated, only a tiny fraction of which actually hit the camera. [40] : 7-9  [36] : 587 
::一种称为光子映射的技术追踪光子从光源到物体的路径,积累辐射率的数据,然后在传统的光线追踪或路径追踪中使用.[6]:1037-1039仅使用从光源到相机追踪的光线来染场景是不切实际的,即使它与现实更接近,因为需要模拟大量光子,其中只有很小一部分实际上会撞击相机. [1]:7-9 [2]:587

Some authors call conventional ray tracing "backward" ray tracing because it traces the paths of photons backwards from the camera to the light source, and call following paths from the light source (as in photon mapping) "forward" ray tracing. [40] : 7-9   However sometimes the meaning of these terms is reversed. [41]  Tracing rays starting at the light source can also be called  particle tracing  or  light tracing , which avoids this ambiguity. [14] : 92  [42] : 4.5.4 
::一些作者称传统的光线追踪为"倒向"光线追踪,因为它追踪光子从相机向光源的路径,并称光源的后续路径 (如光子映射) 为"前向"光线追踪. [1]: 7-9 然而,有时这些术语的含义是反向的. [2] 从光源开始追踪光线也可以称为粒子追踪或光线追踪,从而避免了这种模两可. [1]: 92 [2]: 4.5.4

Real-time rendering, including video game graphics, typically uses rasterization, but increasingly combines it with ray tracing and path tracing. [10] : 2   To enable realistic  global illumination , real-time rendering often relies on pre-rendered ("baked") lighting for stationary objects. For moving objects, it may use a technique called  light probes , in which lighting is recorded by rendering omnidirectional views of the scene at chosen points in space (often points on a grid to allow easier  interpolation ). These are similar to  environment maps , but typically use a very low resolution or an approximation such as  spherical harmonics . [43]  (Note:  Blender  uses the term 'light probes' for a more general class of pre-recorded lighting data, including reflection maps. [44] )
::实时染,包括视频游戏图形,通常使用光,但越来越多地将其与光线跟踪和路径跟踪结合在一起.[10]:2为了实现现实的全球照明,实时染通常依赖于固定对象的预先染 ("烤") 照明.对于移动的对象,它可能使用一种称为光探测器的技术,其中光照被记录在空间中选择的点 (通常是网格上的点以允许更容易的插值) 染场景的全向视图.这些类似于环境地图,但通常使用非常低的分辨率或近似度,如球体波.

Examples comparing different rendering techniques
  • A low quality rasterized image, rendered by  Blender 's EEVEE renderer with low  shadow map  resolution and a low-resolution mesh

    ::一个低质量的光图像,由Blender的EEVEE染器染,影子图像分辨率低,并具有低分辨率的网格
  • A low quality path traced image, rendered by Blender's Cycles renderer with only 16 sampled paths per pixel and a low-resolution mesh

    ::一个低质量的路径图像,由Blender的循环染器染,每像素只有16个样本路径和低分辨率网格
  • A ray traced image, using the  POV-Ray  program (using only its ray tracing features) with a low-resolution mesh

    ::采用POV-Ray程序 (仅使用其光线追踪功能) 带有低分辨率网格的光线追踪图像
  • A higher quality rasterized image, using  Blender 's EEVEE renderer with light probes

    ::使用Blender的EEVEE染器和光探测器,获得更高质量的光图像
  • A higher quality path traced image, using  Blender 's Cycles renderer with 2000 sampled paths per pixel

    ::使用Blender的循环染器,每像素采样了2000个路径,更高质量的路径图像
  • An image rendered using  POV-Ray 's  ray tracing radiosity  and  photon mapping  features

    ::使用POV-Ray的光线追踪,辐射和光子映射功能染的图像
  • A more realistic path traced image, using  Blender 's Cycles renderer with  image-based lighting

    ::使用Blender的循环染器和基于图像的照明,更真实的路径图像

  • ::一个光谱染图像,使用POV-Ray的光线追踪,辐射和光子映射功能

Rasterization
::化

Main article:  Rasterization
An architectural visualization of the  Extremely Large Telescope  from 2009, likely rendered using a combination of techniques

The term  rasterization  (in a broad sense) encompasses many techniques used for 2D rendering and  real-time  3D rendering. 3D  animated films  were rendered by rasterization before  ray tracing  and  path tracing  became practical.
::拉斯特化 (在广义上) 术语涵盖了用于2D染和实时3D染的许多技术.在光线跟踪和路径跟踪成为实际之前,3D动画电影是通过拉斯特化染的.

A renderer combines rasterization with  geometry processing  (which is not specific to rasterization) and  pixel processing  which computes the  RGB color values  to be placed in the  framebuffer  for display. [16] : 2.1  [35] : 9 
::染器将化与几何处理 (不特定于化) 和像素处理结合在一起,计算将在缓冲器中放置的RGB颜色值以显示.[16]: 2.1 [35]: 9

The main tasks of rasterization (including pixel processing) are: [16] : 2, 3.8, 23.1.1 
::化的主要任务 (包括像素处理) 是:[16]: 2, 3.8, 23.1.1

  • Determining which pixels are covered by each geometric shape in the 3D scene or 2D image (this is the actual rasterization step, in the strictest sense)
    ::确定3D场景或2D图像中的每个几何形状所覆盖的像素 (这是严格意义上的实际化步骤)
  • Blending between colors and depths defined at the  vertices  of shapes, e.g. using  barycentric coordinates  ( interpolation )
    ::在形状的顶点定义的颜色和深度之间的混合,例如使用重心坐标 (插值)
  • Determining if parts of shapes are hidden by other shapes, due to 2D layering or 3D depth ( hidden surface removal )
    ::确定形状的部分是否被其他形状隐藏,由于二维层或三维深度 (隐藏表面的去除)
  • Evaluating a function for each pixel covered by a shape ( shading )
    ::评估每个像素所覆盖的形状 (遮光) 的功能
  • Smoothing edges of shapes so pixels are less visible ( anti-aliasing )
    ::滑滑形状边缘,使像素变得不那么明显 (反化)
  • Blending overlapping transparent shapes ( compositing )
    ::混合重叠透明形状 (复合)

3D rasterization is typically part of a  graphics pipeline  in which an application provides  lists of triangles  to be rendered, and the rendering system transforms and  projects  their coordinates, determines which triangles are potentially visible in the  viewport , and performs the above rasterization and pixel processing tasks before displaying the final result on the screen. [16] : 2.1  [35] : 9 
::3D 光通常是图形管道的一部分,其中应用程序提供要染的三角形列表,光系统转换和投射它们的坐标,确定哪些三角形在视窗中可能可见,并在屏幕上显示最终结果之前执行上述光和像素处理任务. [1]: 2.1 [1]: 9

Historically, 3D rasterization used algorithms like the  Warnock algorithm  and  scanline rendering  (also called "scan-conversion"), which can handle arbitrary polygons and can rasterize many shapes simultaneously. Although such algorithms are still important for 2D rendering, 3D rendering now usually divides shapes into triangles and rasterizes them individually using simpler methods. [45] [46] [36] : 456, 561–569 
::历史上,3D染使用了沃诺克算法和扫描线染 (也称为"扫描转换") 等算法,这些算法可以处理任意的多边形,并可以同时染许多形状.尽管这些算法仍然对2D染很重要,但3D染现在通常将形状分为三角形,并使用更简单的方法单独染它们. [1] [2] [3]: 456, 561 569

High-performance algorithms  exist for rasterizing  2D lines , including  anti-aliased lines , as well as  ellipses  and filled triangles. An important special case of 2D rasterization is  text rendering , which requires careful anti-aliasing and rounding of coordinates to avoid distorting the  letterforms  and preserve spacing, density, and sharpness. [35] : 9.1.1  [47]
::现有高性能算法可以对2D线进行分离,包括反号线,圆和填充三角形. 2D分离的一个重要特殊情况是文本染,它需要仔细反号和圆坐标以避免扭曲字母形状并保持间距,密度和清晰度. [1]: 9.1.1 [2]

After 3D coordinates have been  projected  onto the  image plane , rasterization is primarily a 2D problem, but the 3rd dimension necessitates  hidden surface removal . Early computer graphics used  geometric algorithms  or ray casting to remove the hidden portions of shapes, or used the  painter's algorithm , which sorts shapes by depth (distance from camera) and renders them from back to front. Depth sorting was later avoided by incorporating depth comparison into the  scanline rendering  algorithm. The  z-buffer  algorithm performs the comparisons indirectly by including a depth or "z" value in the  framebuffer . A pixel is only covered by a shape if that shape's z value is lower (indicating closer to the camera) than the z value currently in the buffer. The z-buffer requires additional memory (an expensive resource at the time it was invented) but simplifies the rasterization code and permits multiple passes. Memory is now faster and more plentiful, and a z-buffer is almost always used for real-time rendering. [48] [49] [36] : 553–570  [16] : 2.5.2 
::在3D坐标被投射到图像平面后,分层化主要是一个2D问题,但第三维需要隐藏的表面去除.早期的计算机图形使用几何算法或射线造来删除隐藏的形状部分,或使用画家的算法,根据深度 (距离相机) 排序形状并从后面染它们.深度排序后来通过将深度比较纳入扫描线染算法来避免.z缓冲算法通过在缓冲中包含深度或"z"值来间接进行比较.如果该形状的z值比目前在缓冲中的z值更低 (表示更接近相机),则像素只被一个形状覆盖.z缓冲需要额外的内存 (当时是昂贵的资源),但它允许分层化并

A drawback of the basic  z-buffer algorithm  is that each pixel ends up either entirely covered by a single object or filled with the background color, causing jagged edges in the final image. Early  anti-aliasing  approaches addressed this by detecting when a pixel is partially covered by a shape, and calculating the covered area. The  A-buffer  (and other  sub-pixel  and  multi-sampling  techniques) solve the problem less precisely but with higher performance. For real-time 3D graphics, it has become common to use  complicated heuristics  (and even  neural-networks ) to perform anti-aliasing. [49] [50] [35] : 9.3  [16] : 5.4.2 
::基本的z缓冲算法的缺点是,每个像素最终要么完全被单个对象覆盖,要么被背景颜色填充,导致最终图像的纹边缘.早期的反位方法通过检测像素何时被某个形状部分覆盖,并计算覆盖面积来解决这个问题.A缓冲 (和其他子像素和多样本技术) 解决了不那么精确但性能更高的问题.对于实时3D图形,使用复杂的启发式 (甚至神经网络) 来执行反位变化已成为常见. [1] [2] [3]: 9.3 [16]: 5.4.2

In 3D rasterization, color is usually determined by a  pixel shader  or  fragment shader , a small program that is run for each pixel. The shader does not (or cannot) directly access 3D data for the entire scene (this would be very slow, and would result in an algorithm similar to ray tracing) and a variety of techniques have been developed to render effects like  shadows  and  reflections  using only  texture mapping  and multiple passes. [35] : 17.8 
::在3D化中,颜色通常由像素遮光器或片段遮光器确定,这是一个为每个像素运行的小程序.遮光器无法直接访问整个场景的3D数据 (这将非常缓慢,并会导致类似于光线跟踪的算法),并且已经开发了各种技术,以仅使用纹理映射和多次传递来染影子和反射等效果. [1]: 17.8

Older and more basic 3D rasterization implementations did not support shaders, and used simple shading techniques such as  flat shading  (lighting is computed once for each triangle, which is then rendered entirely in one color),  Gouraud shading  (lighting is computed using  normal vectors  defined at vertices and then colors are interpolated across each triangle), or  Phong shading  (normal vectors are interpolated across each triangle and lighting is computed for each pixel). [35] : 9.2 
::较旧的3D图实现不支持遮光器,并且使用简单的遮光技术,例如平面遮光 (每个三角形的照明一次计算,然后完全呈现为一个颜色),Gouraud遮光 (使用顶点定义的正常向量计算,然后在每个三角形中插入颜色),或Phong遮光 (正常向量在每个三角形中插入,并且对每个像素进行计算).[1]: 9.2

Until relatively recently,  Pixar  used rasterization for rendering its  animated films . Unlike the renderers commonly used for real-time graphics, the  Reyes rendering system  in Pixar's  RenderMan  software was optimized for rendering very small (pixel-sized) polygons, and incorporated  stochastic  sampling techniques more typically associated with  ray tracing . [18] : 2, 6.3  [51]
::直到最近,皮克斯公司还在染动画电影时使用光化技术.与常用于实时图形的染器不同,皮克斯公司的RenderMan软件中的雷耶斯染系统被优化为染非常小 (像素大小) 的多边形,并采用了与射线追踪相关的随机抽样技术. [1]: 2, 6.3 [1]

Ray casting
::射线造

Main article:  Ray casting

One of the simplest ways to render a 3D scene is to test if a  ray  starting at the viewpoint (the "eye" or "camera") intersects any of the geometric shapes in the scene, repeating this test using a different ray direction for each pixel. This method, called  ray casting , was important in early computer graphics, and is a fundamental building block for more advanced algorithms. Ray casting can be used to render shapes defined by  constructive solid geometry  (CSG) operations. [37] : 8-9  [52] : 246–249 
::染3D场景的最简单方法之一是测试视角 ("眼睛"或"摄像头") 开始的射线是否与场景中的任何几何形状相交,并重复此测试,使用不同的射线方向为每个像素.这种称为射线造的方法在早期计算机图形中很重要,是更先进算法的基本构建块.射线造可以用于通过构造型实体几何 (CSG) 运算来染定义的形状. [1]: 8-9 [52]: 246249

Early ray casting experiments include the work of Arthur Appel in the 1960s. Appel rendered shadows by casting an additional ray from each visible surface point towards a light source. He also tried rendering the density of illumination by casting random rays from the light source towards the object and  plotting  the intersection points (similar to the later technique called  photon mapping ). [53]
::早期的射线投射实验包括20世纪60年代的亚瑟·阿佩尔的工作.阿佩尔通过从每个可见表面点向光源投射额外的射线来呈现阴影.他还试图通过从光源向物体投射随机射线并绘制交点来呈现照明密度 (类似于后来称为光子映射的技术).[1]

Ray marching  can be used to find the first intersection of a ray with an intricate shape such as this  Mandelbulb  fractal.

When rendering scenes containing many objects, testing the intersection of a ray with every object becomes very expensive. Special  data structures  are used to speed up this process by allowing large numbers of objects to be excluded quickly (such as objects behind the camera). These structures are analogous to  database indexes  for finding the relevant objects. The most common are the  bounding volume hierarchy  (BVH), which stores a pre-computed  bounding box or sphere  for each branch of a  tree  of objects, and the  k-d tree  which  recursively  divides space into two parts. Recent  GPUs  include hardware acceleration for BVH intersection tests. K-d trees are a special case of  binary space partitioning , which was frequently used in early computer graphics (it can also generate a rasterization order for the  painter's algorithm ).  Octrees , another historically popular technique, are still often used for volumetric data. [10] : 16–17  [54] [52] [21] : 36.2 
::在染包含许多对象的场景时,测试一条光线与每个对象的交叉变得非常昂贵. 特殊数据结构被用来加快这个过程,允许大量的对象被快速排除 (如摄像头后面的对象). 这些结构类似于用于找到相关对象的数据库索引. 最常见的是边界体积层次 (BVH),它为对象树的每个分支存储了一个预先计算的边界框或球,以及 k-d 树,它递归地将空间分为两个部分. 最近的 GPU 包括了BVH交叉测试的硬件加速. K-d 树是二进制空间分区的一个特殊例子,它经常用于早期计算机图形 (它也可以生成画家算法的分顺序). 八度数,另一个历史流行的技术,

Geometric formulas are sufficient for finding the intersection of a ray with shapes like  spheres polygons , and  polyhedra , but for most curved surfaces there is no  analytic solution , or the intersection is difficult to compute accurately using limited precision  floating point numbers Root-finding algorithms  such as  Newton's method  can sometimes be used. To avoid these complications, curved surfaces are often approximated as  meshes of triangles Volume rendering  (e.g. rendering clouds and smoke), and some surfaces such as  fractals , may require  ray marching  instead of basic ray casting. [55] [37] : 13  [16] : 14, 17.3 
::几何公式足以找到球形,多面形和多面形的射线的交点,但对于大多数曲面没有分析解决方案,或者使用有限精度浮点数很难准确计算交点. 诸如牛顿的方法等根查找算法有时可以使用. 为了避免这些并发症,曲面通常被近似为三角形的网格. 体积染 (例如染云和烟雾),以及一些表面如分形,可能需要射线行进而不是基本射线造. [1] [2]: 13 [3]: 14, 17.3

Ray tracing
::射线追踪

Main article:  Ray tracing (graphics)
Spiral Sphere and Julia, Detail , a computer-generated image created by visual artist Robert W. McGregor using only  POV-Ray  3.6 and its built-in scene description language

Ray casting can be used to render an image by tracing  light rays  backwards from a simulated camera. After finding a point on a surface where a ray originated, another ray is traced towards the light source to determine if anything is casting a shadow on that point. If not, a  reflectance model  (such as  Lambertian reflectance  for  matte  surfaces, or the  Phong reflection model  for glossy surfaces) is used to compute the probability that a  photon  arriving from the light would be reflected towards the camera, and this is multiplied by the brightness of the light to determine the pixel brightness. If there are multiple light sources, brightness contributions of the lights are added together. For color images, calculations are repeated for multiple  wavelengths  of light (e.g. red, green, and blue). [16] : 11.2.2  [37] : 8 
::射线射可以通过追踪光线向后从模拟摄像头来染图像.在发现光线起源的表面上的点后,再向光源追踪,以确定是否在该点上射阴影.如果没有,则使用反射率模型 (如光表面的兰伯特反射率或光泽表面的光反射模型) 来计算光线到达的光子会反射到摄像头的概率,并乘以光的亮度来确定像素亮度.如果有多个光源,则光线的亮度贡献被加在一起.对于彩色图像,对多个光波长 (例如红,绿和蓝) 进行重复计算.

Classical ray tracing  (also called  Whitted-style  or  recursive  ray tracing) extends this method so it can render mirrors and transparent objects. If a ray traced backwards from the camera originates at a point on a mirror, the  reflection formula  from  geometric optics  is used to calculate the direction the reflected ray came from, and another ray is cast backwards in that direction. If a ray originates at a transparent surface, rays are cast backwards for both  reflected  and  refracted  rays (using  Snell's law  to compute the refracted direction), and so ray tracing needs to support a branching "tree" of rays. In simple implementations, a  recursive function  is called to trace each ray. [16] : 11.2.2  [37] : 9 
::经典的射线追踪 (也称为惠特式或递归射线追踪) 扩展了这一方法,因此它可以染镜和透明物体.如果从相机向后追踪的射线起源于镜中的某一点,则使用几何光学的反射公式来计算反射射线的方向,然后再向后抛射另一射线.如果射线起源于透明表面,则反射和折射射线的射线都被反射 (使用斯内尔定律计算折射方向),因此射线追踪需要支持射线的分支"树".在简单的实现中,称为循环函数来追踪每个射线.

Ray tracing usually performs  anti-aliasing  by taking the average of multiple  samples  for each pixel. It may also use multiple samples for effects like  depth of field  and  motion blur . If evenly-spaced ray directions or times are used for each of these features, many rays are required, and some aliasing will remain.  Cook-style stochastic , or  Monte Carlo ray tracing  avoids this problem by using  random sampling  instead of evenly-spaced samples. This type of ray tracing is commonly called  distributed ray tracing , or  distribution ray tracing  because it samples rays from  probability distributions . Distribution ray tracing can also render realistic "soft" shadows from large lights by using a random sample of points on the light when testing for shadowing, and it can simulate  chromatic aberration  by sampling multiple wavelengths from the  spectrum of light . [37] : 10  [40] : 25 
::射线追踪通常通过对每个像素采集多个样本的平均值来进行反化.它也可以使用多个样本来进行像深度和运动模糊等效果.如果用于这些特征中的每一个,均间距的射线方向或时间都需要许多射线,并且会保留一些化.库克式,随机或蒙特卡洛射线追踪通过使用随机采样而不是均间距的样本来避免这个问题.这种类型的射线追踪通常被称为分布式射线追踪或分布式射线追踪,因为它从概率分布中采样射线.分布式射线追踪还可以通过测试阴影时使用光线上的随机点样本来呈现现现实"柔"的阴影,并且可以通过从光谱中采样多个波长来

Real surface materials reflect small amounts of light in almost every direction because they have small (or microscopic) bumps and grooves. A distribution ray tracer can simulate this by sampling possible ray directions, which allows rendering blurry reflections from glossy and metallic surfaces. However if this procedure is repeated  recursively  to simulate realistic indirect lighting, and if more than one sample is taken at each surface point, the tree of rays quickly becomes huge. Another kind of ray tracing, called  path tracing , handles indirect light more efficiently, avoiding branching, and ensures that the distribution of all possible paths from a light source to the camera is sampled in an  unbiased  way. [40] : 25–27  [39]
::实际的表面材料几乎在每个方向都能反射少量光,因为它们有小的 (或微观的) 凸起和隙.分布射线追踪器可以通过采样可能的射线方向来模拟这一点,这可以从光泽和金属表面呈现模糊的反射.然而,如果这种程序被递归地重复以模拟现实的间接照明,并且如果在每个表面点上采集了多个样本,射线树就会变得很大.另一种称为路径追踪的射线追踪更有效地处理间接光线,避免分支,并确保从光源到相机的所有可能路径的分布以公正的方式进行采样. [1]: 25 [37]

Ray tracing was often used for rendering reflections in animated films, until path tracing became standard for film rendering. Films such as  Shrek 2  and  Monsters University  also used distribution ray tracing or path tracing to precompute indirect illumination for a scene or frame prior to rendering it using rasterization. [13] : 118–121 
::射线追踪通常用于染动画电影中的反射,直到路径追踪成为电影染的标准.像"小怪 2"和"怪物大学"这样的电影也使用分布射线追踪或路径追踪来预计算场景或的间接照明,然后再使用化染.[13]:118121

Advances in GPU technology have made real-time ray tracing possible in games, although it is currently almost always used in combination with rasterization. [10] : 2   This enables visual effects that are difficult with only rasterization, including reflection from curved surfaces and interreflective objects, [56] : 305   and shadows that are accurate over a wide range of distances and surface orientations. [57] : 159-160   Ray tracing support is included in recent versions of the graphics APIs used by games, such as  DirectX Metal , and  Vulkan . [58]
:: GPU技术的进步使游戏中实时光线跟踪成为可能,尽管目前几乎总是与化结合使用.[10]:2 这使得仅仅化很难实现的视觉效果,包括从曲面和反射对象的反射,[56]:305 和在广泛的距离和表面方向上准确的阴影.[57]:159-160 射线跟踪支持包含在游戏使用的图形API的最新版本中,例如DirectX,Metal和Vulkan.[58]

Ray tracing has been used to render simulated  black holes , and the appearance of objects moving at close to the speed of light, by taking  spacetime curvature  and  relativistic effects  into account during light ray simulation. [59] [60]
::射线追踪已经被用来染模拟的黑洞,以及物体以接近光速的速度移动的外观,通过在光线模拟过程中考虑时空曲率和相对论效应. [1] [2]

Radiosity
::辐射量

Classical radiosity demonstration. Surfaces are divided into 16x16 or 16x32 meshes. Top: direct light only. Bottom: radiosity solution (for  albedo  0.85).
Top: the same scene with a finer radiosity mesh, smoothing the patches during final rendering using  bilinear interpolation . Bottom: the scene rendered with path tracing (using the PBRT renderer).

Radiosity (named after the  radiometric quantity of the same name ) is a method for rendering objects illuminated by light  bouncing off rough or matte surfaces . This type of illumination is called  indirect light environment lighting diffuse lighting , or  diffuse interreflection , and the problem of rendering it realistically is called  global illumination . Rasterization and basic forms of ray tracing (other than distribution ray tracing and path tracing) can only roughly approximate indirect light, e.g. by adding a uniform "ambient" lighting amount chosen by the artist. Radiosity techniques are also suited to rendering scenes with  area lights  such as rectangular fluorescent lighting panels, which are difficult for rasterization and traditional ray tracing. Radiosity is considered a  physically-based method , meaning that it aims to simulate the flow of light in an environment using equations and experimental data from physics, however it often assumes that all surfaces are opaque and perfectly  Lambertian , which reduces realism and limits its applicability. [16] : 10, 11.2.1  [6] : 888, 893  [61] [62] : 6 
::射线性 (以同名的放射量命名) 是一种通过光反射到粗或的表面来染物体的染方法.这种类型的照明被称为间接光,环境照明,扩散照明或扩散互反射,并且将其现实地染的问题称为全球照明. 晶体化和射线跟踪的基本形式 (除射线分布跟踪和路径跟踪外) 仅可以大致地近似间接光,例如通过添加艺术家选择的统一的"环境"照明量. 射线性技术也适用于染区域灯光的场景,例如矩形光灯板,这对于光化和传统射线跟踪是很困难的. 射线性被认为是一种基于物理的方法,它旨在模拟使用物理和实验数据

In the original radiosity method (first proposed in 1984) now called  classical radiosity , surfaces and lights in the scene are split into pieces called  patches , a process called  meshing  (this step makes it a  finite element method ). The rendering code must then determine what fraction of the light being emitted or  diffusely reflected  (scattered) by each patch is received by each other patch. These fractions are called  form factors  or  view factors  (first used in engineering to model  radiative heat transfer ). The form factors are multiplied by the  albedo  of the receiving surface and put in a  matrix . The lighting in the scene can then be expressed as a matrix equation (or equivalently a  system of linear equations ) that can be solved by methods from  linear algebra . [61] [63] : 46  [6] : 888, 896 
::在原始的辐射度方法 (首次提出于1984年),现在称为经典辐射度,场景中的表面和光线被分成称为补丁的部分,这个过程称为网格化 (这个步骤使其成为有限元方法).然后染代码必须确定每个补丁发出的光或分散反射 (分散) 的哪一部分被每个补丁接收.这些部分被称为形式因子或视图因子 (首先用于工程模型辐射传热).形式因子乘以接收表面的白度并置于矩阵中.场景中的照明可以用矩阵方程 (或等效的线性方程系统) 表示,可以通过线性代数的方法来解决. [1] [2] [3] [4]: 46: 898, 886

Solving the radiosity equation gives the total amount of light emitted and reflected by each patch, which is divided by area to get a value called  radiosity  that can be used when rasterizing or ray tracing to determine the color of pixels corresponding to visible parts of the patch. For real-time rendering, this value (or more commonly the  irradiance , which does not depend on local surface albedo) can be pre-computed and stored in a texture (called an  irradiance map ) or stored as vertex data for 3D models. This feature was used in architectural visualization software to allow real-time walk-throughs of a building interior after computing the lighting. [6] : 890  [16] : 11.5.1  [62] : 332 
::解决辐射度方程给出了每个补丁发出的和反射的光总量,并按面积划分,得到一个称为辐射度的值,可以在光线度或光线跟踪时用于确定对应于补丁可见部分的像素颜色.对于实时染,这个值 (或更常见的是不依赖于局部表面白度的辐射率) 可以预先计算并存储在纹理中 (称为辐射率图) 或存储为3D模型的顶点数据.这个功能被用于建筑可视化软件,允许在计算光线后实时通过建筑内部进行步行.[6]: 890 [16]: 11.5.1 [26]: 332

The large size of the matrices used in classical radiosity (the square of the number of patches) causes problems for realistic scenes. Practical implementations may use  Jacobi  or  Gauss-Seidel  iterations, which is equivalent (at least in the Jacobi case) to simulating the propagation of light one bounce at a time until the amount of light remaining (not yet absorbed by surfaces) is insignificant. The number of iterations (bounces) required is dependent on the scene, not the number of patches, so the total work is proportional to the square of the number of patches (in contrast, solving the matrix equation using  Gaussian elimination  requires work proportional to the cube of the number of patches). Form factors may be recomputed when they are needed, to avoid storing a complete matrix in memory. [6] : 901, 907 
::经典辐射度 (补丁数的平方) 中使用的矩阵的大小会给现实场景带来问题.实际实现可能使用雅科比或高斯-赛德尔代,这相当于 (至少在雅科比的情况下) 一次模拟光的传播,直到剩余的光量 (尚未被表面吸收) 无意义.所需的代数 (反弹) 取决于场景,而不是补丁数,因此总工作与补丁数的平方成比例 (相比之下,使用高斯消除解决矩阵方程需要与补丁数立方体成比例的工作).需要时可以重新计算形式因子,以避免存储完整的矩阵在内存中.

The quality of rendering is often determined by the size of the patches, e.g. very fine meshes are needed to depict the edges of shadows accurately. An important improvement is  hierarchical radiosity , which uses a coarser mesh (larger patches) for simulating the transfer of light between surfaces that are far away from one another, and adaptively sub-divides the patches as needed. This allows radiosity to be used for much larger and more complex scenes. [6] : 975, 939 
::染质量通常取决于斑块的大小,例如需要非常细的网格来准确地描绘阴影的边缘. 一个重要的改进是等级辐射度,它使用更粗的网格 (更大的斑块) 来模拟远离彼此的表面之间的光传输,并根据需要适应地分为斑块. 这使得辐射度可以用于更大更复杂的场景. [1]:975,939

Alternative and extended versions of the radiosity method support non-Lambertian surfaces, such as glossy surfaces and mirrors, and sometimes use volumes or "clusters" of objects as well as surface patches. Stochastic or  Monte Carlo  radiosity uses  random sampling  in various ways, e.g. taking samples of incident light instead of integrating over all patches, which can improve performance but adds noise (this noise can be reduced by using deterministic iterations as a final step, unlike path tracing noise). Simplified and partially precomputed versions of radiosity are widely used for real-time rendering, combined with techniques such as  octree  radiosity  that store approximations of the  light field . [6] : 979, 982  [63] : 49  [64] [16] : 11.5 
::辐射度方法的替代和扩展版本支持非兰伯特表面,如光泽表面和镜子,有时使用体积或物体"集群"以及表面补丁. 随机或蒙特卡洛辐射度以各种方式使用随机采样,例如取入光的样本而不是整合所有补丁,这可以提高性能,但增加噪音 (这种噪音可以通过使用代确定作为最后一步来减少,与路径跟踪噪音不同). 辐射度的简化和部分预计算版本广泛用于实时染,结合了存储光场近似值的八度辐射度等技术. [1]: 979, 982 [2]: 49 [3]: 11.5

Path tracing
::路径跟踪

Main article:  Path tracing

As part of the approach known as  physically based rendering path tracing  has become the dominant technique for rendering realistic scenes, including effects for movies. [65]  For example, the popular open source 3D software  Blender  uses path tracing in its Cycles renderer. [66]  Images produced using path tracing for  global illumination  are generally noisier than when using  radiosity  (the main competing algorithm for realistic lighting), but radiosity can be difficult to apply to complex scenes and is prone to artifacts that arise from using a  tessellated  representation of  irradiance . [65] [6] : 975-976, 1045 
::作为物理基染方法的一部分,路径跟踪已成为染现实场景的主要技术,包括电影的效果. [1] 例如,流行的开源3D软件Blender在其Cycles染器中使用路径跟踪. [2] 使用路径跟踪生成的图像对于全球照明通常比使用射线度 (现实照明的主要竞争算法) 更噪音,但射线度可能难以应用于复杂的场景,并且容易产生因使用光照的图形表示而产生的工件.

Like  distributed ray tracing , path tracing is a kind of  stochastic  or  randomized   ray tracing  that uses  Monte Carlo  or  Quasi-Monte Carlo  integration. It was proposed and named in 1986 by  Jim Kajiya  in the same paper as the  rendering equation . Kajiya observed that much of the complexity of  distributed ray tracing  could be avoided by only tracing a single path from the camera at a time (in Kajiya's implementation, this "no branching" rule was broken by tracing additional rays from each surface intersection point to randomly chosen points on each light source). Kajiya suggested reducing the noise present in the output images by using  stratified sampling  and  importance sampling  for making random decisions such as choosing which ray to follow at each step of a path. Even with these techniques, path tracing would not have been practical for film rendering, using computers available at the time, because the computational cost of generating enough samples to reduce  variance  to an acceptable level was too high.  Monster House , the first feature film rendered entirely using path tracing, was not released until 20 years later. [39] [65] [67]
::像分布式光线追踪一样,路径追踪是一种随机或随机的光线追踪,使用蒙特卡罗或准蒙特卡罗集成.它是由吉姆·卡吉亚在1986年提出的,并在同一个论文中命名的染方程.卡吉亚观察到,分布式光线追踪的复杂性可以通过一次只追踪相机的单一路径来避免 (在卡吉亚的实现中,这种"无分支"规则被打破,通过追踪每个表面交叉点的额外光线到每个光源上的随机选择的点).卡吉亚建议通过分层采样减少输出图像中的噪音,并建议采样对于随机决策的重要性,例如选择在路径的每个步骤上遵循哪个光线.即使使用这些技术,路径追踪

In its basic form, path tracing is inefficient (requiring too many samples) for rendering  caustics  and scenes where light enters indirectly through narrow spaces. Attempts were made to address these weaknesses in the 1990s.  Bidirectional path tracing  has similarities to  photon mapping , tracing rays from the light source and the camera separately, and then finding ways to connect these paths (but unlike photon mapping it usually samples new light paths for each pixel rather than using the same cached data for all pixels).  Metropolis light transport  samples paths by modifying paths that were previously traced, spending more time exploring paths that are similar to other "bright" paths, which increases the chance of discovering even brighter paths.  Multiple importance sampling  provides a way to reduce  variance  when combining samples from more than one sampling method, particularly when some samples are much noisier than the others. [65] [14]
::双向路径跟踪与光子映射有相似之处,可以单独追踪光源和相机的光线,然后找到连接这些路径的方法 (但与光子映射不同的是,它通常为每个像素采样新的光路径,而不是使用所有像素的相同缓存数据).大都会通过修改以前追踪的路径来传输光样本路径,花费更多时间探索与其他"明亮"路径相似的路径,从而增加发现更明亮的路径的机会.多重采样提供了一种减少比采样从一种方法组合多个样本的差异的方式,特别是当一些样本比其他样本明亮得多时. [1]

This later work was summarized and expanded upon in  Eric Veach 's 1997 PhD thesis, which helped raise interest in path tracing in the computer graphics community. The  Arnold renderer , first released in 1998, proved that path tracing was practical for rendering frames for films, and that there was a demand for  unbiased  and  physically based  rendering in the film industry; other commercial and open source path tracing renderers began appearing. Computational cost was addressed by rapid advances in  CPU  and  cluster  performance. [65]
::这项后来的工作在Eric Veach1997年的博士论文中得到了总结和扩展,这有助于提高计算机图形界对路径跟踪的兴趣.Arnold染器于1998年首次发布,证明了路径跟踪对于染电影的是实用的,并且在电影行业中对无偏见和物理基的染有需求;其他商业和开源路径跟踪染器开始出现.计算成本是由CPU和集群性能的快速进步解决的. [1]

Path tracing's relative simplicity and its nature as a  Monte Carlo method  (sampling hundreds or thousands of paths per pixel) have made it attractive to implement on a  GPU , especially on recent GPUs that support ray tracing acceleration technology such as Nvidia's  RTX  and  OptiX . [68]  However bidirectional path tracing and Metropolis light transport are more difficult to implement efficiently on a GPU. [69] [70]
::路径跟踪的相对简单性及其作为蒙特卡洛方法 (每像素采样数百或数千条路径) 的性质使其在GPU上实现具有吸引力,尤其是在支持光线跟踪加速技术的最近的GPU上,例如Nvidia的RTX和OptiX.[1] 然而,双向路径跟踪和Metropolis光传输在GPU上更难以有效地实现.[2] [3]

Research into improving path tracing continues. Many variations of bidirectional path tracing and Metropolis light transport have been explored, and ways of combining path tracing with photon mapping. [71] [72]  Recent  path guiding  approaches construct approximations of the  light field  probability distribution in each volume of space, so paths can be sampled more effectively. [72]  Techniques have been developed to  denoise  the output of path tracing, reducing the number of paths required to achieve acceptable quality, at the risk of losing some detail or introducing small-scale artifacts that are more objectionable than noise; [73] [74]   neural networks  are now widely used for this purpose. [75] [76] [77]
::改善路径跟踪的研究仍在继续. 探索了双向路径跟踪和大都市光传输的许多变化,以及将路径跟踪与光子映射结合的方法. [1] [2] 最近的路径引导方法构建了每个空间体积中的光场概率分布的近似值,因此可以更有效地采样路径. [3] 已经开发了技术来消除路径跟踪的输出,减少实现可接受质量的路径数量,冒着失去一些细节或引入比噪声更令人反感的小规模文物; [4] [5] 神经网络现在被广泛用于此目的. [6] [7]

Neural rendering
::神经染

This section  needs expansion . You can help by  adding to it (February 2022)
This section needs to be  updated . Please help update this article to reflect recent events or newly available information.  (January 2025)

Neural rendering  is a rendering method using  artificial neural networks . [78] [79]  Neural rendering includes  image-based rendering  methods that are used to  reconstruct 3D models  from 2-dimensional images. [78] One of these methods are  photogrammetry , which is a method in which a collection of images from multiple angles of an object are turned into a 3D model. There have also been recent developments in generating and rendering 3D models from text and coarse paintings by notably  Nvidia Google  and various other companies.
::神经染是一种使用人工神经网络的染方法. [1] [2] 神经染包括基于图像的染方法,用于从二维图像重建3D模型. [3] 其中一种方法是光度计,这是一个将对象的多个角度图像集合转换为3D模型的方法.最近Nvidia,Google和其他各种公司也在从文本和粗画中生成和染3D模型.

Scientific and mathematical basis
::科学和数学基础

Main article:  Unbiased rendering
This section  does not  cite  any  sources . Please help  improve this section  by  adding citations to reliable sources . Unsourced material may be challenged and  removed (December 2024)  ( Learn how and when to remove this message )

The implementation of a realistic renderer always has some basic element of physical simulation or emulation – some computation which resembles or abstracts a real physical process.
::实现现实染器总是包含一些物理模拟或仿真的基本元素, 一些类似或抽象真实物理过程的计算.

The term " physically based " indicates the use of physical models and approximations that are more general and widely accepted outside rendering. A particular set of related techniques have gradually become established in the rendering community.
::"基于物理"一词表示使用物理模型和近似,这些模型和近似在染之外更为普遍和广泛接受.在染社区中,一套特定的相关技术逐渐建立.

The basic concepts are moderately straightforward, but intractable to calculate; and a single elegant algorithm or approach has been elusive for more general purpose renderers. In order to meet demands of robustness, accuracy and practicality, an implementation will be a complex combination of different techniques.
::基本概念中等简单,但难以计算;对于更通用的染器来说,单一的优雅算法或方法是难以捉摸的.为了满足强度,准确性和实用性的要求,实现将是不同技术的复杂组合.

Rendering research is concerned with both the adaptation of scientific models and their efficient application.
::染研究既涉及科学模型的调整,也涉及它们的有效应用.

Mathematics used in rendering includes:  linear algebra calculus numerical mathematics signal processing , and  Monte Carlo methods .
::染中使用的数学包括:线性代数,微积分,数值数学,信号处理和蒙特卡洛方法.

The rendering equation
::染方程

Main article:  Rendering equation

This is the key academic/theoretical concept in rendering. It serves as the most abstract formal expression of the non-perceptual aspect of rendering. All more complete algorithms can be seen as solutions to particular formulations of this equation.
::这是染的关键学术/理论概念.它是染非感知方面的最抽象的形式表达.所有更完整的算法都可以被视为这个方程的特定表述的解决方案.

L o ( x , ω ) = L e ( x , ω ) + Ω L i ( x , ω ) f r ( x , ω , ω ) ( ω n ) d ω

Meaning: at a particular position and direction, the outgoing light (L o ) is the sum of the emitted light (L e ) and the reflected light. The reflected light being the sum of the incoming light (L i ) from all directions, multiplied by the surface reflection and incoming angle. By connecting outward light to inward light, via an interaction point, this equation stands for the whole 'light transport' – all the movement of light – in a scene.
::意思:在特定位置和方向,外发光 (Lo) 是发射光 (Le) 和反射光的总和.反射光是来自所有方向的入射光 (Li) 的总和,乘以表面反射和入射角度.通过通过交互点将外光与内光连接起来,这个方程代表了整个"光传输" - - 一个场景中的光的全部运动.

The bidirectional reflectance distribution function
::双向反射分布函数

The  bidirectional reflectance distribution function  (BRDF) expresses a simple model of light interaction with a surface as follows:
::双向反射分布函数 (BRDF) 以以下方式表达光与表面相互作用的简单模型:

f r ( x , ω , ω ) = d L r ( x , ω ) L i ( x , ω ) ( ω n ) d ω

Light interaction is often approximated by the even simpler models: diffuse reflection and specular reflection, although both can ALSO be BRDFs.
::光相互作用通常通过更简单的模型进行近似:分散反射和反射反射,尽管这两种也可以是BRDF.

Geometric optics
::几何光学

Rendering is practically exclusively concerned with the particle aspect of light physics – known as  geometrical optics . Treating light, at its basic level, as particles bouncing around is a simplification, but appropriate: the wave aspects of light are negligible in most scenes, and are significantly more difficult to simulate. Notable wave aspect phenomena include diffraction (as seen in the colours of  CDs  and  DVDs ) and polarisation (as seen in  LCDs ). Both types of effect, if needed, are made by appearance-oriented adjustment of the reflection model.
::染几乎完全涉及光物理学的粒子方面,称为几何光学.将光作为基本层面的粒子反弹是一种简化,但恰当:光的波形方面在大多数场景中是可以忽略不计的,并且很难模拟.值得注意的波形现象包括衍射 (如CD和DVD的颜色) 和极化 (如LCD).如果需要,这两种效果都是通过面向外观的反射模型调整而产生的.

Visual perception
::视觉感知

Though it receives less attention, an understanding of  human visual perception  is valuable to rendering. This is mainly because image displays and human perception have restricted ranges. A renderer can simulate a wide range of light brightness and color, but current displays – movie screen, computer monitor, etc. – cannot handle so much, and something must be discarded or compressed. Human perception also has limits, and so does not need to be given large-range images to create realism. This can help solve the problem of fitting images into displays, and, furthermore, suggest what short-cuts could be used in the rendering simulation, since certain subtleties will not be noticeable. This related subject is  tone mapping .
::虽然它受到较少的关注,但对人类视觉感知的理解对染有价值.这主要是因为图像显示和人类感知范围有限.染器可以模拟广泛的光亮度和颜色,但当前的显示器电影屏幕,计算机显示器等不能处理这么多,必须丢弃或压缩一些东西.人类感知也有局限性,因此不需要给出大范围的图像来创建现实主义.这可以帮助解决将图像放入显示的问题,并且进一步建议在染模拟中使用哪些快捷方式,因为某些细微的东西不会被注意到.这与相关的主题是音调映射.

Sampling and filtering
::采样和过

One problem that any rendering system must deal with, no matter which approach it takes, is the  sampling problem . Essentially, the rendering process tries to depict a  continuous function  from image space to colors by using a finite number of pixels. As a consequence of the  Nyquist–Shannon sampling theorem  (or Kotelnikov theorem), any spatial waveform that can be displayed must consist of at least two pixels, which is proportional to  image resolution . In simpler terms, this expresses the idea that an image cannot display details, peaks or troughs in color or intensity, that are smaller than one pixel.
::任何染系统必须处理的一个问题,无论采用哪种方法,都是采样问题.基本上,染过程试图通过使用有限数量的像素将图像空间到颜色的连续函数描绘出来.由于尼奎斯特香农采样定理 (或科特尔尼科夫定理),任何可以显示的空间波形必须至少由两个像素组成,这与图像分辨率成比例.简单地说,这表达了图像不能显示细节,颜色或强度的高峰或低谷,小于一个像素的想法.

If a naive rendering algorithm is used without any filtering, high frequencies in the image function will cause ugly  aliasing  to be present in the final image. Aliasing typically manifests itself as  jaggies , or jagged edges on objects where the pixel grid is visible. In order to remove aliasing, all rendering algorithms (if they are to produce good-looking images) must use some kind of  low-pass filter  on the image function to remove high frequencies, a process called  antialiasing .
::如果使用无染算法而没有过,图像函数中的高频率将导致最终图像中存在丑的别名.别名通常表现为像素网格可见的对象上的纹或纹边缘.为了删除别名,所有染算法 (如果它们要产生漂亮的图像) 必须在图像函数上使用某种低通波器来删除高频率,称为反别名的过程.

Hardware
::硬件

Rendering is usually limited by available computing power and memory  bandwidth , and so specialized  hardware  has been developed to speed it up ("accelerate" it), particularly for  real-time rendering . Hardware features such as a  framebuffer  for raster graphics are required to display the output of rendering smoothly in real time.
::染通常受可用的计算能力和内存带宽的限制,因此已经开发了专门的硬件来加快它 ("加速"),特别是在实时染中. 需要硬件功能,例如图形的框架缓冲器,以在实时中平稳地显示染的输出.

History
::历史

In the era of  vector monitors  (also called  calligraphic displays ), a display processing unit (DPU) was a dedicated  CPU  or  coprocessor  that maintained a list of visual elements and redrew them continuously on the screen by controlling an  electron beam . Advanced DPUs such as  Evans & Sutherland 's  Line Drawing System-1  (and later models produced into the 1980s) incorporated 3D coordinate transformation features to accelerate rendering of  wire-frame images . [36] : 93–94, 404–421  [80]  Evans & Sutherland also made the  Digistar   planetarium  projection system, which was a vector display that could render both stars and wire-frame graphics (the vector-based Digistar and Digistar II were used in many planetariums, and a few may still be in operation). [81] [82] [83]  A Digistar prototype was used for rendering 3D star fields for the film  Star Trek II: The Wrath of Khan  – some of the first 3D computer graphics sequences ever seen in a feature film. [84]
::在矢量显示器时代 (也称为书法显示器),显示处理单元 (DPU) 是一个专用的CPU或共处理器,通过控制电子束来维护视觉元素列表并通过控制电子束来连续在屏幕上重新绘制它们.高级DPU如埃文斯和萨瑟兰的线画系统-1 (以及后来的20世纪80年代生产的模型) 包含了3D坐标转换功能以加速线图像的染. [1]: 9394, 404421 [2]埃文斯和萨瑟兰还制造了Digistar星投影系统,这是一个可以染星星和线图形的矢量显示系统 (基于矢量的Digistar和Digistar II在许多星中使用,并且可能仍在运行). [3] [4] [5] Digistar原型号被用于星染3

Shaded 3D graphics rendering in the 1970s and early 1980s was usually implemented on general-purpose computers, such as the  PDP-10  used by researchers at the University of Utah [85] [49] . It was difficult to speed up using specialized hardware because it involves a  pipeline  of complex steps, requiring data addressing, decision-making, and computation capabilities typically only provided by CPUs (although dedicated circuits for speeding up particular operations were proposed  [85] ).  Supercomputers  or specially designed multi-CPU computers or  clusters  were sometimes used for ray tracing. [52]  In 1981,  James H. Clark  and  Marc Hannah  designed the Geometry Engine, a  VLSI  chip for performing some of the steps of the 3D rasterization pipeline, and started the company  Silicon Graphics  (SGI) to commercialize this technology. [86] [87]
::1970年代和80年代初,阴影3D图形染通常在通用计算机上实现,例如犹他大学研究人员使用的PDP-10[1][2].使用专业硬件很难加快速度,因为它涉及复杂的步骤,需要数据处理,决策和计算能力通常只由CPU提供 (尽管提出了用于加快特定操作的专用电路[3]).超级计算机或专门设计的多CPU计算机或集群有时用于光线跟踪[4] .1981年,詹姆斯·克拉克和马克·汉纳设计了Geometry Engine,这是一款用于执行3D化管道的一些步骤的VLSI芯片,并创办了SGI公司来商业化这项技术.[5][6]

Home computers  and  game consoles  in the 1980s contained graphics  coprocessors  that were capable of scrolling and filling areas of the display, and drawing  sprites  and lines, though they were not useful for rendering realistic images. [88] [89]  Towards the end of the 1980s  PC graphics cards  and  arcade games  with 3D rendering acceleration began to appear, and in the 1990s such technology became commonplace. Today, even low-power  mobile processors  typically incorporate 3D graphics acceleration features. [86] [90]
::1980年代的家用电脑和游戏机包含了能够滚动和填充显示区域的图形共处理器,并绘制sprite和线条,尽管它们对于染现实图像并不有用. [1] [2] 在20世纪80年代末,PC图形卡和3D染加速的街机游戏开始出现,并在20世纪90年代,这种技术变得普遍. 今天,即使是低功耗的移动处理器也通常包含3D图形加速功能. [3] [4]

GPUs
::处理器

The  3D graphics accelerators  of the 1990s evolved into modern GPUs. GPUs are general-purpose processors, like  CPUs , but they are designed for tasks that can be broken into many small, similar, mostly independent sub-tasks (such as rendering individual pixels) and performed in  parallel . This means that a GPU can speed up any rendering algorithm that can be split into subtasks in this way, in contrast to 1990s 3D accelerators which were only designed to speed up specific rasterization algorithms and simple shading and lighting effects (although  tricks  could be used to perform more general computations). [16] : ch3  [91]
::1990年代的3D图形加速器演变成现代GPU.GPU是通用处理器,像CPU一样,但它们是为可以被分解成许多小,相似,主要是独立的子任务 (如染单个像素) 并并行执行的任务而设计的.这意味着GPU可以加快任何可以被这样分割成子任务的染算法,而不是1990年代的3D加速器,它们只被设计用于加快特定的光算法和简单的阴影和照明效果 (尽管可以使用技巧来执行更一般的计算).[16]:ch3 [91]

Due to their origins, GPUs typically still provide specialized hardware acceleration for some steps of a traditional 3D rasterization  pipeline , including hidden surface removal using a  z-buffer , and  texture mapping  with  mipmaps , but these features are no longer always used. [16] : ch3   Recent GPUs have features to accelerate finding the intersections of rays with a  bounding volume hierarchy , to help speed up all variants of  ray tracing  and  path tracing , [54]  as well as  neural network  acceleration features sometimes useful for rendering. [92]
::由于其起源,GPU通常仍然为传统3D化管道的某些步骤提供专用硬件加速,包括使用z缓冲器隐藏的表面移除和使用mipmaps进行纹理映射,但这些功能不再总是使用. [1]: ch3 最近的GPU具有加速找到光线交叉点的功能,具有限制体积等级,以帮助加快所有变体的光线跟踪和路径跟踪, [2]以及神经网络加速功能有时用于染. [3]

GPUs are usually integrated with  high-bandwidth memory systems  to support the read and write  bandwidth  requirements of high-resolution, real-time rendering, particularly when multiple passes are required to render a frame, however memory  latency  may be higher than on a CPU, which can be a problem if the  critical path  in an algorithm involves many memory accesses. GPU design accepts high latency as inevitable (in part because a large number of  threads  are sharing the  memory bus ) and attempts to "hide" it by efficiently switching between threads, so a different thread can be performing computations while the first thread is waiting for a read or write to complete. [16] : ch3  [93] [94]
:: GPU通常与高带宽内存系统集成,以支持高分辨率的读写带宽要求,特别是当需要多次传输来染时,但是内存延迟可能比 CPU 高,如果算法中的关键路径涉及许多内存访问,这可能是一个问题. GPU 设计接受高延迟是不可避免的 (部分原因是大量线程共享内存总线),并试图通过有效地切换线程来"隐藏"它,因此在第一个线程等待读写完成时,不同的线程可以执行计算.[16]: ch3 [93][94]

Rendering algorithms will run efficiently on a GPU only if they can be implemented using small groups of threads that perform mostly the same operations. As an example of code that meets this requirement: when rendering a small square of pixels in a simple  ray-traced  image, all threads will likely be intersecting rays with the same object and performing the same lighting computations. For performance and architectural reasons, GPUs run groups of around 16-64 threads called  warps  or  wavefronts  in  lock-step  (all threads in the group are executing the same instructions at the same time). If not all threads in the group need to run particular blocks of code (due to conditions) then some threads will be idle, or the results of their computations will be discarded, causing degraded performance. [16] : ch3  [94]
::染算法只能在 GPU 上有效运行,如果它们可以使用小组线程执行大多相同的操作.作为满足此要求的代码的一个例子:在简单的光线跟踪图像中染一个小方形的像素时,所有线程可能会与相同的对象交叉射线并执行相同的照明计算.出于性能和架构原因,GPU 在锁步中运行大约 16-64 个线程的组,称为曲线或波面 (该组中的所有线程同时执行相同的指令).如果不是该组中的所有线程需要运行特定的代码块 (由于条件),那么一些线程将被置,或者它们的计算结果将被丢弃,导致性能降低.[16]: ch34]


Last modified: Wednesday, 19 March 2025, 9:41 PM