[go: up one dir, main page]

CN104463943A - Multi-light-source acceleration method for programmable shader - Google Patents

Multi-light-source acceleration method for programmable shader Download PDF

Info

Publication number
CN104463943A
CN104463943A CN201410636581.8A CN201410636581A CN104463943A CN 104463943 A CN104463943 A CN 104463943A CN 201410636581 A CN201410636581 A CN 201410636581A CN 104463943 A CN104463943 A CN 104463943A
Authority
CN
China
Prior art keywords
light source
rendering
node
light sources
brightness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410636581.8A
Other languages
Chinese (zh)
Other versions
CN104463943B (en
Inventor
孟祥雨
王璐
徐延宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Yuezhao Digital Technology Co ltd
Original Assignee
SHANDONG DIWEI DIGITAL TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHANDONG DIWEI DIGITAL TECHNOLOGY Co Ltd filed Critical SHANDONG DIWEI DIGITAL TECHNOLOGY Co Ltd
Priority to CN201410636581.8A priority Critical patent/CN104463943B/en
Publication of CN104463943A publication Critical patent/CN104463943A/en
Application granted granted Critical
Publication of CN104463943B publication Critical patent/CN104463943B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/506Illumination models

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

本发明提供了一种面向可编程着色器的多光源加速方法,在可编程着色器环境下实现了Lightcuts算法,通过将光源聚类成树形结构,然后再对光源树进行裁剪,减少实际渲染的光源数目,能够将渲染时间与光源数目的关系降为亚线性,而且稳定性比较好,在大部分情况下都能有良好的加速效果。其次,实验发现对于场景中阴影部分的渲染,算法的加速效果并不理想,针对此问题进行优化。最后,本发明将同一物体上相近的点分组进行渲染,进一步提高效率。

The present invention provides a programmable shader-oriented multi-light source acceleration method, realizes the Lightcuts algorithm in the programmable shader environment, clusters the light sources into a tree structure, and then cuts the light source tree to reduce actual rendering The number of light sources can reduce the relationship between rendering time and the number of light sources to sub-linear, and the stability is relatively good, and in most cases, it can have a good acceleration effect. Secondly, the experiment found that for the rendering of the shadow part in the scene, the acceleration effect of the algorithm is not ideal, and it is optimized for this problem. Finally, the present invention groups similar points on the same object for rendering, further improving efficiency.

Description

一种面向可编程着色器的多光源加速方法A Multi-Light Acceleration Method for Programmable Shader

技术领域technical field

本发明涉及图形学真实感渲染领域,具体涉及一种典型的基于层次结构的多光源加速方法。The invention relates to the field of graphics realistic rendering, in particular to a typical multi-light source acceleration method based on hierarchical structure.

背景技术Background technique

在大规模场景的渲染中,光源数目的增长会导致渲染时间随之线性增长,对于一些复杂的光照效果,这样的渲染时间是不能接受的。本发明属于真实感渲染系统中渲染引擎研发部分的工作,引擎在渲染多光源场景时,并没有对多光源进行优化处理,导致渲染速度难以接受。为了节约成本,提高效率,本发明针对基于Renderman规范的渲染引擎,实现了多光源场景的加速方案。In the rendering of large-scale scenes, the increase in the number of light sources will lead to a linear increase in rendering time. For some complex lighting effects, such rendering time is unacceptable. The present invention belongs to the research and development part of the rendering engine in the realistic rendering system. When the engine renders a multi-light source scene, it does not optimize the multi-light source, resulting in unacceptable rendering speed. In order to save costs and improve efficiency, the present invention implements an acceleration scheme for multi-light source scenes for a rendering engine based on the Renderman specification.

对于多光源场景渲染的优化有多种方法,文章[A general version of crow’s shadowvolumes]中Bergeron提出了为光源设置一个影响半径的方法,在影响半径内的物体会受到光源照射,否则不去考虑该光源的影响,这样会导致大量低亮度光源产生的光照效果被忽视;文章[Adaptive shadow testing for ray tracing]中Ward提出了为所有光源建立一个贡献表,只考虑贡献比较大的光源。当光源的数目很多的时候,求贡献值将耗费大量时间;文章[Monte carlo techniques for direct lighting calculation]中Shirley把光源根据影响半径分为重要和不重要两类,对两类光源分别采样,不过采样数量不合适会带来走样的问题;文章[A light hierarchy for fast rendering of scenes with many lights]中Paquette提出了基于树形层次结构的优化算法,但是并不支持阴影效果,极大的限制了其使用范围。There are many ways to optimize the rendering of multi-light source scenes. In the article [A general version of crow's shadow volumes], Bergeron proposed a method of setting a radius of influence for the light source. Objects within the radius of influence will be illuminated by the light source. Otherwise, it will not be considered. The influence of the light source, which will cause the lighting effect produced by a large number of low-brightness light sources to be ignored; in the article [Adaptive shadow testing for ray tracing], Ward proposed to establish a contribution table for all light sources, and only consider light sources with relatively large contributions. When the number of light sources is large, it will take a lot of time to calculate the contribution value; in the article [Monte carlo techniques for direct lighting calculation], Shirley divides the light sources into important and unimportant categories according to the radius of influence, and samples the two types of light sources separately, but An inappropriate number of samples will cause aliasing problems; in the article [A light hierarchy for fast rendering of scenes with many lights], Paquette proposed an optimization algorithm based on a tree-like hierarchy, but it does not support shadow effects, which greatly limits its scope of use.

文章[Lightcuts in blender]中Davide对Lightcuts算法在Blender引擎中的实现方式和应用范围作出了简要的介绍。但是Blender引擎的着色器是内置的,不如可编程着色器灵活易用。文献中并没有提出在可编程着色器环境下的算法的实现方案。而且文献也提出Blender中实现的Lightcuts算法在实际应用中加速效果并不如预想的明显。In the article [Lightcuts in blender], Davide gave a brief introduction to the implementation and scope of application of the Lightcuts algorithm in the Blender engine. But the shaders of the Blender engine are built-in, not as flexible and easy to use as programmable shaders. No implementation of the algorithm in the context of programmable shaders is proposed in the literature. Moreover, the literature also pointed out that the acceleration effect of the Lightcuts algorithm implemented in Blender is not as obvious as expected in practical applications.

本发明在分析和对比了多种多光源优化算法后,选择了基于层级结构的Lightcuts算法作为研究基础。该算法是基于二叉树结构的光源聚类优化方法,具有良好的加速效果,而且算法的普适性较强,对大多数场景的渲染都可以优化。算法能够通过错误阈值参数的调节来对优化程度进行控制,便于实际工程使用。After analyzing and comparing various multi-light source optimization algorithms, the present invention selects the Lightcuts algorithm based on the hierarchical structure as the research basis. This algorithm is a light source clustering optimization method based on a binary tree structure, which has a good acceleration effect, and the algorithm has strong universality, and can be optimized for rendering of most scenes. The algorithm can control the degree of optimization through the adjustment of error threshold parameters, which is convenient for practical engineering use.

Lightcuts算法基础是韦伯原理,即人类可以感知到的最小的亮度变化大概为当前亮度的1%,算法中一般选取0.02作为误差阈值的参数,光源集合产生的光照小于0.02倍的总亮度则可以认为能够简化计算。算法在每两个光源之间计算一个权值,该权值与两光源距离和亮度相关。然后根据权值把光源聚类成一棵二叉树。在对点进行渲染时,从光源树的根节点开始,根据韦伯原理判断是否对节点进行分裂:如果当前节点对渲染点亮度的贡献值大于误差阈值而且其存在叶子节点,则将该节点向下分裂为两个子节点,否则停止分裂。当所有路径都停止分裂后,得到的所有节点的集合,就是一个光源割。之后的渲染过程使用光源割代替原始光源进行渲染。The Lightcuts algorithm is based on Weber's principle, that is, the smallest brightness change that humans can perceive is about 1% of the current brightness. In the algorithm, 0.02 is generally selected as the parameter of the error threshold, and the light generated by the light source set is less than 0.02 times the total brightness. can simplify calculations. The algorithm calculates a weight between every two light sources, which is related to the distance and brightness of the two light sources. Then the light sources are clustered into a binary tree according to the weights. When rendering a point, start from the root node of the light source tree, and judge whether to split the node according to Weber's principle: if the contribution value of the current node to the brightness of the rendering point is greater than the error threshold and there is a leaf node, the node will be down Split into two child nodes, otherwise stop splitting. When all paths stop splitting, the set of all nodes obtained is a light source cut. Subsequent rendering passes use the light source cut instead of the original light source for rendering.

发明内容Contents of the invention

本发明的目的就是为了解决上述问题,提出了一种面向可编程着色器的多光源加速方法,该方法首先在可编程着色器环境下实现了Lightcuts算法,通过将光源聚类成树形结构,然后再对光源树进行裁剪,减少实际渲染的光源数目,能够将渲染时间与光源数目的关系降为亚线性,而且稳定性比较好,在大部分情况下都能有良好的加速效果。The purpose of the present invention is to solve the above-mentioned problems, and proposes a multi-light source acceleration method for programmable shaders. The method first realizes the Lightcuts algorithm in the programmable shader environment, and clusters the light sources into a tree structure. Then cut the light source tree to reduce the number of light sources actually rendered, which can reduce the relationship between rendering time and the number of light sources to sub-linear, and the stability is relatively good, and in most cases, it can have a good acceleration effect.

为了实现上述目的,本发明采用如下技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:

一种面向可编程着色器的多光源加速方法,包括:A multi-light source acceleration method for programmable shaders, including:

(1)渲染引擎读取场景文件中的光源信息,提取Lightcuts算法所需光照参数,存入光源链表;(1) The rendering engine reads the light source information in the scene file, extracts the lighting parameters required by the Lightcuts algorithm, and stores them in the light source linked list;

(2)渲染场景前,利用Lightcuts算法对光源进行聚类,遍历光源链表,对每类光源构建全局的光源树;(2) Before rendering the scene, use the Lightcuts algorithm to cluster the light sources, traverse the light source linked list, and build a global light source tree for each type of light source;

(3)渲染过程中,将几何表面上待渲染点放置于缓冲区中;对缓冲区中的渲染点聚类:同一物体上相近的点有相同材质,受相同的光源影响,因此下一步对同一物体上相近的一组渲染点求一个公共的光源割,进行渲染;(3) During the rendering process, place the points to be rendered on the geometric surface in the buffer; cluster the rendering points in the buffer: similar points on the same object have the same material and are affected by the same light source, so the next step is to A group of similar rendering points on the same object find a common light source cut for rendering;

(4)对于每一组的渲染点,利用全局的光源树,对渲染点分组计算光源割;(4) For each group of rendering points, use the global light source tree to group the rendering points to calculate the light source cut;

(5)设定阴影域参数和背景亮度参数的值,如果当前光源节点亮度Lc小于阴影域参数值,则取其背景亮度参数值作为当前光源节点亮度的估计值,进行求光源割的计算;(5) Set the value of the shadow domain parameter and the background brightness parameter, if the current light source node brightness L c is smaller than the shadow domain parameter value, then take the background brightness parameter value as the estimated value of the current light source node brightness, and calculate the light source cut ;

(6)渲染引擎识别此光源割中的着色器文件,使用光源割代替原始光源进行照明;(6) The rendering engine recognizes the shader file in this light source cut, and uses the light source cut instead of the original light source for lighting;

(7)重复渲染过程,直到所有渲染点渲染完成,输出渲染结果图像。(7) The rendering process is repeated until all rendering points are rendered, and the rendering result image is output.

所述步骤(3)中,对同一物体上相近的渲染点求公共光源割的具体方法如下:In the step (3), the specific method for seeking common light source cuts for similar rendering points on the same object is as follows:

a.每一组渲染点共享一个存储光源割的堆栈;设置标记位,标记所执行的是否为该组渲染点的第一个点;a. Each group of rendering points shares a stack for storing light source cuts; set the flag bit to mark whether the executed point is the first point of the group of rendering points;

b.如果执行的是第一个点,则正常执行求光源割,结果存储到堆栈;如果不是第一个点,则从堆栈中的上一次计算的光源割开始,执行当前点的求光源割过程,结果仍存放在堆栈中;b. If the first point is executed, the light source cut is performed normally, and the result is stored in the stack; if it is not the first point, the light source cut of the current point is executed starting from the last calculated light source cut in the stack process, the result is still stored on the stack;

c.不断循环执行步骤b,直到该组渲染点全部执行完毕,堆栈中的结果就是该组渲染点的公共光源割。c. Execute step b continuously until the group of rendering points are all executed, and the result in the stack is the common light source cut of the group of rendering points.

所述步骤(4)中,对渲染点分组计算光源割的具体方法为:In the step (4), the specific method for grouping the rendering points to calculate the light source cut is:

1)预估光源树中光源节点的两个值:Lc和upperbound;所述Lc表示一个光源聚类实际照射到渲染点的亮度的预估;upperbound表示理论上光源节点所代表的光源聚类照射到渲染点产生的亮度的预计最大值;1) Estimate the two values of the light source node in the light source tree: L c and upperbound; the L c represents the estimation of the brightness of a light source cluster actually irradiated to the rendering point; upperbound represents the theoretical light source cluster represented by the light source node The expected maximum value of the brightness produced by the class shining on the rendering point;

