CN103886635A - Self-adaption LOD model establishing method based on face clustering - Google Patents

Self-adaption LOD model establishing method based on face clustering Download PDF

Info

Publication number
CN103886635A
CN103886635A CN201410158036.2A CN201410158036A CN103886635A CN 103886635 A CN103886635 A CN 103886635A CN 201410158036 A CN201410158036 A CN 201410158036A CN 103886635 A CN103886635 A CN 103886635A
Authority
CN
China
Prior art keywords
model
lod
texture
simplified
fine
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
CN201410158036.2A
Other languages
Chinese (zh)
Other versions
CN103886635B (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.)
Chongqing Academy of Surveying and Mapping
Original Assignee
Chongqing Survey Institute
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 Chongqing Survey Institute filed Critical Chongqing Survey Institute
Priority to CN201410158036.2A priority Critical patent/CN103886635B/en
Publication of CN103886635A publication Critical patent/CN103886635A/en
Application granted granted Critical
Publication of CN103886635B publication Critical patent/CN103886635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Generation (AREA)

Abstract

本发明公开了一种基于面聚类的自适应LOD模型构建方法,属于三维数字城市及地理信息系统领域,本发明减少了LOD模型的数据量;利用本方法得到的简化LOD模型由于是一种递进式的加载,每个LOD的构成都来源于原始模型的部分面构成,因此不会造成顶点属性的错乱;本发明算法效率高,可用于实时自适应生成LOD模型,有效避免了LOD切换时过度不够自然;根据纹理分辨率对纹理优化更加规范。

The invention discloses an adaptive LOD model construction method based on surface clustering, which belongs to the field of three-dimensional digital cities and geographic information systems. The invention reduces the data volume of the LOD model; the simplified LOD model obtained by using the method is a kind of Progressive loading, the composition of each LOD comes from the partial surface composition of the original model, so it will not cause confusion of vertex attributes; the algorithm of the present invention has high efficiency and can be used for real-time self-adaptive generation of LOD models, effectively avoiding LOD switching The transition is not natural enough; the texture optimization is more standardized according to the texture resolution.

Description

基于面聚类的自适应LOD模型构建方法Adaptive LOD model construction method based on face clustering

技术领域technical field

本发明属于三维数字城市及地理信息系统领域,特别是涉及一种LOD模型构建方法。The invention belongs to the field of three-dimensional digital cities and geographic information systems, and in particular relates to a method for constructing an LOD model.

背景技术Background technique

LOD(Levels of Detail,细节层次)是常用的三维模型加载思想,其核心在于生成良好的LOD模型和LOD模型的加载策略。良好的模型优化结果在相同的加载模型下能够提高渲染效率;而对于相同的模型,良好的加载模式同样能够提高渲染速度。LOD (Levels of Detail) is a commonly used 3D model loading idea, and its core lies in generating a good LOD model and a loading strategy for the LOD model. A good model optimization result can improve rendering efficiency under the same loading model; and for the same model, a good loading mode can also improve rendering speed.

现有的建筑模型简化方法,大多采用基于自由网格的简化方法,在删减面或合并面的过程中,会使得建筑物产生变形,效果不佳;其次,由于建筑模型通常都贴有纹理数据,而在大部分的模型简化方法中,对顶点属性考虑不够,简化方法会带来纹理贴图坐标的混乱,从而导致纹理贴图错乱,极大地降低了模型简化的质量。Most of the existing architectural model simplification methods use free mesh-based simplification methods, which will cause deformation of the building during the process of deleting or merging surfaces, and the effect is not good; secondly, since architectural models are usually pasted with texture However, in most of the model simplification methods, the vertex attributes are not considered enough, and the simplification method will cause confusion in texture map coordinates, resulting in texture map confusion, which greatly reduces the quality of model simplification.

LOD模型的加载效率不高。许多三维平台在加载海量模型数据的时候,存在模型加载效率低,LOD模型之间切换不够流畅,加载和渲染速度慢的问题,影响了视觉体验效果,影响了三维平台进一步的行业应用,如何提高模型的动态吞吐速度和加快大场景的三维绘制速度需要解决的难题。LOD models are not loaded efficiently. When many 3D platforms load massive model data, there are problems such as low model loading efficiency, insufficient switching between LOD models, and slow loading and rendering speeds, which affect the visual experience and further industry applications of the 3D platform. How to improve The dynamic throughput speed of the model and the problems that need to be solved to speed up the 3D rendering speed of large scenes.

发明内容Contents of the invention

有鉴于现有技术的上述缺陷,本发明所要解决的技术问题是提供一种数字城市中,提高大场景三维模型加载效率的LOD模型构建方法。In view of the above-mentioned defects in the prior art, the technical problem to be solved by the present invention is to provide a method for constructing an LOD model that improves the loading efficiency of a 3D model of a large scene in a digital city.

为实现上述目的,本发明提供了一种基于面聚类的自适应LOD模型构建方法,按以下步骤进行:In order to achieve the above object, the present invention provides a method for building an adaptive LOD model based on surface clustering, which is carried out in the following steps:

步骤一、生成形状LOD;生成并优化纹理LOD;Step 1. Generate shape LOD; generate and optimize texture LOD;

所述生成形状LOD按以下步骤执行:Described generation shape LOD is carried out according to the following steps:

A1、获取每个面的重要因子;A1. Obtain the important factors of each surface;

A2、确定重要因子的分割阈值并划分模型;A2. Determine the segmentation threshold of important factors and divide the model;

