A WebGL-based cloud collaborative three-dimensional building modeling and rendering method and system
By dividing building components into independent components according to functional attributes, generating multi-level detailed models and using distributed GPU clusters for parallel ray tracing calculations, the problem of low rendering efficiency of single GPU is solved, and efficient rendering of complex building scenes and real-time response of multi-user collaborative editing is achieved.
Patent Information
- Application Number
- CN202510525324.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-25
AI Technical Summary
The existing single GPU rendering architecture based on WebGL cannot efficiently handle parallel ray tracing calculations of large-scale architectural models, resulting in a sharp drop in frame rates in complex lighting scenarios, and global re-rendering is required for multi-user editing, resulting in a surge in network load and response delay.
By dividing building components into independent components according to functional attributes, a multi-level detailed geometric model is generated, and the physical properties of the material are calculated in combination with the ray tracing algorithm. Parallel ray tracing calculation is used to perform parallel ray tracing calculations, dynamically update the rendering blocks, and local rendering optimization is achieved through differential data flow.
It achieves a balance between efficient rendering efficiency and visual effects in complex architectural scenes, supports real-time response and low-latency updates for collaborative editing by multiple users, and optimizes the utilization of rendering resources.
Smart Images

Figure CN120047595B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of modeling and rendering technologies, and particularly to a cloud collaborative three-dimensional building modeling and rendering method and system based on WebGL. Background Art
[0002] In the scenarios of building information models and smart city management, complex building models need to display real-time lighting effects on various terminals (PCs, mobile devices), including the interaction between natural light and artificial light sources; need to dynamically adjust the model detail level according to the terminal performance and user viewing distance to balance the rendering quality and loading speed; need to support multiple users to modify model components simultaneously and synchronize the rendering results in real time to avoid data conflicts and delays.
[0003] The current mainstream solutions adopt a single GPU rendering architecture based on the WebGL framework (such as Three.js, Babylon.js), and its process includes: loading building model data through JavaScript, and directly calling the GPU through the WebGL interface for rasterization and shader calculation; using ray tracing algorithms to simulate lighting effects, but limited by the computing power of a single node, only supporting static models or low-complexity dynamic scenes.
[0004] However, a single GPU node cannot efficiently handle the parallel ray tracing calculations of large-scale building models, resulting in a sharp drop in the frame rate in complex lighting scenarios; lacking a distributed rendering mechanism, global re-rendering is required during multi-user editing, causing a sharp increase in network load and response delay. Summary of the Invention
[0005] This application provides a cloud collaborative three-dimensional building modeling and rendering method and system based on WebGL to solve the problem of poor building modeling and rendering effects in the prior art.
[0006] In a first aspect, this application provides a cloud collaborative three-dimensional building modeling and rendering method based on WebGL, including:
[0007] Obtain the design parameters of the target building from the cloud database, parse the design parameters into geometric topology data of multiple independent components based on the functional attribute division rules of building components, and dynamically generate multi-level detail geometric models of each independent component according to the terminal display resolution and viewing distance;
[0008] Attach material physical attributes to the surface vertex data of the multi-level detail geometric models, calculate the diffuse reflection coefficient and specular reflection intensity of the material physical attributes and the building scene lighting conditions through ray tracing algorithms, and generate lightweight component data carrying physical rendering parameters;
[0009] In response to the perspective switching instruction of the end user, according to the spatial block corresponding to the current perspective, a main GPU node is allocated from the distributed GPU cluster. The main GPU node divides the lightweight component data by spatial block, and allocates adjacent blocks of the spatial block to edge GPU nodes. The edge GPU nodes perform parallel ray tracing calculations on the allocated blocks based on the WebGL protocol, return the calculation results to the main GPU node, synthesize the terminal display image and display it.
[0010] Optionally, it further includes:
[0011] When the collaborative editing operation of multiple users triggers the change of the geometric shape or material properties of at least one independent component, extract the three-dimensional spatial bounding box range of the changed component;
[0012] Based on the vertex coordinate update value and material property change value within the three-dimensional spatial bounding box range, recalculate the diffuse reflection coefficient and specular reflection intensity of the changed component under the lighting direction of the building scene, and generate updated lightweight component data carrying physical rendering parameters;
[0013] According to the corresponding spatial block of the three-dimensional spatial bounding box range, distribute the updated lightweight component data to the distributed GPU cluster, trigger the edge GPU node bound to the corresponding spatial block to perform parallel ray tracing secondary calculations, return the secondary calculation results to the main GPU node for local frame synthesis, and generate updated rendering blocks;
[0014] Perform pixel-level difference comparison between the updated rendering block and the original display data in the unchanged area, extract the difference pixel coordinates and color values, and overwrite the original display data through the difference data stream.
[0015] Optionally, attaching material physical properties to the surface vertex data of the multi-level detail geometric model, and calculating the diffuse reflection coefficient and specular reflection intensity of the material physical properties and the lighting conditions of the building scene through the ray tracing algorithm to generate lightweight component data carrying physical rendering parameters includes:
[0016] Match the material type corresponding to the multi-level detail geometric model in the building material database, extract the surface roughness, refractive index and metallicity parameters of the material type, and map them to the surface vertex data of the multi-level detail geometric model;
[0017] Based on the preset natural light direction and artificial light source position in the building scene, construct a light propagation path associated with the surface vertex data of the multi-level detail geometric model, and calculate the first reflection direction and energy attenuation value of each light path at the surface vertex coordinates of the multi-level detail geometric model according to the surface roughness and the refractive index;
[0018] Dynamically adjusting the light sampling density of the surface vertex coordinates, wherein the number of secondary light sampling is increased for vertices in high curvature areas and the number of secondary light sampling is reduced for vertices in flat areas, to generate diffuse reflection coefficients and specular reflection intensity of the surface vertex coordinates;
[0019] The diffuse reflection coefficient, the specular reflection intensity and the energy attenuation value are encapsulated as physical rendering parameters bound to the surface vertex coordinates, redundant vertex data not affected by illumination in the multi-level detail geometric model is eliminated, and lightweight component data carrying physical rendering parameters is generated.
[0020] Optionally, the step of constructing a light propagation path associated with the surface vertex data of the multi-level detail geometric model based on the preset natural light direction and artificial light source position in the architectural scene, and calculating the first reflection direction and energy attenuation value of each light path at the surface vertex coordinates according to the surface roughness and the refractive index includes:
[0021] Reading the preset natural light direction angle and the three-dimensional space coordinates of the artificial light source from the building scene configuration file, and obtaining the radiation intensity and spectral distribution data of the artificial light source;
[0022] Taking the surface vertex coordinates as the starting point, extending the light propagation path in the reverse direction along the natural light direction angle and the three-dimensional space coordinates, and establishing a direct illumination association relationship between the surface vertex coordinates and the artificial light source;
[0023] Determine a microsurface normal perturbation range at the surface vertex coordinates according to the surface roughness, calculate a first reflection direction of an incident light ray at the surface vertex coordinates in combination with the refractive index, and randomly shift the first reflection direction based on the microsurface normal perturbation range;
[0024] The energy attenuation value in the first reflection direction is calculated according to the radiation intensity of the artificial light source and the path length of the light propagation path.
[0025] Optionally, the triggering of the edge GPU node bound to the corresponding spatial block to perform a secondary calculation of parallel ray tracing, returning the secondary calculation result to the main GPU node for local frame synthesis, and generating an updated rendering block includes:
[0026] According to the boundary coordinates of the corresponding spatial block, the updated lightweight component data is divided into a plurality of rendering subtasks, and the rendering subtasks are distributed to edge GPU nodes bound to the corresponding spatial block;
[0027] In the edge GPU node, a local ray propagation path is constructed based on the geometric data and lighting parameters of the corresponding spatial block, and the ray energy distribution of the local ray propagation path is calculated;
[0028] The ray energy distribution is returned to the main GPU node, and local frame synthesis is performed on the ray energy distribution data according to the boundary coordinates to generate local frame buffer data;
[0029] Edge smoothing processing is performed on the local frame buffer data and the frame buffer data of adjacent spatial blocks to generate an updated rendering block.
[0030] Optionally, encapsulating the diffuse reflection coefficient, the specular reflection intensity, and the energy attenuation value into physical rendering parameters bound to the surface vertex coordinates, and removing redundant vertex data in the multi-level detail geometric model that is not affected by light, to generate lightweight component data carrying physical rendering parameters, includes:
[0031] According to the numerical ranges of the diffuse reflection coefficient, the specular reflection intensity, and the energy attenuation value, generating a physical rendering parameter data block corresponding to the surface vertex coordinates;
[0032] Based on the lighting visibility detection result of the surface vertex coordinates, screening out the coordinate data that is not affected by light, and marking the coordinate data that is not affected by light as redundant vertex data;
[0033] Binding the physical rendering parameter data block to the surface vertex coordinates to generate a set of vertex data carrying physical rendering parameters;
[0034] Removing the redundant vertex data from the multi-level detail geometric model, and optimizing the set of vertex data according to the removal result to generate the lightweight component data carrying physical rendering parameters.
[0035] Optionally, based on the functional attribute division rule of building components, parsing the design parameters into geometric topology data of multiple independent components, and dynamically generating a multi-level detail geometric model for each independent component according to the terminal display resolution and the viewing point distance, includes:
[0036] According to the functional attribute division rule of building components, extracting independent component data corresponding to walls, beams, columns, doors, and windows from the design parameters to generate initial geometric topology data;
[0037] Based on the terminal display resolution and the current viewing point distance, calculating the display detail level of the independent component data, and generating geometric simplification parameters matching the display detail level;
[0038] According to the geometric simplification parameters, perform vertex merging and patch simplification on the initial geometric topology data to generate optimized geometric topology data;
[0039] Associate and store the optimized geometric topology data with the functional attribute partitioning rules to dynamically generate multi-level detailed geometric models for each independent component.
[0040] In a second aspect, the present application provides a WebGL-based cloud collaborative three-dimensional building modeling and rendering system, including:
[0041] An analysis module, configured to obtain design parameters of a target building from a cloud database, parse the design parameters into geometric topology data of multiple independent components based on the functional attribute partitioning rules of building components, and dynamically generate multi-level detailed geometric models for each independent component according to the terminal display resolution and viewing distance;
[0042] A calculation module, configured to attach material physical attributes to the surface vertex data of the multi-level detailed geometric model, calculate the diffuse reflection coefficient and specular reflection intensity of the material physical attributes and the building scene lighting conditions through a ray tracing algorithm, and generate lightweight component data carrying physical rendering parameters;
[0043] A synthesis module, configured to respond to a perspective switching instruction of a terminal user, allocate a main GPU node from a distributed GPU cluster according to the spatial block corresponding to the current perspective, split the lightweight component data by the main GPU node according to the spatial block, and allocate adjacent blocks of the spatial block to edge GPU nodes. The edge GPU nodes perform parallel ray tracing calculations on the allocated blocks based on the WebGL protocol, return the calculation results to the main GPU node, synthesize a terminal display image and display it.
[0044] In a third aspect, the present application provides a computing device, including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement a WebGL-based cloud collaborative three-dimensional building modeling and rendering method as described in the first aspect above.
[0045] In a fourth aspect, the present application provides a computer storage medium storing a computer program, and when the computer program is executed by a computer, it implements a WebGL-based cloud collaborative three-dimensional building modeling and rendering method as described in the first aspect.
[0046] In an embodiment of the present application, design parameters of a target building are obtained from a cloud database, and based on a functional attribute division rule of building components, the design parameters are parsed into geometric topological data of multiple independent components, and a multi-level detailed geometric model of each independent component is dynamically generated according to a terminal display resolution and a viewpoint distance; material physical properties are added to surface vertex data of the multi-level detailed geometric model, and the diffuse reflection coefficient and the mirror reflection intensity of the material physical properties and the lighting conditions of the building scene are calculated by a ray tracing algorithm to generate lightweight component data carrying physical rendering parameters; in response to a perspective switching instruction of a terminal user, a main GPU node is allocated from a distributed GPU cluster according to a spatial block corresponding to a current perspective, and the main GPU node divides the lightweight component data into spatial blocks, and allocates adjacent blocks of the spatial blocks to edge GPU nodes, and the edge GPU nodes perform parallel ray tracing calculations on the allocated blocks based on the WebGL protocol, and return the calculation results to the main GPU node, synthesize the terminal display image, and display it.
[0047] The technical solution of this application has the following beneficial effects:
[0048] The design parameters are parsed through the functional attribute rules of building components, and the complex building model is disassembled into the geometric topological data of independent components. The multi-level detail model is dynamically generated in combination with the terminal display characteristics, and it adapts to different viewing distances and resolution requirements to optimize the geometric data load. The physical properties of the material are bound to the model vertex data, and the diffuse and specular reflection characteristics of the material and lighting are accurately calculated through the ray tracing algorithm to generate lightweight component data to ensure a balance between physical rendering accuracy and data transmission efficiency. The space blocks are dynamically divided according to the user's perspective, and the main GPU node schedules the distributed cluster resources. The edge nodes process the ray tracing calculations of adjacent blocks in parallel based on the WebGL protocol, which improves rendering efficiency and reduces the load on the main node. The main node integrates the distributed computing results to quickly generate high-fidelity images, supports real-time screen updates when the user switches perspectives, and ensures smooth interaction.
[0049] Furthermore, by matching the material database to extract parameters such as surface roughness and refractive index, the vertex-related light propagation path is constructed, and the light sampling density in the high curvature area is dynamically adjusted to improve detail accuracy. After calculating the first reflection direction and energy attenuation value, the physical rendering parameters bound to the vertex are encapsulated, and redundant vertices not affected by lighting are removed, and finally lightweight and high-precision component data is generated. Through dynamic light sampling optimization and redundant vertex culling mechanism, the calculation and transmission load are greatly reduced while retaining the realism of the material, achieving the coordination of high-precision physical rendering and real-time interaction, and significantly improving the rendering efficiency and visual effects of complex architectural scenes.
[0050] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. Brief Description of the Drawings
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0052] Figure 1 Shows a flowchart of a WebGL-based cloud collaborative 3D building modeling and rendering method provided by the present application;
[0053] Figure 2 Shows a schematic structural diagram of a WebGL-based cloud collaborative 3D building modeling and rendering system provided by the present application;
[0054] Figure 3 Shows a schematic structural diagram of a computing device provided by the present application. Detailed Description of the Embodiments
[0055] In order to enable those skilled in the art to better understand the solutions of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application.
[0056] In some processes described in the specification, claims and the above drawings of the present application, there are multiple operations that appear in a specific order. However, it should be clearly understood that these operations may not be executed in the order in which they appear herein or may be executed in parallel. The operation numbers such as 101, 102, etc. are only used to distinguish different operations, and the numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions such as "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, nor do they limit that "first" and "second" are of different types.
[0057] The R & D idea of this application is as follows: First, decouple building components through functional attribute rules, parse the cloud design parameters into geometric topology units that can be independently processed, and dynamically generate multi-level detail models in combination with the terminal display characteristics to adapt to different viewing distance accuracy requirements; Subsequently, fuse the physical properties of materials at the vertex level, accurately calculate the lighting interaction effect based on the ray tracing algorithm, and generate lightweight rendering data that retains physical authenticity; For real-time interaction requirements, design a dynamic segmentation strategy for spatial blocks, intelligently schedule distributed computing power by the main GPU node, and implement parallel ray tracing calculations for adjacent blocks through the WebGL protocol. Finally, efficiently synthesize high-fidelity images through the main node, forming a full-link optimization closed loop from data parsing, dynamic modeling, physical calculation to distributed rendering.
[0058] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0059] Figure 1 The following is a flowchart of a WebGL-based cloud collaborative three-dimensional building modeling and rendering method provided by an embodiment of the present application, as Figure 1 shown, the method includes:
[0060] 101. Obtain the design parameters of the target building from the cloud database, and based on the functional attribute division rules of the building components, parse the design parameters into geometric topology data of multiple independent components, and dynamically generate multi-level detail geometric models for each independent component according to the terminal display resolution and viewing distance;
[0061] In this step, the functional attribute division rule refers to the classification logic established based on the actual functions of building components in the engineering structure (such as load-bearing, enclosure, decoration), which is used to disassemble the global design parameters into geometric data units of independent components. For example, separate the "structural column" and "curtain wall glass" in the BIM model into independent data entities. The multi-level detail geometric model is a progressive geometric model dynamically generated according to the terminal hardware performance and the user's viewing distance, including multi-level data from high-precision (close view) to low-precision (distant view), and realizes the dynamic balance of storage and calculation load through vertex cluster merging and patch simplification.
[0062] In the embodiments of the present application, after extracting IFC format design parameters from the cloud BIM database, the component types are first identified based on semantic tags (such as IfcWall, IfcSlab), and an independent topological structure is constructed according to the preset component function weights (load-bearing components are given priority to retain details). For each independent component, a dynamic LOD generation strategy based on frustum projection is adopted: by calculating the product of the terminal screen pixel density (PPI) and the viewing distance, the geometric simplification intensity coefficient is derived, and the edge collapse algorithm is driven to iteratively merge triangular patches, and finally a multi-level detail geometric model of each independent component is generated.
[0063] Suppose a BIM model of a super high-rise building contains 280 million vertices. According to the function attribute division rules, it is split into independent components such as the core tube (structure), glass curtain wall (enclosure), ventilation duct (equipment), etc. When the user views it on a tablet computer (viewing distance 50 cm, resolution 2560×1600), the LOD level of the core tube is 5 (retaining 90% of the vertices), and the LOD level of the curtain wall is 3 (retaining 40% of the vertices); after switching to a workstation (viewing distance 30 cm, 8K resolution), the core tube is automatically upgraded to the LOD level 8 (98% of the vertices), and the curtain wall is upgraded to the LOD level 6 (85% of the vertices), and a multi-level detail geometric model of each independent component is generated.
[0064] 102. Attach material physical properties to the surface vertex data of the multi-level detail geometric model, and calculate the diffuse reflection coefficient and specular reflection intensity of the material physical properties and the building scene lighting conditions through a ray tracing algorithm to generate lightweight component data carrying physical rendering parameters;
[0065] In this step, the material physical properties are a parameter set describing the optical response characteristics of building materials, including anisotropic roughness, subsurface scattering coefficient, Fresnel reflectivity, etc., and are used to simulate the interaction behavior of light and matter in the real world. The lightweight component data is a structured data packet after physical rendering calculation and redundancy elimination, including a compact encoding format of geometric vertices, material parameters, and pre-computed lighting results, and supports direct access and streaming transmission by the GPU.
[0066] In the application example, the building material knowledge graph is called to match the component type with the predefined PBR material template (such as the anisotropic highlights of marble and the refraction and transmission of glass). The hybrid algorithm of Photon Mapping and Bidirectional Path Tracing is used to calculate the lighting parameters in two stages: in the first stage, energy particles are propagated in the scene through a photon emitter, and the radiant flux of the photon collision points on the component surface is recorded; in the second stage, a spherical probe is constructed centered on the vertex, the photon density distribution within the probe range is collected, and the diffuse reflection coefficient is calculated in combination with the micro-surface heightfield model. The specular reflection intensity is estimated by the Ray Differentials method to calculate the influence of the surface curvature change on the highlight range. Finally, the vertices with photon density lower than the threshold are marked as "light inaccessible" and removed, and lightweight component data carrying physical rendering parameters is generated.
[0067] For example, continuing the above example, the super high-rise curtain wall components use low-iron glass material (refractive index 1.52, surface roughness 0.05). 10^6 photons are projected into the scene in the photon mapping stage, and significant differences in the photon density of the curtain wall vertices are detected: the average number of photons captured by the vertices on the sunny side is 120 photons / ㎡, while on the shady side it is only 3 photons / ㎡. After verification by bidirectional path tracing, 85% of the vertices on the shady side are removed, and the lightweight data volume is compressed from the original 1.2GB to 210MB, and lightweight component data carrying physical rendering parameters is output.
[0068] 103. In response to the perspective switching instruction of the end user, according to the spatial block corresponding to the current perspective, a main GPU node is allocated from the distributed GPU cluster. The main GPU node divides the lightweight component data according to the spatial block, and allocates the adjacent blocks of the spatial block to the edge GPU nodes. The edge GPU nodes perform parallel ray tracing calculations on the allocated blocks based on the WebGL protocol, return the calculation results to the main GPU node, and synthesize and display the terminal display image.
[0069] In this step, the spatial block division divides the three-dimensional building model into regular grid cells (such as 2m×2m×2m) according to the spatial coordinate system, and each cell is assigned as an independent rendering task to the computing node. The parallel ray tracing calculation is based on the distributed rendering framework of the heterogeneous computing architecture, and multi-GPU collaborative ray tracing acceleration is achieved through task sharding, data locality optimization, and asynchronous communication.
[0070] In the embodiments of the present application, after receiving the viewing angle parameters, the main GPU node determines the visible space blocks by using frustum culling and occlusion culling, and encodes the spatial continuity of the blocks according to the Morton Code. The work stealing task scheduling strategy is adopted to dynamically allocate the blocks to the edge GPU nodes: after each node loads the lightweight data of the corresponding block, a hierarchical bounding volume (HLBVH) acceleration structure is constructed, and based on the wavefront ray tracing technology, the rays are grouped by material type (diffuse group, specular group, transmission group) for batch processing. For transparent materials (such as glass), stochastic alpha testing is used to eliminate aliasing artifacts; the change of dynamic light sources reduces the computational overhead through temporal photon reuse. After each node completes the local rendering, the main node uses weighted variance antialiasing to fuse the sub-frame images, and ensures the multi-terminal display consistency through gamut adaptive mapping.
[0071] For example, continuing with the above example, when the user flies around a super high-rise building for browsing, the main node divides the visible area into 320 blocks (2m³). Edge node A is responsible for block X50-Y70-Z120 (the curtain wall area). After loading 210MB of lightweight data, it completes 2.5×10^6 ray tracings within 12ms (the specular group accounts for 68%). The main node fuses all the block data and enables gamut mapping (sRGB→DCI-P3), and finally outputs an HDR image on an 8K monitor with a peak brightness of 1000 nit.
[0072] In order to achieve real-time and accurate update of local changes and efficient utilization of rendering resources in the multi-user collaborative editing scenario of large buildings, the present application proposes a bounding box-driven incremental rendering pipeline, which constructs an end-to-end low-latency update link through change area detection, physical light recalculation, heterogeneous parallel rendering, and differential stream transmission. In some embodiments, it further includes:
[0073] 201. When the multi-user collaborative editing operation triggers a change in the geometric shape or material properties of at least one independent component, extract the three-dimensional spatial bounding box range of the changed component;
[0074] In step 201, the three-dimensional spatial bounding box range is a cube space range defined by the extreme values of the vertex coordinates of the changed component, which is used to identify the physical area that needs to recalculate the lighting and rendering.
[0075] In the embodiments of the present application, collaborative editing operations are listened for through an event bus, the component modification instructions submitted by the user (such as vertex displacement vectors, material reflectivity adjustment values) are parsed, and an accurate bounding box is constructed using the Hierarchical Bounding Volumes (HBV) iterative contraction algorithm: First, the changed area is quickly located based on the octree spatial index of the original geometry of the component. Subsequently, combined with the Markov Chain Monte Carlo (MCMC) sampling strategy, a probability assessment is made on the scope of the indirect illumination impact that may be caused by the change of the material properties (for example, highly reflective materials may affect adjacent walls), and the bounding box boundary is dynamically extended to cover the direct and indirect scopes of action. Finally, the three-dimensional space bounding box range is output.
[0076] 202. Based on the updated vertex coordinate values and the changed values of the material properties within the range of the three-dimensional space bounding box, recalculate the diffuse reflection coefficient and the specular reflection intensity of the changed component in the illumination direction of the building scene, and generate updated lightweight component data carrying physical rendering parameters;
[0077] In step 202, the updated vertex coordinate values and the changed values of the material properties are a set of geometric vertex spatial positions or material optical characteristic parameters directly modified by the user's editing behavior.
[0078] In the embodiments of the present application, within the bounding box space, a hybrid strategy of Multiple Importance Sampling (MIS) and Virtual Point Lights (VPLs) is used to reconstruct the local illumination field: Virtual point lights are projected along the main light source direction of the building scene (such as the solar azimuth angle) onto the surface of the bounding box to construct a light energy transmission proxy network; The Stratified Russian Roulette is used to terminate the light ray paths with low contributions and focus on calculating the high-energy transmission paths; The anisotropic Ward reflection model is applied to the changed material, and a normal perturbation map is generated in combination with the micro-surface height field to correct the azimuth distribution of diffuse reflection and specular reflection, so as to recalculate the diffuse reflection coefficient and the specular reflection intensity. Finally, vertex data with contributions lower than the threshold is removed through Flux Clustering, and updated lightweight component data carrying physical rendering parameters is generated.
[0079] 203. According to the corresponding spatial block within the range of the three-dimensional space bounding box, distribute the updated lightweight component data to the distributed GPU cluster, trigger the edge GPU node bound to the corresponding spatial block to perform parallel ray tracing secondary calculation, and return the secondary calculation result to the main GPU node for local frame synthesis to generate an updated rendering block;
[0080] In step 203, the corresponding spatial block is a regular three-dimensional grid cell formed by dividing the building model space, and each cell is bound to a specific GPU computing node to achieve task load balancing.
[0081] In the embodiment of the present application, the master node quickly retrieves the set of blocks covered by the bounding box based on the spatial block hash mapping table, and dynamically allocates tasks using the priority queue scheduling strategy: high-visual-significance blocks (such as around the user's fixation point) are preferentially allocated to high-performance edge nodes. After receiving the data, the edge node starts the asynchronous compute shaders to construct a hybrid acceleration structure: only reconstruct the bottom-level acceleration structure (BLAS) of the geometry inside the bounding box, and reuse the global top-level acceleration structure (TLAS); bucket by ray type (primary ray, shadow ray, reflection ray), and use wavefront thread scheduling to maximize GPU utilization; combine temporal accumulation and spatial wavelet denoising to generate a low-noise intermediate frame. The master node uses the visibility pyramid to fuse the sub-frames of each block to generate an updated rendered block.
[0082] 204. Perform a pixel-level difference comparison between the updated rendered block and the original display data in the unchanged area, extract the difference pixel coordinates and color values, and overwrite the original display data through the difference data stream.
[0083] In step 204, the difference data stream is an incremental update data packet that only contains the changed pixel positions and color information, and is used to minimize the network transmission and terminal rendering overhead.
[0084] In the embodiment of the present application, a multi-modal difference detection pipeline is adopted: apply the structural similarity index (SSIM) and the human visual system (HVS) weighted model to filter out tiny color differences that are invisible to the naked eye (such as ΔE < 1.5); calculate the pixel displacement vector between the front and back frames through the block matching algorithm to correct the pseudo-differences caused by the perspective fine-tuning; compress the difference pixel set using adaptive sparse coding and perceptual hashing to generate a high-compression-ratio difference stream, and overwrite the original display data.
[0085] The following is a specific example:
[0086] When an international team collaborated on the design of a landmark twin-tower building, User A adjusted the geometric curvature of the curved glass curtain wall of the top-floor viewing platform from a radius of 15 m to 12 m (involving a displacement of 38,000 vertices), and User B simultaneously changed the curtain wall material from ordinary glass (refractive index 1.5, roughness 0.1) to electrochromic glass (refractive index dynamic range 1.4 - 1.7, roughness 0.05). Through Step 201, the initial bounding box (X200 - Y300 - Z400~X220 - Y320 - Z420) was generated by detecting the changed area of the curtain wall, and the indirect influence range was evaluated in combination with the light scattering characteristics of the electrochromic material, and the bounding box was extended to X190 - Y290 - Z390~X230 - Y330 - Z430; through Step 202, 25,000 virtual point light sources were arranged within the extended bounding box, and the specular highlight diffusion effect caused by the curvature change was calculated through the anisotropic Ward model to generate updated lightweight component data (the number of vertices was compressed from 480,000 to 220,000); through Step 203, the 24 spatial blocks corresponding to the bounding box were assigned to 4 edge nodes equipped with NVIDIA A40 GPUs, and the secondary ray tracing was completed within 18 ms using a hybrid acceleration structure, and the local sub-frame with a signal-to-noise ratio (SNR) of 42 dB was output and synthesized after spatio-temporal noise reduction to generate an updated rendering block; through Step 204, 157,000 different pixels (accounting for 1.2% of the total pixels) were detected, and the data volume was reduced to 1.8 MB after sparse coding compression. The terminal completed the screen update within 3 ms through the WebGL pixel shader and overwrote the original display data.
[0087] Through the bounding-box-driven incremental rendering pipeline, this application achieves high-precision real-time feedback for local updates in a multi-user collaborative editing scenario. The change area detection combined with the indirect influence assessment ensures the physical completeness of the lighting recalculation; the heterogeneous distributed rendering framework outputs high-quality images with low latency through a hybrid acceleration structure and spatio-temporal noise reduction; the differential flow mechanism significantly reduces the network transmission load, enabling the terminal to achieve pixel-level precise updates on high-resolution screens. This solution significantly improves the efficiency of collaborative design of large buildings, enabling designers to synchronously modify and verify the lighting and material effects of complex structures without perceptible latency, while avoiding resource waste caused by global rendering.
[0088] In order to achieve the collaborative optimization of high-precision physical rendering and data lightweighting in 3D building modeling, this application proposes a material-driven adaptive lighting calculation framework, which constructs a complete link from material binding to rendering output through accurate mapping of material parameters, optimization of light paths, dynamic adjustment of sampling density, and data encapsulation and compression. In some embodiments, physical material attributes are attached to the surface vertex data of the multi-level detail geometric model, and the diffuse reflection coefficient and specular reflection intensity of the physical material attributes and the lighting conditions of the building scene are calculated through a ray tracing algorithm to generate lightweight component data carrying physical rendering parameters, including:
[0089] 301. Match the material type corresponding to the multi - level detail geometric model in the building material database, extract the surface roughness, refractive index, and metallicity parameters of the material type, and map them to the surface vertex data of the multi - level detail geometric model.
[0090] In step 301, the material type is a predefined standardized material category in the building material database (such as granite, tempered glass, anodized aluminum), which includes a parametric description of its physical and optical properties.
[0091] In the embodiment of the present application, a material matching engine based on a graph neural network (GNN) is called to perform graph - structure modeling on the surface topological features (curvature distribution, triangle patch density) of the multi - level detail geometric model. Through similarity retrieval between the node embedding vectors and the feature map in the material database, the best material type is matched. For the matching result, non - uniform B - spline interpolation (NURBS) is used to map the discrete material parameters (such as surface roughness, refractive index, metallicity parameters) to vertex attributes: the vertices in the high - curvature region are sharpened, and the vertices in the flat region are Gaussian - smoothed to ensure natural material transition. Finally, the parameters are mapped to the surface vertex data of the multi - level detail geometric model through vertex shader channel encoding.
[0092] 302. Based on the preset natural light direction and artificial light source position in the building scene, construct a light propagation path associated with the surface vertex data of the multi - level detail geometric model, and calculate the first - reflection direction and energy attenuation value of each light path at the surface vertex coordinates of the multi - level detail geometric model according to the surface roughness and the refractive index.
[0093] In step 302, the light propagation path is the light trajectory emitted from the light source to the surface vertex and undergoing reflection / refraction, and its direction and energy distribution are jointly determined by the material properties and the scene geometry.
[0094] In the embodiments of the present application, a light transport network based on a hybrid of bidirectional path tracing and virtual point light sources (VPLs) is constructed: light rays are synchronously emitted from the natural light direction (solar altitude angle) and the artificial light source position (lamp coordinates), the ray differentials technology is used to estimate the influence of surface curvature on light diffusion, and a light propagation path associated with the surface vertex data is constructed. For the calculation of the first reflection direction, the anisotropic microfacet model is applied, and it is calculated after generating a normal perturbation field by combining the azimuthal dependence of surface roughness; the energy attenuation value is obtained by quantifying the scattering loss of light rays inside the material through volumetric photon mapping, and a dispersion compensation coefficient is introduced for transmissive materials (such as glass) to eliminate the wavelength-dependent attenuation deviation.
[0095] 303. Dynamically adjust the light sampling density of the surface vertex coordinates, where the vertices in the high-curvature region increase the number of secondary light ray samplings, and the vertices in the flat region decrease the number of secondary light ray samplings, to generate the diffuse reflection coefficient and specular reflection intensity of the surface vertex coordinates;
[0096] In step 303, the light sampling density is the number of secondary light rays projected per unit area, which is used to balance the rendering quality and the calculation overhead.
[0097] In the embodiments of the present application, an adaptive multiple importance sampling (AMIS) strategy is adopted to dynamically allocate sampling resources: a sampling weight map is generated based on vertex curvature entropy and local lighting gradient, stratified quasi-Monte Carlo sampling is initiated for the high-curvature region (such as carved decoration) to increase the number of secondary light rays in the specular reflection direction; for the flat region (such as the wall surface), a low-discrepancy sequence is used to reduce the sampling density. Through the variance-aware termination mechanism, the sampling convergence state is detected in real time and low-contribution light rays are terminated in advance to generate the diffuse reflection coefficient and specular reflection intensity.
[0098] 304. Encapsulate the diffuse reflection coefficient, the specular reflection intensity and the energy attenuation value into physical rendering parameters bound to the surface vertex coordinates, remove redundant vertex data not affected by illumination in the multi-level detail geometric model, and generate lightweight component data carrying physical rendering parameters.
[0099] In step 304, the physical rendering parameters are a structured data set describing vertex lighting response characteristics, including diffuse reflection coefficients, specular reflection intensity, and energy attenuation values.
[0100] In the embodiment of the present application, the radiant flux clustering algorithm is applied to compress and optimize the surface vertex coordinates: a kd tree spatial index is constructed based on the vertex radiation contribution, and low radiant flux vertices (such as shadow areas and backlit surfaces) are hierarchically clustered, similar vertices are merged, and redundant vertex data not affected by lighting is eliminated. After the physical rendering parameters are compressed by entropy encoding, they are bit-interleaved stored with the surface vertex coordinates to generate lightweight component data carrying physical rendering parameters.
[0101] Here is a specific example:
[0102] In a large-scale stadium BIM collaborative design project, the steel structure roof adopted a multi-level detailed geometry model (LOD level 5: 2 million vertices). Through step 301, the GNN engine identifies the surface features of the roof, matches the material to galvanized steel (roughness 0.25, metallicity 0.95), generates vertex-level parameters through NURBS interpolation, and increases the roughness of the welding node area with a curvature greater than 0.8 to 0.4; through step 302, the natural light direction is preset to 30 degrees south-east, the artificial light source is 200 sets of LED arrays, and the bidirectional path tracing generates 120 million light paths. The volume photon mapping shows that the energy attenuation value of the backlight area reaches 68%; through step 303, the curvature entropy of the vertices in the arched area exceeds the threshold, and the hierarchical quasi-Monte Carlo sampling is started. The number of secondary rays is increased to 512 / vertex, and the number of rays in the flat area is reduced to 64 / vertex. The variance detection terminates 23% of the low-contribution rays in advance; through step 304, the radiation flux clustering eliminates 38% of redundant vertices, and the data volume after entropy coding compression is reduced from 15GB to 3.8GB, generating lightweight component data, which is streamed to the terminal through WebGL.
[0103] This application realizes the collaborative optimization of the physical rendering accuracy and data efficiency of building models through a material-driven adaptive lighting framework. The accurate mapping of material parameters and the optimization of light paths ensure the true lighting response of complex geometric surfaces; the dynamic sampling strategy significantly reduces the computational overhead; the clustering of radiant fluxes and entropy coding compression reduces the data volume to 1 / 4 of the traditional solution.
[0104] This application realizes the collaborative optimization of the physical rendering accuracy and data efficiency of building models through a material-driven adaptive lighting framework. The accurate mapping of material parameters and the optimization of light paths ensure the true lighting response of complex geometric surfaces; the dynamic sampling strategy significantly reduces the computational overhead; the clustering of radiant fluxes and entropy coding compression reduces the data volume to 1 / 4 of the traditional solution. In the stadium case, the system supports real-time rendering at 4K resolution. Designers can interactively adjust material and light source parameters and instantly view high-fidelity effects, greatly improving the design verification efficiency and the smoothness of collaborative work.
[0105] In order to achieve physically accurate reflection direction prediction and energy attenuation modeling in the lighting calculation of building scenes, this application proposes an energy transfer framework that couples reverse ray tracing and micro-surfaces. By parsing light source parameters, constructing reverse paths, correcting normal perturbations, and quantifying attenuation, a complete energy transfer link from the light source to the surface vertices is established. In some embodiments, based on the preset natural light direction and artificial light source position in the building scene, a light propagation path associated with the surface vertex data of the multi-level detail geometric model is constructed, and the first reflection direction and energy attenuation value of each light path at the surface vertex coordinates are calculated according to the surface roughness and the refractive index, including:
[0106] 401. Read the preset natural light direction angle and the three-dimensional spatial coordinates of the artificial light source from the building scene configuration file, and obtain the radiant intensity and spectral distribution data of the artificial light source;
[0107] In step 401, the natural light direction angle is the azimuth and elevation angle parameters of the sunlight incident direction, which are used to define the spatio-temporal distribution characteristics of natural light in the building scene. The three-dimensional spatial coordinates are the spatial position data of the artificial light source (such as lamps, projection devices) in the building scene.
[0108] In the embodiments of this application, the building scene configuration file in JSON format is parsed, and the natural light direction angle (such as the solar azimuth angle accurate to 0.01 degrees) and the artificial light source coordinates (XYZ axis accurate to the millimeter level) are extracted through a semantic segmentation engine. For the artificial light source, a Spectroradiometric Calibration Model is used to parse its radiant intensity (unit: watt / steradian) and spectral distribution data (energy density curve in the 380nm - 780nm band).
[0109] 402. Starting from the surface vertex coordinates, extend the light propagation path in the opposite direction of the natural light direction angle and the three-dimensional space coordinates to establish the direct illumination correlation relationship between the surface vertex coordinates and the artificial light source.
[0110] In step 402, extending the light propagation path in the opposite direction traces the light path in the reverse direction from the surface vertex to the light source direction, which is used to detect the direct illumination accessibility between the vertex and the light source.
[0111] In the embodiment of the present application, a reverse ray tracing acceleration structure is constructed based on the surface vertex coordinates: First, the sparse voxel octree (SVO) is used to divide the building scene space. Reverse rays are emitted at the vertex (the direction is the reverse direction of natural light and the artificial light source coordinate direction), and the conservative rasterization is used to detect the potential intersections of the rays with the scene geometry. For the artificial light source direction, the visibility cone algorithm is applied to quickly exclude the occluded paths, and only the effective rays reaching the light source directly are retained. Finally, the direct illumination correlation relationship between the vertex and the light source is generated.
[0112] 403. Determine the micro-surface normal perturbation range at the surface vertex coordinates according to the surface roughness, calculate the first reflection direction of the incident light at the surface vertex coordinates in combination with the refractive index, and randomly offset the first reflection direction based on the micro-surface normal perturbation range.
[0113] In step 403, the micro-surface normal perturbation range is the random offset angle interval of the normal direction determined by the surface roughness, which is used to simulate the influence of the microscopic geometry of the material on the light reflection direction.
[0114] In the embodiment of the present application, the anisotropic Beckmann distribution is used to model the micro-surface normal perturbation: The normal direction covariance matrix is generated according to the surface roughness parameters, and the standard deviation of the normal in the tangent plane and the normal direction is defined. Combining the refractive index parameters, the ideal reflection direction vector is calculated by Snell's Law, and random offset is performed within the perturbation range based on the Markov chain Monte Carlo (MCMC) sampling. For high-roughness surfaces (such as concrete), stratified importance sampling is started to increase the diversity of perturbation directions; for low-roughness surfaces (such as mirror metals), quasi-random sequences are used to ensure the uniformity of the direction distribution.
[0115] 404. Calculate the energy attenuation value in the first reflection direction according to the radiation intensity of the artificial light source and the path length of the light propagation path.
[0116] In step 404, the path length is the propagation distance of the light from the light source to the surface vertex, which is used to quantify the spatial attenuation of the energy during transmission.
[0117] In the embodiment of the present application, double attenuation calculation is applied using the Atmospheric Transmittance Model and the Material Absorption Model: based on the path length and the preset turbidity factor of the scene, the Hosek-Wilkie sky model is used to calculate the scattering loss of the light in the atmosphere; according to the material type (such as glass, metal), the preset absorption spectral curve is queried, and the energy attenuation rate is calculated by integrating along the path length; the atmospheric transmittance and the material absorption rate are multiplied, combined with the radiation intensity of the artificial light source, and the energy attenuation value in the first reflection direction is output.
[0118] The following is a specific example:
[0119] In a dome lighting design project of a certain museum, through step 401, the natural light direction angles (azimuth angle 120°, elevation angle 45°) and the coordinates of 36 groups of artificial spotlights (XYZ error ±2 mm) are obtained by parsing the configuration file. Spectral analysis shows that the main peak wavelength of the spotlight is 560 nm (warm white light), and the average value of the radiation intensity data is 850 W / sr; through step 402, reverse light rays are emitted to the dome surface vertices (about 500,000 vertices). The SVO acceleration structure excludes the paths blocked by the decorative reliefs, and a direct connection diagram of the direct light reachability is generated, showing that 82% of the vertices can receive direct illumination from at least 3 spotlights; through step 403, the surface roughness of the bronze relief is 0.6, and the Beckmann distribution is used to generate a normal perturbation range of ±15°. 1024 offset directions are generated by MCMC sampling, and the width of the main lobe of the specular reflection is expanded to 3 times the original value; through step 404, the average path length from the spotlight to the dome vertex is 8.5 m, the atmospheric transmittance is 0.92, and the absorption rate of the bronze material is 0.85. Finally, it is calculated that the energy in the first reflection direction is attenuated to 78.2% of the original value.
[0120] The present application realizes the balance between the physical accuracy and the calculation efficiency of the building scene illumination calculation through an energy transmission framework that combines reverse light path tracing and micro-surface coupling. The high-precision parsing of the light source parameters and the reverse path acceleration structure ensure the reliability of the direct light illumination detection; the combination of the Beckmann distribution and MCMC sampling improves the authenticity of the rough surface reflection direction modeling; the double attenuation model of the atmosphere and the material quantifies the details of the energy loss.
[0121] To achieve efficient rendering and visual continuity guarantee for local updates of building models in a distributed GPU cluster, this application proposes a spatially-block-driven heterogeneous parallel rendering pipeline. By means of task sharding, local light path calculation, sub-frame fusion, and edge optimization, a complete rendering link from data distribution to image synthesis is constructed. In some embodiments, triggering the edge GPU nodes bound to the corresponding spatial block to perform parallel ray tracing secondary calculations, and returning the secondary calculation results to the main GPU node for local frame synthesis to generate updated rendering blocks, including:
[0122] 501. Divide the updated lightweight component data into multiple rendering subtasks according to the boundary coordinates of the corresponding spatial block, and distribute the rendering subtasks to the edge GPU nodes bound to the corresponding spatial block;
[0123] In step 501, the boundary coordinates of the corresponding spatial block are the cube space ranges defined by the minimum / maximum XYZ coordinates of each unit obtained by pre-dividing the building model into three-dimensional grid cells of fixed size.
[0124] In the embodiments of this application, the main node performs topological sorting on the updated lightweight component data based on the Morton Code space-filling curve to ensure spatial locality in the storage of adjacent block data. A dynamic load balancing strategy is adopted: calculating the complexity weights of each block through a historical rendering time prediction model, and combining the real-time GPU utilization rate (CUDA core occupancy rate, remaining video memory capacity) of the edge nodes, and using an improved Hungarian Algorithm to achieve the optimal matching of tasks and nodes. When distributing tasks, the zero-copy RDMA (Remote Direct Memory Access) technology is used to directly write the updated lightweight component data into the video memory address space of the edge GPU nodes.
[0125] 502. In the edge GPU nodes, construct a local light propagation path based on the geometric data and lighting parameters of the corresponding spatial block, and calculate the light energy distribution of the local light propagation path;
[0126] In step 502, the local light propagation path is a set of light trajectories limited within the spatial block, including the complete transmission path from the light source to the surface vertex and then to the camera.
[0127] In the embodiments of the present application, the edge node starts a hybrid acceleration structure construction pipeline: constructs a bottom - layer acceleration structure (BLAS) for the geometric data within the block, and at the same time re - uses the global top - layer acceleration structure (TLAS) to implement cross - block ray tracing. The wavefront tracing technology is used to group and schedule rays according to material types (diffuse, specular, transmissive): the diffuse group applies multiple importance sampling (MIS) to optimize the convergence speed of indirect illumination; the specular group uses an anisotropic micro - surface model to generate the highlight direction distribution; the transmissive group combines dispersion compensation and random alpha testing to eliminate transparent material artifacts. Finally, the radiance cache records the contribution of each path and calculates the light energy distribution of the local light propagation path.
[0128] 503. Return the light energy distribution to the main GPU node, and perform local frame synthesis on the light energy distribution data according to the boundary coordinates to generate local frame buffer data;
[0129] In step 503, the local frame buffer data is a set of pixels of the rendering result corresponding to the spatial block, including color, depth, and normal buffers.
[0130] In the embodiments of the present application, the main node fuses multi - frame data using temporal anti - aliasing (TAA) and spatial super - resolution: aligns the historical frame and the current frame based on the motion vector, and reduces noise through weighted averaging; applies edge - directed upsampling to the low - resolution block to reconstruct high - frequency details; uses the visibility pyramid to detect and eliminate depth conflicts and lighting discontinuities between adjacent blocks to generate local frame buffer data.
[0131] 504. Perform edge smoothing on the local frame buffer data and the frame buffer data of adjacent spatial blocks to generate an updated rendering block.
[0132] In step 504, the edge smoothing process: a pixel - level optimization operation to eliminate visual discontinuities at the seams of adjacent spatial blocks.
[0133] In the embodiments of the present application, multi-stage edge smoothing processing is performed on local frame buffer data and frame buffer data: the seam area is identified based on the structural similarity index (SSIM) and depth gradient analysis; depth-aware bilateral filtering is applied to the detection area to smooth color jumps while preserving geometric edges; the pixel displacement between adjacent frames in a dynamic scene is predicted by optical flow, and the filtering weights are corrected to avoid motion blur, and finally an updated rendering block is generated.
[0134] The following is a specific example:
[0135] Suppose a user modifies the glass curtain wall material of the central dome (the refractive index is adjusted from 1.5 to 1.8) in a smart city transportation hub, triggering the following process: In step 501, the dome corresponds to 12 spatial blocks (X100 - Y200 - Z50 to X160 - Y260 - Z110). According to the performance difference between T4 / A40 nodes, the main node assigns the high-curvature blocks to the A40 node and the low-complexity blocks to the T4 node; in step 502, the edge node A40 constructs a wavefront tracing pipeline for the dome blocks, the proportion of specular group light rays is increased to 65%, the microfacet model is used to generate the refraction direction distribution, and 120 million ray tracings are completed within 36 ms to calculate the ray energy distribution; in step 503, the main node fuses the time-domain cumulative frame (weight 0.7) and the current frame (weight 0.3), and the visibility pyramid eliminates the depth conflict between the columns and the dome; in step 504, the color temperature difference (transition area from 6500K to 5500K) between the dome and the adjacent waiting hall blocks is detected and edge-smoothed, and the optical flow compensation corrects the pixel displacement artifacts caused by the train movement to generate an updated rendering block.
[0136] The present application realizes the efficient distributed computing and visual seamless fusion of local updates of building models through a heterogeneous parallel rendering pipeline driven by spatial blocks. Morton code sorting and Hungarian task scheduling ensure balanced computing load; wavefront tracing and hybrid acceleration structures improve the ray calculation efficiency; time-domain - spatial domain joint anti-aliasing ensures high-quality output; depth-aware filtering and motion compensation eliminate edge defects.
[0137] In order to efficiently store physical parameters and accurately eliminate redundant data in 3D building rendering, the present application proposes a radiation flux-driven data compression optimization framework, and constructs a complete link from parameter encoding to lightweight data output through parameter block generation, visibility detection, data binding, and vertex elimination. In some embodiments, encapsulating the diffuse reflection coefficient, the specular reflection intensity, and the energy attenuation value into physical rendering parameters bound to the surface vertex coordinates, and eliminating redundant vertex data in the multi-level detail geometric model that is not affected by light to generate lightweight component data carrying physical rendering parameters includes:
[0138] 601. Generate a physical rendering parameter data block corresponding to the surface vertex coordinates according to the numerical ranges of the diffuse reflection coefficient, the specular reflection intensity, and the energy attenuation value;
[0139] In step 601, the physical rendering parameter data block includes a binary data structure of vertex-level lighting response parameters (diffuse reflection, specular reflection, energy attenuation), which is segmented and encoded according to the numerical ranges.
[0140] In the embodiment of the present application, the range-adaptive encoding technology is used to quantize and compress the diffuse reflection coefficient, the specular reflection intensity, and the energy attenuation value: First, the vertices are grouped according to parameter similarity based on the K-means clustering algorithm, and the parameter values within each group are mapped to 8 / 16-bit precision through nonlinear quantization. Among them, high-dynamic range parameters (such as specular reflection intensity > 0.9) use logarithmic encoding to retain details, and low-dynamic parameters (such as diffuse reflection coefficient < 0.2) use linear encoding. The encoded parameter block is bound to the surface vertex coordinates through bit-interleaving to form a physical rendering parameter data block that can be directly read by the GPU texture sampler.
[0141] 602. Based on the lighting visibility detection result of the surface vertex coordinates, filter out the coordinate data not affected by lighting, and mark the coordinate data not affected by lighting as redundant vertex data;
[0142] In step 602, the lighting visibility detection result is a set of boolean flags for determining whether a vertex is directly or indirectly illuminated by a light source.
[0143] In the embodiment of the present application, a multi-level lighting visibility detection pipeline is constructed: Use octree occlusion culling to quickly exclude vertices completely blocked by building components; collect the photon density around the vertices through radiosity probes, and mark the vertices with a density lower than the noise threshold as invisible; apply variance shadow mapping (VSM) to perform secondary verification on the candidate vertices to eliminate misjudgments. Finally, a redundancy bitmap is generated to mark the coordinate data not affected by lighting as redundant vertex data.
[0144] 603. Bind the physical rendering parameter data block to the surface vertex coordinates to generate a set of vertex data carrying physical rendering parameters;
[0145] In step 603, the vertex data set is a composite data structure that integrates geometric coordinates and physical parameters, supporting streaming and direct GPU parsing.
[0146] In the embodiments of the present application, a spatial hash index based on hashing is adopted to bind the physical rendering parameter data block to the surface vertex coordinates: perform three-dimensional hash bucketing on the vertex coordinates, and compress and store the difference values of the physical rendering parameter data blocks in the same spatial bucket through delta encoding. At the same time, to cope with the dynamic update requirements, a versioned pointer mechanism is introduced, allowing the parameter block to be updated in place in the GPU video memory without affecting the stability of the coordinate data, and finally generating a vertex data set carrying physical rendering parameters.
[0147] 604. Remove the redundant vertex data from the multi-level detail geometric model, optimize the vertex data set according to the removal result, and generate the lightweight component data carrying physical rendering parameters.
[0148] In step 604, the lightweight component data is a compressed data packet of the valid vertices and their associated parameters remaining after removing the redundant vertices.
[0149] In the embodiments of the present application, a topology-aware vertex culling strategy is implemented: based on the redundant vertex marker bitmap, use the graph cut algorithm to identify and remove isolated redundant vertex clusters while retaining the necessary topological connectivity (such as edge and patch indices). Apply entropy encoding and dictionary compression to the remaining vertex data set to generate lightweight component data that supports real-time decompression by LZ4.
[0150] The following is a specific example:
[0151] In a project to optimize the light and shadow effects of the curtain wall of a super high-rise office building, the following process is executed: In step 601, the specular reflection intensity of the curtain wall vertices (about 1.2 million) is distributed between 0.85 and 0.98, compressed to 8 bits using logarithmic coding, and the data volume is reduced from 720MB to 90MB, constructing a physically rendered parameter data block; In step 602, the vertices in the backlight area (about 280,000) are removed by octree, and the vertices in the shadow area (about 150,000) are detected by radiosity probes. After VSM secondary verification, a total of 360,000 redundant vertex data are marked; In step 603, the curtain wall vertices are divided into 512 buckets by spatial hashing bucketing, and the parameter block volume is further compressed by 22% by incremental coding, forming a vertex data set; In step 604, the graph cut algorithm removes redundant vertices and reconstructs the patch topology. After entropy coding, the final lightweight component data is 58MB, and the compression rate compared to the original data reaches 92%.
[0152] This application realizes the efficient storage and transmission of physically rendered data of building models through a data compression optimization framework driven by radiant flux. The range adaptive coding bound to spatial hashing significantly reduces the parameter storage overhead; the multi-level visibility detection accurately identifies invalid vertices; the topology-aware culling ensures geometric integrity.
[0153] In order to achieve dynamic optimization and multi-terminal adaptation of component-level geometric data in a building information model, this application proposes a progressive geometry generation framework driven by functional semantics. Through component semantic parsing, level of detail calculation, topology simplification, and associated storage, a complete generation link from design parameters to multi-level models is constructed. In some embodiments, based on the functional attribute division rules of building components, the design parameters are parsed into geometric topology data of multiple independent components, and a multi-level detailed geometric model of each independent component is dynamically generated according to the terminal display resolution and the viewing distance, including:
[0154] 701. According to the functional attribute division rules of building components, extract the independent component data corresponding to walls, beams, columns, doors, and windows from the design parameters to generate initial geometric topology data;
[0155] In step 701, the functional attribute division rule is a data classification standard defined based on the structural role of building components in the project (such as load-bearing, enclosure, decoration), and is used to separate independent components from global design parameters. The initial geometric topology data is the original geometric structure data without simplification, including vertex coordinates, edge connection relationships, and patch indices.
[0156] In the embodiments of the present application, a semantic-enhanced graph convolutional network (SE-GCN) is used to analyze BIM design parameters: First, the component attributes in IFC format (such as IfcWall, IfcColumn) are encoded as graph node features, and the semantic relationships of adjacent components are aggregated through multiple layers of graph convolution to generate a component function weight vector. Based on the weight threshold segmentation, the geometric data of independent components such as walls, beams, and columns are extracted, and Delaunay Triangulation is applied to optimize the patch topology to eliminate self-intersections and non-manifold structures. Finally, the initial geometric topology data that meets the Watertight requirements is output.
[0157] 702. Calculate the display detail level of the independent component data based on the terminal display resolution and the current viewing distance, and generate geometric simplification parameters matching the display detail level;
[0158] In step 702, the display detail level is the model accuracy level dynamically divided according to the terminal performance and observation conditions, and the larger the value, the richer the geometric details. The geometric simplification parameters are a set of parameters that control the vertex merging ratio, the patch simplification intensity, and the curvature retention threshold.
[0159] In the embodiments of the present application, an adaptive detail model based on the human visual system (HVS) is constructed: Calculate the proportion of the projected area of the component in the screen space. If it is lower than the pixel density threshold (such as 0.5 pixels / mm²), the detail level is reduced; The Weber-Fechner Law is used to quantify the perception threshold of the human eye for surface changes, and the simplification intensity of high-curvature regions is dynamically adjusted; The non-dominated sorting genetic algorithm II (NSGA-II) is used to balance the simplification rate and the visual fidelity, and geometric simplification parameters matching the display detail level are output.
[0160] 703. According to the geometric simplification parameters, perform vertex merging and patch simplification on the initial geometric topology data to generate optimized geometric topology data;
[0161] In step 703, vertex merging aggregates spatially adjacent and attribute-similar vertices into a single vertex to reduce geometric data redundancy. Patch simplification reduces the model complexity by removing low-contribution triangular patches or merging coplanar patches.
[0162] In the embodiments of the present application, an iterative geometric simplification pipeline is implemented: based on the QEM (quadratic error metric) algorithm, the folding cost of each edge is evaluated, and the edges with the least visual impact are preferentially folded; for high-curvature regions such as carvings and threads, Constrained Delaunay Refinement is applied to retain feature edges; the Incremental Mesh Reconstruction algorithm is used to ensure that the simplified model maintains manifoldness and hole closure. Finally, optimized geometric topology data meeting the target level of detail is generated.
[0163] 704. The optimized geometric topology data is associated and stored with the functional attribute partitioning rules to dynamically generate multi-level detailed geometric models for each independent component.
[0164] In step 704, the associated storage is a database structure that binds geometric data with the functional semantics of components, supporting on-demand retrieval and dynamic loading. The multi-level detailed geometric model is a geometric data set containing multiple preset levels of detail, supporting real-time switching to adapt to different terminals.
[0165] In the embodiments of the present application, a spatial multi-resolution index based on an octree is constructed: an octree node is created for each independent component, and the leaf node stores the optimized geometric data corresponding to the LOD level; Git-style version control is used to manage the change history of geometric data at different levels of detail; according to the level of detail requested by the terminal, the corresponding data blocks are pulled from the distributed storage in real time and assembled into a complete model, dynamically generating multi-level detailed geometric models for each independent component.
[0166] The following is a specific example:
[0167] In a steel structure delivery project of a stadium, the following process is executed: in step 701, SE-GCN separates independent components such as the grandstand truss (functional weight 0.92), the roof reticulated shell (0.85), and the support columns (0.78) from the BIM model, and the generated initial geometric topology data contains 5.8 million vertices; in step 702, the mobile terminal (viewing distance 1m, 2K screen) requests the LOD3 level, the simplification rate of the grandstand truss is set to 65%, and the feature edges with a curvature > 0.05 of the roof reticulated shell are retained to obtain geometric simplification parameters; in step 703, QEM edge folding reduces the grandstand vertices to 2.03 million, and constrained Delaunay refinement retains the bolt hole features of the reticulated shell, generating optimized geometric topology data, and the data volume is reduced to 1.8GB; in step 704, the octree index loads the LOD3 data to the terminal on demand, dynamically generating multi-level detailed geometric models for each independent component, and engineers can seamlessly switch to LOD6 (4.5 million vertices) to view welding details.
[0168] This application realizes the intelligent optimization and efficient management of geometric data of building components through a function-semantics-driven progressive geometry generation framework. The semantic parsing and visual perception model ensure that key engineering features are retained during the simplification process; multi-resolution indexing and versioned storage support the real-time dynamic loading of models with hundreds of millions of vertices.
[0169] Figure 2 FIG. is a schematic structural diagram of a cloud-based collaborative 3D building modeling and rendering system based on WebGL provided by an embodiment of this application. As Figure 2 shown, the system includes:
[0170] A parsing module 21, configured to obtain design parameters of a target building from a cloud database, parse the design parameters into geometric topology data of multiple independent components based on the functional attribute division rules of building components, and dynamically generate multi-level detail geometric models of each independent component according to the terminal display resolution and viewing distance;
[0171] A calculation module 22, configured to attach material physical attributes to the surface vertex data of the multi-level detail geometric model, calculate the diffuse reflection coefficient and specular reflection intensity of the material physical attributes and the building scene lighting conditions through a ray tracing algorithm, and generate lightweight component data carrying physical rendering parameters;
[0172] A synthesis module 23, configured to respond to a perspective switching instruction of a terminal user, allocate a main GPU node from a distributed GPU cluster according to the spatial block corresponding to the current perspective, split the lightweight component data by the spatial block by the main GPU node, and allocate adjacent blocks of the spatial block to edge GPU nodes. The edge GPU nodes perform parallel ray tracing calculations on the allocated blocks based on the WebGL protocol, return the calculation results to the main GPU node, synthesize a terminal display image, and display it.
[0173] Figure 2 The above-mentioned cloud-based collaborative 3D building modeling and rendering system based on WebGL can execute Figure 1 The cloud-based collaborative 3D building modeling and rendering method described in the embodiments shown. Its implementation principle and technical effects will not be elaborated. For the above-mentioned cloud-based collaborative 3D building modeling and rendering system in the embodiments, the specific ways for each module and unit to perform operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0174] In a possible design, Figure 2 The cloud-based collaborative 3D building modeling and rendering system described in the embodiments shown can be implemented as a computing device. As Figure 3 shown, the computing device may include a storage component 31 and a processing component 32;
[0175] The storage component 31 stores one or more computer instructions, and among them, the one or more computer instructions are for the processing component 32 to call and execute.
[0176] The processing component 32 is used for the above Figure 1 A WebGL-based cloud collaborative three-dimensional building modeling and rendering method of the above embodiment.
[0177] Among them, the processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components for executing the above method.
[0178] The storage component 31 is configured to store various types of data to support the operation of the terminal. The storage component may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0179] Of course, the computing device may necessarily further include other components, such as input / output interfaces, display components, communication components, etc.
[0180] The input / output interface provides an interface between the processing component and the peripheral interface module, and the above peripheral interface module may be an output device, an input device, etc.
[0181] The communication component is configured to facilitate the communication between the computing device and other devices in a wired or wireless manner, etc.
[0182] Among them, the computing device may be a physical device or an elastic computing host provided by a cloud computing platform, etc. At this time, the computing device may refer to a cloud server, and the above processing component, storage component, etc. may be basic server resources leased or purchased from the cloud computing platform.
[0183] The embodiment of the present application also provides a computer storage medium storing a computer program, and when the computer program is executed by a computer, it can implement the above Figure 1 A WebGL-based cloud collaborative three-dimensional building modeling and rendering method of the above shown embodiment.
[0184] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described system, system and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0185] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0186] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present application.
Claims
1. A WebGL-based cloud collaborative 3D building modeling and rendering method, characterized in that, Including: Obtain the design parameters of the target building from the cloud database, parse the design parameters into geometric topology data of multiple independent components based on the functional attribute division rules of building components, and dynamically generate multi-level detail geometric models for each independent component according to the terminal display resolution and viewing distance; Attach material physical properties to the surface vertex data of the multi-level detail geometric model, calculate the diffuse reflection coefficient and specular reflection intensity of the material physical properties and the building scene lighting conditions through a ray tracing algorithm, and generate lightweight component data carrying physical rendering parameters; In response to the perspective switching instruction of the terminal user, allocate a main GPU node from the distributed GPU cluster according to the spatial block corresponding to the current perspective. The main GPU node divides the lightweight component data by spatial block, and allocates the adjacent blocks of the spatial block to the edge GPU nodes. The edge GPU nodes perform parallel ray tracing calculations on the allocated blocks based on the WebGL protocol, return the calculation results to the main GPU node, synthesize the terminal display image and display it.
2. The method according to claim 1, wherein Also including: When the multi-user collaborative editing operation triggers a change in the geometric shape or material properties of at least one independent component, extract the three-dimensional spatial bounding box range of the changed component; Based on the vertex coordinate update value and material property change value within the three-dimensional spatial bounding box range, recalculate the diffuse reflection coefficient and specular reflection intensity of the changed component under the building scene lighting direction, and generate updated lightweight component data carrying physical rendering parameters; According to the corresponding spatial block of the three-dimensional spatial bounding box range, distribute the updated lightweight component data to the distributed GPU cluster, trigger the edge GPU node bound to the corresponding spatial block to perform parallel ray tracing secondary calculations, and return the secondary calculation results to the main GPU node for local frame synthesis to generate an updated rendering block; Perform a pixel-level difference comparison between the updated rendering block and the original display data in the unchanged area, extract the difference pixel coordinates and color values, and overwrite the original display data through the difference data stream.
3. The method according to claim 1, characterized in that, The attaching material physical properties to the surface vertex data of the multi-level detail geometric model, calculating the diffuse reflection coefficient and specular reflection intensity of the material physical properties and the building scene lighting conditions through a ray tracing algorithm, and generating lightweight component data carrying physical rendering parameters includes: Match the material type corresponding to the multi-level detail geometric model in the building material database, extract the surface roughness, refractive index and metallicity parameters of the material type, and map them to the surface vertex data of the multi-level detail geometric model; Based on the preset natural light direction and artificial light source position in the building scene, construct a light propagation path associated with the surface vertex data of the multi-level detail geometric model, and calculate the first reflection direction and energy attenuation value of each light path at the surface vertex coordinates of the multi-level detail geometric model according to the surface roughness and the refractive index; Dynamically adjusting the light sampling density of the surface vertex coordinates, wherein the number of secondary light sampling is increased for vertices in high curvature areas and the number of secondary light sampling is reduced for vertices in flat areas, to generate diffuse reflection coefficients and specular reflection intensity of the surface vertex coordinates; The diffuse reflection coefficient, the specular reflection intensity and the energy attenuation value are encapsulated as physical rendering parameters bound to the surface vertex coordinates, redundant vertex data not affected by illumination in the multi-level detail geometric model is eliminated, and lightweight component data carrying physical rendering parameters is generated.
4. The method according to claim 3, characterized in that The method comprises: constructing a light propagation path associated with the surface vertex data of the multi-level detail geometric model based on the preset natural light direction and artificial light source position in the architectural scene, and calculating the first reflection direction and energy attenuation value of each light path at the surface vertex coordinate according to the surface roughness and the refractive index, including: Reading the preset natural light direction angle and the three-dimensional space coordinates of the artificial light source from the building scene configuration file, and obtaining the radiation intensity and spectral distribution data of the artificial light source; Taking the surface vertex coordinates as the starting point, extending the light propagation path in the reverse direction along the natural light direction angle and the three-dimensional space coordinates, and establishing a direct illumination association relationship between the surface vertex coordinates and the artificial light source; Determine a microsurface normal perturbation range at the surface vertex coordinates according to the surface roughness, calculate a first reflection direction of an incident light ray at the surface vertex coordinates in combination with the refractive index, and randomly shift the first reflection direction based on the microsurface normal perturbation range; The energy attenuation value in the first reflection direction is calculated according to the radiation intensity of the artificial light source and the path length of the light propagation path.
5. The method according to claim 2, wherein The triggering of the edge GPU node bound to the corresponding spatial block to perform parallel ray tracing secondary calculation, returning the secondary calculation result to the main GPU node for local frame synthesis, and generating an updated rendering block, includes: According to the boundary coordinates of the corresponding spatial block, the updated lightweight component data is divided into a plurality of rendering subtasks, and the rendering subtasks are distributed to edge GPU nodes bound to the corresponding spatial block; In the edge GPU node, a local light propagation path is constructed based on the geometric data and illumination parameters of the corresponding spatial block, and light energy distribution of the local light propagation path is calculated; Returning the light energy distribution to the main GPU node, performing local frame synthesis on the light energy distribution data according to the boundary coordinates, and generating local frame buffer data; Edge smoothing is performed on the local frame buffer data and the frame buffer data of the adjacent spatial block to generate an updated rendering block.
6. The method according to claim 3, wherein The step of encapsulating the diffuse reflection coefficient, the specular reflection intensity and the energy attenuation value into physical rendering parameters bound to the surface vertex coordinates, removing redundant vertex data not affected by illumination in the multi-level detail geometric model, and generating lightweight component data carrying physical rendering parameters includes: Generate a physical rendering parameter data block corresponding to the surface vertex coordinates according to the numerical ranges of the diffuse reflection coefficient, the specular reflection intensity, and the energy attenuation value; Based on the lighting visibility detection result of the surface vertex coordinates, filter out the coordinate data not affected by lighting, and mark the coordinate data not affected by lighting as redundant vertex data; Bind the physical rendering parameter data block to the surface vertex coordinates to generate a set of vertex data carrying physical rendering parameters; Remove the redundant vertex data from the multi-level detail geometric model, and optimize the set of vertex data according to the removal result to generate the lightweight component data carrying physical rendering parameters.
7. The method according to claim 1, wherein Based on the functional attribute division rule of building components, parse the design parameters into geometric topology data of multiple independent components, and dynamically generate a multi-level detail geometric model for each independent component according to the terminal display resolution and the viewing distance, including: According to the functional attribute division rule of building components, extract the independent component data corresponding to walls, beams, columns, doors, and windows from the design parameters to generate initial geometric topology data; Based on the terminal display resolution and the current viewing distance, calculate the display detail level of the independent component data, and generate geometric simplification parameters matching the display detail level; According to the geometric simplification parameters, perform vertex merging and patch simplification on the initial geometric topology data to generate optimized geometric topology data; Associate and store the optimized geometric topology data with the functional attribute division rule, and dynamically generate a multi-level detail geometric model for each independent component.
8. A cloud-based collaborative 3D building modeling and rendering system based on WebGL, characterized in that, Including: A parsing module for obtaining the design parameters of the target building from the cloud database, parsing the design parameters into geometric topology data of multiple independent components based on the functional attribute division rule of building components, and dynamically generating a multi-level detail geometric model for each independent component according to the terminal display resolution and the viewing distance; A calculation module for attaching material physical attributes to the surface vertex data of the multi-level detail geometric model, calculating the diffuse reflection coefficient and the specular reflection intensity of the material physical attributes and the building scene lighting conditions through a ray tracing algorithm, and generating lightweight component data carrying physical rendering parameters; A synthesis module for responding to the perspective switching instruction of the terminal user, allocating a main GPU node from the distributed GPU cluster according to the spatial block corresponding to the current perspective, splitting the lightweight component data by the main GPU node according to the spatial block, and allocating the adjacent blocks of the spatial block to the edge GPU nodes. The edge GPU nodes perform parallel ray tracing calculations on the allocated blocks based on the WebGL protocol, return the calculation results to the main GPU node, and synthesize and display the terminal display image.
9. A computing device, characterized in that, Including a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement a WebGL-based cloud collaborative three-dimensional building modeling and rendering method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that, A computer program is stored, and when the computer program is executed by a computer, it implements a WebGL-based cloud collaborative three-dimensional building modeling and rendering method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Three dimensional Boolean calculating method for quantity survey in construction
CN102662915A
BIM model external contour layering parallel rapid extraction method and system
CN112559188A