A building information three-dimensional scene rendering positioning method, system and medium
Patent Information
- Application Number
- CN202211137349.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-09-19
AI Technical Summary
[0005]1、每加载一个三维农房模型都需要创建一个threejs的场景、相机以及对应的渲染器,造成加载多个农房BIM模型时系统性能较差,耗费大量算力
[0037] Compared with existing technologies, the beneficial effects achieved by the architectural information 3D scene rendering and positioning method, system, and storage medium proposed in this invention include:
Smart Images

Figure CN115496847B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to information management technology for buildings, specifically a method, system, and storage medium for rendering and locating three-dimensional scenes of building information. Background Technology
[0002] In the three-dimensional scene of building information in rural communities, the main components include farmhouses and the surrounding farmland. In traditional farmhouse information management, data is usually displayed in two dimensions or charts, lacking the association between the three-dimensional spatial entities and attribute information of farmhouses. Geographical location is represented by simple drawings or boundaries (the boundaries around the house or farmland, etc.), which leads to problems such as disputes and poor timeliness in farmhouse construction, old house improvement and management.
[0003] In recent years, the integration of 3D scene technology has been widely applied in urban information management, providing a more intuitive and convenient channel for traditional rural housing information management. In practical applications, 3D models provide the data foundation for the microscopic realm, while Geographic Information Systems (GIS) provide spatial reference information such as the surrounding geographical environment of the model. GIS collects, manages, analyzes, and displays geographic data in the Earth's surface space. In web page rendering, 3D models store and display entity information in the microscopic realm in formats such as glTF, 3dtiles, obj, and fbx. By integrating GIS with 3D models, GIS is introduced from the macroscopic realm to the microscopic realm, enabling interaction between 3D model information in the microscopic realm and GIS information in the macroscopic realm. Currently, for the standalone display of 3D models, Three.js is typically used for front-end display, while lightweight front-end display frameworks such as Mapbox are commonly used for 2D and 3D visualization of GIS.
[0004] Although existing Mapbox technology offers relatively simple extension support for loading 3D models using Three.js, it cannot fully integrate the two scenarios. In practical applications of integrated rural housing information scenarios, the following main problems exist:
[0005] 1. Each time a 3D farmhouse model is loaded, a Three.js scene, camera, and corresponding renderer need to be created, resulting in poor system performance and a large amount of computing power consumption when loading multiple farmhouse BIM models.
[0006] 2. The 3D model is based on world coordinates and local coordinates in a spatial rectangular coordinate system to determine the location, while the map in the GIS webpage is based on a projected coordinate system to determine the location of features. The inconsistency between the two coordinate systems leads to problems such as position offset, loading flickering, and poor accuracy of floating-point data calculation when switching between multiple rural community 3D scenes. Summary of the Invention
[0007] To overcome the shortcomings of existing technologies, this invention provides a method, system, and storage medium for rendering and locating 3D scenes in building information systems. All model elements within a 3D scene are integrated into a scene library for drawing 3D images. This scene library renders each frame of the 3D scene model only once, improving rendering performance. When loading 3D scene model data, the world coordinate origin of the 3D scene is dynamically offset, and the model scene coordinates are converted and merged with the map scene coordinates to achieve precise positioning of the 3D scene model. This solves the technical problem of high computational cost when loading multiple 3D scene models in existing rural housing information management systems that integrate map scenes and model scenes.
[0008] On one hand, embodiments of the present invention provide a method for rendering and locating three-dimensional scenes of building information, including the following steps:
[0009] Create 3D visualization scenes in custom layers using geographic information data visualization tools;
[0010] Render the 3D visualization model scene and the map scene of the geographic information data visualization tool onto the same canvas, so that the two scenes share a single canvas, allowing the 3D visualization model scene to obtain depth buffer data.
[0011] The camera position and angle of the 3D visualization model scene and the map scene of the geographic information data visualization tool are synchronized to make the content displayed in the two scenes consistent.
[0012] Acquire positioning point information, including latitude, longitude and altitude, and accurately locate the 3D model of the building in the 3D scene based on the coordinates of the building's location.
[0013] The building model is loaded onto the positioning point, and the latitude, longitude and height coordinates of the positioning point are converted by merging the map scene and the 3D visualization model scene of the geographic information data visualization tool to achieve the positioning of the building model.
[0014] A custom layer of the map scene in a geographic information data visualization tool is rendered to obtain a 3D visualization model scene of the building.
[0015] In a preferred embodiment, creating a 3D visualization scene in a custom layer using a geographic information data visualization tool includes four layers:
[0016] The first layer is the scene root node, which is used for unified management of child objects;
[0017] The second layer consists of scene lighting and an object group for unified management of building model objects. The origin of the projection coordinates of the object group in the map scene is (0,0,0), and the origin of the world coordinates in the 3D visualization model scene is set as the center point coordinates of the current map.
[0018] The third layer is the 3D model object layer under the object group, including a layered binary 3D model layer and a normal 3D model layer. Each layer stores and manages multiple model objects, and manages multiple building models in a specific building scene.
[0019] The fourth layer is the building model. The three-dimensional model objects at this level are positioned by setting the latitude and longitude coordinates of the center point of the building's location.
[0020] In a preferred embodiment, synchronizing the camera position and angle of the 3D visualization model scene and the map scene of the geographic information data visualization tool includes:
[0021] The projection matrix of the map scene camera in the geographic information data visualization tool is obtained by using the parameters of the rendering function.
[0022] Calculate and obtain the positioning and viewing angle of the camera in the 3D visualization model scene in the 3D visualization world coordinates, and set them to the world matrix of the camera in the 3D visualization model scene;
[0023] The 3D visualization scene camera is transformed by using the origin position of the 3D visualization model scene, the projection matrix of the map scene camera, and the world matrix of the 3D visualization scene camera, and the projection matrix of the 3D visualization scene camera is calculated.
[0024] In a preferred embodiment, the building model is loaded onto the positioning point. By fusing the map scene and the 3D visualization model scene from a geographic information data visualization tool, the latitude, longitude, and height coordinates of the positioning point are converted to achieve the positioning of the building model. This includes:
[0025] Convert latitude and longitude coordinates to projected coordinates;
[0026] Convert from map scene coordinate system to 3D visualization model scene coordinate system;
[0027] When loading and locating a 3D visualization model, the coordinates are offset relative to the parent model, so that the 3D visualization model is located in the map scene of the geographic information data visualization tool by converting latitude and longitude to the coordinate system of the 3D visualization model scene.
[0028] In a preferred embodiment, the geographic information data visualization tool is Mapbox, the 3D visualization scene is a Three.js model scene, the building model is a farmhouse model, the 3D building information scene is a comprehensive farmhouse information scene, and the location of the building is a homestead.
[0029] On the other hand, embodiments of the present invention provide a three-dimensional scene rendering and positioning system for building information, comprising:
[0030] The scene creation module is used to create 3D visualization scenes in custom layers of geographic information data visualization tools;
[0031] The canvas rendering module is used to render the 3D visualization model scene and the map scene of the geographic information data visualization tool onto the same canvas, so that the two scenes share a canvas and the 3D visualization model scene can obtain depth buffer data.
[0032] The synchronization module is used to synchronize the camera position and angle of the 3D visualization model scene and the map scene of the geographic information data visualization tool, so that the content displayed in the two scenes is consistent.
[0033] The positioning module is used to acquire positioning point information, including latitude, longitude and altitude, and to accurately locate the 3D model of the building in the 3D scene based on the coordinates of the building's location.
[0034] The fusion module is used to load the building model onto the positioning point. By fusion of the map scene of the geographic information data visualization tool and the 3D visualization model scene, the latitude, longitude and height coordinates of the positioning point are converted to achieve the positioning of the building model.
[0035] The scene rendering module is used to render custom layers of map scenes in geographic information data visualization tools to obtain 3D visualization model scenes of buildings.
[0036] In another aspect, embodiments of the present invention also provide a computer storage medium storing a computer program, which, when executed by a processor, implements the above-described method for rendering and locating three-dimensional scenes of building information.
[0037] Compared with existing technologies, the beneficial effects achieved by the architectural information 3D scene rendering and positioning method, system, and storage medium proposed in this invention include:
[0038] 1. This invention integrates all model elements in a 3D scene of rural building information into a scene library for drawing 3D images, namely the threejs scene library. This scene library renders each frame of the 3D scene model only once, which improves rendering performance and reduces the computing power consumed when merging map scenes and model scenes to load multiple 3D scene models.
[0039] 2. When loading the data of a 3D scene model of a rural farmhouse, this invention dynamically offsets the world coordinate origin of the 3D scene by organizing and managing the coordinates of the 3D model scene, and transforms and merges the coordinates of the Three.js model scene with the coordinates of the Mapbox map scene to achieve accurate positioning of the 3D model of the farmhouse. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart of the three-dimensional scene rendering and positioning method for building information in an embodiment of the present invention;
[0042] Figure 2 This is a hierarchical structure diagram of the model scene in this embodiment of the invention. Detailed Implementation
[0043] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely intended to explain the present invention and not to limit the present invention. For those skilled in the art, the present invention can be practiced without some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present invention by illustrating examples of the invention.
[0044] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0045] It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of this invention can be combined with each other. The embodiments will now be described in detail with reference to the accompanying drawings.
[0046] Example 1
[0047] like Figure 1 As shown, this embodiment provides a method for rendering and locating a 3D scene of building information. The geographic information data visualization tool is Mapbox, and the 3D visualization scene is a Three.js model scene. The rendering and locating method specifically includes the following steps:
[0048] Step S1: Create a 3D visualization Three.js model scene in a custom layer of the geographic information data visualization tool Mapbox, including a camera, a scene, and a renderer WebGLRenderer.
[0049] The created Three.js model scenario consists of four layers, as follows:
[0050] The first layer is the Scene, which serves as the root node of the scene and is used for unified management of child objects.
[0051] The second layer consists of scene lights (Light) and a group of mapboxMercator objects. The mapboxMercator object group is used for unified management of farmhouse model objects. The origin of the mapboxMercator object group's projection coordinates in the map scene is (0,0,0), and the origin of its world coordinates in the Three.js model scene is set to the center point coordinates (x,y,z) of the current map. Specifically, in the Three.js model scene, the mapboxMercator object group is positioned at the negative value of the center point coordinates (x,y,z) of the current map, i.e., (-x,-y,-z).
[0052] The third layer is the 3D model object layer under the mapboxMercator object group, which includes the layered binary 3D model layer 3dTilesLayer and the ordinary 3D model layer objectLayer. Each layer can store and manage multiple model objects, and manage multiple farmhouse models in a specific rural scene.
[0053] The fourth layer is the farmhouse model. The three-dimensional model objects at this level can be located by setting the latitude and longitude coordinates (lng, lat, height) of the center point of the homestead.
[0054] like Figure 2As shown, each model object can contain multiple layers of sub-component objects to represent components within the house model, such as walls, floors, tables, chairs, and appliances. These include Group, Object3D, and Mesh objects. Group and Object3D objects can contain nested Group, Object3D, and Mesh objects. Setting the local coordinates (xLocal, yLocal, zLocal) of the sub-component object relative to the interior of the house is the local positioning. The corresponding world coordinates are (xLocal+xProj-x, yLocal+height-y, zLocal+yProj-z).
[0055] Step S2: Render the Three.js model scene and the Mapbox map scene onto the same canvas. This allows the Three.js model scene to obtain depth buffer data and render a more realistic 3D effect.
[0056] In a preferred embodiment, when rendering the Mapbox layer, the built-in layers other than custom layers are rendered first.
[0057] Step S3: Synchronize the camera position and angle of the Three.js model scene and the Mapbox map scene to ensure consistency in the content displayed by the two scenes, including consistency in geographic coordinates and depth buffer.
[0058] This step synchronizes the camera position and angle between the Three.js model scene and the Mapbox map scene, including the following steps:
[0059] S31. Obtain the projection matrix of the Mapbox map scene camera through the parameters of the render function. The render method is a commonly used rendering function for Three.js model scenes, and will not be described in detail here.
[0060] S32. Calculate and obtain the position and view angle of the camera in the Three.js model scene in Three.js world coordinates, and set it to the matrixWorld matrix (i.e., world matrix) of the Three.js model scene camera.
[0061] S33. Transform the Three.js scene camera using the origin position of the Three.js model scene, the projection matrix of the Mapbox scene camera, and the matrixWorld matrix of the Three.js scene camera, and calculate the projection matrix of the Three.js scene camera.
[0062] The specific steps for converting the camera in a Three.js scene are as follows:
[0063] S331, Position Offset: Obtain the camera projection coordinates mapboxCameraCoor of the Mapbox map scene and the projection coordinates threeOriginCoor of the origin of the threejs model scene in the Mapbox map scene. Subtract the projection coordinates threeOriginCoor from the camera projection coordinates mapboxCameraCoor of the Mapbox map scene to obtain the coordinates of the camera in the threejs model scene, and obtain the translation matrix of the camera in the threejs scene.
[0064] S332, Angle Rotation: When the camera in the Mapbox scene is perpendicular to the Mapbox map, obtain the rotation angle of the Mapbox scene camera on the z-axis, `mapboxBearing`. When the Mapbox scene camera is in other viewpoints (other than perpendicular), obtain the rotation matrix of the Three.js model scene camera when pointing to the current screen center point. Essentially, this calculates the camera matrix of the Mapbox scene and converts it into camera coordinates in the world coordinates of the Three.js model scene.
[0065] S333. Multiply the translation and rotation matrices of the Three.js scene camera to obtain the transformation matrix of the Three.js scene camera, and assign it to the world matrix matrixWorld and projection matrix of the Three.js scene camera to ensure that the camera position and angle of the Three.js scene camera are consistent with those of the Mapbox map scene camera.
[0066] Step S4: Obtain positioning point information, which includes latitude, longitude and altitude. In the rural housing comprehensive information scenario, the three-dimensional model of the farmer's house is accurately located based on the homestead coordinates.
[0067] The height includes terrain height and relative terrain height. Since the specific terrain height may fluctuate depending on the accuracy requirements, the relative terrain height of the BIM model is dynamically set to keep the BIM model always close to the ground. The terrain height is calculated by dynamically acquiring the pixel values corresponding to the latitude and longitude of the RGB terrain raster data loaded into the rural housing integrated information scene; the relative terrain height is adjusted through rural housing attributes, such as foundation height. When loading rural housing, the foundation is placed underground by offsetting.
[0068] Step S5: Load the farmhouse model onto the positioning point. By merging the Mapbox map scene and the Three.js model scene, convert the latitude, longitude and height coordinates of the positioning point to achieve the positioning of the farmhouse model.
[0069] In some preferred embodiments, the latitude, longitude, and altitude coordinates of the location points are converted by fusing the Mapbox map scene and the Three.js model scene to achieve the positioning of the farmhouse model. The specific implementation method is as follows:
[0070] Step S51: Convert latitude and longitude coordinates to projected coordinates (xProj, yProj, height).
[0071] Step S52: Convert the coordinate system from the Mapbox map scene (a right-handed coordinate system with the z-axis pointing upwards) to the Three.js model scene coordinate system (a right-handed coordinate system with the y-axis pointing upwards). During the conversion, the y and z values of the coordinates must be swapped. That is, the z-value height in the Mapbox map scene should be set to the y-axis value in the Three.js model scene, and the y-value yProj in the Mapbox map scene should be set to the z-axis value in the Three.js model scene. That is, the local coordinates in the Three.js model scene are (xProj, height, yProj).
[0072] Step S53: When loading and positioning the Three.js model, offset it relative to the parent's coordinates (-x, -y, -z). This allows the Three.js model to be positioned in the Three.js model scene coordinate system by converting latitude and longitude in the Mapbox map scene. Therefore, the world coordinates in the Three.js model scene are (xProj-x, height-y, yProj-z).
[0073] Step S6: Based on the settings in steps S2-S5 above, render the custom layer of the Mapbox map scene to obtain the Three.js model scene of the farmhouse.
[0074] Using the method described above, each frame of the Three.js model scene only needs to be rendered once. The 3D farmhouse model loaded into the Three.js model scene will be converted to world coordinates of the Three.js model scene and added to it; no new scene will be created for rendering. Here, "each frame" refers to every frame in the 3D scene, and also every frame of the Mapbox scene, because the Three.js model scene is a custom layer within the Mapbox scene.
[0075] In some preferred embodiments, when rendering a custom layer in each frame and processing the world coordinate origin position of the Three.js model scene, the position is dynamically adjusted based on the current map's center point, zoom level, and time difference to maintain accurate positioning when switching between multiple distant rural scenes. The specific implementation method is as follows:
[0076] Step S61: Determine the distance to the center point: When the viewport position changes, calculate the distance between the center point positions before and after the change. When the distance exceeds 50,000 meters, the coordinates show a significant shift, and the world coordinate origin needs to be moved.
[0077] Step S62: Determine the current zoom level: Only when the map zoom level is greater than 8 will the world coordinate origin be moved, because the accuracy requirement for the model position is low at small scales. The movement calculation is only performed at medium or large scales to reduce the amount of calculation.
[0078] Step S63: Determine the time: Record the time of the last move. Only when the current rendering time is greater than 1 second from the last rendering time is it necessary to move the world coordinate origin to avoid frequent calculations and wasting computing power.
[0079] Step S64: When the center point distance, zoom level, and time difference conditions are all met, reposition the current mapboxMercator object group to the center point of the current map, move the world coordinate origin of the Three.js model scene, update the model coordinates, and eliminate the positioning offset.
[0080] Example 2
[0081] Based on the same inventive concept as Embodiment 1, this embodiment provides a building information 3D scene rendering and positioning system, including:
[0082] The scene creation module is used to implement step S1 of embodiment 1, which creates a three-dimensional visualization scene in a custom layer of a geographic information data visualization tool;
[0083] The canvas rendering module is used to implement step S2 of embodiment 1, rendering the 3D visualization model scene and the map scene of the geographic information data visualization tool onto the same canvas, so that the two scenes share a canvas, and the 3D visualization model scene obtains the depth buffer data.
[0084] The synchronization module is used to implement step S3 of embodiment 1, which synchronizes the camera position and angle of the 3D visualization model scene and the map scene of the geographic information data visualization tool, so that the content displayed by the two scenes is consistent.
[0085] The positioning module is used to implement step S4 of embodiment 1, to obtain positioning point information, which includes latitude, longitude and altitude, and to accurately locate the 3D model of the building in the 3D scene of building information based on the coordinates of the building's location;
[0086] The fusion module is used to implement step S5 of embodiment 1, which loads the building model onto the positioning point and converts the latitude, longitude and height coordinates of the positioning point by fusion of the map scene of the geographic information data visualization tool and the three-dimensional visualization model scene, thereby realizing the positioning of the building model.
[0087] The scene rendering module is used to implement step S6 of embodiment 1, rendering a custom layer of the map scene of the geographic information data visualization tool to obtain a three-dimensional visualization model scene of the building.
[0088] Steps S1-S6 have been described in detail in Example 1. To keep the description concise, this example will not describe the specific functions implemented by each module in detail. Please refer to Example 1.
[0089] This embodiment also provides a computer storage medium storing a computer program. When the computer program is executed by a processor, it implements steps S1-S6 of the architectural information three-dimensional scene rendering and positioning method described in Embodiment 1, as detailed in the specific description of Embodiment 1.
[0090] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0091] The functional blocks shown in the above structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. The programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0092] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0093] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0094] The above are merely specific embodiments of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for rendering and locating three-dimensional scenes using building information, characterized in that, Includes the following steps: Create 3D visualization scenes in custom layers using geographic information data visualization tools; Render the 3D visualization model scene and the map scene of the geographic information data visualization tool onto the same canvas, so that the two scenes share a single canvas, allowing the 3D visualization model scene to obtain depth buffer data. The camera position and angle of the 3D visualization model scene and the map scene of the geographic information data visualization tool are synchronized to make the content displayed in the two scenes consistent. Acquire positioning point information, including latitude, longitude and altitude, and accurately locate the 3D model of the building in the 3D scene based on the coordinates of the building's location. The building model is loaded onto the positioning point, and the latitude, longitude and height coordinates of the positioning point are converted by merging the map scene and the 3D visualization model scene of the geographic information data visualization tool to achieve the positioning of the building model. A custom layer of the map scene in a geographic information data visualization tool is rendered to obtain a 3D visualization model scene of the building; Creating a 3D visualization scene using custom layers in a geographic information data visualization tool involves four layers: The first layer is the scene root node, which is used for unified management of child objects; The second layer consists of scene lighting and an object group for unified management of building model objects. The origin of the projection coordinates of the object group in the map scene is (0,0,0), and the origin of the world coordinates in the 3D visualization model scene is set as the center point coordinates of the current map. The third layer is the 3D model object layer under the object group, including a layered binary 3D model layer and a normal 3D model layer. Each layer stores and manages multiple model objects, and manages multiple building models in a specific building scene. The fourth layer is the building model. The three-dimensional model objects at this level are positioned by setting the latitude and longitude coordinates of the center point of the building's location. Synchronize the camera position and angle of the 3D visualization model scene and the map scene of the geographic information data visualization tool, including: The projection matrix of the map scene camera in the geographic information data visualization tool is obtained by using the parameters of the rendering function. Calculate and obtain the positioning and viewing angle of the camera in the 3D visualization model scene in the 3D visualization world coordinates, and set them to the world matrix of the camera in the 3D visualization model scene; The 3D visualization scene camera is transformed by using the origin position of the 3D visualization model scene, the projection matrix of the map scene camera, and the world matrix of the 3D visualization scene camera, and the projection matrix of the 3D visualization scene camera is calculated.
2. The method for rendering and locating three-dimensional scenes of building information according to claim 1, characterized in that, Create 3D visualization scenes, including cameras, scenes, and renderers, in custom layers using geographic information data visualization tools.
3. The method for rendering and locating three-dimensional scenes of building information according to claim 1, characterized in that, The camera is converted for 3D visualization scenes, including: Position offset: Obtain the camera projection coordinates of the map scene and the projection coordinates of the origin of the 3D visualization model scene in the map scene. Subtract the projection coordinates from the camera projection coordinates of the map scene to obtain the coordinates of the camera in the 3D visualization model scene, and obtain the translation matrix of the camera in the 3D visualization scene. For angle rotation, when the scene camera and the map of the geographic information data visualization tool are in a perpendicular view, obtain the rotation angle of the scene camera on the z-axis; when the scene camera and the map of the geographic information data visualization tool are in a view other than the perpendicular view, obtain the rotation matrix of the 3D visualization model scene camera in the 3D visualization model scene when it points to the current screen center point. Multiply the translation and rotation matrices of the 3D visualization scene camera to obtain the transformation matrix of the 3D visualization scene camera, and assign it to the world matrix and projection matrix of the 3D visualization scene camera to ensure that the camera position and angle of the 3D visualization scene camera are consistent with those of the map scene camera.
4. The method for rendering and locating three-dimensional scenes of building information according to claim 1, characterized in that, In the location point information, the height includes terrain height and relative terrain height; the terrain height is calculated by dynamically acquiring the pixel values of latitude and longitude corresponding to the terrain raster data loaded into the 3D scene of the building information; the relative terrain height is adjusted by the building attributes.
5. The method for rendering and locating three-dimensional scenes of building information according to claim 1, characterized in that, The building model is loaded onto the location point. By merging the map scene and the 3D visualization model scene using a geographic information data visualization tool, the latitude, longitude, and height coordinates of the location point are converted to achieve the positioning of the building model, including: Convert latitude and longitude coordinates to projected coordinates; Convert from map scene coordinate system to 3D visualization model scene coordinate system; When loading and locating a 3D visualization model, the coordinates are offset relative to the parent model, so that the 3D visualization model is located in the map scene of the geographic information data visualization tool by converting latitude and longitude to the coordinate system of the 3D visualization model scene.
6. The method for rendering and locating three-dimensional scenes of architectural information according to any one of claims 1-5, characterized in that, The geographic information data visualization tool is Mapbox, the 3D visualization scene is a Three.js model scene; the building model is a farmhouse model, the 3D scene of building information is a comprehensive farmhouse information scene, and the location of the building is a homestead.
7. A building information three-dimensional scene rendering and positioning system, characterized in that, The rendering and positioning method based on claim 1 includes: The scene creation module is used to create 3D visualization scenes in custom layers of geographic information data visualization tools; The canvas rendering module is used to render the 3D visualization model scene and the map scene of the geographic information data visualization tool onto the same canvas, so that the two scenes share a canvas and the 3D visualization model scene can obtain depth buffer data. The synchronization module is used to synchronize the camera position and angle of the 3D visualization model scene and the map scene of the geographic information data visualization tool, so that the content displayed in the two scenes is consistent. The positioning module is used to acquire positioning point information, including latitude, longitude and altitude, and to accurately locate the 3D model of the building in the 3D scene based on the coordinates of the building's location. The fusion module is used to load the building model onto the positioning point. By fusion of the map scene of the geographic information data visualization tool and the 3D visualization model scene, the latitude, longitude and height coordinates of the positioning point are converted to achieve the positioning of the building model. The scene rendering module is used to render custom layers of map scenes in geographic information data visualization tools to obtain 3D visualization model scenes of buildings.
8. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the architectural information three-dimensional scene rendering and positioning method according to any one of claims 1-6.
Citation Information
Patent Citations
Engineering scene establishing method
CN112069582A
BIM (Building Information Modeling) and GIS (Geographic Information System) information fusion display method and related components
CN114663324A