2)如果maxupperbound<0.02*∑Lc,说明堆栈内所有光源节点的upperbound值都满足小于0.02*∑Lc的条件,则堆栈内光源节点即为最后求得的光源节点,计算完毕;其中,maxupperbound为栈内所有节点的upperbound的最大值,0.02为韦伯参数;2) If maxupperbound<0.02*∑L c , it means that the upperbound values of all light source nodes in the stack meet the condition of less than 0.02*∑L c , then the light source node in the stack is the last obtained light source node, and the calculation is completed; among them, maxupperbound is the maximum value of the upperbound of all nodes in the stack, and 0.02 is the Weber parameter;

否则,分裂该光源节点,将被分裂的节点出栈,其子节点入栈;计算新入栈节点的upperbound和LcOtherwise, split the light source node, pop the split node out of the stack, and push its child nodes into the stack; calculate the upperbound and L c of the newly added node.

所述步骤(5)中,如果使用了背景亮度后,在之后的计算过程中,预估的光源节点亮度Lc值又大于或等于了阴影域参数值时,则恢复使用预估光源节点亮度Lc进行求光源割的计算。In the step (5), if the background brightness is used, in the subsequent calculation process, when the estimated light source node brightness L c value is greater than or equal to the shadow domain parameter value, the estimated light source node brightness will be used again L c is used to calculate the cut of the light source.