A3、生成简化模型,构建形状LOD;A3. Generate a simplified model and build a shape LOD;

步骤二、采用累加方式加载形状LOD,利用传统切换方式加载纹理LOD。Step 2: Use the cumulative method to load the shape LOD, and use the traditional switching method to load the texture LOD.

较佳的,步骤一中所述获取每个面的重要因子按以下步骤进行:Preferably, as described in step 1, the important factors of each surface are obtained according to the following steps:

为建筑模型的每一个面定义其对于整个建筑模型外观贡献程度的重要因子,设定所有面的重要因子的总和为1,设定简化模型的重要因子总和为E,0<E≤1;对于同样大小的重要因子总和E,获取使用个数最少的面的组合。For each face of the building model, define the important factor of its contribution to the appearance of the whole building model, set the sum of the important factors of all faces to 1, set the sum of the important factors of the simplified model to E, 0<E≤1; for The sum E of the important factors of the same size obtains the combination with the least number of faces.

较佳的,步骤一中所述确定重要因子的分割阈值并划分模型按以下步骤进行:Preferably, the determination of the segmentation threshold of important factors and the division of models described in step 1 are carried out in the following steps:

将所有的面按照重要因子的大小排列,通过设定两种以上重要因子的分割阈值,对建筑面进行分割,得到面聚类结果,从而将建筑模型划分成多个部分;再对这些划分的部分进行组合得到不同级别的形状LOD。Arrange all the faces according to the size of the important factors, and divide the building faces by setting the segmentation threshold of more than two important factors, and obtain the result of face clustering, so as to divide the building model into multiple parts; Parts are combined to get different levels of shape LOD.

较佳的,步骤一中所述生成简化模型,构建形状LOD按以下步骤进行:Preferably, the simplified model is generated as described in step 1, and the shape LOD is constructed according to the following steps:

在阈值内的所有面构成该级别的简化模型;通过不同的分割阈值,划分得到不同级别的简化模型,通过不同级别的简化模型组合构建出形状LOD。All the faces within the threshold constitute the simplified model of this level; through different segmentation thresholds, the simplified models of different levels are divided, and the shape LOD is constructed by combining the simplified models of different levels.

较佳的,步骤一中所述进行LOD模型纹理优化按以下步骤进行:Preferably, the LOD model texture optimization described in step 1 is performed in the following steps:

设定LOD模型纹理的精细纹理为T1,设定LOD模型纹理的简化纹理为T2;Set the fine texture of the LOD model texture to T1, and set the simplified texture of the LOD model texture to T2;

对于精细纹理T1,优化精细模型图片尺寸:For fine texture T1, optimize fine model image size:

设定用于贴图的纹理标准分辨率为R1(r1x,r1y),r1x和r1y分别为用于贴图的纹理标准在坐标轴x方向和y方向上的分辨率;设定精细模型图片分辨率为R2(r2x,r2y),r2x和r2y分别为精细模型图片在坐标轴x方向和y方向上的分辨率;设定精细模型图片的缩减倍数为N(nx,ny),nx和ny分别为精细纹理在坐标轴x方向和y方向的缩减倍数;计算

Figure BDA0000493190670000031
得到精细模型图片的缩减倍数;将精细模型图片的长度和宽度缩减为原来的1/N(nx,ny);Set the texture standard resolution used for mapping as R 1 (r 1 x, r 1 y), where r 1 x and r 1 y are the resolutions of the texture standard used for mapping in the x and y directions of the coordinate axis, respectively ; Set the resolution of the fine model picture as R 2 (r 2 x, r 2 y), where r 2 x and r 2 y are the resolutions of the fine model picture in the coordinate axis x direction and y direction respectively; set the fine model The reduction factor of the picture is N(nx,ny), nx and ny are the reduction factors of the fine texture in the x direction and y direction of the coordinate axis respectively; calculate
Figure BDA0000493190670000031
Get the reduction factor of the fine model picture; reduce the length and width of the fine model picture to the original 1/N(nx,ny);

使用3Dmax的渲染到纹理技术,将所有简化纹理T2合并成一张图,并利用重采样方法降低简化纹理T2合并后的分辨率。Use 3Dmax's rendering-to-texture technology to combine all the simplified textures T2 into one image, and use the resampling method to reduce the resolution of the combined simplified texture T2.

本发明的有益效果是:The beneficial effects of the present invention are:

1、本发明减少了LOD模型的数据量,提高了模型的加载效率。一般的LOD模型至少包括原始精细模型,以及生成的简化模型,如果多级LOD,则模型量更多。而使用本方法得到的简化模型是利用原始精细模型的部分组成的,所有总的模型量仍然为原始精细模型。纹理方面,本文方法生成简化纹理对于多级的LOD模型来说都是同一个纹理,而通常生成的LOD模型,由于存在变形,可能需要更多套纹理及多套纹理坐标才能满足要求。1. The present invention reduces the data volume of the LOD model and improves the loading efficiency of the model. The general LOD model includes at least the original fine model and the generated simplified model. If there are multiple levels of LOD, the amount of the model will be more. However, the simplified model obtained by using this method is composed of parts of the original fine model, and all the total model quantities are still the original fine model. In terms of texture, the simplified texture generated by the method in this paper is the same texture for the multi-level LOD model. However, due to the deformation of the usually generated LOD model, more sets of textures and multiple sets of texture coordinates may be required to meet the requirements.

