A city digital twin scene static LOD processing method

By screening the model within the viewing frustum and calculating the perceptible screen pixel threshold and visual similarity, the LOD level is dynamically adjusted, which solves the visual jump problem in traditional LOD technology and improves rendering quality and efficiency.

CN120355830BActive Publication Date: 2025-10-17SHENZHEN EMAP INFORMATION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510866029.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-10-17
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

Traditional LOD technology causes the model to switch instantly between discrete levels when moving quickly or the perspective changes suddenly, resulting in obvious visual popping problems.

Method used

By obtaining the visual frustum corresponding to the current viewpoint position and viewing angle, calculating the perceptible screen pixel threshold and visual similarity, dynamically adjusting the LOD level of the model, and using geometric deformation or transparency blending algorithms for smooth processing to avoid visual jumps.

Benefits of technology

This significantly reduces rendering overhead, improves rendering quality and efficiency, and avoids unnecessary model processing while maintaining visual fidelity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355830B_ABST
    Figure CN120355830B_ABST
Patent Text Reader

Abstract

The application discloses a kind of urban digital twin scene static LOD processing methods, it is related to model rendering processing technical field, discloses a kind of urban digital twin scene static LOD processing methods, comprising: obtaining the viewing pyramid corresponding to current viewpoint position and visual angle, and determine the model to be rendered in three-dimensional scene in the viewing pyramid;Calculate the perceivable screen pixel threshold value of the model to be rendered at the current viewpoint position;The visual similarity of the model to be rendered and original model is acquired;If the visual similarity is less than preset similarity, determine the target LOD of the model to be rendered corresponding to the perceivable screen pixel threshold value.The continuous adaptation based on actual perception is changed from the discrete switching based on preset rule by dynamic perception threshold value and visual similarity evaluation, maintain the visual fidelity perceived by user while improving rendering quality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of model rendering processing, in particular to a city digital twin scene static LOD processing method. BACKGROUND

[0002] Traditional LOD (Level of Detail) technology balances rendering performance and picture quality by dynamically adjusting model details.

[0003] However, due to its discrete level switching and static error threshold design, the LOD system triggers level switching through a preset SSE (Screen-Space Error) threshold. When an object moves quickly or the viewing angle changes suddenly, the error threshold of SSE is out of sync with actual visual perception, causing the model to switch between discrete levels instantaneously and produce obvious visual popping.

[0004] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0005] The main purpose of the present application is to provide a city digital twin scene static LOD processing method, which aims to solve the technical problem of visual popping in the rendering of the current three-dimensional scene model.

[0006] To achieve the above purpose, the present application provides a city digital twin scene static LOD processing method, which comprises:

[0007] Obtaining a view pyramid corresponding to the current viewpoint position and viewing angle, and determining a to-be-rendered model in the three-dimensional scene located in the view pyramid;

[0008] Calculating the perceptible screen pixel threshold of the to-be-rendered model corresponding to the current viewpoint position;

[0009] Obtaining the visual similarity of the to-be-rendered model and the original model;

[0010] If the visual similarity is less than a preset similarity, determining the target LOD of the to-be-rendered model corresponding to the perceptible screen pixel threshold.

[0011] In an embodiment, the step of determining the target LOD of the to-be-rendered model corresponding to the perceptible screen pixel threshold if the visual similarity is less than a preset similarity comprises:

[0012] If the visual similarity is less than the preset similarity, determining the LOD sequence whose screen space error is less than or equal to the perceptible screen pixel threshold.

[0013] set a minimum LOD level of the LOD sequence as the target LOD.

[0014] In an embodiment, before the step of obtaining a frustum corresponding to the current viewpoint position and viewpoint angle, and determining a model to be rendered in the three-dimensional scene located in the frustum, the city digital twin scene static LOD processing method further comprises:

[0015] determining the LOD corresponding to each of the original models in the three-dimensional scene, and constructing a quadtree or octree according to the LOD, wherein the leaf nodes of the quadtree or the octree contain a plurality of LOD levels corresponding to each of the original models;

[0016] determining the screen space error corresponding to each LOD level at each viewing distance.

[0017] In an embodiment, the step of calculating the perceptible screen pixel threshold value of the model to be rendered corresponding to the current viewpoint position comprises:

[0018] obtaining the screen physical size and the pixel density of the acquisition device, and the viewing distance between the acquisition device and the model to be rendered;

[0019] calculating the product of the screen physical size and the pixel density, and the quotient between the product and the viewing distance;

[0020] setting the quotient multiplied by the product between the minimum resolution angle of the human eye and the proportional coefficient of the angle and the radian as the perceptible screen pixel threshold value.

[0021] In an embodiment, the step of obtaining the visual similarity between the model to be rendered and the original model comprises:

[0022] determining the screen space geometric error and the screen texture error between the model to be rendered and the original model;

[0023] fusing the screen space geometric error and the screen texture error based on a preset weight value to obtain a screen space visual error;