所述阴影域参数默认取绝对感觉阈限的中值0.05,所述背景亮度参数大于或等于阴影域参数值,默认取绝对感觉阈限0.1。The shadow domain parameter defaults to the median value of the absolute sensory threshold of 0.05, and the background brightness parameter is greater than or equal to the value of the shadow domain parameter, and the default absolute sensory threshold is 0.1.

所述步骤(3)中对缓冲区中的渲染点聚类的方法为:The method for clustering the rendering points in the buffer in the step (3) is:

第1步:对于同一组光源的集合,寻找其中权重最小的两个光源;Step 1: For the set of the same group of light sources, find the two light sources with the smallest weight;

第2步:为权重最小的两个光源构建一个父节点,在两光源中随机选择一个光源作为其代表光源,记录包围盒信息和总亮度值;Step 2: Construct a parent node for the two light sources with the smallest weight, randomly select a light source from the two light sources as its representative light source, and record the bounding box information and total brightness value;

第3步:将父节点加入光源集合,两个子节点从光源集合中删除;Step 3: Add the parent node to the light source collection, and delete the two child nodes from the light source collection;

第4步:跳到第1步执行,直到该组光源的集合中只剩一个节点,即根节点,光源树构建完成;其中叶子节点为实际光源,内部节点为代表光源。Step 4: Skip to step 1 until there is only one node left in the group of light sources, that is, the root node, and the light source tree is constructed; the leaf nodes are the actual light sources, and the internal nodes are representative light sources.

所述第1步中权重的计算方法如下式所示:The calculation method of the weight in the first step is shown in the following formula:

W=Ic(ac 2+c2(1–cosβc)2)W=I c (a c 2 +c 2 (1–cosβ c ) 2 )

其中,Ic为两个光源亮度的和,ac为两光源轴对齐包围盒的对角线长度;对于点光源和平行光c的值为0,对于聚光灯,c是一个联系空间大小和聚光灯方向的常量,与场景包围盒的对角线长度相关;βc为这两个光源绑定角的1/2。Among them, I c is the sum of the brightness of the two light sources, a c is the diagonal length of the axis-aligned bounding box of the two light sources; for the point light source and parallel light, the value of c is 0, and for the spotlight, c is a connection space size and the spotlight A constant of the direction, related to the diagonal length of the bounding box of the scene; β c is 1/2 of the binding angle of the two light sources.

本发明的有益效果Beneficial effects of the present invention

1.本发明针对Lightcuts算法对于场景中阴影部分的渲染加速效果并不理想这一问题进行了分析并改进算法,提出了阴影域和背景亮度两个参数,对阴影部分的渲染过程进行控制,避免一些不必要的计算,加速了阴影处渲染的效率。1. The present invention analyzes and improves the algorithm for the problem that the rendering acceleration effect of the shadow part in the Lightcuts algorithm is unsatisfactory, and proposes two parameters of the shadow domain and background brightness to control the rendering process of the shadow part to avoid Some unnecessary calculations speed up the rendering efficiency of shadows.

2.本发明采用渲染点聚类的方法,对一组同材质、空间距离近的渲染点求取Lightcuts,减少的光源割的构建时间,提升渲染效率。2. The present invention adopts the method of rendering point clustering to obtain Lightcuts for a group of rendering points of the same material and close spatial distance, which reduces the construction time of light source cuts and improves rendering efficiency.

3.为了使算法支持可编程着色器下的渲染流程,本发明设计了相关的接口,使其支持商业渲染普遍采用的可编程着色器,提高了算法可用性。3. In order to enable the algorithm to support the rendering process under the programmable shader, the present invention designs related interfaces so that it supports the programmable shader commonly used in commercial rendering and improves the usability of the algorithm.

附图说明Description of drawings

图1为四个光源的聚类过程示意图;Figure 1 is a schematic diagram of the clustering process of four light sources;

图2为四个光源的求光源割过程示意图;Fig. 2 is the schematic diagram of the light source cutting process for four light sources;

图3为本发明实施例渲染时间对比柱状图。FIG. 3 is a histogram of rendering time comparison according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合具体实施例与附图对本发明作进一步说明。The present invention will be further described below in combination with specific embodiments and accompanying drawings.

Lightcuts算法主要分为光源聚类和求取光源割两个部分。The Lightcuts algorithm is mainly divided into two parts: light source clustering and light source cut calculation.

a.光源聚类:a. Light source clustering:

光源聚类过程将场景中的光源聚类成为一棵二叉树,如图1所示。步骤如下:The light source clustering process clusters the light sources in the scene into a binary tree, as shown in Figure 1. Proceed as follows:

1)对于所有同类光源的集合,寻找其中权重最小的两个光源,权重的计算方法如公式(1)所示:1) For the set of all light sources of the same type, find the two light sources with the smallest weight. The weight calculation method is shown in formula (1):

W=Ic(ac 2+c2(1–cosβc)2)       公式(1)W=I c (a c 2 +c 2 (1–cosβ c ) 2 ) Formula (1)

其中Ic为两个光源亮度的和,ac为两光源轴对齐包围盒的对角线长度。对于点光源和平行光c的值为0。对于聚光灯,c是一个联系空间大小和聚光灯方向的常量,与场景包围盒的对角线长度相关,βc为这两个光源绑定角的1/2。Among them, I c is the sum of the brightness of the two light sources, and a c is the diagonal length of the axis-aligned bounding box of the two light sources. The value of c is 0 for point lights and parallel lights. For spotlights, c is a constant that connects the size of the space and the direction of the spotlight, and is related to the diagonal length of the bounding box of the scene, and β c is 1/2 of the binding angle of the two light sources.

2)为权重最小的两个光源构建一个父节点,在两光源中随机选择一个光源作为其代表光源,记录包围盒信息和总亮度值。包围盒的意思是用体积稍大且特性简单的几何体来近似地代替复杂的几何对象。2) Construct a parent node for the two light sources with the smallest weight, randomly select one of the two light sources as its representative light source, and record the bounding box information and total brightness value. The bounding box means to approximately replace complex geometric objects with slightly larger and simple geometric objects.

