Drawing lightweight method and system in static scene construction

By removing unnecessary object data from the view and optimizing the primitive index, the rendering complexity caused by drawing objects outside the view's field of view is solved, thus improving rendering efficiency and smoothness.

CN119273857AInactive Publication Date: 2025-01-07ZHEJIANG EXPRESSWAY INFO ENG TECH CO LTD
View PDF 14 Cites 0 Cited by

Patent Information

Application Number
CN202411823651.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-01-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In existing technologies, drawing objects outside the field of view increases workload and storage requirements, and also increases rendering complexity, resulting in low rendering efficiency.

Method used

By obtaining the number of pixels projected from objects in the view, setting a pixel threshold, removing object data that does not need to be drawn, and using an octree algorithm for primitive indexing, rendering data is dynamically selected and image errors are evaluated to ensure visual quality.

Benefits of technology

The number of rendering objects has been reduced, improving rendering smoothness and efficiency, and ensuring the accuracy and fluidity of visual effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273857A_ABST
    Figure CN119273857A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of static scene construction, in particular to a drawing lightweight method and system in static scene construction, and the method comprises the steps: obtaining the number of pixels, projected on a screen, of pixels of an object in a detected view; comparing the number of the pixels projected on the screen with a limited pixel threshold value, wherein the limited pixel threshold value is the limited number of the pixels projected on the screen; after a rejected object is determined, some component objects, which are far away from a viewpoint, in a view are selected, and image information of which pixel values are lower than a limited pixel threshold value is deleted, so that on one hand, object data of some component objects, which are far away from the viewpoint, in the view are deleted; and on the other hand, data of objects which are shielded in the view and outside the visual field can be deleted, so that only the object on the outermost layer in the current view is drawn, and smooth rendering can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of static scene construction planning, and in particular to a lightweight drawing method and system in static scene construction. Background Art

[0002] Static scene construction means that during the construction process, the focus is on creating and configuring those parts that are relatively stable and not easy to change. This includes road environments, building layouts, etc. These elements rarely change in simulation or actual scenes, so they are called static scenes.

[0003] Rendering technology is used in the construction of static scenes. The purpose of rendering is to enhance the sense of reality and immersion: through rendering technology, static scenes can simulate the light and shadow changes and texture details of the real world, create highly realistic images, and give users an immersive experience. This sense of reality and immersion is crucial to improving user experience; visual expression: rendering technology can transform complex information or design concepts into intuitive images, making it easier for users to quickly grasp important information. In fields such as architectural design and product display, this helps designers and customers better understand and display design solutions; improve interactivity: although the static scene itself does not change, rendering technology can create a multi-dimensional three-dimensional virtual environment for it, allowing users to observe and explore from different angles, and even achieve limited interaction with the scene in some cases.

[0004] However, since objects outside the field of view are drawn in the view, on the one hand, the workload of drawing will increase, and on the other hand, the data of objects outside the field of view is stored in the storage unit. During the rendering process, additional processing and calculation are required when calling the view. The increase in the number of tiles means that more objects need to be processed and rendered in the scene, which directly increases the complexity of rendering. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a lightweight rendering method and system in static scene construction.

[0006] In order to achieve the above purpose, the technical solution adopted by the present invention is: In a first aspect, a lightweight drawing method for static scene construction is provided, comprising: Get the number of pixels on the screen where the pixels of the object detected in the view are projected; Compare the number of pixels projected on the screen with a defined pixel threshold, where the defined pixel threshold is the defined number of pixels projected on the screen, and if the number of pixels of an object in the view projected on the screen is less than the defined pixel threshold, set the object in the view as a culling object; Based on the judgment of the object to be eliminated, the storage information corresponding to the object to be eliminated in the storage unit is deleted; The scene model is drawn based on the stored information of objects retained after being removed from the view.