[0024] calculating the visual similarity according to a natural exponential function between a decay coefficient and the screen space visual error.

[0025] In an embodiment, after the step of determining the target LOD of the model to be rendered corresponding to the perceptible screen pixel threshold value if the visual similarity is less than a preset similarity, the city digital twin scene static LOD processing method further comprises:

[0026] If the target LOD is different from the LOD selected in the previous frame, smooth processing is performed on the target LOD based on a geometric deformation or transparency blending algorithm to avoid visual jumps.

[0027] The model to be rendered is sent to a rendering pipeline for rendering processing.

[0028] In an embodiment, the step of obtaining a frustum corresponding to the current viewpoint position and the viewpoint angle and determining the model to be rendered in the three-dimensional scene located in the frustum comprises:

[0029] Six plane equations are calculated according to the viewpoint position and the viewpoint angle, and the frustum is formed based on the six plane equations;

[0030] An intersection detection result between the frustum and the three-dimensional scene corresponding to the original model is determined, and the model intersecting with the plane of the frustum and located inside the frustum is set as the model to be rendered.

[0031] In an embodiment, after the step of obtaining the visual similarity between the model to be rendered and the original model, the urban digital twin scene static LOD processing method further comprises:

[0032] If the visual similarity is greater than or equal to the preset similarity, the step of obtaining the frustum corresponding to the current viewpoint position and the viewpoint angle and determining the model to be rendered in the three-dimensional scene located in the frustum is executed.

[0033] In addition, to achieve the above-mentioned purpose, the present application also proposes a detail level processing device, which comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the urban digital twin scene static LOD processing method as described above.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the urban digital twin scene static LOD processing method as described above.

[0035] The one or more technical solutions proposed in the present application have at least the following technical effects:

[0036] First, the current viewpoint position and the corresponding view pyramid are obtained, so as to screen out the visible part of the to-be-rendered model in the three-dimensional scene located in the view pyramid, thereby avoiding unnecessary model processing. Subsequently, the perceptible screen pixel threshold of the to-be-rendered model at the current viewpoint position is calculated to evaluate the visual saliency of the model on the screen. Then, the visual similarity between the to-be-rendered model and the original model is obtained, and when the similarity is lower than a preset value, the target LOD level is adaptively determined according to the perceptible screen pixel threshold. Based on this, through dynamic perceptible threshold and visual similarity evaluation, the LOD decision is changed from discrete switching based on preset rules to continuous adaptation based on actual perception, intelligently adjusting the level of detail, while maintaining the visual fidelity perceived by the user to avoid visual jump, significantly reducing the rendering overhead and improving the rendering quality. BRIEF DESCRIPTION OF DRAWINGS

[0037] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings required to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.

[0039] Figure 1 A flowchart provided by a first embodiment of a city digital twin scene static LOD processing method of the present application;

[0040] Figure 2 A flowchart provided by a second embodiment of a city digital twin scene static LOD processing method of the present application;

[0041] Figure 3 A schematic diagram of the overall workflow obtained by combining various embodiments of the present application;

[0042] Figure 4 A device structure schematic diagram of the hardware running environment involved in the city digital twin scene static LOD processing method in the embodiments of the present application.

[0043] The purpose of the present application, functional characteristics and advantages will be further described with reference to the embodiments and accompanying drawings. DETAILED DESCRIPTION

[0044] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.

[0045] Traditional LOD (Level of Detail) techniques balance rendering performance and picture quality by dynamically adjusting model details.

[0046] However, due to its discrete level switching and static error threshold design, the LOD system triggers level switching by preset SSE (Screen-Space Error) threshold. When the object moves quickly or the view angle changes suddenly, the error threshold of SSE is out of sync with the actual visual perception, causing the model to switch between discrete levels instantaneously, resulting in obvious visual popping.

[0047] The main solution of the embodiment of the application is to obtain a view frustum corresponding to a current viewpoint position and view angle, and determine a to-be-rendered model in the three-dimensional scene located in the view frustum;

[0048] Calculate the perceptible screen pixel threshold of the to-be-rendered model corresponding to the current viewpoint position;

[0049] Obtain the visual similarity of the to-be-rendered model and the original model;

[0050] If the visual similarity is less than a preset similarity, determine the target LOD of the to-be-rendered model corresponding to the perceptible screen pixel threshold.

[0051] Specifically, through dynamic perceptible threshold and visual similarity evaluation, the LOD decision is changed from discrete switching based on preset rules to continuous adaptation based on actual perception, intelligently adjusting the level of detail, significantly reducing rendering overhead while maintaining the visual fidelity perceived by the user, and improving rendering quality.

[0052] It should be noted that the execution subject of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a level of detail processing device, etc. capable of realizing the above functions. The following will take the level of detail processing device as an example to explain the embodiment and the following embodiments.