2、本发明不会引起顶点属性的错乱;利用本方法得到的简化LOD模型由于是一种递进式的加载,每个LOD的构成都来源于原始模型的部分面构成,因此不会造成顶点属性的错乱。例如顶点包含的纹理坐标,法线信息在LOD生成后不会发生错乱。2. The present invention will not cause confusion of vertex attributes; the simplified LOD model obtained by using this method is a progressive loading, and the composition of each LOD is derived from the partial face composition of the original model, so it will not cause vertex property confusion. For example, the texture coordinates and normal information contained in the vertices will not be confused after the LOD is generated.

3、本发明算法效率高,可用于实时自适应生成LOD模型;LOD模型纹理可以固定设置为简化纹理和精细纹理两层,而形状LOD生成中,简化模型是由精细模型的部分面构成的,只需要根据设定的精细程度,然后根据面的重要因子的大小,实时增减部分面,得到新的聚类划分,从而获得新的形状LOD,与LOD模型纹理构成LOD模型。3. The algorithm of the present invention has high efficiency and can be used for real-time self-adaptive generation of LOD models; the texture of the LOD model can be fixedly set as two layers of simplified texture and fine texture, and in the generation of shape LOD, the simplified model is composed of partial faces of the fine model. It only needs to increase or decrease part of the face in real time according to the set fineness and the size of the important factors of the face to obtain a new cluster division, thereby obtaining a new shape LOD, and forming an LOD model with the LOD model texture.

4、本发明有效避免了LOD切换时过度不够自然;对于通常的LOD切换,由于简化模型和精细模型是不同的,因此是不同模型之间切换不可避免的会有不一致的情况,简化效果越好,过渡越自然。利用本方法进行切换时,在前一部分的LOD模型基础上不断增加新面,构成新的更为精细的LOD模型,最终达到精细模型的显示。4. The present invention effectively avoids excessive and unnatural LOD switching; for ordinary LOD switching, since the simplified model and the fine model are different, it is inevitable that there will be inconsistencies between different models, the better the simplification effect , the transition is more natural. When using this method to switch, new surfaces are continuously added on the basis of the LOD model in the previous part to form a new and more refined LOD model, and finally achieve the display of the fine model.

5、根据纹理分辨率对纹理优化更加规范;针对三维数字城市模型,不仅应当有模型精度,也应该对模型所贴纹理的精度进行统一的考虑,本发明利用分辨率对纹理进行自动优化,更加规范了纹理的贴图标准。5. The texture optimization is more standardized according to the texture resolution; for the three-dimensional digital city model, not only should there be model accuracy, but also the accuracy of the texture attached to the model should be considered uniformly. The present invention uses the resolution to automatically optimize the texture, which is more Standardizes the mapping standard for textures.

附图说明Description of drawings

图1是本发明一具体实施方式的流程示意图。Fig. 1 is a schematic flow chart of a specific embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明作进一步说明:Below in conjunction with accompanying drawing and embodiment the present invention will be further described:

如图1所示,一种基于面聚类的自适应LOD模型构建方法,按以下步骤进行:As shown in Figure 1, an adaptive LOD model construction method based on surface clustering is carried out in the following steps:

步骤一、生成形状LOD,生成并优化纹理LOD;Step 1. Generate shape LOD, generate and optimize texture LOD;

所述生成形状LOD按以下步骤执行:Described generation shape LOD is carried out according to the following steps:

A1、获取每个面的重要因子;A1. Obtain the important factors of each surface;

A2、确定重要因子的划分阈值并划分模型;A2. Determine the division threshold of important factors and divide the model;

A3、生成简化模型,构建形状LOD;A3. Generate a simplified model and build a shape LOD;

步骤二、采用累加方式加载形状LOD,利用传统切换方式加载纹理LOD。Step 2: Use the cumulative method to load the shape LOD, and use the traditional switching method to load the texture LOD.

步骤一中所述获取每个面的重要因子按以下步骤进行:Obtaining the important factors of each surface described in step 1 is carried out in the following steps:

为建筑模型的每一个面定义其对于整个建筑模型外观贡献程度的重要因子,根据模型形状本身和模型面的实际意义定义面的重要因子。本实施例中,根据模型形状本身的实际意义定义面的重要因子为:面的面积大的重要因子大于面积小的面的重要因子;根据模型面的实际意义定义面的重要因子为:建筑的主体结构面的重要因子大于建筑细节造型面的重要因子。定义所有面的重要因子的总和为1,设定简化模型的重要因子总和为E,0<E≤1;简化模型为对于同样大小的重要因子总和E,获取使用个数最少的面的组合。E越大,简化模型越精细。For each face of the building model, define the important factors of its contribution to the appearance of the whole building model, and define the important factors of the face according to the model shape itself and the actual meaning of the model face. In this embodiment, the important factors defining the surface according to the actual meaning of the model shape itself are: the important factor of the large surface area is greater than the important factor of the small surface; the important factor of the surface defined according to the actual meaning of the model surface is: the building The important factor of the main structural surface is greater than the important factor of the architectural detail modeling surface. Define the sum of the important factors of all surfaces to be 1, set the sum of the important factors of the simplified model to be E, 0<E≤1; the simplified model is for the sum of the important factors E of the same size, and obtain the combination of the least number of surfaces used. The larger E is, the finer the simplified model is.

步骤一中所述确定重要因子的分割阈值并划分模型按以下步骤进行:As described in step 1, determine the segmentation threshold of important factors and divide the model according to the following steps:

将所有的面按照重要因子的大小排列,通过设定两种以上重要因子的分割阈值,将建筑模型不同面进行聚类,从而划分成多个部分,再对这些划分的部分进行组合得到不同级别的形状LOD。本实施例中,分割阈值采用自适应方法获得,根据在加载显示时,对该级别简化模型的精细程度的要求来设定。Arrange all the faces according to the size of the important factors, and cluster the different faces of the building model by setting the segmentation threshold of more than two important factors, so as to divide them into multiple parts, and then combine these divided parts to obtain different levels The shape of the LOD. In this embodiment, the segmentation threshold is obtained by an adaptive method, and is set according to the requirement for the level of refinement of the simplified model at the time of loading and displaying.

步骤一中所述生成简化模型,构建形状LOD按以下步骤进行:Generate a simplified model as described in step 1, and construct the shape LOD according to the following steps:

每一个分割阈值都能将所有的面划分成两个部分,在阈值内的所有面构成该级别的简化模型;通过不同的分割阈值,划分得到不同级别的简化模型,通过不同级别的简化模型组合构建出形状LOD;相邻两级LOD,较精细的简化模型为较粗略模型的所有面与递增部分所有面(包含在两者划分阈值之间的面)的和。Each segmentation threshold can divide all the faces into two parts, and all the faces within the threshold constitute the simplified model of this level; through different segmentation thresholds, different levels of simplified models can be divided, and the combination of simplified models of different levels Construct a shape LOD; adjacent two levels of LOD, the finer simplified model is the sum of all faces of the rougher model and all faces of the incremental part (including faces between the two division thresholds).

本实施例中,以三级LOD模型为例,更多级别以此类推。如下式(1-4)所示:In this embodiment, a three-level LOD model is taken as an example, and more levels can be deduced by analogy. As shown in the following formula (1-4):

f1>=f2……>=fk1……>=fk2……>=fn;  (1)f 1 >= f 2 ... >= f k1 ... >= f k2 ... >= f n ; (1)

Fall={F1,F2,……,Fk1,……,Fk2,……,Fn};  (2)F all ={F 1 ,F 2 ,...,F k1 ,...,F k2 ,...,F n }; (2)

Mm 11 == {{ Ff 11 ,, Ff 22 ,, .. .. .. .. .. .. ,, Ff kk 11 }} Mm 22 == {{ Ff kk 11 ++ 11 ,, .. .. .. .. .. .. ,, Ff kk 22 }} Mm 33 == {{ Ff kk 22 ++ 11 ,, .. .. .. .. .. .. ,, Ff nno }} ;; -- -- -- (( 33 ))

Figure BDA0000493190670000062
Figure BDA0000493190670000062

式(1)为按从大到小排列的面的重要因子,此实施例使用各个面的面积大小来给定重要因子的值,式(2)为每个重要因子相对应的面的排列,式(3)为面聚类划分结果,根据划分结果得到式(4),即LOD模型,包含LOD0,LOD1和LOD2。Formula (1) is the important factor of the surface arranged from large to small. In this embodiment, the area size of each surface is used to give the value of the important factor. Formula (2) is the arrangement of the surface corresponding to each important factor. Equation (3) is the division result of area clustering. According to the division result, Equation (4) is obtained, which is the LOD model, including LOD0, LOD1 and LOD2.

式(1)中fi为排序中排在第i位的重要因子,i为正整数,fk1和fk2分别是组成M1和M2的面的重要因子值f的最小值,即分割阈值,下标k1和k2表示其在重要因子排序中的位置;式(2)中,Fi表示fi对应的面,Fall指所有面的集合,而精细模型包含了所有面,所以Fall即精细模型。M1,M2,M3分别表示被分割成的三部分的面集合,例如M1由面F1,F2,……,Fk1组成。式(4)中,精细模型LOD0由{M1,M2,M3}组合构成,LOD1和LOD2表示的是生成的不同级别的简化模型,分别由{M1,M2}和{M1}组成,LOD1的精细程度要大于LOD2。In formula (1), f i is the important factor ranked i in the ranking, i is a positive integer, f k1 and f k2 are the minimum value of the important factor value f of the surfaces of M1 and M2, that is, the segmentation threshold, The subscripts k1 and k2 represent their positions in the ranking of important factors; in formula (2), F i represents the surface corresponding to f i , F all refers to the set of all surfaces, and the fine model includes all surfaces, so F all is Detailed model. M1 , M2 , and M3 represent three-part face collections respectively. For example, M1 is composed of faces F 1 , F 2 , . . . , F k1 . In formula (4), the fine model LOD0 is composed of {M1, M2, M3}, LOD1 and LOD2 represent the generated simplified models of different levels, which are respectively composed of {M1, M2} and {M1}, and the fine model of LOD1 The degree is greater than LOD2.

划分最小值fk1和fk2的确定包括两个方面的约束:The determination of the partition minimum f k1 and f k2 includes two constraints:

1)约束条件1:1) Constraint 1:

从简化模型能够保持原始精细模型的外观比例来设定,并且只需要满足在LOD模型在其显示区间的清晰度即可,例如LOD1是在模型距离500-1000米之间显示的,只要保证LOD1在500米远的外观满足要求,通过给定的清晰度大小可以自适应的得到LOD模型面的初步划分。It is set from the fact that the simplified model can maintain the appearance ratio of the original fine model, and only needs to meet the clarity of the LOD model in its display range. For example, LOD1 is displayed between 500-1000 meters away from the model, as long as LOD1 is guaranteed The appearance at a distance of 500 meters meets the requirements, and the preliminary division of the LOD model surface can be adaptively obtained through a given definition.