3)将父节点加入光源集合,两个子节点从光源集合中删除。3) Add the parent node to the light source collection, and delete the two child nodes from the light source collection.

4)跳到第一步执行,直到光源集合中只剩一个节点,即根节点,光源树构建完成。其中叶子节点为实际光源,内部节点为代表光源。4) Jump to the first step and execute until there is only one node left in the light source collection, that is, the root node, and the light source tree is constructed. The leaf nodes are actual light sources, and the internal nodes are representative light sources.

b.求光源割:b. Find the cut of the light source:

要在保证渲染结果质量的前提下进行多光源的简化,在求解光源割的过程中就需要按照韦伯原理分裂节点。分裂过程中,对于光源树中的代表光源节点,都有两个值:Lc和upperbound。这两个值在查找到节点时才进行计算:To simplify multi-light sources while ensuring the quality of rendering results, it is necessary to split nodes according to Weber's principle in the process of solving light source cuts. During the splitting process, for the representative light source node in the light source tree, there are two values: L c and upperbound. These two values are only calculated when a node is found:

Lc表示一个光源聚类实际照射到渲染点的亮度的预估。其计算公式(2)如下:L c represents an estimate of the brightness of a light source cluster that actually illuminates the rendering point. Its calculation formula (2) is as follows:

Lc(x,w)≈Mj(x,w)Gj(x)Vj(x)∑i∈C Ii         公式(2)L c (x,w)≈M j (x,w)G j (x)V j (x)∑ i∈C I i formula (2)

其中集合C表示一个光源聚类,x表示渲染点(包含位置,法向等信息),w表示视点方向,M表示材质因子,G表示几何因子,V表示可见性,I表示光源亮度。i代表实际光源,j是当前聚类的代表光源。upperbound表示理论上节点所代表的光源聚类照射到渲染点产生的亮度的预计最大值(假设光源全部可见)。其计算公式与Lc的公式相同,只是计算过程中材质因子M、几何因子G以及可见性因子V要取上限值。The set C represents a light source cluster, x represents the rendering point (including position, normal and other information), w represents the viewpoint direction, M represents the material factor, G represents the geometric factor, V represents the visibility, and I represents the brightness of the light source. i represents the actual light source, and j is the representative light source of the current cluster. upperbound represents theoretically the estimated maximum value of the brightness generated by the light source cluster represented by the node irradiating the rendering point (assuming that all light sources are visible). Its calculation formula is the same as that of Lc , except that the material factor M, geometric factor G and visibility factor V need to take the upper limit value during the calculation process.

具体的求光源割的过程如图2所示,包括:The specific process of calculating the light source cut is shown in Figure 2, including:

1)设立一个堆栈来存放结果。首先将根节点入栈,计算根节点的upperbound和Lc1) Set up a stack to store the results. First push the root node into the stack, and calculate the upperbound and L c of the root node.

2)如果maxupperbound<0.02*∑Lc(maxupperbound为栈内所有节点的upperbound的最大值,0.02为韦伯参数),说明栈内所有节点的upperbound值都满足小于0.02*∑Lc的条件,则栈内节点即为最后求得的节点,计算完毕。否则分裂该节点(如果存在子节点),将被分裂的节点出栈,其子节点入栈。计算新入栈节点的upperbound和Lc2) If maxupperbound<0.02*∑L c (maxupperbound is the maximum value of the upperbound of all nodes in the stack, and 0.02 is the Weber parameter), it means that the upperbound values of all nodes in the stack meet the condition of less than 0.02*∑L c , then the stack The inner node is the last obtained node, and the calculation is completed. Otherwise, split the node (if there are child nodes), pop the split node out of the stack, and push its child nodes into the stack. Calculate the upperbound and L c of the newly pushed node.

最终堆栈中存储的就是经过Lightcuts算法简化后的结果,即一个光源割。What is stored in the final stack is the simplified result of the Lightcuts algorithm, that is, a light cut.

原始Lightcuts算法在场景中阴影较多的地方执行效率比较低,在大量光源都被遮挡的阴影处,光源割内光源的数目基本等于实际光源数。这些阴影处预估亮度Lc很小(有可能为0),从而韦伯参数0.02与Lc的乘积也很小,而代表光源的上限估计值upperbound由于不考虑遮挡,一般都会大于0.02*Lc。导致求光源割过程中节点不断分裂,直到叶子节点。The original Lightcuts algorithm is relatively inefficient in places with many shadows in the scene. In the shadows where a large number of light sources are blocked, the number of light sources in the light cut is basically equal to the actual number of light sources. The estimated brightness L c of these shadows is very small (possibly 0), so the product of the Weber parameter 0.02 and L c is also very small, and the estimated value upperbound representing the light source is generally greater than 0.02*L c because occlusion is not considered. . As a result, the nodes continue to split during the process of seeking light source cuts until the leaf nodes.

为了加快实际渲染效率,本发明提出了阴影域和背景亮度两个可选经验参数。在计算执行的光源时候,当预估的总光照值Lc小于阴影域参数值(为保证渲染效果,中和预估总光照时带来的误差,默认取绝对感觉阈限的中值0.05)时,认为该渲染点处于阴影内,对其取背景亮度参数值(一般大于或等于阴影域参数值,默认为绝对感觉阈限0.1)作为当前预估亮度Lc的值,进行求光源割的计算。如果使用了背景亮度后,在之后的计算过程中,预估的总光照值又大于或等于了阴影域参数值,则恢复使用预估亮度Lc进行计算,确保准确性。In order to speed up the actual rendering efficiency, the present invention proposes two optional empirical parameters of shadow domain and background brightness. When calculating the executed light source, when the estimated total illumination value L c is less than the shadow domain parameter value (in order to ensure the rendering effect and neutralize the error caused by the estimated total illumination, the median value of the absolute sensory threshold is taken as 0.05 by default) When , it is considered that the rendering point is in the shadow, and the value of the background brightness parameter (generally greater than or equal to the parameter value of the shadow domain, the default is the absolute threshold of perception 0.1) is taken as the value of the current estimated brightness L c to calculate the light source cut. calculate. If the estimated total illumination value is greater than or equal to the value of the shadow domain parameter in the subsequent calculation process after using the background brightness, then restore the calculation using the estimated brightness L c to ensure accuracy.

经过适当的增加阴影区域内渲染点的预估亮度,可以合理减少光源割内光源总数,提高阴影处渲染的效率,实际渲染的结果也符合预期,而且可以保证的图像质量。By appropriately increasing the estimated brightness of the rendering points in the shadow area, the total number of light sources in the light source cut can be reasonably reduced, and the rendering efficiency of the shadow area can be improved. The actual rendering results are also in line with expectations, and the image quality can be guaranteed.