[0053] In order to better understand the technical solutions of the present application, the following will be explained in detail in combination with the drawings in the specification and specific embodiments.

[0054] The embodiment of the application provides a city digital twin scene static LOD processing method, which is described with reference to Figure 1 , Figure 1 The flowchart of the first embodiment of the city digital twin scene static LOD processing method of the application.

[0055] The LOD processing method for the urban digital twin scene in this embodiment comprises steps S10-S40.

[0056] In step S10, the frustum corresponding to the current viewpoint position and viewing angle is obtained, and a model to be rendered in the three-dimensional scene located in the frustum is determined.

[0057] It should be noted that in three-dimensional computer graphics, a frustum-shaped space region is defined according to a set viewing angle (such as horizontal / vertical field of view angle) and near / far clipping planes from the observer (viewpoint). After the frustum is calculated, the space index (such as quad / octree) can be quickly traversed to mark which nodes are in the frustum (need to be rendered) and which nodes are outside the frustum (can be ignored or only the lowest LOD is retained). It can be understood that only objects located in the region can be rendered to the screen. Thus, in the rendering process of a specific frame, the three-dimensional model in the three-dimensional scene that is determined to be located inside the frustum and needs to be drawn to the screen after the frustum clipping test is the model to be rendered. Each model in the three-dimensional scene, such as a building or a road, corresponds to a separate model to be rendered.

[0058] The rendering engine of the level of detail processing device first obtains the current viewpoint position (usually a three-dimensional space coordinate) and viewing angle (including the field of view direction, horizontal / vertical field of view angle) of the observer in the virtual scene, and then calculates six plane equations (up, down, left, right, near, far) according to the viewpoint position, viewing angle direction, field of view angle, and pre-set near clipping plane distance and far clipping plane distance. The six planes together form a frustum. It can be understood that the frustum can be determined by conventional calculation methods, which are not described herein. When the viewpoint position and viewing angle of the observer change, the frustum needs to be determined again.

[0059] After obtaining the frustum, the model to be rendered located in the frustum needs to be determined. As an optional implementation for determining the model to be rendered, the space index (quad / octree) can be quickly traversed, and it is marked which nodes are in the frustum (need to be rendered) and which nodes are outside the frustum (can be ignored or only the lowest LOD is retained), that is, the model corresponding to the nodes located in the frustum is taken as the model to be rendered.

[0060] Optionally, in another optional embodiment of determining the to-be-rendered model, a frustum culling test can be performed on all candidate three-dimensional models in the scene, specifically including performing intersection detection between the bounding volume of the model and the six planes of the view frustum, if the bounding volume is completely outside a certain view frustum plane, the model is invisible and is discarded, if the bounding volume intersects the view frustum or is completely inside the view frustum, the model or its intersecting part is marked as a to-be-rendered model. Thus, the intersection detection result between the view frustum and the three-dimensional scene corresponding to the original model can be determined, and the models intersecting the view frustum plane and located inside the view frustum are set as to-be-rendered models. Finally, the model set that passes the test is output as the to-be-rendered model of the current frame.

[0061] For example, in a three-dimensional city scene, the user character is located at coordinates (0, 10, 0) and faces the front (e.g., the negative direction of the Z axis) with a field of view of 90 degrees and a near clipping plane distance of 1 meter and a far clipping plane distance of 100 meters. The rendering engine calculates the corresponding view frustum and detects that a house (with an AABB inside the frustum) and a tree (completely inside the frustum) in the scene are located inside the frustum, while another tree behind the user character is discarded. The house and the tree are the to-be-rendered models of the current frame.

[0062] Step S20, calculating a perceivable screen pixel threshold of the to-be-rendered model corresponding to the current viewpoint position.

[0063] The perceivable screen pixel threshold (PSP) refers to the minimum critical value of the pixel size occupied by a feature (such as a vertex, an edge, or a small area) on the surface of a three-dimensional model after being projected onto the screen (imaging plane) under the current viewpoint position and viewing angle, which reaches the resolution of the human eye.

[0064] In this embodiment, for the selected to-be-rendered model, the spatial distance (Distance) from the surface feature point (or model center / bounding box vertex) to the current viewpoint position, i.e., the viewing distance, can be calculated, and the pixel size corresponding to the unit space length on the screen, i.e., the pixel density, under the distance can be calculated based on the application of the perspective projection principle, combining the screen physical size and the field of view (FOV) of the current acquisition device. The PSP is calculated by the pixel density, the screen physical size, and the viewing distance.

[0065] As an optional implementation of determining the PSP, the screen physical size and the pixel density of the collection device, and the visual distance between the collection device and the model to be rendered are acquired, then the product of the screen physical size and the similar density is calculated, and the quotient between the product and the visual distance is calculated, and finally the product of the quotient and the minimum resolution angle of the human eye, and the quotient of the angle and the radian are calculated, and the PSP is calculated. Therefore, the calculation formula of the PSP is as follows:

[0066]

[0067] Wherein, θ min is the minimum resolution angle of the human eye, usually 0.016°, and π / 180 is the quotient of the angle and the radian. It can be understood that the minimum resolution angle of the human eye is the radian coefficient, and therefore parameter conversion is required.

[0068] The embodiment provides a quantitative standard by calculating the PSP for the LOD decision, accurately selects the coarsest LOD level that meets the visual fidelity when upgrading is required, and intelligently adjusts the LOD based on the PSP, so as to reasonably simplify the distant model and improve the rendering efficiency of the model.

[0069] In step S30, the visual similarity between the model to be rendered and the original model is acquired.

[0070] In the embodiment, the original model is the version with the highest geometric details and texture resolution in the three-dimensional model, and represents the highest visual fidelity of the model. The visual similarity (SIM, Similarity) is used to measure the closeness of the visual appearance between the current model instance (usually a model of a certain LOD level) used for rendering and the corresponding original model. The similarity is usually [0, 1] or [0%, 100%], and 1 (or 100%) indicates complete identity. Each model to be rendered corresponds to an original model, for example, the model to be rendered is a tree, and the original model is also a tree in the corresponding scene.

[0071] It can be understood that the PSP is the core basis for the LOD upgrade decision of the model to be rendered, and the visual similarity is the prerequisite for triggering the LOD upgrade. When the visual quality of the current model is insufficient (the similarity is less than a preset value), the fine LOD selection based on visual perception needs to be started. Therefore, after the PSP is calculated, the visual similarity between the models needs to be acquired.

[0072] In the embodiment, the visual similarity between the two models can be directly acquired from the local database, or the similarity between the two models can be calculated in real time.

[0073] As an optional implementation, the visual similarity of each generated LOD level model to the original model can be calculated in the model preprocessing stage (offline process) so that the visual similarity can be directly obtained from the database later. Common algorithms include geometric error metrics such as Hausdorff distance (calculating the maximum minimum distance between two mesh surface point sets), root mean square vertex error (RMS), etc. Image space metrics: render the original model and the LOD model at multiple predefined viewpoints, compare the differences between the rendered result images, common methods include structural similarity index (SSIM), peak signal-to-noise ratio (PSNR), or perceptually driven difference map analysis, and the results of multiple perspectives are integrated to obtain an average similarity score.

[0074] For example, the model to be rendered currently uses the LOD1 level model. In the model library, the visual similarity of the LOD1 model to its original model (LOD0) has been calculated by the SSIM algorithm (comparison under 8 standard viewpoints) in the preprocessing stage and stored as 0.92. The rendering engine directly reads the pre-stored similarity value 0.92.

[0075] Step S40, if the visual similarity is less than the preset similarity, determining the target LOD of the model to be rendered corresponding to the perceptible screen pixel threshold.

[0076] In this embodiment, the preset similarity is a threshold value (for example, 0.9 or 90%) set by the user or the system, which represents the acceptable minimum visual quality similarity. When the visual similarity between models is lower than this value, it is considered that the visual quality is insufficient and it is necessary to consider switching to a higher detail LOD. The target LOD refers to the selected detail level of the model to be rendered that will be used in this rendering. The higher the LOD level, such as LOD0, the richer the model details, the more the number of vertices / faces, and the greater the rendering overhead. The lower the level, such as LOD3, the more simplified the model, and the smaller the rendering overhead.

[0077] Therefore, when the visual similarity is less than the preset similarity, it means that the visual quality of the current LOD model is insufficient and has a large gap with the original model. At this time, the target LOD needs to be determined according to the PSP calculated in step S20. The PSP can correspond to one LOD or multiple LODs.

[0078] As an optional implementation, when the PSP corresponds to multiple LODs, in the process of determining the target LOD, LOD levels higher (more details) than the current LOD level under the current view distance can be traversed, and according to the screen space error corresponding to each level, LOD sequences with screen space errors less than or equal to the perceptible screen threshold are screened out, and then the LOD level with the coarsest details, i.e., the largest LOD level number, and the smallest error but still meeting the condition, is found from the selected LOD sequences as the target LOD. It can be understood that the coarsest details combined with the error less than the pixel threshold that can be distinguished by the human eye in the screen projection means that the vision is good enough. Selecting the coarsest level (the highest LOD number) that meets this condition can save rendering resources to the greatest extent and improve rendering efficiency on the premise of ensuring visual quality. If there is no LOD of a higher level that meets the condition, the original model (LOD0) is selected as the target LOD. The screen space error refers to the pixel size occupied by the geometric error (the maximum distance from the model surface point to the original model surface or a certain statistical distance) of the model of a certain LOD level projected onto the imaging plane under the current viewpoint and screen setting. It predicts the maximum degree of geometric distortion that can be observed on the screen when using the LOD level for rendering, which can be a manually set parameter or a parameter calculated in real time based on the engine such as 3D tiles.