[0007] It should be understood that after determining the culling objects, the image information of some component objects in the view that are far from the viewpoint and whose pixel values ​​are lower than the specified pixel threshold are selected for deletion. On the one hand, the object data of some component objects in the view that are far from the viewpoint are deleted, and on the other hand, the object data that is blocked in the view and outside the field of view will also be deleted, so that only the outermost objects in the current view are drawn; The occlusion culling technology used above removes parts that do not need to be drawn, which can reduce the amount of data during batch drawing, thereby helping to improve drawing efficiency, and further reduce the number of rendering objects, which is conducive to improving rendering smoothness.

[0008] As a further optimized technical solution of the present invention, a method for indexing the primitives of the removed objects is also included, and the primitive indexing method comprises the following steps: Spatial indexing of the primitives of objects in the view to obtain primitive information; According to the indexed primitive information, calculate the primitives to be removed in the current viewport.

[0009] Specifically, the drawn primitives are spatially indexed using an octree algorithm to quickly access the primitive numbers of the primitives to be removed, so as to more quickly locate the primitive data to be deleted, which is conducive to quickly deleting the primitive data to be deleted.

[0010] As a further optimized technical solution of the present invention, a method for simplifying the drawn static scene tiles is also included, and the simplification method includes: The pixels of the drawn model are displayed by setting PagedLOD of the model, so that the corresponding rendering data can be dynamically selected according to the pixel size occupied by the scene primitives in the viewport during rendering.

[0011] It should be understood that when the pixels occupied by the primitives of the scene model in the viewport are small, the audience often cannot distinguish the details of the primitives. By dynamically selecting rendering data, the rendering fineness can be adjusted according to the actual pixel size of the primitives in the viewport. When the primitives are small, lower-detail data can be selected for rendering to save computing resources, which is conducive to improving rendering speed.

[0012] As a further optimized technical solution of the present invention, an evaluation and determination method is also included, and the evaluation and determination method comprises the following steps: Evaluate the image after culling, find out the pixel values ​​at different positions of each image after culling and compare them with the view pixels before culling, and get the average value of the square error of all pixel positions before and after culling, that is, the pixel evaluation value ; Based on average When the pixel value is less than the specified pixel threshold, the pixel evaluation value The image with a pixel value smaller than the specified pixel threshold is determined as the image to be drawn after the culling process.

[0013] It should be understood that after the culling process, if too many small bends and fragments are removed, or the important shapes and contours of the model are over-simplified, the model may be distorted, affecting the visual effect and the accuracy of the model. Therefore, it is necessary to evaluate the image after the culling process. The average square error of all pixel positions between the culled image and the original image is When the pixel value is less than the specified pixel threshold, the pixel evaluation value Images with pixel values ​​smaller than the specified pixel threshold are determined as culled images, which helps to ensure the accuracy of visual effects and scene models.

[0014] Specifically, the evaluation method is The evaluation method, The evaluation method is used to automatically evaluate the impact of the simplified results on the original model.

[0015] Specifically, The evaluation method can automatically evaluate the impact of the simplified results on the original model, thereby balancing the quality and lightweight levels.

[0016] As a further optimized technical solution of the present invention, the evaluation and determination method further includes: Acquire multiple sets of images with different viewing angles at the same viewing distance; Perform elimination processing on multiple sets of images acquired under different viewing angles to obtain multiple images formed after elimination processing ; For multiple images Evaluate the obtained images with different viewing angles to obtain pixel evaluation values ​​at different positions under different viewing angles. ; The pixel evaluation values ​​obtained under multiple different viewing angles Perform averaging to get the average value ; average value When the value is less than the specified threshold, the average value The culled images whose values ​​are smaller than the specified threshold are determined as the culled images‌ .