为了提高效率,将同一物体上相近的点分组进行渲染,只需要执行一遍材质shader,就可以渲染最多256个点。相近的点一般法向和位置相差不大,计算得到的光源割也大致相同,所以根据这个特点,采用增量计算公共光源割的方法来适应引擎对渲染点分组处理的流程,并且加快了求光源割的速度。In order to improve efficiency, similar points on the same object are grouped for rendering, and only need to execute the material shader once to render up to 256 points. The normal direction and position of similar points are generally not much different, and the calculated light source cuts are also roughly the same. Therefore, according to this feature, the method of incremental calculation of common light source cuts is used to adapt to the engine's process of grouping rendering points, and speed up the calculation process. The speed at which the light cuts.

可编程着色器在渲染中被广泛使用,但传统Lightcuts算法普遍不支持可编程着色器描述的光源。本发明从提取光源着色器提取Lightcuts算法所必要的参数进行传递,从而支持可编程着色器。提取的信息主要包括:光源类型、光源亮度、衰减模式、光源位置、方向、照射范围。Programmable shaders are widely used in rendering, but traditional Lightcuts algorithms generally do not support light sources described by programmable shaders. The invention extracts the necessary parameters of the Lightcuts algorithm from the shader for extracting the light source and transmits them, thereby supporting the programmable shader. The extracted information mainly includes: light source type, light source brightness, attenuation mode, light source position, direction, and irradiation range.

在渲染引擎中实现Lightcuts算法,首先必须获取光源信息,以建立光源树。而且建立光源树的过程必须在渲染每个点之前进行,建树过程可以看做是一种预处理,全局只执行一次。渲染引擎会遍历所有光源来计算渲染点处的光照值。要应用Lightcuts算法进行加速,需要在遍历之前加入求光源割的过程,用得到的光源割去取代原来的光源进行渲染,达到加速的目的。To implement the Lightcuts algorithm in the rendering engine, it is first necessary to obtain light source information to build a light source tree. Moreover, the process of building a light source tree must be performed before rendering each point. The tree building process can be regarded as a kind of preprocessing, which is only executed once globally. The rendering engine traverses all light sources to calculate the lighting value at the rendering point. To apply the Lightcuts algorithm for acceleration, it is necessary to add the process of finding the light source cut before traversing, and use the obtained light cut to replace the original light source for rendering to achieve the purpose of acceleration.

本发明的面向可编程着色器的多光源加速方法包括以下步骤:The multi-light source acceleration method for programmable shaders of the present invention comprises the following steps:

1)渲染引擎读取场景文件中光源信息,Lightcuts解析提取所需光照参数,存入光源链表。1) The rendering engine reads the light source information in the scene file, Lightcuts parses and extracts the required lighting parameters, and stores them in the light source linked list.

2)渲染场景前,Lightcuts算法对光源进行聚类,遍历光源链表,对每类光源构建全局的光源树。2) Before rendering the scene, the Lightcuts algorithm clusters the light sources, traverses the light source linked list, and constructs a global light source tree for each type of light source.

3)渲染过程中,渲染引擎计算点的光照时,执行Lightcuts算法:3) During the rendering process, when the rendering engine calculates the lighting of a point, it executes the Lightcuts algorithm:

3.1)渲染点的时候,将待渲染点放置于缓冲区中。3.1) When rendering a point, place the point to be rendered in the buffer.

3.2)对缓冲区中的渲染点聚类,同一物体上相近的点有相同材质,受相同的光源影响,将其聚类,进行渲染。3.2) Cluster the rendering points in the buffer. Similar points on the same object have the same material and are affected by the same light source. Cluster them for rendering.

3.3)一组256个渲染点,利用全局光源树,求解一个光源割。3.3) A group of 256 rendering points, using the global light source tree, solves a light source cut.

3.4)对光源割内的光源进行遍历,根据阴影域或者背景亮度参数估算光源对场景影响,忽略无影响光源。提交渲染执行光源着色器3.4) Traversing the light sources in the light source cut, estimating the influence of the light source on the scene according to the shadow domain or background brightness parameters, and ignoring the non-affecting light sources. Submit rendering to execute light shader

4)渲染引擎执行对应的光源着色器,计算光照结果。选取下一批点,重复步骤2,直到渲染完成,输出渲染结果图像。4) The rendering engine executes the corresponding light source shader to calculate the lighting result. Select the next batch of points, repeat step 2 until the rendering is completed, and output the rendered image.

实现细节:Implementation details:

1)可编程着色器定义的光源shader和材质shader有很大灵活性,需要定义与Lightcuts算法相配套的接口进行约束。接口设计时只提取出必要的参数进行传递,避免多余的计算,同时也防止接口参数对着色器约束过多,影响可编程着色器的灵活性。1) The light source shader and material shader defined by the programmable shader have great flexibility, and it is necessary to define the interface matching the Lightcuts algorithm for constraints. When the interface is designed, only the necessary parameters are extracted for transmission, avoiding redundant calculations, and at the same time preventing the interface parameters from constraining the shader too much and affecting the flexibility of the programmable shader.

在上述的设计方案中,求光源割需要预估直接光照的值(Lc),这与材质中直接光照部分的计算有很多是重复的,两遍计算导致效率降低。经过实验证实重复计算中90%以上的工作量源于可见性V的求解。可见性的计算涉及到阴影线与整个场景求交(trace函数),与场景中面片数目相关,复杂度很高。所以设计了trace_reuse接口参数,将渲染引擎计算Lc过程中得到的求交结果传递给材质shader重用,提高加速效果。In the above-mentioned design scheme, calculating the light source cut needs to estimate the value of direct illumination (L c ), which is repeated with the calculation of the direct illumination part in the material, and the two-pass calculation leads to a decrease in efficiency. Experiments show that more than 90% of the workload in repeated calculations comes from the solution of visibility V. The calculation of visibility involves the intersection of shadow lines and the entire scene (trace function), which is related to the number of patches in the scene, and the complexity is very high. Therefore, the trace_reuse interface parameter is designed, and the intersection result obtained during the calculation of Lc by the rendering engine is passed to the material shader for reuse to improve the acceleration effect.

2)引擎渲染流程中,为了提高效率,将同一物体上相近的点分组进行渲染,这样只需要执行一遍材质着色器,就可以渲染最多256个点。相近的点一般法向和位置相差不大,计算得到的光源割也大致相同。根据这个特点,本发明采用增量计算公共光源割的方法,对渲染点分组计算光源割,加快了求光源割的速度。计算方法如下:2) In the engine rendering process, in order to improve efficiency, similar points on the same object are grouped for rendering, so that a maximum of 256 points can be rendered only by executing the material shader once. The normal direction and position of similar points are generally not much different, and the calculated light source cuts are also roughly the same. According to this characteristic, the present invention adopts the method of incrementally calculating the common light source cut, and calculates the light source cut by grouping the rendering points, which speeds up the speed of calculating the light source cut. The calculation method is as follows:

1.一组点共享一个存储光源割的堆栈。设置标记位,标记所执行的是否为一组点的第一个点。1. A set of points share a stack that stores light source cuts. Set the flag bit to mark whether the execution is the first point of a set of points.

