An efficient method for individualized rendering of oblique photogrammetry
By dividing the building mask into subsets and utilizing floating-point rendering textures and multi-core processing, the problem of low rendering efficiency in oblique photogrammetry models is solved, achieving efficient building mask rendering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, rendering a large number of building masks in oblique photogrammetry models is inefficient and has a high GPU pixel fill rate, resulting in rendering stutters.
The building mask is divided into multiple subsets, with each subset containing non-overlapping masks. 32-bit floating-point rendering of textures and the MIN blending function are used, and the rendering process is optimized through multi-core parallel processing and dynamic resource scheduling.
It significantly improves the rendering efficiency of a large number of building masks, reduces GPU pixel fill rate, shortens processing time, and optimizes resource utilization.
Smart Images

Figure CN121033241B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of 3D modeling, and in particular to an efficient oblique photogrammetry-based single-unit rendering method. Background Technology
[0002] Oblique photogrammetry is a technology application in the field of rapid 3D modeling. It uses drones to take multi-point and multi-angle photos of the ground, and performs aerial triangulation to quickly generate a realistic 3D model. Since the oblique photogrammetry model does not contain the component attribute information of the building, it is necessary to use individual masks to wrap each building and apply the mask color to the building surface to achieve individual management of the oblique photogrammetry model.
[0003] like Figure 1 As shown, let B(n) be the mask that wraps around each obliquely photographed building. Each mask is a closed polyhedron formed by stretching a planar polygon. The outer edge of the polyhedron is clockwise, and the inner edge is counterclockwise. For example... Figure 2 As shown, when rendering each individual building mask B(i), the screen template buffer is first reset to 0. When rendering building mask B(i), a depth test is passed when the pixel depth is greater than the scene depth value. For clockwise encircling triangles, the template buffer is decremented by 1, and for counter-clockwise encircling triangles, the template buffer is incremented by 1. After rendering, the pixels with a template buffer of 1 are the pixels of the building area to be projected by building mask B(i). Building mask B(i) is then drawn again, and the specified color is projected onto the building pixel area. This process is repeated until B(n) is rendered.
[0004] Each time a building mask is rendered, the template buffer for the entire screen needs to be reset. When there are too many individual masks, it will greatly consume the GPU's pixel fill rate, causing rendering stutters; it is necessary to improve the efficiency of rendering a large number of building masks. Summary of the Invention
[0005] To improve the efficiency of rendering a large number of building masks, this application provides an efficient oblique photogrammetry-based individual rendering method.
[0006] Firstly, this application provides an efficient method for individual rendering of oblique photogrammetry, employing the following technical solution:
[0007] An efficient method for individual rendering via oblique photogrammetry includes the following steps:
[0008] Obtain the data to be rendered, extract the building features from the data to be rendered, and divide the building features into building masks B(n).
[0009] Divide the building mask B(n) into multiple subsets Set(m) according to the spatial disjointness rule;
[0010] Obtain the screen size of the display screen, and clear the floating-point rendering texture with the same screen size;
[0011] Enable depth testing. The depth test passes when the depth value of the drawn triangle is greater than the depth value of the model scene. At the same time, disable writing to the depth buffer, which holds the depth information of the model scene.
[0012] Draw all subsets Set(m) sequentially. For each building mask subset Set(i), draw the triangular faces of subset Set(i) onto the floating-point rendering texture. The triangular faces include clockwise and counterclockwise triangular faces. Encode the pixel depth of the triangular faces into a pixel depth floating-point number and output the pixel depth floating-point number to the floating-point rendering texture.
[0013] The floating-point rendering texture stores the mask triangle closest to the camera that is occluded by the model scene.
[0014] Draw the subset Set(i) again, draw counterclockwise triangles, compare the pixel depth floating-point number encoded by the counterclockwise triangles with the value in the floating-point rendering texture, and if the comparison result is equal, then mix the mask color corresponding to the building mask onto the screen.
[0015] When drawing the subset Set(i+1), the exponent of the encoded pixel depth floating-point number is incremented by 1, and the pixel depth floating-point number in the subset Set(i+1) is less than the old pixel value already present in the floating-point number rendering texture.
[0016] By adopting the above technical solution, all building masks are assumed to be closed polyhedra after vertical stretching of planar polygons. The building masks are divided into multiple subsets, and the masks in each subset do not intersect. Taking the subset as a unit, one subset is processed in each batch. First, the subset is drawn once, and the depth information of the subset is updated in the floating-point rendering texture using floating-point rendering texture. Only the counterclockwise triangles are drawn again for the subset. The depth in the floating-point rendering texture is read in the pixel to determine whether the current pixel is the projection area of the specified building. If so, the color is projected onto the pixel. This consumes very little GPU pixel fill rate and improves the efficiency of rendering a large number of building masks.
[0017] Optionally, the method further includes the following steps:
[0018] Both the floating-point rendering texture and the pixel depth floating-point number are 32-bit floating-point numbers; wherein, the first bit is set to a constant 1, the second to the ninth bits are exponent bits, the content of the exponent bits is i in the subset Set(i), and the tenth to the 32nd bits are the pixel depth floating-point numbers of the triangle face.
[0019] By adopting the above technical solution, the storage structure of floating-point numbers has been optimized.
[0020] Optionally, the method further includes the following steps:
[0021] When m in the subset Set(m) exceeds 127, the floating-point rendering texture is cleared to 0.
[0022] By adopting the above technical solution, the floating-point texture on the screen only needs a few zeroing operations during the entire process. Even if there are tens of thousands of building masks, they can be efficiently projected onto the corresponding building pixels.
[0023] Optionally, the method further includes the following steps:
[0024] The depth information of the subset is updated in the floating-point rendered texture using a 32-bit floating-point rendering texture and an ALPHA blending function set to MIN.
[0025] By adopting the above technical solution, when drawing shadows or dark spots, MIN blending can ensure that the superimposed area is not brighter than the original area.
[0026] Optionally, the method further includes the following steps:
[0027] Obtain the remaining computing resources of multiple computing cores;
[0028] If the amount of computing resources is greater than the preset first reference resource amount, then the building mask B(n) is divided into multiple different first processing tasks;
[0029] The first processing task is distributed to multiple computing cores for simultaneous processing.
[0030] By adopting the above technical solutions, the remaining resources of the computing cores can be obtained and tasks can be split accordingly, which can make full use of idle computing resources and avoid resource waste; multi-core parallel processing can significantly shorten the processing time of building masks and improve the overall processing efficiency.
[0031] Optionally, the method further includes the following steps:
[0032] The ratio of the computing resources to the first reference resources is calculated as the first computing power ratio. The number of computing cores called is adjusted according to the first computing power ratio. The larger the first computing power ratio, the more computing cores are called, and the smaller the first computing power ratio, the fewer computing cores are called.
[0033] By adopting the above technical solution, the number of computing cores can be adjusted by dynamically calculating the first computing power ratio, thus achieving precise matching between resource allocation and processing needs. When the computing power ratio is high, core calls are increased, which can fully utilize the system's potential and accelerate the processing of complex tasks. When the computing power ratio is low, core calls are reduced, thereby reducing energy consumption and system load.
[0034] Optionally, the method further includes the following steps:
[0035] Obtain the remaining computing resources of multiple computing cores;
[0036] If the amount of computing resources is less than the preset second reference resource amount, then the subset Set(m) is divided into different second processing tasks;
[0037] Multiple second processing tasks are distributed to multiple computing cores for simultaneous processing.
[0038] By adopting the above technical solution, when the remaining resources of the computing core are limited, the subset is split into a second processing task and allocated to multi-core parallel processing, making full use of existing resources to improve processing efficiency and ensuring the smooth processing of the subset.
[0039] Optionally, the method further includes the following steps:
[0040] The ratio of the computing resources to the second reference resources is calculated as the second computing power ratio. The number of the second processing tasks allocated to the computing core is adjusted inversely according to the computing power ratio. The larger the computing power ratio, the fewer the number of the second processing tasks. The smaller the computing power ratio, the more the number of the second processing tasks.
[0041] By adopting the above technical solutions, dynamic optimization of processing tasks can be achieved when resources are limited; when the computing power ratio is high, reducing the number of tasks can reduce the load on a single core and improve the success rate of complex task processing; when the ratio is low, increasing the number of tasks can make full use of fragmented resources and avoid resource idleness.
[0042] In summary, this application includes at least one of the following beneficial technical effects: All building masks B(n) are assumed to be closed polyhedra after vertical stretching of planar polygons. The building masks B(n) are divided into subsets Set(m), where the masks within subset Set(i) of each subset Set(m) are mutually exclusive. Taking subset Set(i) as a unit, one subset Set(i) is processed in each batch. First, subset Set(i) is drawn once, and the depth information of the subset is updated in the floating-point rendering texture using a 32-bit floating-point rendering texture and an ALPHA blending function set to MIN. Only the counter-clockwise triangular faces of the subset are drawn again. The depth in the floating-point rendering texture is read in the pixel SHADER to determine whether the current pixel is the projection area of the specified building. If so, the color is projected onto that pixel. This results in minimal GPU pixel fill rate consumption and improves efficiency when rendering a large number of building masks. The entire process requires only a few zeroing operations on the floating-point rendering texture on the display screen. Even with tens of thousands of building masks, they can be efficiently projected onto the corresponding building pixels with minimal consumption of GPU pixel fill rate, greatly improving the efficiency of rendering a large number of building masks. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the mask B(n) that wraps around each obliquely photographed individual building in the prior art.
[0044] Figure 2 This is a schematic diagram of rendering the mask B(i) of each individual building in the existing technology.
[0045] Figure 3 This is a schematic diagram of multiple subsets Set(m).
[0046] Figure 4 This is a schematic diagram of the data structure for rendering textures using floating-point numbers.
[0047] Figure 5 This is a schematic diagram of the mask triangle closest to the camera that is obscured by the scene.
[0048] Figure 6 This is a schematic diagram of drawing the subset Set(i).
[0049] Figure 7 This is a schematic diagram of the overall rendering effect. Detailed Implementation
[0050] The embodiments of this application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.
[0051] In the description of this specification, the references to "certain embodiments," "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples" refer to specific features, structures, materials, or characteristics described in connection with the described embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0052] This application discloses an efficient method for individual rendering of oblique photogrammetry, referring to... Figure 1 It includes the following steps:
[0053] Obtain the data to be rendered, extract the building features from the data, and divide the building features into building masks B(n); for example Figure 3 As shown, the building mask B(n) is divided into multiple subsets Set(m) according to the spatial non-intersection rule.
[0054] Obtain the screen size for display. Clear the 32-bit floating-point rendering textures that match the screen size, setting them to 0. Enable depth testing; the depth test passes when the depth value of the drawn triangle is greater than the depth value of the model scene. Simultaneously disable writing to the depth buffer, which retains the depth information of the model scene.
[0055] Draw all subsets Set(m) sequentially. For each building mask subset Set(i), draw the triangles of subset Set(i) to a floating-point rendering texture. The triangles include clockwise and counter-clockwise triangles. Encode the pixel depth of the triangles as a 32-bit floating-point pixel depth value, and set the ALPHA blending function to MIN. When drawing shadows or dark spots, MIN blending ensures that the overlaid area is not brighter than the original area. Output the pixel depth floating-point value to the floating-point rendering texture.
[0056] Obtain the remaining computing resources of multiple computing cores.
[0057] If the computational resources exceed the preset first reference resource amount, the building mask B(n) is divided into multiple different first processing tasks. These first processing tasks are then distributed among multiple computing cores for simultaneous processing. The ratio of computational resources to the first reference resource amount is called the first computing power ratio. The number of computing cores called is adjusted based on this first computing power ratio; a larger ratio results in more computing cores, and a smaller ratio results in fewer computing cores.
[0058] When handling complex computational tasks such as large-scale building masking, real-time acquisition of the remaining resources of each computing core and corresponding task splitting is an effective measure to improve system performance. In current computing scenarios, multi-core architectures often suffer from idle core resources. By accurately capturing the status of remaining resources and selectively splitting tasks, scattered idle computing power can be effectively activated, ensuring that every computing resource participates in task processing and preventing resource waste at its source. Simultaneously, the multi-core parallel processing mode breaks through the efficiency bottleneck of single-core computation. By decomposing the building masking processing task and distributing it across multiple cores for simultaneous execution, tasks that previously required long single-core computations can be completed in a shorter time, significantly shortening the overall processing cycle and greatly improving the system's overall processing efficiency.
[0059] By dynamically calculating the first computing power ratio and adjusting the number of computing cores invoked accordingly, a precise match between resource allocation and actual processing needs is achieved. When the first computing power ratio is high, it means that the system has a lot of redundant resources available for use. In this case, increasing the number of computing cores invoked can fully unleash the system's computing potential, allowing more cores to collaboratively participate in the processing of complex tasks and accelerating task completion. Conversely, when the first computing power ratio is low, reducing the number of cores invoked can avoid ineffective resource consumption, reduce unnecessary energy expenditure, and alleviate the system's operating load, preventing performance fluctuations caused by excessive core invocation. This dynamic adjustment mechanism enables the system to achieve an optimal balance between resource utilization and task processing, comprehensively optimizing computing performance and resource allocation efficiency.
[0060] If the computational resources are less than the preset second reference resources, and the second reference resources are less than the first reference resources, then the subset Set(m) is divided into different second processing tasks. Multiple second processing tasks are then distributed to multiple computing cores for simultaneous processing. The ratio of computational resources to the second reference resources is the second computing power ratio. The number of second processing tasks allocated to the computing cores is adjusted inversely based on this computing power ratio: a larger computing power ratio results in fewer second processing tasks, and a smaller ratio results in more second processing tasks.
[0061] In scenarios where computing cores have limited remaining resources, systems often face the dual challenges of insufficient computing power and task backlog. In such cases, splitting the subset into secondary processing tasks and allocating them to multiple cores for parallel processing can precisely utilize fragmented remaining resources. Even with limited single-core resources, multi-core collaboration can still create synergistic computing power, avoiding idle waste caused by resource fragmentation, ensuring that every available resource participates in task processing, and guaranteeing the continuity and smoothness of subset processing from the basic task plan perspective, preventing processing interruptions or delays caused by insufficient resources.
[0062] This dynamic task optimization mechanism based on resource status further enhances the system's adaptability in low-resource environments. When the computing power ratio is high, it means that the core's remaining resources are relatively abundant but still limited. In this case, reducing the number of second processing tasks can increase the number of first processing tasks, allowing each core to concentrate its computing power on more critical sub-tasks, significantly improving the success rate of complex tasks and avoiding computational errors caused by overload. Conversely, when the computing power ratio is low, core resources are more strained. By increasing the number of tasks, fragmented resources can be precisely matched with small tasks, making full use of previously idle resources. This avoids resource waste and improves overall processing throughput through task refinement.
[0063] This flexible task scheduling strategy enables the system to maintain an efficient task processing rhythm and achieve a dynamic balance between resources and tasks in complex scenarios with limited resources, greatly enhancing the system's stability and adaptability in low-computing-power environments.
[0064] like Figure 4 As shown, both the floating-point rendering texture and the pixel depth floating-point number are 32-bit floating-point numbers; where the first bit is set to a constant 1, the second to ninth bits are the exponent bits, the content of the exponent bits is i in the subset Set(i), and the tenth to 32nd bits are the pixel depth floating-point numbers of the triangle face. The storage structure of the floating-point number has been optimized.
[0065] like Figure 5 As shown, the floating-point rendering texture stores the mask triangle closest to the camera that is occluded by the model scene.
[0066] like Figure 6 As shown, the subset Set(i) is drawn again, and a counterclockwise triangle is drawn. The pixel depth floating-point number encoded by the counterclockwise triangle is compared with the value in the floating-point rendering texture. If the comparison result is equal, the mask color corresponding to the building mask is mixed onto the screen.
[0067] When drawing the subset Set(i+1), the exponent of the encoded pixel depth floating-point number is incremented by 1, and the pixel depth floating-point number in the subset Set(i+1) is less than the existing old pixel value in the floating-point rendering texture. In this case, the 32-bit floating-point rendering texture does not need to be cleared and can continue to be used, reducing GPU pixel fill rate consumption. Only when m of the subset Set(m) exceeds 127, due to the limitation of the number of bits in the floating-point exponent, is a clearing operation required for the 32-bit floating-point rendering texture. Figure 7 As shown, the entire process requires only a few zeroing operations on the floating-point texture on the screen, and even tens of thousands of building masks can be efficiently projected onto the corresponding building pixels.
[0068] All building masks are assumed to be closed polyhedra resulting from vertically stretched planar polygons. The building masks are divided into multiple subsets, with masks within each subset not intersecting. One subset is processed in each batch, with the subset first drawn once and its depth information updated in the floating-point rendering texture using floating-point rendering texture. Only the counter-clockwise triangles of the subset are drawn again. The depth in the floating-point rendering texture is read from the pixel, and it is determined whether the current pixel is the projection area of the specified building. If so, the color is projected onto the pixel. This method consumes very little GPU pixel fill rate and improves the efficiency of rendering a large number of building masks.
[0069] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A highly efficient method for individual rendering via oblique photogrammetry, characterized in that, Includes the following steps: Obtain the data to be rendered, extract the building features from the data to be rendered, and divide the building features into building masks B(n). Divide the building mask B(n) into multiple subsets Set(m) according to the spatial disjointness rule; Obtain the screen size of the display screen, and clear the floating-point rendering texture with the same screen size; Enable depth testing. The depth test passes when the depth value of the drawn triangle is greater than the depth value of the model scene. At the same time, disable writing to the depth buffer, which holds the depth information of the model scene. Draw all subsets Set(m) sequentially. For each building mask subset Set(i), draw the triangular faces of subset Set(i) onto the floating-point rendering texture. The triangular faces include clockwise and counterclockwise triangular faces. Encode the pixel depth of the triangular faces into a pixel depth floating-point number and output the pixel depth floating-point number to the floating-point rendering texture. The floating-point rendering texture stores the mask triangle closest to the camera that is occluded by the model scene. Draw the subset Set(i) again, draw counterclockwise triangles, compare the pixel depth floating-point number encoded by the counterclockwise triangles with the value in the floating-point rendering texture, and if the comparison result is equal, then mix the mask color corresponding to the building mask onto the screen. When drawing the subset Set(i+1), the exponent of the encoded pixel depth floating-point number is incremented by 1, and the pixel depth floating-point number in the subset Set(i+1) is less than the old pixel value already present in the floating-point number rendering texture.
2. The efficient oblique photogrammetry-based single-unit rendering method according to claim 1, characterized in that, The method also includes the following steps: Both the floating-point rendering texture and the pixel depth floating-point number are 32-bit floating-point numbers; wherein, the first bit is set to a constant 1, the second to the ninth bits are exponent bits, the content of the exponent bits is i in the subset Set(i), and the tenth to the 32nd bits are the pixel depth floating-point numbers of the triangle face.
3. The efficient oblique photogrammetry-based single-unit rendering method according to claim 2, characterized in that, The method also includes the following steps: When m in the subset Set(m) exceeds 127, the floating-point rendering texture is cleared to 0.
4. The efficient oblique photogrammetry-based single-unit rendering method according to claim 3, characterized in that, The method also includes the following steps: The depth information of the subset is updated in the floating-point rendered texture using a 32-bit floating-point rendering texture and an ALPHA blending function set to MIN.
5. The efficient oblique photogrammetry-based single-unit rendering method according to claim 4, characterized in that, The method also includes the following steps: Obtain the remaining computing resources of multiple computing cores; If the amount of computing resources is greater than the preset first reference resource amount, then the building mask B(n) is divided into multiple different first processing tasks; The first processing task is distributed to multiple computing cores for simultaneous processing.
6. The efficient oblique photogrammetry-based single-unit rendering method according to claim 5, characterized in that, The method also includes the following steps: The ratio of the computing resources to the first reference resources is calculated as the first computing power ratio. The number of computing cores called is adjusted according to the first computing power ratio. The larger the first computing power ratio, the more computing cores are called, and the smaller the first computing power ratio, the fewer computing cores are called.
7. The efficient oblique photogrammetry-based single-unit rendering method according to claim 4, characterized in that, The method also includes the following steps: Obtain the remaining computing resources of multiple computing cores; If the amount of computing resources is less than the preset second reference resource amount, then the subset Set(m) is divided into different second processing tasks; Multiple second processing tasks are distributed to multiple computing cores for simultaneous processing.
8. The efficient oblique photogrammetry-based single-unit rendering method according to claim 7, characterized in that, The method also includes the following steps: The ratio of the computing resources to the second reference resources is calculated as the second computing power ratio. The number of the second processing tasks allocated to the computing core is adjusted inversely according to the computing power ratio. The larger the computing power ratio, the fewer the number of the second processing tasks. The smaller the computing power ratio, the more the number of the second processing tasks.
Citation Information
Patent Citations
WebGPU-based rendering method, electronic equipment and storage medium
CN114494550A
Batch monomer method and device for oblique photography model of unmanned aerial vehicle
CN115527000A