[0079] Therefore, if the visual similarity is less than the preset similarity, it is necessary to determine the LOD sequence of the PSP with a screen space error less than or equal to the LOD sequence, and then set the minimum LOD level of the LOD sequence as the target LOD. The minimum LOD level is the LOD with the largest number in the LOD sequence, such as LOD0-LOD6, and LOD6 is the minimum LOD level.

[0080] Optionally, if the visual similarity is greater than or equal to the preset similarity, it means that the LOD model currently used has reached an acceptable standard in visual quality, and there is no need to switch to a higher level LOD (because a higher level also does not bring significant visual improvement), and at this time, there is no need to do much processing on the current model to be rendered, and the processing action of step S10 can be jumped to perform processing on other models to be rendered. It can be understood that when the processing of multiple models to be rendered in step S10 is performed asynchronously, the view angle change can be waited for and the action of step S10 can be re-executed at this time.

[0081] The embodiment provides a city digital twin scene static LOD processing method, which realizes intelligentization and self-adaptation of LOD selection by combining spatial relationship of a current viewpoint and visual quality attributes in a model, that is, calculated visual similarity, and introducing a human eye visual perception threshold as a key decision basis. When it is detected that visual quality of a current model is insufficient, only the lowest detail LOD level meeting a visual fidelity requirement is accurately selected according to actual visible influence of model details in a current screen space, unnecessary detail rendering in a visually imperceptible area is effectively avoided, or too low a detail model is used in a visually sensitive area to cause picture defects, so that LOD is dynamically selected based on visual similarity and a perceptible screen pixel threshold under the premise of guaranteeing user visual experience, dynamic optimization allocation of rendering computing resources is realized, and real-time rendering efficiency and fluency of a complex three-dimensional scene are significantly improved.

[0082] Based on the first embodiment of the application, in the second embodiment of the application, the same or similar content as the above first embodiment can be referred to the above introduction, and subsequent details will not be repeated. On this basis, please refer to Figure 2 , step S30 further includes steps S31-S33:

[0083] Step S31, determining a screen space geometric error between the to-be-rendered model and the original model, and a screen texture error.

[0084] Step S32, fusing the screen space geometric error and the screen texture error based on a preset weight value to obtain a screen space visual error.

[0085] Step S33, calculating the visual similarity according to a natural exponential function between the attenuation coefficient and the screen space visual error.

[0086] In the embodiment, the three-dimensional space can be projected to a screen space, and then the similarity of the two is calculated through a screen space geometric error SGE (Screen-space Geometric Error) and a screen texture error STE (Screen-space Texture Error) between models. The similarity is calculated through two different error parameters, so as to improve the similarity calculation accuracy. The way of calculating the screen space geometric error and the screen texture error is a prior art, which will not be repeated herein. After obtaining two different errors, the errors can be mapped, including weighted fusion of the screen space geometric error and the texture mapping error based on different weight proportions, so as to obtain a screen space visual error SVE (Screen-space Visual Error), and then improve the similarity calculation accuracy through different weight proportions. Finally, the preset similarity algorithm is calculated.

[0087] An example is given to illustrate the calculation process of visual similarity using a Python code function,

[0088] def calculate_SIM(M_high, M_low, viewpoint):

[0089] # 1. Three-dimensional space to screen space projection

[0090] SGE = project_to_screenspace(M_high, M_low, viewpoint)# Screen space geometry error, M_high is the original model, M_low is the model to be rendered, viewpoint is the viewpoint

[0091] STE = texture_error_map(M_high, M_low)# Screen texture error

[0092] # 2. Perception weighted fusion (human eyes are sensitive to different geometry / texture)

[0093] SVE = α * SGE + β * STE# α=0.6, β=0.4 (experimental calibration)

[0094] # 3. Visual similarity calculation

[0095] SIM = exp(-k * SVE)# k is the attenuation coefficient, calibrated by PSP, SIM is the visual similarity

[0096] return SIM.

[0097] The embodiment provides a city digital twin scene static LOD processing method, which calculates the actual visual similarity through two types of errors, screen space geometry error and screen space texture error, thereby improving the accuracy of visual similarity calculation, and thereby improving the accuracy of subsequent LOD decision based on visual similarity.

[0098] Based on the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as the above first embodiment can be referred to the above introduction, and will not be repeated hereinafter. On this basis, it is also necessary to calculate the screen space error in the preprocessing stage, so as to select the LOD sequence based on the screen space error. Therefore, before step S10, the city digital twin scene static LOD processing method further comprises steps S01-S02:

[0099] Step S01, determine the LOD corresponding to each original model in the three-dimensional scene, and construct a quadtree or octree according to the LOD.