2.如果执行的是第一个点,则正常执行求光源割,结果存储到堆栈。如果不是第一个点,则从堆栈中的上一次计算的光源割开始,执行当前点的求光源割过程,结果仍存放在堆栈中。2. If the execution is the first point, execute the light source cut normally, and store the result in the stack. If it is not the first point, start from the light source cut calculated last time in the stack, execute the light source cut process of the current point, and the result is still stored in the stack.

3.不断循环执行第二步,直到一组点全部执行完毕,堆栈中的结果就是这组点的公共光源割。3. The second step is executed in a loop until all the points in a group are executed, and the result in the stack is the common light source cut of this group of points.

对于一个渲染算法,即是将一个三维场景转化为图片的过程,场景中包括了摄像机,几何体,光源,材质,贴图纹理等信息。在渲染任务开始前,将一个三维场景在建模软件中的表达转化为渲染引擎可以读取和识别的数据表达方式,在转化程序里,按照本发明所述,在可编程着色器中实现Lightcuts算法以及相关改进。之后用户提交一个包含完整信息的场景数据文件包,渲染引擎可以识别这些文件中所描述的摄像机,几何体,光源等信息。在将整个场景数据读入后,开始渲染,着色过程中执行算法,输出图像。For a rendering algorithm, it is the process of converting a three-dimensional scene into a picture, and the scene includes information such as cameras, geometry, light sources, materials, and map textures. Before the rendering task starts, the expression of a three-dimensional scene in the modeling software is converted into a data expression that can be read and recognized by the rendering engine. In the conversion program, Lightcuts is implemented in the programmable shader according to the present invention. Algorithms and related improvements. After the user submits a scene data file package containing complete information, the rendering engine can identify the camera, geometry, light source and other information described in these files. After the entire scene data is read in, the rendering starts, the algorithm is executed during the shading process, and the image is output.

浦东夜色场景是一个渲染实例,该场景包含11万三角面片,724个光源,所有几何体、光源、材质均采用符合Renderman规范,光源、材质使用可编程着色器描述。具体场景信息数据如表1所示The Pudong night scene is a rendering example. The scene contains 110,000 triangular patches and 724 light sources. All geometry, light sources, and materials conform to the Renderman specification. The light sources and materials are described by programmable shaders. The specific scene information data is shown in Table 1.

表1Table 1

本发明Lightcuts算法集成渲染引擎进行如下步骤处理:Lightcuts algorithm integrated rendering engine of the present invention carries out following steps processing:

1)用户提交渲染场景数据,渲染引擎读取场景数据,Lightcuts解析提取所需光照参数,存入724个光源组成的光源链表,解析用户背景亮度经验参数估值。1) The user submits the rendering scene data, the rendering engine reads the scene data, and Lightcuts analyzes and extracts the required lighting parameters, stores them in a light source list composed of 724 light sources, and analyzes the empirical parameter estimation of the user's background brightness.

2)渲染场景前,Lightcuts算法对光源进行聚类,遍历光源链表,构建724个光源组成的全局光源树,用于求解光源割。2) Before rendering the scene, the Lightcuts algorithm clusters the light sources, traverses the light source linked list, and constructs a global light source tree composed of 724 light sources, which is used to solve the light source cut.

3)渲染过程中,渲染引擎计算某个面片材质是,需要计算该面片光照,则执行Lightcuts算法:3) During the rendering process, when the rendering engine calculates the material of a certain patch, it needs to calculate the lighting of the patch, then execute the Lightcuts algorithm:

3.1)将面片上的所有点放置于缓冲区中。3.1) Place all the points on the patch in the buffer.

3.2)对缓冲区中的渲染点聚类,同一物体上相近的点有相同材质,受相同的光源影响,将其聚类,进行渲染。3.2) Cluster the rendering points in the buffer. Similar points on the same object have the same material and are affected by the same light source. Cluster them for rendering.

3.3)一组256个渲染点,利用全局光源树,求解一个光源割。3.3) A group of 256 rendering points, using the global light source tree, solves a light source cut.

3.4)对光源割内的光源进行遍历,根据阴影域或者背景亮度参数估算光源对场景影响,忽略无影响光源。提交渲染执行光源着色器3.4) Traversing the light sources in the light source cut, estimating the influence of the light source on the scene according to the shadow domain or background brightness parameters, and ignoring the non-affecting light sources. Submit rendering to execute light shader

4)渲染引擎执行对应的光源着色器,计算光照结果。选取下一批点,重复步骤2,直到渲染完成,输出渲染结果图像。4) The rendering engine executes the corresponding light source shader to calculate the lighting result. Select the next batch of points, repeat step 2 until the rendering is completed, and output the rendered image.

在浦东夜色场景中,传统的渲染方法,每个渲染点平均处理光源数量为724个,使用文章[Lightcuts:a scalable approach to illumination]原始方法平均处理光源数量275个,本方法平均处理光源数量为149个。相比较原始的多光源优化算法,其加速百分比大约在30%到40%之间。采用原始算法与本发明改进算法的具体统计数据对比如表2所示。未加速、采用原始算法加速与采用本发明改进方法加速的渲染时间对比如图3所示。In the Pudong night scene, with the traditional rendering method, the average number of light sources processed at each rendering point is 724. Using the article [Lightcuts: a scalable approach to illumination], the original method processes an average of 275 light sources. The average number of light sources processed by this method is 149. Compared with the original multi-light optimization algorithm, the speedup percentage is about 30% to 40%. The specific statistical data comparison between the original algorithm and the improved algorithm of the present invention is shown in Table 2. The comparison of rendering time without acceleration, accelerated by the original algorithm and accelerated by the improved method of the present invention is shown in Fig. 3 .

表2Table 2

上述虽然结合附图对本发明的具体实施方式进行了描述,但并非对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。Although the specific implementation of the present invention has been described above in conjunction with the accompanying drawings, it does not limit the protection scope of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, those skilled in the art do not need to pay creative work Various modifications or variations that can be made are still within the protection scope of the present invention.

Claims (7)

