Three-dimensional model processing method, electronic equipment, storage medium and program product
By compressing the geometric features and texture information of the three-dimensional model and writing it to a file that complies with the 3DTiles specification, the problem of poor compatibility of the three-dimensional model format on the web page is solved, and the effect of reducing storage and transmission costs and improving rendering performance is achieved.
Patent Information
- Application Number
- CN202411957950.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-03-28
AI Technical Summary
The poor compatibility of the existing three-dimensional model formats on the web page side leads to the need for format conversion to adapt to web page applications. However, this increases the size and transmission cost of the model file, and occupies more system resources.
A three-dimensional model processing method is proposed. By obtaining the geometric feature information of the three-dimensional model (such as vertex features, normal features, texture UV coordinates, etc.), this information is compressed, and the compressed content is written into the file, satisfying the 3DTiles specification.
By compressing the geometric features and texture information of the three-dimensional model, the storage and transmission cost of model files is significantly reduced, the system resource usage is reduced, and the rendering performance is improved.
Smart Images

Figure CN119722824A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of three-dimensional models, and in particular to a three-dimensional model processing method, an electronic device, a readable storage medium, and a computer program product. Background Art
[0002] Generating three-dimensional models through multi-angle photography is a technology that has been developed in recent years. The three-dimensional models generated by this technology usually have specific formats. The three-dimensional model files in these formats are not compatible with the web page and are difficult to apply and display directly on the web page. The three-dimensional model needs to be converted into a specific format before it can be applied to the web page.
[0003] At present, the 3D model file obtained after format conversion of the 3D model has high requirements for rendering performance and high transmission cost, resulting in more occupation of system resources. Summary of the invention
[0004] The present disclosure provides a three-dimensional model processing method, an electronic device, a readable storage medium, and a computer program product.
[0005] In a first aspect, the present disclosure proposes a method for processing a three-dimensional model, comprising: obtaining geometric feature information of the three-dimensional model to be processed, wherein the geometric feature information includes one or more of vertex features, normal features, and UV coordinates of the texture of the three-dimensional model; compressing the geometric feature information to obtain compressed geometric content; and writing the compressed geometric content to a file for storing compressed model data.
[0006] According to some embodiments of the present disclosure, the geometric feature information satisfies one or more of the following: the vertex features include one or more of vertex position features and vertex color features; the normal features include normal direction features; the UV coordinates of the texture include one or more of the UV coordinates of the front side of the texture and the UV coordinates of the back side of the texture; the geometric feature information also includes a tangent vector.
[0007] According to some embodiments of the present disclosure, the method further includes: obtaining vertex index information of the three-dimensional model to be processed; and compressing the geometric feature information specifically includes: compressing the geometric feature information based on the vertex index information.
[0008] According to some embodiments of the present disclosure, the geometric feature information includes multiple information items, and compressing the geometric feature information includes: compressing the multiple information items in the geometric feature information in sequence.
[0009] According to some embodiments of the present disclosure, the method also includes: obtaining texture information of the three-dimensional model to be processed, and storing the obtained texture information as an image; performing texture compression on the image to obtain compressed texture content, and storing the texture content in a texture format; and writing the compressed texture content to the file for storing compressed model data.
[0010] According to some embodiments of the present disclosure, the method for performing texture compression on the image is specifically: compressing the image according to a specified texture format, and the specified texture format is ETC1S format or UASTC format.
[0011] According to some embodiments of the present disclosure, when compressing the image, KTX2 is used as the compression container format.
[0012] According to some embodiments of the present disclosure, after the texture content is written into a model file, the data format of the texture content in the model file satisfies one or more of the following: contains information on the compression format used by the model file; contains information on the texture format used by the model file; contains information on image resources used for the texture.
[0013] According to some embodiments of the present disclosure, the format of the file for storing compressed model data meets the 3D Tiles specification.
[0014] A second aspect of the present disclosure proposes an electronic device, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the method described in any one of the above embodiments.
[0015] A third aspect of the present disclosure provides a readable storage medium, wherein the readable storage medium stores a computer program, and when the computer program is executed by a processor, it is used to implement the method described in any of the above embodiments.
[0016] A fourth aspect of the present disclosure provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it is used to implement the method described in any of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0018] Figure 1A schematic diagram showing an application scenario of a three-dimensional model processing method according to some embodiments of the present disclosure.
[0019] Figure 2-Figure 5 A schematic diagram of the overall process of a three-dimensional model processing method M100 according to some embodiments of the present disclosure is shown.
[0020] Figure 6 It is a schematic block diagram of the structure of a three-dimensional model processing device according to an embodiment of the present invention.
[0021] Figure 7 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0023] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.
[0025] The terms used herein are for the purpose of describing specific embodiments, rather than being restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values and / or provided values that will be recognized by those of ordinary skill in the art.
[0026] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the three-dimensional model processing method implemented in the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are first introduced.
[0027] OSGB (Open Scene Graph Binary): is a file format used to store and load 3D models.
[0028] glTF (Graphics Language Transmission Format): is a format used by engines and applications to efficiently transmit and load 3D scenes and models, and glTF can be used as a universal standard to export 3D models to the Web.
[0029] 3D Tiles: is an open specification for efficient streaming and rendering of large three-dimensional geospatial datasets.
[0030] b3dm (Batched 3D Model): a data format that complies with the 3D Tiles specification.
[0031] Multi-angle photography refers to collecting images from multiple different angles and building a 3D model through images from multiple different angles. For example, oblique photography technology uses multiple sensors on the same flying platform to collect images from five different angles, including one vertical and four oblique angles, and then generates a more visually realistic 3D city model through modeling technology.
[0032] The 3D city model generated by multi-angle images usually stores the model data in OSGB format files. However, the current Web end (web page end) cannot directly be compatible with and recognize OSGB files, so it is necessary to convert OSGB files into formats that can be used and recognized by the Web end, such as glTF, b3dm and other formats that meet the 3D Tiles specification.
[0033] In the related art, when converting OSGB files into files in glTF format, for example, the model is not compressed, resulting in the generated model file occupying a large storage space. Therefore, the model file has higher requirements on transmission performance and rendering performance, and the transmission cost is therefore higher, and more system resources are occupied.
[0034] To this end, the present disclosure proposes a three-dimensional model processing method.
[0035] Figure 1The schematic diagram of the application scenario of the three-dimensional model processing method of some embodiments of the present disclosure is shown. In this application scenario, a processing end 10 and a service end 20 may be included.
[0036] The processing end 10 can communicate with the server end 20 to perform data transmission or instruction transmission. In the present disclosure, the processing end 10 and the server end 20 each include at least one processor and at least one memory. The processing end 10 and the server end 20 can be different types of electronic devices, such as tablet computers, laptop computers, desktop computers, etc. The server end 20 can include a server, which can be a physical server or a cloud server. The present disclosure does not limit the type of server.
[0037] Exemplarily, the processing end 10 can perform texture compression and model body (geometric features of the model) on the three-dimensional model, and store the compressed model file to the server end 20, so that the client can obtain the model file from the server end 20 and realize model display on the client with lower transmission cost and lower rendering performance.
[0038] Figure 2 FIG. 1 is a schematic diagram showing the overall process of a three-dimensional model processing method M100 according to some embodiments of the present disclosure. Figure 2 As shown, the three-dimensional model processing method M100 includes step S110, step S120 and step S130. Step S110, step S120 and step S130 belong to the geometric body compression step of the model.
[0039] S110, obtaining geometric feature information of the three-dimensional model to be processed, wherein the geometric feature information includes one or more of vertex features, normal features, and UV coordinates of the texture of the three-dimensional model.
[0040] The 3D model to be processed can be stored in a file in OSGB format or other formats. Assuming that the 3D model is a community model, which contains multiple building models, the features of the geometric vertices of each building model can be obtained in step S110, the normal features of different faces can be obtained, and the UV coordinates of the textures on different faces can also be obtained. These obtained features are used as geometric feature information and belong to the content that needs to be compressed in the subsequent steps.
[0041] UV coordinates are a coordinate system used to map a 2D texture onto a 3D model surface. UV coordinates are 2D coordinates, expressed as (u, v). The rendering engine uses UV coordinates to determine the mapping positions of different points in a 2D texture image onto a 3D model.
[0042] S120, compressing the geometric feature information to obtain compressed geometric content.
[0043] Exemplarily, the Draco compression method can be used for the above-mentioned vertex features, normal features and UV coordinates. Draco is an open source library that can be used to compress and decompress 3D geometric meshes and point cloud data. Draco supports compression of multiple data types, including meshes, point clouds, vertex attributes (such as position, color, normals, etc.), and supports both lossy and lossless compression. Compression through Draco can improve the storage and transmission efficiency of 3D graphics, speed up loading by reducing file size, reduce bandwidth consumption, and meet industry standards for normal parsing on the Web side to keep the model rendering frame rate from floating.
[0044] KHR_draco_mesh_compression is a glTF extension that is used to reduce the file size of 3D model geometry data (such as vertices, normals, texture coordinates, etc.) by using the Draco compression algorithm. This extension enables various applications to recognize files written with compressed geometry features.
[0045] S130: Write the compressed geometric content into a file for storing compressed model data.
[0046] The file used to store the compressed model data can be in a file format suitable for application on a web page, that is, it can be a format that meets the 3D Tiles specification, such as the glTF format or the b3dm format. If the texture format used for texture compression is the ASTC format, a file in the ASTC format will be obtained after the texture is compressed, and the content of the file will then be written into a file in the glTF format.
[0047] In the original OSGB format, information such as vertices, UV coordinates, and normals are stored in sequence according to vectors without any compression. For OSGB model files in GB (Gigabyte), this requires reducing file storage space, increasing file transfer speed, and reducing rendering costs.
[0048] According to the three-dimensional model processing method proposed in the embodiment of the present invention, the geometric information of the model is compressed and the compressed geometric information is written into the model file, thereby reducing the storage cost of the model file. When the model file is used by the program, the file transmission cost and rendering cost can be reduced, and the transmission speed and rendering speed can be improved.
[0049] According to the test, the uncompressed file size is 123KB (Kilobyte), and the compressed file size is 75KB. The compression rate is about 39%, which effectively reduces the storage and transmission costs of files.
[0050] The above-mentioned geometric feature information may satisfy one or more of the following: a. Vertex features include one or more of vertex position features and vertex color features; b. Normal features include normal direction features; c. Texture UV coordinates include one or more of UV coordinates on the front of the texture and UV coordinates on the back of the texture; d. The geometric feature information also includes tangent vectors.
[0051] Taking glTF as an example, the vertex position feature in item a can be defined in the POSITION field. The POSITION field represents the vertex position information in the mesh, and the coordinates of each vertex in space are represented by a three-dimensional vector (x, y, z). The vertex color feature in item b can be defined in the COLOR_0 field. The COLOR_0 field provides vertex color information. The color of the vertex can be directly stored in this field without calculating the color through material and lighting calculations. The normal direction feature in item a can be defined in the NORMAL field. The normal direction feature is used to represent the direction of the point on the surface for calculating lighting information. The UV coordinates in item c can be defined in the TEXCOORD_0 and TEXCOORD_1 fields, where the TEXCOORD_0 field corresponds to the coordinate set of the main texture (the front of the texture), and the TEXCOORD_1 field corresponds to the coordinate set of the back of the texture. The tangent vector in item d can be defined in the TANGENT field, which stores the tangent vector information at the vertex for calculating the lighting effect of the normal map through the tangent space.
[0052] Figure 3 FIG. 1 is a schematic diagram showing the overall flow of a three-dimensional model processing method M100 according to other embodiments of the present disclosure. Figure 3 The model compression step may further include step S111. The execution order between step S111 and step S110 may be arbitrary, for example, step S110 and step S111 may be executed synchronously or sequentially.
[0053] S111, obtaining vertex index information of the three-dimensional model to be processed.
[0054] Index information indices is used to define the indices of the vertices of a polygon (such as a triangle). The index information contains a series of integer indices that point to specific locations in the vertex array and are used to define the vertices that can make up a polygon.
[0055] Correspondingly, in step S120, the method of compressing the geometric feature information may specifically be: compressing the geometric feature information based on the vertex index information.
[0056] Index information can avoid repeated storage of the same vertex data, and there is no need to repeatedly store vertex information shared by multiple polygons. During the graphics rendering process, graphics APIs (such as OpenGL or Direct3D) can determine how to connect vertices to draw polygons based on the index list, thereby saving memory space and improving rendering efficiency.
[0057] Taking the POSITION field as an example, in the process of compressing the geometric features of the OSGB model, the index information indices is first determined by traversing the OSGB model, and then the information of the POSITION field is found according to the indices. In the process of model processing, the Draco method is used to perform corresponding compression operations on POSITION, TEXCOORD_0, and NORMAL in the entire model mesh Mesh.
[0058] Figure 4 FIG. 1 is a schematic diagram showing the overall flow of a three-dimensional model processing method M100 according to other embodiments of the present disclosure. Figure 4 The geometric feature information may include multiple information items. In step S120, the method for compressing the geometric feature information may specifically be: compressing the multiple information items in the geometric feature information in sequence.
[0059] The compression process of geometric features can be performed separately by field. For example, the POSITION field, COLOR_0 field, NORMAL field, TEXCOORD_0 field, TEXCOORD_1 field, and TANGENT field can be compressed in sequence.
[0060] Figure 5 FIG. 1 is a schematic diagram showing the overall flow of a three-dimensional model processing method M100 according to other embodiments of the present disclosure. Figure 5 The processing method M100 of the three-dimensional model may further include step S210, step S220 and step S230. Step S210, step S220 and step S230 belong to the texture compression step of the model. It should be noted that the execution order of the texture compression step and the geometric body compression step can be arbitrary, for example, the geometric body compression step and the texture compression step can be executed in parallel, or they can also be executed sequentially.
[0061] S210, acquiring texture information of the three-dimensional model to be processed, and storing the acquired texture information as an image.
[0062] After the texture information of the three-dimensional model is extracted through step S110, the texture information can be stored in a common image format, such as JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap), SVG (Scalable Vector Graphics), etc.
[0063] The purpose of storing it as an image is to ensure that the input format requirements of the compression algorithm are met during subsequent texture compression.
[0064] S220, compressing the image texture to obtain compressed texture content, wherein the texture content is stored in a texture format.
[0065] Texture compression refers to a compressed texture format. Texture compression can be achieved by dividing the texture into fixed-size blocks or tiles, compressing each block individually, which reduces the overall video memory usage and can be directly read and rendered by the GPU without CPU decoding.
[0066] The purpose of texture compression is that image files in compressed format in storage space will become uncompressed format after being released to memory, such as RGB888, RGBA888, RGB565 or other uncompressed image formats. Texture compressed files in compressed format in storage space can also be in compressed format after being released to memory and can be rendered by GPU (Graphics Processing Unit).
[0067] For example, a JPEG texture image with a size of 1024×1024, when stored in RGBA format in memory, occupies about 4M~5.3M of video memory space. If a texture compression technology is used to compress the texture, the memory occupied by the resulting texture compression file can be reduced to about 1.3M, greatly reducing memory usage.
[0068] When compressing textures, the texture format used can be selected according to the scene and needs, for example, it can be the ETC (Ericsson Texture Compression) format for Android systems, the DXT (DirectX Texture Compression) format for Windows systems, the ASTC (AdaptiveScalable Texture Compression) format and the Basis Universal format for cross-platform systems. The above different texture formats correspond to corresponding texture compression technologies. ETC, DXT, ASTC and Basis Universal are texture compression technologies developed by different developers, and these compression technologies correspond to their own compression algorithms. Using the corresponding texture compression technology to perform texture compression will obtain a file of the corresponding texture format, and the texture format of the texture content obtained after compression is the texture format used above. Texture compression algorithms are used to reduce the storage space occupied by texture images in computer graphics processing while maintaining or approaching the quality of the original image. These algorithms compress texture data through different technologies, thereby improving the efficiency and performance of graphics rendering while ensuring image quality.
[0069] S230, writing the compressed texture content into a file for storing compressed model data.
[0070] Since the execution order of the geometry compression step and the texture compression step can be arbitrary, the start execution time of step S130 and step S230 can also be arbitrary. If step S230 is started after step S130 is completed, the file for storing the compressed model data already exists, and in step S230, the compressed texture content is directly written to the existing file. If step S130 has not been started before step S230 starts to execute, a file for storing the compressed model data can be created by step S230, and when step S130 is executed, the compressed geometry content is directly written to the existing file.
[0071] The texture of the model is compressed through steps S210 to S230, and the compressed texture content is written into the model file, which reduces the storage cost of the model file. When the model file is used by the program, the file transmission cost and rendering cost can be further reduced, and the transmission speed and rendering speed can be improved.
[0072] In step S220, the image may be compressed in a specific manner by compressing the image in a specified texture format, wherein the specified texture format may be an ETC1S format or a UASTC format.
[0073] ETC1S is a subset of the ETC compression format used to improve compression efficiency and file size. It is suitable for low-quality texture compression and can achieve smaller transmission and memory usage, such as compressing images, photos, map data, or albedo / specular reflection / etc. textures.
[0074] UASTC (Universal ASTC) is a subset of the ASTC compression format. The UASTC format is suitable for high-quality texture compression and can achieve good lossless compression, such as compressing complex normal maps.
[0075] Taking the texture compression of PNG images as an example, for a 207KB PNG image, the file size obtained by compressing it in the ETC1S format is 50KB, and the file size obtained by compressing it in the UASTC format is 438KB. Therefore, compared with UASTC, the compressed file of ETC1S format is smaller, and the texture quality of the compressed file of UASTC format is higher.
[0076] In step S220, when compressing the image according to the specified texture format, KTX2 may be used as the container format for compression. The container format here refers to the texture container format. Texture container refers to a data structure or file format for storing and managing texture data. There are many texture containers that can be selected, such as KTX, KTX2 and DDS (DirectDraw Surface).
[0077] KTX (Khronos Texture) is a cross-platform texture container format for storing and distributing compressed or uncompressed texture data. Compared with KTX, KTX2 adds support for Basis Universal ultra-compressed GPU textures, which can produce compact textures and can be effectively transcoded into various GPU compressed texture formats at runtime. Among them, BasisUniversal is an efficient texture compression format and toolset, mainly used in real-time graphics applications. basisu is a command line tool for BasisUniversal. The basisu command can convert common image formats (such as PNG, JPEG, TIFF, etc.) to Basis Universal format (such as KTX2). In step S220, in the conversion process using KTX2, it can be compiled through the source code of KTX2, or it can be compiled using the source code of basisu, so as to realize the conversion of OSGB model to 3D Tiles format.
[0078] At the same time, by using the KHR_texture_basisu extension, glTF / b3dm files can include KTX2 textures, reduce download size, and use natively supported texture formats to reduce GPU memory size and improve rendering speed on different devices and platforms. Among them, KHR_texture_basisu is an extension of glTF that supports the use of Basis Universal compressed textures in glTF files. This extension enables glTF models to include efficient, cross-platform compatible compressed textures, thereby optimizing the loading and rendering performance of 3D resources, especially on mobile devices and Web platforms.
[0079] By using KTX2 and the KHR_texture_basis_ extension, the glTF model can significantly reduce the size of texture files, reduce network transmission bandwidth and memory usage, thereby improving loading speed and rendering performance.
[0080] It should be noted that texture format and texture container format are two different concepts. Texture format refers to the encoding method or storage layout of the texture data itself, which determines how pixels are arranged in memory, how color information is represented, whether compression algorithms are applied, etc. It is used to specify how texture data is stored and processed in the GPU. The texture format affects how the texture is represented on the GPU as well as the performance and quality when rendering. Texture container format refers to the file format used to encapsulate and organize texture data. It not only contains the original image data of the texture, but can also contain other metadata (such as the texture's size, format, compression type, etc.), and generally supports more complex structures and functions. Texture container formats are used to transmit, store, and manage texture resources, especially in 3D applications.
[0081] After writing the texture content into the model file (step S230), the data format of the texture content in the model file satisfies one or more of the following: 1. Contains information on the compression format used by the model file; 2. Contains information on the texture format used by the model file; 3. Contains information on image resources used for texture.
[0082] Regardless of whether the texture format is ETC1S, UASTC, or something else, when using the KHR_texture_basisu extension for texture compression, the JSON (JavaScript Object Notation) data structure written to the glTF file must meet certain formatting requirements so that the corresponding texture format can be used when rendering.
[0083] The format requirements may include: the written data structure needs to list all extensions used in the current glTF file, that is, the data format can meet the above 1st content. For example, KHR_texture_basisu is the currently used extension, which is used to indicate that the file contains textures compressed using Basis Universal, so a corresponding statement needs to be made in the JSON code.
[0084] The format requirements may also include: the written data structure needs to list the textures used by the model and the image resource index associated with the texture, that is, the data format can meet the above item 2.
[0085] The format requirements may also include: the written data structure needs to list the image resources used for textures, that is, the data format can meet the above Item 3. For example, it may include mimeType, which is a standard format for indicating file types and is used to specify the format and encoding of files when transmitting files over the network.
[0086] In an experiment using a 3D community model, the single-frame rendering rate is about 120 milliseconds for JPEG and about 31 milliseconds for KTX2. It can be seen that KTX2 renders faster than JPEG.
[0087] Based on any of the above embodiments, the present disclosure also provides a three-dimensional model processing device. Figure 6 FIG. 1 is a schematic block diagram of a three-dimensional model processing device according to an embodiment of the present disclosure. Figure 6 As shown, the three-dimensional model processing device includes: a geometric feature acquisition module 110, a geometric feature compression module 120 and a writing module 130.
[0088] The geometric feature acquisition module 110 is used to acquire geometric feature information of the three-dimensional model to be processed, wherein the geometric feature information includes one or more of the vertex features, normal features, and UV coordinates of the texture of the three-dimensional model.
[0089] The geometric feature compression module 120 is used to compress the geometric feature information to obtain compressed geometric content.
[0090] The writing module 130 is used to write the compressed geometric content into a file for storing compressed model data.
[0091] Continue reading Figure 6 The three-dimensional model processing device may further include: a texture information acquisition module 210 and a texture information compression module 220.
[0092] The texture information acquisition module 210 is used to acquire texture information of the three-dimensional model to be processed, and store the acquired texture information as an image.
[0093] The texture information compression module 220 is used to perform texture compression on the image to obtain compressed texture content, wherein the texture content is stored in a texture format.
[0094] The writing module 130 is further used to write the compressed texture content into a file for storing compressed model data.
[0095] The above-mentioned 3D model processing device can be in the form of computer software, and each module of the above-mentioned 3D model processing device can be implemented by a computer software module. The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0096] The execution subject of the three-dimensional model processing method in the specific implementation manner of the present disclosure may be an electronic device such as a computer or a server.
[0097] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the three-dimensional model processing method of any one of the embodiments described above in the present disclosure. Figure 7 FIG. 1 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure. Figure 7 , the hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0098] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0099] The processor 1200 may be a central processing unit (CPU). The processor 1200 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0100] The memory 1300 can be used as a non-transitory computer-readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions of the computer program in the embodiment of the present disclosure. The processor 1200 implements the three-dimensional model processing method by running the non-transitory software programs, instructions and modules stored in the memory 1300.
[0101] The memory 1300 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created by the processor 1200, such as structural data, model data, sample data, stiffness evaluation results, etc. of the bridge. In addition, the memory 1300 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 1300 may optionally include a memory remotely arranged relative to the processor 1200, and these remote memories may be connected to the processor 1200 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0103] The present disclosure also provides a computer program product, and the method of the present disclosure can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.
[0104] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0105] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0106] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, 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, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0107] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0109] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0110] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0111] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A method for processing a three-dimensional model, characterized in that: include: Acquire geometric feature information of the three-dimensional model to be processed, wherein the geometric feature information includes one or more of vertex features, normal features, and UV coordinates of the texture of the three-dimensional model; Compressing the geometric feature information to obtain compressed geometric content; as well as The compressed geometric content is written to a file for storing compressed model data.
2. The three-dimensional model processing method according to claim 1, characterized in that: The geometric feature information satisfies one or more of the following: The vertex features include one or more of vertex position features and vertex color features; The normal feature includes a normal direction feature; The UV coordinates of the texture include one or more of the UV coordinates of the front side of the texture and the UV coordinates of the back side of the texture; The geometric feature information also includes a tangent vector.
3. The three-dimensional model processing method according to claim 1 or 2, characterized in that: The method further comprises: obtaining vertex index information of the three-dimensional model to be processed; The compressing the geometric feature information specifically includes: compressing the geometric feature information based on the vertex index information.
4. The three-dimensional model processing method according to any one of claims 1 or 2, characterized in that: The geometric feature information includes multiple information items, and compressing the geometric feature information includes: The various information items in the geometric feature information are compressed in sequence.
5. The three-dimensional model processing method according to claim 1, characterized in that: The method further comprises: Acquiring texture information of the three-dimensional model to be processed, and storing the acquired texture information as an image; Performing texture compression on the image to obtain compressed texture content, wherein the texture content is stored in a texture format; and The compressed texture content is written into the file for storing compressed model data.
6. The three-dimensional model processing method according to claim 5, characterized in that: The specific method of performing texture compression on the image is: compressing the image according to a specified texture format, and the specified texture format is ETC1S format or UASTC format.
7. The three-dimensional model processing method according to claim 5, characterized in that: When compressing the image, KTX2 is used as the compression container format.
8. The three-dimensional model processing method according to claim 5, characterized in that: After the texture content is written into the model file, the data format of the texture content in the model file satisfies one or more of the following: Contains information about the compression format used by the model file; Contains information about the texture format used by the model file; Contains information about the image resource used for the texture.
9. The three-dimensional model processing method according to claim 1, characterized in that: The format of the file used to store the compressed model data meets the 3D Tiles specification.
10. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the method according to any one of claims 1 to 9.
11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program is used to implement the method according to any one of claims 1 to 9.