[0100] In the present embodiment, in addition to the selected LOD of the model to be rendered in the real-time rendering stage, the preparation of the model parameters in the offline preprocessing stage is also required, including the generation of a series of LOD models with different levels of detail based on each model (such as buildings, roads, etc.) in the original three-dimensional city scene. After the construction of the LOD models with different levels of detail, a spatial index needs to be constructed to organize the entire scene into a quadtree (2D scene) or octree (3D scene) structure. Among them, the quadtree recursively divides the two-dimensional space into four quadrants, and the octree recursively divides the three-dimensional space into eight quadrants. Each node represents a spatial region, and the leaf node stores the objects located in the region. The end node in the tree data structure no longer undergoes further division. In the present embodiment, the leaf node is associated with the three-dimensional model in its spatial region and all the pre-generated LOD level data, i.e., each leaf node contains the model in the region and its multiple LOD levels.

[0101] Specifically, the model traversal device of the level of detail processing equipment traverses all original models in the three-dimensional scene. For each original model, all pre-generated LOD level model data (e.g., LOD0 (original), LOD1, LOD2, LOD3) are loaded. Each LOD level contains a simplified mesh, a texture, and associated attributes. Then, based on the spatial range (bounding box) of the entire scene, a quadtree (suitable for models mainly distributed on the ground) or an octree (suitable for scenes that require fine three-dimensional space division, such as flight or underwater scenes) is selected.

[0102] After the construction of the quadtree or octree, starting from the root node (representing the entire scene space), the spatial region of the current node is recursively divided into four (quadtree) or eight (octree) sub-regions (sub-nodes) according to the set division rules (such as the number of models in the node exceeding the threshold, the depth of the node not reaching the upper limit). The reference or index data of each model and all its LOD levels are distributed to the leaf nodes that overlap with their bounding volumes (such as AABB). A model may be assigned to multiple leaf nodes. Finally, each leaf node stores information including the spatial region represented by the node and the access information of all models and their LOD levels located in the region.

[0103] Example: In a three-dimensional city scene, an octree needs to be constructed for the scene. The root node represents the entire city space (e.g., 10000m x 10000m x 1000m). After multiple levels of recursive division, a leaf node located in the city center region may contain all LOD levels of the "City Hall" model (LOD0 fine model, LOD1 medium model, LOD2 simplified model, LOD3 low model). Another leaf node located in the suburbs contains all LOD levels of the "windmill" model.

[0104] Step S02, determine the screen space error corresponding to each LOD level under each view distance.

[0105] View distance refers to the spatial straight-line distance from the observer (camera viewpoint) to a point on the surface of the three-dimensional model (usually the center of the model or the center of the bounding box). Each LOD level corresponds to a screen space error under different view distances. Therefore, in this embodiment, it is necessary to pre-calculate the reference value of the screen space error or visual similarity of each LOD level (relative to the finer LOD of the previous level) under different standard view distances. This reference value can be interpolated according to the actual view distance in the real-time stage.

[0106] When generating LODs for model simplification, the geometric error GE_lod of the LOD relative to the original model has usually been calculated. Therefore, the screen space error of a certain LOD level under a view distance d_i is calculated by the formula: SSE_lod(d_i) = GE_lod*PixelPerUnit(d_i), where PixelPerUnit() is used to calculate the pixel density, and the calculation method is similar to PSP. This formula means that when observing the model at a distance d_i, using this LOD level may cause the maximum geometric deviation of the model surface details on the screen to be about SSE_lod(d_i) pixels.

[0107] For example, for the LOD2 level of the "City Hall Building", the geometric error GE_lod2 = 0.5 meters is known. The screen parameters set are H_px (screen height) = 1080, FOV_v (vertical field of view) = 60° ≈ 1.0472 rad, and the sampling view distance: d_i = [10, 20, 50, 100, 200, 500] meters. Then calculate SSE_lod2(d_i):

[0108] When d_i = 50m, PixelPerUnit(50) = 1080 / (2*50*tan(1.0472 / 2)) ≈ 1080 / (100*0.5773) ≈ 18.70px / m, and SSE_lod2(50) = 0.5*18.70 ≈ 9.35 pixels.

[0109] When d_i = 100m: PixelPerUnit(100) = 18.70 / 2 = 9.35px / m (because the distance is doubled, the density is halved), SSE_lod2(100) = 0.5*9.35 ≈ 4.68 pixels.

[0110] The final obtained SSE table of the storage result LOD2 is: {10: ≈ 37.4px, 20: ≈ 18.7px, 50: ≈ 9.35px, 100: ≈ 4.68px, 200: ≈ 2.34px, 500: ≈ 0.94px}.

[0111] It should be noted that the above parameters are only used for explanation and do not limit the present application.