以按模型所有面都是三角面为例,假定以三角面的面积为面的重要因子,并且以生成两层LOD模型为例,包含LOD0,和LOD1。那么阈值首先可以按如下方式确定:Take the example that all the faces of the model are triangular faces, assume that the area of the triangular faces is an important factor of the face, and take the example of generating a two-layer LOD model, including LOD0 and LOD1. Then the threshold can first be determined as follows:

V屏幕=V世界*MVPW;  (5)V screen = V world * MVPW; (5)

上式表明世界坐标系中的模型坐标到屏幕坐标系的转换关系,V屏幕为屏幕坐标,V世界为点在世界坐标系中的坐标,MVPW为转换矩阵。设定屏幕允许忽略的最小三角形尺寸,反算其在实际坐标系中,位于简化模型和精细模型的切换距离时的三角形面积大小,即为简化模型集合中最小面的面积,即对应最小面的重要因子,在式(2)表示的面的序列中,获得对应求得第P1个三角面作为划分间隔,P1为正整数。The above formula indicates the transformation relationship from the model coordinates in the world coordinate system to the screen coordinate system, V screen is the screen coordinates, V world is the coordinates of the point in the world coordinate system, and MVPW is the transformation matrix. Set the minimum triangle size that is allowed to be ignored on the screen, and calculate the area of the triangle at the switching distance between the simplified model and the fine model in the actual coordinate system, which is the area of the smallest face in the simplified model set, that is, the area corresponding to the smallest face Important factor, in the sequence of faces represented by formula (2), obtain the corresponding P1th triangular face as the division interval, and P1 is a positive integer.

2)约束条件2:2) Constraint 2:

仅有P1的限制是不够的,若一个模型全部由小面构成,则会被全部忽略,所得简化模型的面集合为空,因此还需增加P2,P2的设定如下:Only the restriction of P1 is not enough. If a model is composed of small faces, all of them will be ignored, and the face set of the resulting simplified model is empty, so P2 needs to be added. The setting of P2 is as follows:

将面的重要因子按从大到小逐步累加,其计算式(1)中前P2项的和E(所有项总和大小为1),E满足:The important factors of the surface are gradually accumulated from large to small, and the sum E of the first P2 items in formula (1) is calculated (the sum of all items is 1), and E satisfies:

EE. == &Sigma;&Sigma; ii == 00 ii == PP 22 ff ii &GreaterEqual;&Greater Equal; EE. minmin ;; -- -- -- (( 66 ))

fi为第i个三角形的重要因子,Emin为允许的E最小值,按式(6)可求解得到P2的值。f i is an important factor of the i-th triangle, E min is the allowable minimum value of E, and the value of P2 can be obtained by solving formula (6).

结合约束1求得的P1的大小和约束2求得的P2的值,有:Combining the size of P1 obtained by constraint 1 and the value of P2 obtained by constraint 2, there are:

M 1 = { F 1 , F 2 , . . . . . . , F k } M 2 = { F k , . . . . . . , F n } , 其中k=max(P1,P2);  (7) m 1 = { f 1 , f 2 , . . . . . . , f k } m 2 = { f k , . . . . . . , f no } , where k=max(P1,P2); (7)

进而得到形状LOD的构成如下:Then the composition of the shape LOD is obtained as follows:

LODLOD 11 == {{ Mm 11 }} LODLOD 00 == {{ Mm 11 ,, Mm 22 }} ;; -- -- -- (( 88 ))

步骤一中所述生成并优化纹理LOD按以下步骤进行:Generate and optimize the texture LOD as described in step 1 and proceed as follows:

设定LOD模型纹理的精细纹理为T1,设定LOD模型纹理的简化纹理为T2;Set the fine texture of the LOD model texture to T1, and set the simplified texture of the LOD model texture to T2;

对于精细纹理T1,优化精细模型图片尺寸:For fine texture T1, optimize fine model image size:

设定用于贴图的纹理标准分辨率为R1(r1x,r1y),r1x和r1y分别为用于贴图的纹理标准在坐标轴x方向和y方向上的分辨率;设定精细模型图片分辨率为R2(r2x,r2y),r2x和r2y分别为精细模型图片在坐标轴x方向和y方向上的分辨率;设定精细模型图片的缩减倍数为N(nx,ny),nx和ny分别为精细纹理在坐标轴x方向和y方向的缩减倍数;计算

Figure BDA0000493190670000084
得到精细模型图片的缩减倍数;将精细模型图片的长度和宽度缩减为原来的1/N(nx,ny)。Set the texture standard resolution used for mapping as R 1 (r 1 x, r 1 y), where r 1 x and r 1 y are the resolutions of the texture standard used for mapping in the x and y directions of the coordinate axis, respectively ; Set the resolution of the fine model picture as R 2 (r 2 x, r 2 y), where r 2 x and r 2 y are the resolutions of the fine model picture in the coordinate axis x direction and y direction respectively; set the fine model The reduction factor of the picture is N(nx,ny), nx and ny are the reduction factors of the fine texture in the x direction and y direction of the coordinate axis respectively; calculate
Figure BDA0000493190670000084
Get the reduction factor of the fine model picture; reduce the length and width of the fine model picture to the original 1/N(nx,ny).