[0017] It should be understood that multiple groups of images with different viewing angles under the same viewing distance are obtained, the views of the images in different viewing boxes are eliminated, and the pixel values ​​of the images under different viewing angles after elimination are compared and evaluated with the pixel values ​​of the original images under different viewing angles, and the pixel evaluation values ​​of the multiple groups of different viewing angles are obtained. Perform averaging to get the average value ,average value When the value is less than the specified threshold, the average value The images after elimination that are smaller than the specified threshold are determined as the images after elimination processing. Therefore, by keeping the viewing distance unchanged and changing the viewing angle, richer samples are obtained. Under the condition of the same viewing distance, if the pixel values ​​between images at the same position are similar but at different viewing angles, it is helpful to explain that the images at that position are similar, which is helpful to further improve the value of the evaluation.

[0018] The second method provides a lightweight system for drawing in static scene construction, including the following units: An acquisition unit, used to acquire the number of pixels projected on the screen by the pixels of the object detected in the view; a processing and judging unit, configured to compare the number of pixels projected on the screen with a defined pixel threshold, wherein the defined pixel threshold is a defined number of pixels projected on the screen, and if the number of pixels of an object in the view projected on the screen is less than the defined pixel threshold, the object in the view is set as a culling object; A deletion unit, used to delete the storage information corresponding to the object to be deleted in the storage unit; A drawing unit is used to draw the scene model for the objects retained in the view.

[0019] Specifically, it also includes the following units: An indexing unit, used to spatially index the primitives of objects in the view and index out primitive information; The calculation unit is used to calculate the primitives to be eliminated in the current viewport according to the indexed primitive information.