1.一种面向可编程着色器的多光源加速方法,其特征是,包括:1. A multi-light source acceleration method for programmable shaders, characterized in that it comprises: (1)渲染引擎读取场景文件中的光源信息,提取Lightcuts算法所需光照参数,存入光源链表;(1) The rendering engine reads the light source information in the scene file, extracts the lighting parameters required by the Lightcuts algorithm, and stores them in the light source linked list; (2)渲染场景前,利用Lightcuts算法对光源进行聚类,遍历光源链表,对每类光源构建全局的光源树;(2) Before rendering the scene, use the Lightcuts algorithm to cluster the light sources, traverse the light source linked list, and build a global light source tree for each type of light source; (3)渲染过程中,将几何表面上待渲染点放置于缓冲区中;对缓冲区中的渲染点聚类:同一物体上相近的点有相同材质,受相同的光源影响,因此下一步对同一物体上相近的一组渲染点求一个公共的光源割,进行渲染;(3) During the rendering process, place the points to be rendered on the geometric surface in the buffer; cluster the rendering points in the buffer: similar points on the same object have the same material and are affected by the same light source, so the next step is to A group of similar rendering points on the same object find a common light source cut for rendering; (4)对于每一组的渲染点,利用全局的光源树,对渲染点分组计算光源割;(4) For each group of rendering points, use the global light source tree to group the rendering points to calculate the light source cut; (5)设定阴影域参数和背景亮度参数的值,如果当前光源节点亮度Lc小于阴影域参数值,则取其背景亮度参数值作为当前光源节点亮度的估计值,进行求光源割的计算;(5) Set the value of the shadow domain parameter and the background brightness parameter, if the current light source node brightness L c is smaller than the shadow domain parameter value, then take the background brightness parameter value as the estimated value of the current light source node brightness, and calculate the light source cut ; (6)渲染引擎识别此光源割中的着色器文件,使用光源割代替原始光源进行照明;(6) The rendering engine recognizes the shader file in this light source cut, and uses the light source cut instead of the original light source for lighting; (7)重复渲染过程,直到所有渲染点渲染完成,输出渲染结果图像。(7) The rendering process is repeated until all rendering points are rendered, and the rendering result image is output. 2.如权利要求1所述的一种面向可编程着色器的多光源加速方法,其特征是,所述步骤(3)中,对同一物体上相近的渲染点求公共光源割的具体方法如下:2. a kind of programmable shader-oriented multi-light source acceleration method as claimed in claim 1, it is characterized in that, in described step (3), the specific method for seeking common light source cut to similar rendering points on the same object is as follows : a.每一组渲染点共享一个存储光源割的堆栈;设置标记位,标记所执行的是否为该组渲染点的第一个点;a. Each group of rendering points shares a stack for storing light source cuts; set the flag bit to mark whether the executed point is the first point of the group of rendering points; b.如果执行的是第一个点,则正常执行求光源割,结果存储到堆栈;如果不是第一个点,则从堆栈中的上一次计算的光源割开始,执行当前点的求光源割过程,结果仍存放在堆栈中;b. If the first point is executed, the light source cut is performed normally, and the result is stored in the stack; if it is not the first point, the light source cut of the current point is executed starting from the last calculated light source cut in the stack process, the result is still stored on the stack; c.不断循环执行步骤b,直到该组渲染点全部执行完毕,堆栈中的结果就是该组渲染点的公共光源割。c. Execute step b continuously until the group of rendering points are all executed, and the result in the stack is the common light source cut of the group of rendering points. 3.如权利要求1所述的一种面向可编程着色器的多光源加速方法,其特征是,所述步骤(4)中,对渲染点分组计算光源割的具体方法为:3. a kind of programmable shader-oriented multi-light source acceleration method as claimed in claim 1, is characterized in that, in described step (4), the specific method of grouping calculation light source cut to rendering point is: 1)预估光源树中光源节点的两个值:Lc和upperbound;所述Lc表示一个光源聚类实际照射到渲染点的亮度的预估;upperbound表示理论上光源节点所代表的光源聚类照射到渲染点产生的亮度的预计最大值;1) Estimate the two values of the light source node in the light source tree: L c and upperbound; the L c represents the estimation of the brightness of a light source cluster actually irradiated to the rendering point; upperbound represents the theoretical light source cluster represented by the light source node The expected maximum value of the brightness produced by the class shining on the rendering point; 2)如果maxupperbound<0.02*∑Lc,说明堆栈内所有光源节点的upperbound值都满足小于0.02*∑Lc的条件,则堆栈内光源节点即为最后求得的光源节点,计算完毕;其中,maxupperbound为栈内所有节点的upperbound的最大值,0.02为韦伯参数;2) If maxupperbound<0.02*∑L c , it means that the upperbound values of all light source nodes in the stack meet the condition of less than 0.02*∑L c , then the light source node in the stack is the last obtained light source node, and the calculation is completed; among them, maxupperbound is the maximum value of the upperbound of all nodes in the stack, and 0.02 is the Weber parameter; 否则,分裂该光源节点,将被分裂的节点出栈,其子节点入栈;计算新入栈节点的upperbound和LcOtherwise, split the light source node, pop the split node out of the stack, and push its child nodes into the stack; calculate the upperbound and L c of the newly added node. 4.如权利要求1所述的一种面向可编程着色器的多光源加速方法,其特征是,所述步骤(5)中,如果使用了背景亮度后,在之后的计算过程中,预估的光源节点亮度Lc值又大于或等于了阴影域参数值时,则恢复使用预估光源节点亮度Lc进行求光源割的计算。4. A kind of programmable shader-oriented multi-light source acceleration method as claimed in claim 1, it is characterized in that, in said step (5), if after using the background brightness, in the subsequent calculation process, estimate When the brightness L c value of the light source node is greater than or equal to the parameter value of the shadow domain, the calculation of the light source cut is resumed using the estimated brightness L c of the light source node. 5.如权利要求4所述的一种面向可编程着色器的多光源加速方法,其特征是,所述阴影域参数默认取绝对感觉阈限的中值0.05,所述背景亮度参数大于或等于阴影域参数值,默认取绝对感觉阈限0.1。5. A method for accelerating multi-light sources oriented to programmable shaders according to claim 4, wherein the shadow domain parameter defaults to a median value of 0.05 of the absolute perception threshold, and the background brightness parameter is greater than or equal to The parameter value of the shadow domain, the absolute sensory threshold is 0.1 by default. 6.如权利要求1所述的一种面向可编程着色器的多光源加速方法,其特征是,所述步骤(3)中对缓冲区中的渲染点聚类的方法为:6. a kind of programmable shader-oriented multi-light source acceleration method as claimed in claim 1, is characterized in that, in described step (3), the method for the rendering point clustering in buffer is: 第1步:对于同一组光源的集合,寻找其中权重最小的两个光源;Step 1: For the set of the same group of light sources, find the two light sources with the smallest weight; 第2步:为权重最小的两个光源构建一个父节点,在两光源中随机选择一个光源作为其代表光源,记录包围盒信息和总亮度值;Step 2: Construct a parent node for the two light sources with the smallest weight, randomly select a light source from the two light sources as its representative light source, and record the bounding box information and total brightness value; 第3步:将父节点加入光源集合,两个子节点从光源集合中删除;Step 3: Add the parent node to the light source collection, and delete the two child nodes from the light source collection; 第4步:跳到第1步执行,直到该组光源的集合中只剩一个节点,即根节点,光源树构建完成;其中叶子节点为实际光源,内部节点为代表光源。Step 4: Skip to step 1 until there is only one node left in the group of light sources, that is, the root node, and the light source tree is constructed; the leaf nodes are the actual light sources, and the internal nodes are representative light sources. 7.如权利要求6所述的一种面向可编程着色器的多光源加速方法,其特征是,所述第1步中权重的计算方法如下式所示:7. A kind of programmable shader-oriented multi-light source acceleration method as claimed in claim 6, is characterized in that, the calculation method of weight in the described 1st step is as follows: W=Ic(ac 2+c2(1–cosβc)2)W=I c (a c 2 +c 2 (1–cosβ c ) 2 ) 其中,Ic为两个光源亮度的和,ac为两光源轴对齐包围盒的对角线长度;对于点光源和平行光c的值为0,对于聚光灯,c是一个联系空间大小和聚光灯方向的常量,与场景包围盒的对角线长度相关;βc为这两个光源绑定角的1/2。Among them, I c is the sum of the brightness of the two light sources, a c is the diagonal length of the axis-aligned bounding box of the two light sources; for the point light source and parallel light, the value of c is 0, and for the spotlight, c is a connection space size and the spotlight A constant of the direction, related to the diagonal length of the bounding box of the scene; β c is 1/2 of the binding angle of the two light sources.
CN201410636581.8A 2014-11-12 2014-11-12 A kind of multiple light courcess accelerated method towards programmable shader Expired - Fee Related CN104463943B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410636581.8A CN104463943B (en) 2014-11-12 2014-11-12 A kind of multiple light courcess accelerated method towards programmable shader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410636581.8A CN104463943B (en) 2014-11-12 2014-11-12 A kind of multiple light courcess accelerated method towards programmable shader