使用3Dmax的渲染到纹理技术,将所有简化纹理T2合并成一张图,并利用重采样方法将简化纹理T2合并后的分辨率降低3/4或15/16,本实施例中,通过采样方法将合并后的简化纹理T2的分辨率降低3/4。Use 3Dmax's rendering-to-texture technology to merge all the simplified textures T2 into one image, and use the resampling method to reduce the combined resolution of the simplified textures T2 by 3/4 or 15/16. In this embodiment, the sampling method will The merged simplified texture T2 is reduced in resolution by 3/4.

步骤二中采用累加的方式对所述形状LOD和LOD模型纹理进行加载,本实施例以三层LOD模型和两层LOD纹理为例,模型不同LOD的加载距离范围如下:In step 2, the shape LOD and the LOD model texture are loaded in an accumulative manner. In this embodiment, a three-layer LOD model and a two-layer LOD texture are used as examples. The loading distance ranges of different LODs of the model are as follows:

LODLOD 22 == {{ Mm 11 ;; TT 22 }} sthe s &GreaterEqual;&Greater Equal; sthe s 11 LODLOD 11 == {{ Mm 11 ,, Mm 22 ;; TT 22 }} sthe s 11 >> sthe s &GreaterEqual;&Greater Equal; sthe s 22 LODLOD 00 == {{ Mm 11 ,, Mm 22 ,, Mm 33 ;; TT 11 }} sthe s 22 >> sthe s ;; -- -- -- (( 99 ))

s为模型位置距离当前视点的距离,s1,s2为L0D切换距离,结合LOD模型的生成时的参数,即P1值的获取时设定的切换距离作为s1和s2的值。同样在给定了切换距离以后,也可以实时调整聚类划分,得到新的实时的自适应的LOD模型。s is the distance from the model position to the current viewpoint, s1 and s2 are the L0D switching distances, combined with the parameters when the LOD model is generated, that is, the switching distance set when the P1 value is acquired is used as the values of s1 and s2. Similarly, after the switching distance is given, the cluster division can also be adjusted in real time to obtain a new real-time adaptive LOD model.

当s≥s1时,只加载M1,纹理使用T2,(T2为简化纹理,T1为精细纹理,由上一节纹理LOD生成与优化获得两层LOD纹理),当s1>s≥s2,增加M2,此时构成了LOD1,纹理依然使用T2;当s2>s时,进一步将M3增加到场景中来,形成精细模型LOD0,同时使用精细纹理T1。如此,形成了递进式的模型LOD加载体系。When s≥s1, only M1 is loaded, and the texture uses T2, (T2 is a simplified texture, T1 is a fine texture, two layers of LOD textures are obtained from the texture LOD generation and optimization in the previous section), when s1>s≥s2, increase M2 , at this time, LOD1 is formed, and T2 is still used for the texture; when s2>s, M3 is further added to the scene to form a fine model LOD0, and the fine texture T1 is used at the same time. In this way, a progressive model LOD loading system is formed.

本发明利用模型LOD技术,获得一组不同细节层次的模型节点。LOD模型包含两部分,形状LOD和纹理LOD。本实施例涉及的LOD模型纹理主要包括精细纹理和一级降分辨率的简化纹理,共两层。而形状LOD同样包括精细模型和多级简化模型,共同构成LOD模型。如2级LOD模型,包括精细模型和一级简化模型,3级LOD模型,包含精细模型和2级简化模型。精细模型是已经获得的三维模型,可通过三维手工建模或自动建模获得。The present invention utilizes the model LOD technology to obtain a group of model nodes with different levels of detail. The LOD model consists of two parts, shape LOD and texture LOD. The LOD model texture involved in this embodiment mainly includes two layers, a fine texture and a simplified texture with one level of resolution reduction. The shape LOD also includes a fine model and a multi-level simplified model, which together constitute the LOD model. For example, the level 2 LOD model includes the fine model and the first-level simplified model, and the third-level LOD model includes the fine model and the second-level simplified model. The detailed model is the obtained 3D model, which can be obtained through 3D manual modeling or automatic modeling.

本实施例涉及的模型的面,包括模型全部转换成三角格网后的三角面和包含多边形面和三角面的集合。The faces of the model involved in this embodiment include triangular faces after all the models are converted into triangular meshes, and sets including polygonal faces and triangular faces.

以上详细描述了本发明的较佳具体实施例。应当理解,本领域的普通技术人员无需创造性劳动就可以根据本发明的构思作出诸多修改和变化。因此,凡本技术领域中技术人员依本发明的构思在现有技术的基础上通过逻辑分析、推理或者有限的实验可以得到的技术方案,皆应在由权利要求书所确定的保护范围内。The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make many modifications and changes according to the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art shall be within the scope of protection defined by the claims.

Claims (5)