[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. After determining the objects to be culled, the image information of some component objects in the view that are far away from the viewpoint and whose pixel values ​​are lower than the specified pixel threshold are selected for deletion. On the one hand, the object data of some component objects in the view that are far away from the viewpoint are deleted, and on the other hand, the object data that is blocked in the view and out of the field of view will also be deleted, so that only the outermost objects in the current view are drawn, which is conducive to ensuring smooth rendering.

[0021] Second, eliminating parts that do not need to be drawn can reduce the amount of data during batch drawing, which is beneficial to improving drawing efficiency, and further reducing the number of rendering objects, which is beneficial to improving rendering smoothness.

[0022] Third, by keeping the viewing distance unchanged and changing the viewing angle, we obtain richer samples. When the viewing distance is the same, if the pixel values ​​between images at the same position are similar but the viewing angles are different, it helps to explain that the images at that position are similar, which in turn helps to further improve the value of the evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 is a flow chart of the first method of the present invention; Figure 2 is a flow chart of the second method of the present invention; Figure 3 It is a module flow chart of the present invention.

[0024] In the figure: 1. Acquisition unit; 2. Processing and judgment unit; 3. Deletion unit; 4. Drawing unit; 5. Indexing unit; 6. Calculation unit. DETAILED DESCRIPTION

[0025] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.

[0026] In order to better understand the pedestrian traffic violation identification method of the present invention, the terms involved in the embodiments of the present invention are first explained.

[0027] like Figure 1 As shown, as an embodiment of the present invention, a lightweight drawing method in static scene construction includes: 101. Obtain the number of pixels projected on the screen by the pixels of the object detected in the view; 102. Compare the number of pixels projected on the screen with a defined pixel threshold, where the defined pixel threshold is a defined number of pixels projected on the screen. If the number of pixels of the object in the view projected on the screen is less than the defined pixel threshold, set the object in the view as a culling object. 103. Based on the determination of the object to be removed, deleting the storage information corresponding to the object to be removed in the storage unit; 104. Draw the scene model based on the stored information of the objects that are retained after being removed from the view.

[0028] It should be understood that after determining the culling objects, the image information of some component objects in the view that are far from the viewpoint and whose pixel values ​​are lower than the specified pixel threshold are selected for deletion. On the one hand, the object data of some component objects in the view that are far from the viewpoint are deleted, and on the other hand, the object data that is blocked in the view and outside the field of view will also be deleted, so that only the outermost objects in the current view are drawn; The occlusion culling technology used above removes parts that do not need to be drawn, which can reduce the amount of data during batch drawing, thereby helping to improve drawing efficiency, and further reduce the number of rendering objects, which is conducive to improving rendering smoothness.

[0029] It should be further explained that the principle of occlusion culling technology to improve rendering efficiency is as follows: First, reduce the number of objects to be rendered: Occlusion culling technology determines whether an object is blocked by other objects, thereby avoiding rendering those blocked objects that are not visible in the final image. This significantly reduces the number of objects that need to be rendered; Second, optimize resource utilization: By culling invisible objects, occlusion culling technology can reduce the load on the GPU and CPU, allowing rendering resources to be more concentrated on processing visible objects, thereby improving resource utilization efficiency; Third, improve frame rate: By reducing the number of objects to be rendered and the amount of calculation, occlusion culling technology helps to improve the frame rate of the game, making the picture smoother.

[0030] like Figure 2 As shown, as a further optimized embodiment of the present invention, it also includes a primitive indexing method for the removed object, and the primitive indexing method includes the following steps: 201. Perform spatial indexing on the primitives of the objects in the view to obtain primitive information; 202. Calculate the graphics elements to be removed in the current viewport according to the indexed graphics element information.

[0031] Specifically, the drawn primitives are spatially indexed using an octree algorithm to quickly access the primitive numbers of the primitives to be removed, so as to more quickly locate the primitive data to be deleted, which is conducive to quickly deleting the primitive data to be deleted.

[0032] As a further optimized embodiment of the present invention, it also includes: The pixels of the drawn model are displayed by setting PagedLOD of the model, so that the corresponding rendering data can be dynamically selected according to the pixel size occupied by the scene primitives in the viewport during rendering.

[0033] It should be understood that when the pixels occupied by the primitives of the scene model in the viewport are small, the audience often cannot distinguish the details of the primitives. By dynamically selecting rendering data, the rendering fineness can be adjusted according to the actual pixel size of the primitives in the viewport. When the primitives are small, lower-detail data can be selected for rendering to save computing resources, which is conducive to improving rendering speed.

[0034] As a further optimized embodiment of the present invention, it also includes an evaluation determination method, comprising the following steps: Evaluate the image after culling, find out the pixel values ​​at different positions of each image after culling and compare them with the view pixels before culling, and get the average value of the square error of all pixel positions before and after culling, that is, the pixel evaluation value ; Based on pixel evaluation When the pixel evaluation value is less than the specified threshold, Images smaller than the specified threshold are determined as images to be drawn after culling.

[0035] It should be understood that after the culling process, if too many small bends and fragments are removed, or the important shapes and contours of the model are over-simplified, the model may be distorted, affecting the visual effect and the accuracy of the model. Therefore, it is necessary to evaluate the image after the culling process. The pixel evaluation value of the square error of all pixel positions between the culled image and the original image is When the pixel evaluation value is less than the specified threshold, Images smaller than the specified threshold are determined as images after culling, which helps to ensure the accuracy of visual effects and scene models.

[0036] It should be further explained that the specified threshold refers to the process of evaluating the image after elimination due to the pixel evaluation value. The smaller the value, the more similar the two images are; the larger the value, the greater the difference between the two images. Therefore, it is necessary to set a specified threshold to control the error within a reasonable range for comparison and to find a reference for evaluation. Therefore, a specified threshold is set for comparison.

[0037] Specifically, the evaluation and determination method is adopted The evaluation method, The evaluation method is used to automatically evaluate the impact of the simplified results on the original model.

[0038] Specifically, The evaluation method can automatically evaluate the impact of the simplified results on the original model, thereby balancing the quality and lightweight levels.

[0039] As a further optimized embodiment of the present invention, the evaluation and determination method further includes: Acquire multiple sets of images with different viewing angles at the same viewing distance; Perform elimination processing on multiple sets of images acquired under different viewing angles to obtain multiple images formed after elimination processing ; For multiple images Evaluate the obtained images with different viewing angles to obtain pixel evaluation values ​​at different positions under different viewing angles. ; The pixel evaluation values ​​obtained under multiple different viewing angles Perform averaging to get the average value ; average value When the value is less than the specified threshold, the average value The culled images whose values ​​are smaller than the specified threshold are determined as the culled images‌ .

[0040] It should be understood that multiple groups of images with different viewing angles under the same viewing distance are obtained, the views of the images in different viewing boxes are eliminated, and the pixel values ​​of the images under different viewing angles after elimination are compared and evaluated with the pixel values ​​of the original images under different viewing angles, and the pixel evaluation values ​​of the multiple groups of different viewing angles are obtained. Perform averaging to get the average value ,average value When the value is less than the specified threshold, the average value The images below the specified threshold are determined as the images after culling. Therefore, by keeping the viewing distance unchanged and changing the viewing angle, more abundant samples are obtained. If the pixel values ​​of images at the same position are similar under the same viewing distance but different viewing angles, it is helpful to indicate that the images at that position are similar, which is helpful to further improve the value of the evaluation.

[0041] Specifically, it also includes The evaluation method described It is an evaluation metric for image super-resolution tasks. The evaluation method is used to measure the distortion between the reconstructed image and the original image. It is achieved by calculating the error on the tetrahedral mesh between the reconstructed image and the original image.

[0042] Said The calculation formula is as follows: in, is an image In Location The pixel value of is an image In Location The pixel value of is an image and In Location The absolute value of the difference between the pixel values ​​of ; is the square of the above difference; is the sum of the squared errors at all pixel positions; and are the width and height of the image respectively; is the total number of pixels in the image; Said The image is calculated and The average of the square errors of all pixel positions between The smaller the value, the more similar the two images are; the larger the value, the greater the difference between the two images.

[0043] like Figure 3 As shown, a lightweight drawing system for static scene construction includes the following units: An acquisition unit 1 is used to acquire the number of pixels projected on the screen by the pixels of the object detected in the view; A processing and judging unit 2 is used to compare the number of pixels projected on the screen with a defined pixel threshold, where the defined pixel threshold is a defined number of pixels projected on the screen, and if the number of pixels of an object in the view projected on the screen is less than the defined pixel threshold, the object in the view is set as a culling object; A deleting unit 3, used for deleting the storage information corresponding to the object to be removed in the storage unit based on the judgment of the object to be removed; The drawing unit 4 is used to draw the scene model according to the stored information of the objects retained after being removed from the view.

[0044] Specifically, it also includes the following units: An indexing unit 5, used to perform spatial indexing on the primitives of the objects in the view and index out primitive information; The calculation unit 6 is used to calculate the primitives to be removed in the current viewport according to the indexed primitive information.

[0045] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions only describe the principles of the present invention. The present invention may have various changes and improvements without departing from the spirit and scope of the present invention, and these changes and improvements fall within the scope of the present invention to be protected, and the scope of protection claimed by the present invention is defined by the attached claims and their equivalents.

Claims

1. A lightweight rendering method in static scene construction, characterized in that: include: Get the number of pixels on the screen where the pixels of the object detected in the view are projected; Compare the number of pixels projected on the screen with a defined pixel threshold, where the defined pixel threshold is the defined number of pixels projected on the screen, and if the number of pixels of an object in the view projected on the screen is less than the defined pixel threshold, set the object in the view as a culling object; Based on the judgment of the object to be eliminated, the storage information corresponding to the object to be eliminated in the storage unit is deleted; The scene model is drawn based on the stored information of objects retained after being removed from the view.

2. According to the lightweight rendering method in static scene construction according to claim 1, it is characterized in that: The invention also includes a method for indexing the primitives of the removed objects, wherein the method comprises the following steps: Spatial indexing of the primitives of objects in the view to obtain primitive information; According to the indexed primitive information, calculate the primitives to be removed in the current viewport.

3. The lightweight rendering method in static scene construction according to claim 2, characterized in that: Also includes: The pixels of the drawn model are displayed by setting PagedLOD of the model, so that the corresponding rendering data can be dynamically selected according to the pixel size occupied by the scene primitives in the viewport during rendering.

4. The lightweight rendering method in static scene construction according to claim 3 is characterized in that: Also included is an evaluation determination method, the evaluation determination method comprising the following steps: Evaluate the image after culling, find out the pixel values ​​at different positions of each image after culling and compare them with the view pixels before culling, and get the average value of the square error of all pixel positions before and after culling, that is, the pixel evaluation value ; Based on pixel evaluation When the pixel evaluation value is less than the specified threshold, Images smaller than the specified threshold are determined as images to be drawn after culling.

5. The lightweight rendering method in static scene construction according to claim 4, characterized in that: The evaluation and determination method further comprises: Acquire multiple sets of images with different viewing angles at the same viewing distance; Perform elimination processing on multiple sets of images acquired under different viewing angles to obtain multiple images formed after elimination processing ; For multiple images Evaluate the obtained images with different viewing angles to obtain pixel evaluation values ​​at different positions under different viewing angles. ; The pixel evaluation values ​​obtained under multiple different viewing angles Perform averaging to get the average value ; average value When the value is less than the specified threshold, the average value The culled images whose values ​​are smaller than the specified threshold are determined as the culled images‌ .

6. The lightweight rendering method in static scene construction according to claim 5, characterized in that: Also includes The evaluation method, The evaluation method is used to measure the distortion between the reconstructed image and the original image, which is achieved by calculating the error on the tetrahedral mesh between the reconstructed image after culling and the original image; Said The calculation formula is as follows: in, is an image In Location The pixel value of is an image In Location The pixel value of is an image and In Location The absolute value of the difference between the pixel values ​​of ; is the square of the above difference; is the sum of the squared errors at all pixel positions; and are the width and height of the image respectively; is the total number of pixels in the image; Said The image is calculated and The average of the square errors of all pixel positions between The smaller the value, the more similar the two images are; the larger the value, the greater the difference between the two images.

7. A lightweight rendering system in static scene construction, applicable to a lightweight rendering method in static scene construction as claimed in any one of claims 1 to 6, characterized in that: The following units are included: An acquisition unit (1) is used to acquire the number of pixels projected on the screen by the pixels of the object detected in the view; A processing and judging unit (2) is used to compare the number of pixels projected on the screen with a predetermined pixel threshold, where the predetermined pixel threshold is the predetermined number of pixels projected on the screen, and if the number of pixels of an object in the view projected on the screen is less than the predetermined pixel threshold, the object in the view is set as a culling object; A deleting unit (3), used for deleting the storage information corresponding to the object to be removed from the storage unit based on the determination of the object to be removed; The drawing unit (4) is used to draw the scene model according to the stored information of the objects retained after being removed from the view.

8. A lightweight rendering system for static scene construction according to claim 7, characterized in that: Also includes the following units: An indexing unit (5) is used to perform spatial indexing on the drawn graphic element and index out the graphic element information; The calculation unit (6) is used to calculate the primitives to be removed in the current viewport according to the indexed primitive information.

Citation Information

Patent Citations

  • Model data processing method, apparatus and device, and readable storage medium

    CN112419463A

  • Scene model rendering method and device thereof, electronic equipment and storage medium

    CN113178014A

  • Display method and device of three-dimensional model, electronic equipment and storage medium

    CN115908673A

  • Image reconstruction method and device, equipment and medium

    CN117218290A

  • BIM (Building Information Modeling) similarity calculation method, BIM similarity calculation system, BIM similarity calculation equipment and storage medium

    CN117315295A