Publications (2)

Publication Number Publication Date
CN104463943A true CN104463943A (en) 2015-03-25
CN104463943B CN104463943B (en) 2015-09-16

Family

ID=52909925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410636581.8A Expired - Fee Related CN104463943B (en) 2014-11-12 2014-11-12 A kind of multiple light courcess accelerated method towards programmable shader

Country Status (1)

Country Link
CN (1) CN104463943B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696188A (en) * 2020-04-26 2020-09-22 杭州群核信息技术有限公司 Rendering graph rapid illumination editing method and device and rendering method
CN112184872A (en) * 2020-10-17 2021-01-05 蔡娟 Game rendering optimization method based on big data and cloud computing center
CN115375826A (en) * 2022-07-15 2022-11-22 北京航空航天大学 A Stochastic Optical Section Method Based on Gaze Point
CN116347003A (en) * 2023-05-30 2023-06-27 湖南快乐阳光互动娱乐传媒有限公司 Virtual lamplight real-time rendering method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7940279B2 (en) * 2007-03-27 2011-05-10 Utah State University System and method for rendering of texel imagery
CN103021020A (en) * 2012-12-05 2013-04-03 上海创图网络科技发展有限公司 Three-dimensional (3D) rendering method based on multiple light sources
CN104134230A (en) * 2014-01-22 2014-11-05 腾讯科技(深圳)有限公司 Image processing method, image processing device and computer equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7940279B2 (en) * 2007-03-27 2011-05-10 Utah State University System and method for rendering of texel imagery
CN103021020A (en) * 2012-12-05 2013-04-03 上海创图网络科技发展有限公司 Three-dimensional (3D) rendering method based on multiple light sources
CN104134230A (en) * 2014-01-22 2014-11-05 腾讯科技(深圳)有限公司 Image processing method, image processing device and computer equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696188A (en) * 2020-04-26 2020-09-22 杭州群核信息技术有限公司 Rendering graph rapid illumination editing method and device and rendering method
CN111696188B (en) * 2020-04-26 2023-10-03 杭州群核信息技术有限公司 Rendering graph rapid illumination editing method and device and rendering method
CN112184872A (en) * 2020-10-17 2021-01-05 蔡娟 Game rendering optimization method based on big data and cloud computing center
CN112184872B (en) * 2020-10-17 2021-09-07 上海恺英软件技术有限公司 Game rendering optimization method based on big data and cloud computing center
CN115375826A (en) * 2022-07-15 2022-11-22 北京航空航天大学 A Stochastic Optical Section Method Based on Gaze Point
CN116347003A (en) * 2023-05-30 2023-06-27 湖南快乐阳光互动娱乐传媒有限公司 Virtual lamplight real-time rendering method and device
CN116347003B (en) * 2023-05-30 2023-08-11 湖南快乐阳光互动娱乐传媒有限公司 Virtual lamplight real-time rendering method and device

Also Published As

Publication number Publication date
CN104463943B (en) 2015-09-16

Similar Documents

Publication Publication Date Title
WO2022121525A1 (en) Method and device for rendering three-dimensional scene data, storage medium, and electronic device
CN104463943B (en) A kind of multiple light courcess accelerated method towards programmable shader
CN104246829B (en) Coloring is patched up in graphics process
US10762282B2 (en) Content rendering
CN104392480B (en) Within external memory exchanged form realize based on point the rendering intent of global illumination effect
CN106251393B (en) A kind of gradual Photon Mapping optimization method eliminated based on sample
KR20210012069A (en) Robust merge of 3d textured meshes
US9514565B2 (en) Image processing apparatus and method
CN111339599B (en) Conversion method from BIM model to GIS model
WO2023071273A1 (en) Point cloud data processing
CN106776028A (en) A kind of ray tracing method based on GPU
CN112017254B (en) A hybrid ray tracing rendering method and system
DE112020007087T5 (en) Concurrent hash table updates
DE102023124529A1 (en) REDUCING FALSE POSITIVE BEAM TRAVELS USING BEAM CUTTERS
CN102074041A (en) Method for drawing planar caustic effect of 3D virtual scene produced by specular reflection
CN118887337A (en) A method for generating 3D models based on digital terrain maps in DWG format
US9704290B2 (en) Deep image identifiers
CN118096995A (en) Three-dimensional twin method and device
CN115371663A (en) Laser mapping method, device, electronic device, and computer-readable storage medium
CN112712581B (en) A ray tracing acceleration method
CN1851753A (en) State set based shader three-dimensional graph drawing frame and drawing method
Kolivand et al. Anti-aliasing in image based shadow generation techniques: a comprehensive survey
KR102650940B1 (en) Computer implemented method and programmable system for rendering 2D/3D models
Laine et al. Hierarchical penumbra casting
CN102184517A (en) Fast intersection solving algorithm in dynamic scene

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200309

Address after: Room 1,020, Nanxun Science and Technology Pioneering Park, No. 666 Chaoyang Road, Nanxun District, Huzhou City, Zhejiang Province, 313000

Patentee after: Huzhou You Yan Intellectual Property Service Co.,Ltd.

Address before: 250101 Shandong city of Ji'nan province high tech Zone (Lixia District) Shunhua Road No. 1500 Shandong University Qilu Software Institute of High Performance Computing Center No. 229

Patentee before: SHANDONG DIWEI DIGITAL TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230116

Address after: Room C2-303-5, Building BC, Xiangfeng Creative Park, No. 211, Xiangzhang Avenue, High-tech Zone, Hefei, Anhui Province, 230000

Patentee after: Hefei Yuezhao Digital Technology Co.,Ltd.

Address before: 313000 room 1020, science and Technology Pioneer Park, 666 Chaoyang Road, Nanxun Town, Nanxun District, Huzhou, Zhejiang.

Patentee before: Huzhou You Yan Intellectual Property Service Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150916

CF01 Termination of patent right due to non-payment of annual fee