1.一种基于面聚类的自适应LOD模型构建方法,其特征在于按以下步骤进行:1. a method for building an adaptive LOD model based on face clustering, characterized in that it proceeds in the following steps: 步骤一、生成形状LOD;生成并优化纹理LOD;Step 1. Generate shape LOD; generate and optimize texture LOD; 所述生成形状LOD按以下步骤执行:Described generation shape LOD is carried out according to the following steps: A1、获取每个面的重要因子;A1. Obtain the important factors of each surface; A2、确定重要因子的分割阈值并划分模型;A2. Determine the segmentation threshold of important factors and divide the model; A3、生成简化模型,构建形状LOD;A3. Generate a simplified model and build a shape LOD; 步骤二、采用累加方式加载形状LOD,利用传统切换方式加载纹理LOD。Step 2: Use the cumulative method to load the shape LOD, and use the traditional switching method to load the texture LOD. 2.如权利要求1所述的基于面聚类的自适应LOD模型构建方法,其特征是:步骤一中所述获取每个面的重要因子按以下步骤进行:2. the self-adaptive LOD model construction method based on face clustering as claimed in claim 1, is characterized in that: the important factor that obtains each face described in step 1 is carried out by the following steps: 为建筑模型的每一个面定义其对于整个建筑模型外观贡献程度的重要因子,设定所有面的重要因子的总和为1,设定简化模型的重要因子总和为E,0<E≤1;对于同样大小的重要因子总和E,获取使用个数最少的面的组合。For each face of the building model, define the important factor of its contribution to the appearance of the whole building model, set the sum of the important factors of all faces to 1, set the sum of the important factors of the simplified model to E, 0<E≤1; for The sum E of the important factors of the same size obtains the combination with the least number of faces. 3.如权利要求1所述的基于面聚类的自适应LOD模型构建方法,其特征是:步骤一中所述确定重要因子的分割阈值并划分模型按以下步骤进行:3. the self-adaptive LOD model construction method based on surface clustering as claimed in claim 1, is characterized in that: the segmentation threshold of determining important factor described in step 1 and dividing model are carried out by the following steps: 将所有的面按照重要因子的大小排列,通过设定两种以上重要因子的分割阈值,对建筑模型的面进行分割,得到面聚类结果,从而将模型划分成多个部分;再对这些划分的部分进行组合得到不同级别的形状LOD。Arrange all the faces according to the size of the important factors, and divide the faces of the building model by setting the segmentation threshold of more than two important factors to obtain the result of face clustering, thereby dividing the model into multiple parts; and then divide these parts The parts are combined to get different levels of shape LOD. 4.如权利要求1所述的基于面聚类的自适应LOD模型构建方法,其特征是:步骤一中所述生成简化模型,构建形状LOD按以下步骤进行:4. the self-adaptive LOD model construction method based on face clustering as claimed in claim 1, is characterized in that: generate simplified model described in step 1, build shape LOD and carry out by the following steps: 在阈值内的所有面构成该级别的简化模型;通过不同的分割阈值,划分得到不同级别的简化模型,通过不同级别的简化模型组合构建出形状LOD。All the faces within the threshold constitute the simplified model of this level; through different segmentation thresholds, the simplified models of different levels are divided, and the shape LOD is constructed by combining the simplified models of different levels. 5.如权利要求1所述的基于面聚类的自适应LOD模型构建方法,其特征是:步骤一中所述进行LOD模型纹理优化按以下步骤进行:5. the self-adaptive LOD model construction method based on face clustering as claimed in claim 1, is characterized in that: carry out LOD model texture optimization as described in step 1 and carry out by the following steps: 设定LOD模型纹理的精细纹理为T1,设定LOD模型纹理的简化纹理为T2;Set the fine texture of the LOD model texture to T1, and set the simplified texture of the LOD model texture to T2; 对于精细纹理T1,优化精细模型图片尺寸:For fine texture T1, optimize fine model image size: 设定用于贴图的纹理标准分辨率为R1(r1x,r1y),r1x和r1y分别为用于贴图的纹理标准在坐标轴x方向和y方向上的分辨率;设定精细模型图片分辨率为R2(r2x,r2y),r2x和r2y分别为精细模型图片在坐标轴x方向和y方向上的分辨率;设定精细模型图片的缩减倍数为N(nx,ny),nx和ny分别为精细纹理在坐标轴x方向和y方向的缩减倍数;计算
Figure FDA0000493190660000021
得到精细模型图片的缩减倍数;将精细模型图片的长度和宽度缩减为原来的1/N(nx,ny);
Set the texture standard resolution used for mapping as R 1 (r 1 x, r 1 y), where r 1 x and r 1 y are the resolutions of the texture standard used for mapping in the x and y directions of the coordinate axis, respectively ; Set the resolution of the fine model picture as R 2 (r 2 x, r 2 y), where r 2 x and r 2 y are the resolutions of the fine model picture in the coordinate axis x direction and y direction respectively; set the fine model The reduction factor of the picture is N(nx,ny), nx and ny are the reduction factors of the fine texture in the x direction and y direction of the coordinate axis respectively; calculate
Figure FDA0000493190660000021
Get the reduction factor of the fine model picture; reduce the length and width of the fine model picture to the original 1/N(nx,ny);
使用3Dmax的渲染到纹理技术,将所有简化纹理T2合并成一张图,并利用重采样方法按实际需要降低简化纹理T2合并后的分辨率。Use 3Dmax's rendering-to-texture technology to combine all the simplified textures T2 into one image, and use the resampling method to reduce the combined resolution of the simplified texture T2 according to actual needs.
CN201410158036.2A 2014-04-18 2014-04-18 Self-adaption LOD model establishing method based on face clustering Active CN103886635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410158036.2A CN103886635B (en) 2014-04-18 2014-04-18 Self-adaption LOD model establishing method based on face clustering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410158036.2A CN103886635B (en) 2014-04-18 2014-04-18 Self-adaption LOD model establishing method based on face clustering

Publications (2)

Publication Number Publication Date
CN103886635A true CN103886635A (en) 2014-06-25
CN103886635B CN103886635B (en) 2017-02-15

Family