[0112] The embodiment provides a city digital twin scene static LOD processing method. By constructing a space index structure (a quadtree / octree) and associating all LOD levels of a model to leaf nodes, the process of "determining a model to be rendered according to a view frustum" in a subsequent step S10 is significantly accelerated. Only the tree nodes intersecting the view frustum need to be traversed to quickly obtain a candidate model set, so as to improve rendering efficiency. Meanwhile, by precalculating and storing screen space errors of each LOD level at different view distances, when a target LOD needs to be determined, the actual distance d of the current model to the viewpoint can be directly used to quickly look up a table or interpolate to obtain the estimated screen space error SSE_lod(d) of the LOD at the current distance, avoiding real-time geometric error to screen space projection calculation for each model at each frame, greatly reducing the calculation overhead and improving the real-time performance of the overall rendering pipeline.

[0113] Based on the first embodiment of the present application, in the fourth embodiment of the present application, the same or similar contents as the above first embodiment can be referred to the above introduction, and the following will not be repeated. On this basis, after step S40, to avoid jumping, the boundary condition also needs to be processed. If the LOD level selected in the current frame is different from that of the last frame (especially when the viewpoint moves slowly, which may cause LOD switching), a geometric morphing or alpha blending technique is used for smooth transition to avoid visual jumping. Therefore, if the target LOD is different from the LOD selected in the previous frame, the target LOD is smoothly processed based on a geometric morphing or alpha blending algorithm to avoid visual jumping. It can be understood that the smooth processing process is a known technology, and the present application will not be repeated.

[0114] After obtaining the target LOD, the model of the selected LOD level also needs to be submitted to the rendering pipeline for rendering, that is, the model to be rendered is sent to the rendering pipeline, so that the rendering pipeline performs rendering processing on the model to be rendered.

[0115] Exemplarily, in order to help understand the implementation process of the city digital twin scene static LOD processing method obtained by combining the above various embodiments, please refer to Figure 3 , Figure 3An overall workflow schematic diagram of a city digital twin scene static LOD processing method is provided, in particular:

[0116] The viewpoint system of the device updates the viewpoint position or direction, performs frustum clipping through the scene manager, and then submits a visible object list, i.e., a model to be rendered, of the frustum. Then, for each visible object, the PSP threshold of the object (model to be rendered) is calculated, then the visual similarity SIM is calculated through the visual similarity measurement model, and then a judgment is made based on the SIM value. If the SIM value is greater than or equal to a preset threshold of 0.95, the current LOD is maintained. If the SIM value is less than 0.95, a higher-precision LOD is requested in the LOD model library based on the PSP, and then, after a new LOD model is provided, smooth transition rendering processing is performed based on the rendering engine, thereby completing the detail level processing of the model in a three-dimensional scene, and effectively improving the rendering efficiency of the model in a dynamic city scene.

[0117] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the city digital twin scene static LOD processing method of the present application. Further simple transformations based on this technical concept are within the scope of protection of the present application.

[0118] The present application provides a detail level processing device, which comprises at least one processor and a memory in communication connection with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the city digital twin scene static LOD processing method in the first embodiment.

[0119] Reference will now be made to Figure 4 which shows a structural schematic diagram of a detail level processing device suitable for implementing embodiments of the present application. The detail level processing device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, as well as fixed terminals such as digital TVs, desktop computers, and the like. Figure 4 The detail level processing device shown is only an example and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0120] As Figure 4As shown, the detail level processing device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1002 or programs loaded from a storage apparatus 1003 into a random access memory (RAM) 1004. Various programs and data required for the operation of the detail level processing device are also stored in the random access memory 1004. The processing apparatus 1001, the read only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the detail level processing device to communicate with other devices wirelessly or by wire to exchange data. Although the detail level processing device with various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.

[0121] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication apparatus, or installed from the storage apparatus 1003, or installed from the read only memory 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0122] The detail level processing device provided by the present disclosure adopts the urban digital twin scene static LOD processing method in the above embodiments, and can solve the technical problem of visual jump in model rendering of a three-dimensional scene. Compared with the prior art, the detail level processing device provided by the present disclosure has the same beneficial effects as the urban digital twin scene static LOD processing method provided by the above embodiments, and other technical features in the detail level processing device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.

[0123] It should be understood that various parts of the present application can be realized in hardware, software, firmware, or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any appropriate manner in one or more embodiments or examples.

[0124] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0125] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer programs) for performing the urban digital twin scene static LOD processing method in the above-mentioned embodiments.

[0126] The computer readable storage medium provided by the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared or semiconductor system, system or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to: an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer readable storage medium can be transmitted by any appropriate medium, including but not limited to: electric wires, optical cables, radio frequencies (RF), etc., or any suitable combination of the above.

[0127] The above-mentioned computer readable storage medium can be contained in the detail level processing device; or can exist separately without being assembled into the detail level processing device.

[0128] The above-mentioned computer readable storage medium carries one or more programs, which, when executed by the detail level processing device, cause the detail level processing device to:

[0129] obtain a frustum corresponding to the current viewpoint position and viewing angle, and determine a model to be rendered in the three-dimensional scene located in the frustum.

[0130] calculate a perceptible screen pixel threshold corresponding to the current viewpoint position of the model to be rendered;

