Method for loading pns format of point cloud based on U3D
By loading point cloud pnts format using U3D technology and utilizing asynchronous threads and GPU acceleration, efficient processing and real-time rendering of point cloud data are achieved, solving the bottleneck problem in traditional point cloud loading methods. This approach is suitable for digital twins and cultural heritage protection.
Patent Information
- Application Number
- CN202511773327.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-24
AI Technical Summary
Traditional point cloud loading methods are difficult to implement large-scale real-time point cloud interaction on mobile devices, resulting in excessively long loading times, high memory consumption, low rendering efficiency, and making it difficult for users to intuitively understand and analyze point cloud data.
The point cloud pnts format method based on U3D technology is adopted. The point cloud data is converted into a Unity-recognizable Mesh or PointCloud structure through an asynchronous thread. Combined with the 3DTiles specification and GPU acceleration, the operation and storage are synchronized to perform preprocessing noise reduction, format conversion and dynamic loading.
It solves the bottleneck of real-time rendering of large-scale point clouds in Unity3D, supports binary storage of point cloud position, color and normal information, optimizes data scheduling, improves spatial positioning accuracy, and is suitable for digital twins and cultural heritage protection.
Smart Images

Figure CN121560414A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of 3D point cloud data processing technology, specifically a method for loading point cloud pnts format based on U3D. Background Technology
[0002] Point cloud data typically contains a large number of points, each with its own coordinates and attribute information. The data volume becomes enormous when point cloud data is aggregated and processed, posing challenges to storage and transmission. Furthermore, due to the complexity of point cloud data, traditional loading methods may not be able to process this data quickly, resulting in excessively long loading times. Storing large amounts of point cloud data requires significant investment. Traditional point cloud loading suffers from high memory consumption and low rendering efficiency, especially on mobile devices where large-scale real-time point cloud interaction is difficult, making it hard for users to intuitively understand and analyze point cloud data. Therefore, to optimize point cloud data analysis and enable binary storage of point cloud position, color, and normal information, optimizing data scheduling using the 3DTiles layer tile mechanism is crucial. However, Unity natively lacks a pnts parsing module. To address this, based on current needs in point cloud data analysis and processing, the applicant proposes a method for loading point cloud pnts format data using Unity3D. This method utilizes point cloud convolution operations to efficiently process compressed data, and performs zero-value and non-zero-value writing operations in an independent thread, achieving simultaneous computation and storage, accelerating the data restoration process. Through a closed-loop technology of preprocessing noise reduction → format conversion → dynamic loading → GPU acceleration, this method solves the bottleneck of large-scale point cloud real-time rendering in Unity3D, making it suitable for fields such as digital twins and cultural heritage preservation. Summary of the Invention
[0003] To address the aforementioned technical issues, this invention proposes a method for loading point cloud PNTS format data using Unity3D. This method rapidly loads PNTS point cloud scenes using Unity3D technology, exports Tile point cloud data in PNTS format according to the 3dTiles specification, and after parsing the PNTS binary file, converts the point cloud data into a Unity-recognizable Mesh or PointCloud structure via an asynchronous thread without plugins. It dynamically and incrementally loads large-scale scenes and includes a built-in coordinate transformation module that automatically maps the global coordinate system in PNTS to the Unity local coordinate system, ensuring spatial positioning accuracy. The method utilizes point cloud convolution operations to efficiently process compressed data, performing zero-value and non-zero-value write operations through an independent thread, achieving synchronous computation and storage, accelerating the data restoration process. Through a closed-loop technology of preprocessing noise reduction → format conversion → dynamic loading → GPU acceleration, it solves the bottleneck of real-time rendering of large-scale point clouds in Unity3D, and is applicable to fields such as digital twins and cultural heritage protection.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0005] A method for loading point cloud PNTS format based on Unity 3D is characterized by: the method rapidly loading PNTS point cloud scenes using Unity 3D technology, exporting Tile point cloud data in PNTS format according to the 3dTiles specification, and after parsing the PNTS binary file, converting the point cloud data into a Unity-recognizable Mesh or PointCloud structure through an asynchronous thread without plugins. Large-scale scenes are loaded dynamically and incrementally, and a built-in coordinate transformation module automatically maps the global coordinate system in PNTS to the Unity local coordinate system, improving spatial positioning accuracy.
[0006] Furthermore, the specific steps for implementing the method of loading point cloud pnts format based on U3D are as follows:
[0007] Step 1: Collect real photo information data using a drone, and export Tile point cloud data in pnts format according to the 3dTiles specification;
[0008] Step 2: Based on the 3dTiles specification, use U3D scripts to serialize and read the 3dTiles data structure cached as nested Tile data objects, initialize the key data of each Tile level, use U3D real-time periodic functions to perform calculation and filtering processing based on the key data of each Tile level, and generate point cloud data pnts through DJI mapping software;
[0009] Step 3: Export cloud data (pnts) from DJI mapping software;
[0010] Step 4: Parse the PNTS binary file and import it into Unity3D; according to the 3DTiles specification, obtain the PNTS binary header data, and obtain the Tile center offset value, point coordinate length, point coordinate set (Points), and point color set (Colors) from the header data to obtain the basic data for rendering each Tile. Then, use Unity3D technology to reconstruct and render the Tile; since the coordinate system in the 3DTiles specification is incompatible with the coordinate system supported by Unity3D technology, a coordinate system conversion process is required; use an asynchronous thread to convert the point cloud data into a Mesh or PointCloud structure that Unity can recognize;
[0011] Step 5: Achieve synchronization between computation and storage; Utilize point cloud convolution operations to efficiently process compressed data, and execute write zero and non-zero value operations through independent threads to achieve synchronization between computation and storage;
[0012] Step Six: Utilize Unity3d's resource management mechanism to associate, compress, and encrypt binary files using Assetbundle; browse the 3D construction environment using a BS architecture system; configure and publish the WebGL platform based on Unity3d's cross-platform compatibility; embed system interactions using HTML5 iframe tags; and extract the global coordinate system from pnts to the Unity local coordinate (x, y, z) set to improve spatial positioning accuracy.
[0013] Furthermore, in step two of the method for loading point cloud pnts format based on U3D, the initialization of key data for each level of Tile includes index address, associated parent Tile, child Tile set, Tile entity type, geometric volume, geometric error, fine mode, and spatial matrix.
[0014] Furthermore, in step two of the method for loading point cloud pnts format using U3D, the calculation and filtering process based on the key data of each tile level includes the rendering view frustum AABB visual filtering method and the screen pixel error SSE fineness filtering method, specifically:
[0015] 1) Rendering the view frustum AABB visual filtering method, using U3D rendering technology and tile geometry volume for preliminary filtering;
[0016] 2) Screen pixel error SSE fine-grained filtering method: Tile rendering distance camDistance is calculated by comparing the tile space matrix coordinates tileV with the U3D rendering camera coordinates camV relative to V, and taking the coordinate modulus of V. Specifically:
[0017] V = camV - tileV
[0018] camDistance=
[0019] The view frustum height (viewHeight) is calculated using the wide-angle fieldOfView of the Unity 3D rendering camera. Specifically:
[0020] viewHeight=2.0*tan(fieldOfView*0.5*
[0021] Finally, using the geometric error (geometricError) during Tile data initialization and the current screen height (screenHeight), the screen error (SSE) is calculated as follows:
[0022] SSE=(geometricError*screenHeight) / (camDistance*viewHeight)
[0023] 3) Obtain the Tile to be rendered, recursively process the nested sub-Tile set, and compare the SSE obtained by the filtering algorithm with the maximum screen pixel error limit MaxScreenSpaceError set according to the scene requirements. Finally, use the Tile index address to download and read the PNTS format binary file.
[0024] Furthermore, the specific process of transforming the coordinate system in the 3DTiles specification to the coordinate system supported by U3D technology in step three of the method for loading point clouds in pnts format based on U3D is as follows:
[0025] Latitude, Longitude, and Altitude LLA(Lon,Lat,Alt) – Cartesian ECEF(X,Y,Z) – U3D POS(X,Y,Z); This transforms the coordinate values in the basic data for tile rendering. First, the original latitude and longitude coordinates of the points are converted, specifically as follows:
[0026] Earth's semi-major axis: EARTH_A=6378137.0;
[0027] Earth's oblateness: EARTH_F = 1 / 298.257223563;
[0028] Earth scaling factor: EARTH_S = (1 - EARTH_F);
[0029] Earth's minor semi-axis: EARTH_B = EARTH_A * EARTH_S;
[0030] First eccentricity squared: ECC_SQ = EARTH_F * (2 - EARTH_F);
[0031] Ellipsoid radius of curvature: N = EARTH_A /
[0032] After transformation, the ECEF three-dimensional coordinates (X,Y,Z) are obtained;
[0033] ECEF.X=(N+LLA.Alt)*cos(LLA.Lat)*cos(LLA.Lon);
[0034] ECEF.Y=(N+LLA.Alt)*cos(LLA.Lat)*sin(LLA.Lon);
[0035] ECEF.Z=(N*(1-ECC_SQ)+LLA.Alt)*sin(LLA.Lat);
[0036] The obtained ECEF coordinates are converted to U3D coordinates by first setting a latitude, longitude, and altitude reference point Ref(Lon,Lat,Alt), and then using the above Ref(Lon,Lat,Alt) to convert to ECEF coordinates Ref(X,Y,Z); finally, U3D POS(X,Y,Z) can be obtained:
[0037] POS.X = ECEF.X - Ref.X;
[0038] POS.Y = ECEF.Z - Ref.Y;
[0039] POS.z=ECEF.Y-Ref.Y
[0040] Through the above conversion process, the Tile point cloud obtains U3D coordinates, and the U3D Mesh technology is used to construct and render the point cloud with the Tile point coordinate set Points and the point color set Colors.
[0041] The benefits of this application are:
[0042] 1. The method for loading point cloud pnts format based on U3D uses U3D technology to quickly load pnts point cloud scenes. This method solves the bottleneck of real-time rendering of large-scale point clouds in Unity3D through a closed loop of technology: preprocessing noise reduction → format conversion → dynamic loading → GPU acceleration.
[0043] 2. The U3D-based point cloud pnts format loading method supports binary storage of point cloud position, color, and normal information, and optimizes data scheduling by combining the 3DTiles hierarchical tile mechanism;
[0044] 3. The method of loading point cloud pnts format based on U3D can realize the conversion between the coordinate system in the 3DTiles specification and the coordinate system supported by U3D technology;
[0045] 4. The method of loading point cloud pnts format based on U3D utilizes point cloud convolution operations to efficiently process compressed data. It performs zero-value and non-zero-value writing operations through an independent thread, so that the operation and storage are performed synchronously. Attached Figure Description
[0046] Figure 1 This is a schematic diagram illustrating the implementation process of the method of the present invention. Detailed Implementation
[0047] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0048] like Figure 1 As shown, this is a method for loading point cloud PNTS format using Unity3D. This method rapidly loads PNTS point cloud scenes using Unity3D technology, exports Tile point cloud data in PNTS format according to the 3dTiles specification, and after parsing the PNTS binary file, converts the point cloud data into a Unity-recognizable Mesh or PointCloud structure via an asynchronous thread without plugins. It dynamically and incrementally loads large-scale scenes and includes a built-in coordinate transformation module that automatically maps the global coordinate system in PNTS to the Unity local coordinate system, ensuring spatial positioning accuracy.
[0049] The specific steps for implementing the point cloud pnts format method based on U3D are as follows:
[0050] Step 1: Collect real photo information data using a drone, and export Tile point cloud data in pnts format according to the 3dTiles specification;
[0051] Step 2: Based on the 3dTiles specification, use U3D scripts to serialize and read the 3dTiles data structure cached as nested Tile data objects. Initialize the key data of each level of Tile. The initialization of key data of each level of Tile includes index address, associated parent Tile, child Tile set, Tile entity type, geometric volume, geometric error, fine mode and spatial matrix, etc. Use U3D real-time periodic functions to perform calculation and filtering processing based on the key data of each level of Tile, and generate point cloud data pnts through DJI mapping software.
[0052] The key data for each tile level shown undergoes calculation and filtering processing, including the rendering view frustum AABB visual filtering method and the screen pixel error SSE fine-grained filtering method, specifically:
[0053] 1) Rendering the view frustum AABB visual filtering method, using U3D rendering technology and tile geometry volume for preliminary filtering;
[0054] 2) Screen pixel error SSE fine-grained filtering method: Tile rendering distance camDistance is calculated by comparing the tile space matrix coordinates tileV with the U3D rendering camera coordinates camV relative to V, and taking the coordinate modulus of V. Specifically:
[0055] V = camV - tileV
[0056] camDistance=
[0057] The view frustum height (viewHeight) is calculated using the wide-angle fieldOfView of the Unity 3D rendering camera. Specifically:
[0058] viewHeight=2.0*tan(fieldOfView*0.5*
[0059] Finally, using the geometric error (geometricError) during Tile data initialization and the current screen height (screenHeight), the screen error (SSE) is calculated as follows:
[0060] SSE=(geometricError*screenHeight) / (camDistance*viewHeight)
[0061] 3) Obtain the tiles to be rendered, recursively process nested sub-tile sets, and compare the SSE obtained by the filtering algorithm with the maximum screen pixel error limit MaxScreenSpaceError. MaxScreenSpaceError is a fixed value set according to scene requirements. Finally, download and read PNTS format binary files using the tile index address.
[0062] Step 3: Export cloud data (pnts) from DJI mapping software;
[0063] Step 4: Parse the PNTS binary file and import it into Unity3D; according to the 3DTiles specification, obtain the PNTS binary header data, and obtain the Tile center offset value, point coordinate length, point coordinate set (Points), and point color set (Colors) from the header data to obtain the basic data for rendering each Tile. Then, use Unity3D technology to reconstruct and render the Tile; since the coordinate system in the 3DTiles specification is incompatible with the coordinate system supported by Unity3D technology, a coordinate system conversion process is required; use an asynchronous thread to convert the point cloud data into a Mesh or PointCloud structure that Unity can recognize;
[0064] The specific process of transforming the coordinate system in the 3DTiles specification into the coordinate system supported by Unity technology is as follows:
[0065] 1) Latitude, Longitude, and Height LLA(Lon,Lat,Alt) – Cartesian ECEF(X,Y,Z) – U3D POS(X,Y,Z); This transforms the coordinate values in the basic data for tile rendering. First, the original latitude and longitude coordinates of the points are converted, specifically as follows:
[0066] Earth's semi-major axis: EARTH_A=6378137.0;
[0067] Earth's oblateness: EARTH_F = 1 / 298.257223563;
[0068] Earth scaling factor: EARTH_S = (1 - EARTH_F);
[0069] Earth's minor semi-axis: EARTH_B = EARTH_A * EARTH_S;
[0070] First eccentricity squared: ECC_SQ = EARTH_F * (2 - EARTH_F);
[0071] Ellipsoid radius of curvature: N = EARTH_A /
[0072] After transformation, the ECEF three-dimensional coordinates (X,Y,Z) are obtained;
[0073] ECEF.X=(N+LLA.Alt)*cos(LLA.Lat)*cos(LLA.Lon);
[0074] ECEF.Y=(N+LLA.Alt)*cos(LLA.Lat)*sin(LLA.Lon);
[0075] ECEF.Z=(N*(1-ECC_SQ)+LLA.Alt)*sin(LLA.Lat);
[0076] The obtained ECEF coordinates are converted to U3D coordinates by first setting a latitude, longitude, and altitude reference point Ref(Lon,Lat,Alt), and then using the above Ref(Lon,Lat,Alt) to convert to ECEF coordinates Ref(X,Y,Z); finally, U3D POS(X,Y,Z) can be obtained:
[0077] POS.X = ECEF.X - Ref.X;
[0078] POS.Y = ECEF.Z - Ref.Y;
[0079] POS.z=ECEF.Y-Ref.Y
[0080] Through the above conversion process, the Tile point cloud obtains U3D coordinates, and the U3D Mesh technology is used to construct point cloud rendering with the Tile point coordinate set Points and the point color set Colors.
[0081] Step 5: Achieve synchronization between computation and storage; Utilize point cloud convolution operations to efficiently process compressed data, and execute write zero and non-zero value operations through independent threads to achieve synchronization between computation and storage;
[0082] Step Six: Utilize Unity3d's resource management mechanism to associate, compress, and encrypt binary files using AssetBundle; browse the 3D construction environment using a B / S architecture system; configure and publish the system using the WebGL platform based on Unity's cross-platform compatibility; embed system interactions using HTML5 iframe tags; and extract the global coordinate system from pnts to the Unity local coordinate (x, y, z) set to ensure spatial positioning accuracy.
[0083] The method shown here, which loads point cloud pnts format data based on Unity3D, utilizes point cloud convolution operations to efficiently process compressed data. By executing zero-value and non-zero-value writing operations in an independent thread, it achieves synchronous operation and storage, accelerating the data restoration process. Through a closed-loop technology of preprocessing noise reduction → format conversion → dynamic loading → GPU acceleration, it solves the bottleneck of real-time rendering of large-scale point clouds in Unity3D and is suitable for fields such as digital twins and cultural heritage protection.
[0084] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any modifications or equivalent changes made based on the technical essence of the present invention shall still fall within the scope of protection claimed by the present invention.
Claims
1. A method for loading point cloud pnts format based on U3D, characterized in that: The specific steps for implementing the method of loading point cloud pnts format based on U3D are as follows: Step 1: Collect real photo information data using a drone, and export Tile point cloud data in pnts format according to the 3dTiles specification; Step 2: Based on the 3dTiles specification, use U3D scripts to serialize and read the 3dTiles data structure cached as nested Tile data objects, initialize the key data of each Tile level, use U3D real-time periodic functions to perform calculation and filtering processing based on the key data of each Tile level, and generate point cloud data pnts through DJI mapping software; Step 3: Export cloud data (pnts) from DJI mapping software; Step 4: Parse the PNTS binary file and import it into Unity3D; according to the 3DTiles specification, obtain the PNTS binary header data, and obtain the Tile center offset value, point coordinate length, point coordinate set (Points), and point color set (Colors) from the header data to obtain the basic data for rendering each Tile. Then, use Unity3D technology to reconstruct and render the Tile; since the coordinate system in the 3DTiles specification is incompatible with the coordinate system supported by Unity3D technology, a coordinate system conversion process is required; use an asynchronous thread to convert the point cloud data into a Mesh or PointCloud structure that Unity can recognize; Step 5: Achieve synchronization between computation and storage; Utilize point cloud convolution operations to efficiently process compressed data, and execute write zero and non-zero value operations through independent threads to achieve synchronization between computation and storage; Step Six: Utilize Unity3d's resource management mechanism to associate, compress, and encrypt binary files using Assetbundle; browse the 3D construction environment using a BS architecture system; configure and publish the WebGL platform based on Unity3d's cross-platform compatibility; embed system interactions using HTML5 iframe tags; and extract the global coordinate system from pnts to the Unity local coordinate (x, y, z) set to improve spatial positioning accuracy.
2. The method for loading point cloud pnts format based on U3D according to claim 2, characterized in that: Step two of the method for loading point cloud pnts format based on U3D initializes the key data for each level of Tile, including index address, associated parent Tile, child Tile set, Tile entity type, geometric volume, geometric error, fine mode, and spatial matrix.
3. The method for loading point cloud pnts format based on U3D according to claim 2, characterized in that: Step two of the method for loading point cloud pnts format based on U3D involves calculation and filtering based on the key data of each tile level, including the rendering view frustum AABB visual filtering method and the screen pixel error SSE fineness filtering method, specifically: 1) Rendering the view frustum AABB visual filtering method, using U3D rendering technology and tile geometry volume for preliminary filtering; 2) Screen pixel error SSE fine-grained filtering method: Tile rendering distance camDistance is calculated by comparing the tile space matrix coordinates tileV with the U3D rendering camera coordinates camV relative to V, and taking the coordinate modulus of V. Specifically: V = camV - tileV camDistance= ; The view frustum height (viewHeight) is calculated using the wide-angle fieldOfView of the Unity 3D rendering camera. Specifically: viewHeight=2.0*tan(fieldOfView*0.5* ; Finally, using the geometric error (geometricError) during Tile data initialization and the current screen height (screenHeight), the screen error (SSE) is calculated as follows: SSE=(geometricError*screenHeight) / (camDistance*viewHeight) 3) Obtain the Tile to be rendered, recursively process the nested sub-Tile set, and compare the SSE obtained by the filtering algorithm with the maximum screen pixel error limit MaxScreenSpaceError set according to the scene requirements. Finally, use the Tile index address to download and read the PNTS format binary file.
4. The method for loading point cloud pnts format based on U3D according to claim 2, characterized in that: The specific process of converting the coordinate system in the 3DTiles specification to the coordinate system supported by U3D technology in step three of the method for loading point clouds in pnts format based on U3D is as follows: Latitude, Longitude, and Altitude LLA(Lon,Lat,Alt) – Cartesian ECEF(X,Y,Z) – U3D POS(X,Y,Z); This transforms the coordinate values in the basic data for tile rendering. First, the original latitude and longitude coordinates of the points are converted, specifically as follows: Earth's semi-major axis: EARTH_A=6378137.0; Earth's oblateness: EARTH_F = 1 / 298.257223563; Earth scaling factor: EARTH_S = (1 - EARTH_F); Earth's minor semi-axis: EARTH_B = EARTH_A * EARTH_S; First eccentricity squared: ECC_SQ = EARTH_F * (2 - EARTH_F); Ellipsoid radius of curvature: N = EARTH_A / ; After transformation, the ECEF three-dimensional coordinates (X,Y,Z) are obtained; ECEF.X=(N+LLA.Alt)*cos(LLA.Lat)*cos(LLA.Lon); ECEF.Y=(N+LLA.Alt)*cos(LLA.Lat)*sin(LLA.Lon); ECEF.Z=(N*(1-ECC_SQ)+LLA.Alt)*sin(LLA.Lat); The obtained ECEF coordinates are converted to U3D coordinates by first setting a latitude, longitude, and altitude reference point Ref(Lon,Lat,Alt), and then using the above Ref(Lon,Lat,Alt) to convert to ECEF coordinates Ref(X,Y,Z); finally, U3D POS(X,Y,Z) can be obtained: POS.X = ECEF.X - Ref.X; POS.Y = ECEF.Z - Ref.Y; POS.z=ECEF.Y-Ref.Y Through the above conversion process, the Tile point cloud obtains U3D coordinates, and the U3D Mesh technology is used to construct and render the point cloud with the Tile point coordinate set Points and the point color set Colors.