ID=50955505

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410158036.2A Active CN103886635B (en) 2014-04-18 2014-04-18 Self-adaption LOD model establishing method based on face clustering

Country Status (1)

Country Link
CN (1) CN103886635B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574275A (en) * 2014-12-25 2015-04-29 珠海金山网络游戏科技有限公司 Method for combining maps in drawing process of model
CN105303597A (en) * 2015-12-07 2016-02-03 成都君乾信息技术有限公司 Patch reduction processing system and processing method used for 3D model
CN106384386A (en) * 2016-10-08 2017-02-08 广州市香港科大霍英东研究院 Grid processing method for LOD model generation and grid processing system thereof and 3D reconstruction method and system
CN106846487A (en) * 2016-12-20 2017-06-13 广州爱九游信息技术有限公司 Subtract face method, equipment and display device
CN118152345A (en) * 2024-01-22 2024-06-07 深圳艾迪普信息技术有限公司 Method and system for manufacturing and generating multi-level three-dimensional grid file

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663801A (en) * 2012-04-19 2012-09-12 北京天下图数据技术有限公司 Method for improving three-dimensional model rendering performance
WO2014022086A2 (en) * 2012-07-30 2014-02-06 Evernote Corporation Note atlas

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663801A (en) * 2012-04-19 2012-09-12 北京天下图数据技术有限公司 Method for improving three-dimensional model rendering performance
WO2014022086A2 (en) * 2012-07-30 2014-02-06 Evernote Corporation Note atlas

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
左福强: "虚拟场景目标定位及LOD建模技术研究", 《中国优秀博硕士学位论文全文数据库 (硕士)信息科技辑》 *
时健 等: "一种基于网格参数化的图像适应方法", 《软件学报》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574275A (en) * 2014-12-25 2015-04-29 珠海金山网络游戏科技有限公司 Method for combining maps in drawing process of model
CN104574275B (en) * 2014-12-25 2017-12-12 珠海金山网络游戏科技有限公司 A kind of method for merging textures during modeling rendering
CN105303597A (en) * 2015-12-07 2016-02-03 成都君乾信息技术有限公司 Patch reduction processing system and processing method used for 3D model
CN106384386A (en) * 2016-10-08 2017-02-08 广州市香港科大霍英东研究院 Grid processing method for LOD model generation and grid processing system thereof and 3D reconstruction method and system
CN106846487A (en) * 2016-12-20 2017-06-13 广州爱九游信息技术有限公司 Subtract face method, equipment and display device
CN106846487B (en) * 2016-12-20 2020-11-06 阿里巴巴(中国)有限公司 Surface reduction method and device and display device
CN118152345A (en) * 2024-01-22 2024-06-07 深圳艾迪普信息技术有限公司 Method and system for manufacturing and generating multi-level three-dimensional grid file

Also Published As

Publication number Publication date
CN103886635B (en) 2017-02-15

Similar Documents

Publication Publication Date Title
CN103886635B (en) Self-adaption LOD model establishing method based on face clustering
CN103559374B (en) A kind of method carrying out face disintegrated type surface subdivision on plurality of subnets lattice model
US11532123B2 (en) Method for visualizing large-scale point cloud based on normal
CN102750730B (en) Characteristic-maintained point cloud data compacting method
CN107918957B (en) Three-dimensional building model simplification method capable of keeping structure and texture characteristics
CN102074050A (en) Fractal multi-resolution simplified method used for large-scale terrain rendering
CN102203781A (en) System and method for hybrid solid and surface modeling for computer-aided design environments
CN114926602B (en) Building singleization method and system based on three-dimensional point cloud
CN111028335B (en) A deep learning-based patch reconstruction method for point cloud data
CN103907118A (en) System and method for coarsening in reservoir simulation system
CN101593361A (en) A large-scale terrain rendering system based on double-layer nested grid
CN110378992A (en) Towards large scene model web terminal dynamic rendering LOD processing method
CN114065320A (en) LOD-based CAD graph lightweight rendering method
CN110033203B (en) Skyline Evaluation Method Based on City Real Scene Scroll and 3D Model Projection
CN110889888A (en) Three-dimensional model visualization method integrating texture simplification and fractal compression
CN105608732B (en) A kind of optimization method of triangle grid model
CN114581620A (en) Road virtual elevation generation method and device, computer equipment and storage medium
CN107767452A (en) The AMF general file generation methods of heterogeneous solid parameterized model
CN115795632A (en) Automatic geometric twinning method and system based on marked point cloud
CN112233226B (en) Index Information Determination Method, Device and System Based on Index and Graph Linkage
CN114020943A (en) Basin water surface mixing drawing method and system, electronic equipment and storage medium
CN105869210A (en) Interpolation data processing method in three-dimensional geological surface model
CN111028349A (en) Hierarchical construction method suitable for rapid visualization of massive three-dimensional live-action data
CN106910239A (en) A kind of soft shadowses method for drafting based on echo
CN100440258C (en) System and method for automatic generation of stratigraphic and fault data grids

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
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: 20240320

Address after: No. 6 Qingzhu East Road, Dazhulin Street, Yubei District, Chongqing, 400000

Patentee after: Chongqing Institute of Surveying and Mapping Science and Technology (Chongqing Map Compilation Center)

Country or region after: China

Address before: 400020 Jiangbei District, Chongqing electric measuring Village No. 231

Patentee before: CHONGQING SURVEY INSTITUTE

Country or region before: China

TR01 Transfer of patent right