[0131] obtain a visual similarity between the model to be rendered and the original model;

[0132] if the visual similarity is less than a preset similarity, determine a target LOD of the model to be rendered corresponding to the perceptible screen pixel threshold.

[0133] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0134] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0135] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0136] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the above-mentioned urban digital twin scene static LOD processing method, and can solve the technical problem of visual jump in model rendering of the current three-dimensional scene. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the present application are the same as those of the urban digital twin scene static LOD processing method provided by the above-mentioned embodiments, and are not described here.

[0137] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation, direct / indirect application in other related technical fields based on the technical concept of the present application, and the contents of the specification and drawings are included in the patent protection scope of the present application.

Claims

1. A static LOD processing method for urban digital twin scenes, characterized by: The static LOD processing method of the city digital twin scene includes: Obtaining a viewing frustum corresponding to the current viewpoint position and viewing angle, and determining a model to be rendered in the three-dimensional scene that is located within the viewing frustum; Calculate the perceptible screen pixel threshold corresponding to the current viewpoint position of the model to be rendered; Determining a screen space geometric error and a screen texture error between the model to be rendered and an original model, wherein the original model is a model with the highest geometric detail and texture resolution, the screen space geometric error is calculated based on the geometric detail between the models, and the screen texture error is calculated based on the texture resolution between the models; fusing the screen space geometric error and the screen texture error based on a preset weight value to obtain a screen space visual error; Calculating visual similarity based on a natural exponential function between an attenuation coefficient and the screen space visual error; If the visual similarity is less than a preset similarity, a target LOD of the model to be rendered corresponding to the perceptible screen pixel threshold is determined.

2. A static LOD processing method for a city digital twin scene according to claim 1, characterized in that: If the visual similarity is less than the preset similarity, the step of determining the target LOD of the model to be rendered corresponding to the perceptible screen pixel threshold comprises: If the visual similarity is less than the preset similarity, determining an LOD sequence having a screen space error less than or equal to the perceptible screen pixel threshold; Set the minimum LOD level of the LOD sequence to the target LOD.

3. A static LOD processing method for a city digital twin scene according to claim 2, characterized in that: Before the steps of obtaining the viewing frustum corresponding to the current viewpoint position and viewing angle, and determining the model to be rendered in the three-dimensional scene located within the viewing frustum, the method for processing static LOD of the city digital twin scene further includes: Determine the LOD corresponding to each of the original models in the three-dimensional scene, and construct a quadtree or an octree according to the LOD, wherein the leaf nodes of the quadtree or the octree contain multiple LOD levels corresponding to each of the original models; The screen space error corresponding to each LOD level at each viewing distance is determined.

4. A static LOD processing method for a city digital twin scene according to claim 1, characterized in that: The step of calculating the perceptible screen pixel threshold corresponding to the current viewpoint position of the model to be rendered includes: Obtaining the screen physical size and pixel density of the acquisition device, and the viewing distance between the acquisition device and the model to be rendered; Calculating a product of the screen physical size and the pixel density, and a quotient between the product and the viewing distance; The product of the quotient, the minimum resolution angle of the human eye, and the proportional coefficient between the angle and the radian is set as the perceptible screen pixel threshold.

5. A static LOD processing method for a city digital twin scene according to claim 1, characterized in that: After the step of determining the target LOD of the model to be rendered corresponding to the perceptible screen pixel threshold if the visual similarity is less than the preset similarity, the method for processing static LOD of the city digital twin scene further includes: If the target LOD is different from the LOD selected in the previous frame, the target LOD is stabilized based on a geometric deformation or transparency blending algorithm to avoid visual jumps; The model to be rendered is sent to a rendering pipeline, so that the rendering pipeline performs a drawing rendering process on the model to be rendered.

6. A static LOD processing method for a city digital twin scene according to claim 1, characterized in that: The step of obtaining a viewing frustum corresponding to the current viewpoint position and viewing angle, and determining a model to be rendered in the three-dimensional scene located within the viewing frustum includes: Calculating six plane equations according to the viewpoint position and the viewing angle, and constructing the viewing frustum based on the six plane equations; An intersection detection result between the viewing frustum and the three-dimensional scene corresponding to the original model is determined, and a model intersecting with a plane of the viewing frustum and located inside the viewing frustum is set as the model to be rendered.

7. A static LOD processing method for a city digital twin scene according to claim 1, characterized in that: After the step of calculating visual similarity based on the attenuation coefficient and the natural exponential function between the screen space visual error, the city digital twin scene static LOD processing method further includes: If the visual similarity is greater than or equal to the preset similarity, the process jumps to the step of obtaining a viewing frustum corresponding to the current viewpoint position and viewing angle, and determining a model to be rendered in the three-dimensional scene within the viewing frustum.

Citation Information

Patent Citations

  • Three-dimensional model LOD continuous display method and device and electronic equipment

    CN119579761A