Three-dimensional noise map rendering data access method, system, device and storage medium
By writing corresponding data in obj files, mtl files and texture picture files, the problem of low reading efficiency of 3D noise map data is solved, and the rapid reading of data and direct OpenGL rendering is realized.
Patent Information
- Application Number
- CN202110483668.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-30
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2041-04-30
AI Technical Summary
The prior art is difficult to support the rapid reading of huge data of three-dimensional noise maps, and further operations are required after reading the data before rendering using OpenGL.
By creating obj files, mtl files and texture picture files, and writing corresponding data into these files, including mtl file path, offset between rendering center coordinates and actual coordinates, ground rendering data and building rendering data, etc.
It effectively improves the reading efficiency of three-dimensional noise map rendering data, so that data can be directly rendered using OpenGL after reading.
Smart Images

Figure CN113192170B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional noise map data processing, and in particular to a three-dimensional noise map rendering data access method, system, device and storage medium. Background Art
[0002] With the development of my country's economy and society, the urbanization process has accelerated, and the impact of environmental noise pollution has become increasingly prominent. Environmental noise pollution disputes have occurred frequently, and complaints of nuisance have remained high. The World Health Organization believes that the actual harm of noise pollution not only affects sleep and people's psychology, but also causes various heart and cardiovascular diseases, learning disabilities and ear diseases. Long-term exposure to such an environment will indirectly shorten people's life span. Therefore, in order to improve the quality of my country's sound environment and create a green and livable environment for the people, the research and control of noise pollution is a key point, and the research and application of three-dimensional noise maps is the basis and key link of noise prevention and control.
[0003] The three-dimensional noise map is a noise value distribution map on the geographic plane and building facades generated by collecting and processing noise source data and geographic information data, using noise prediction models, and combining actual noise measurement surveys and corrections. Relevant environmental protection departments can use the three-dimensional noise map to understand the regional noise pollution distribution, discover noise pollution black spots, and manage and control prominent and key noise sources, thereby improving the efficiency of noise pollution law enforcement and improving the level of urban sound environment management services.
[0004] However, due to the huge amount of data involved in the three-dimensional noise map, the currently known general storage structure is difficult to support the rapid reading of huge data, and after reading the data, further operations are still required on the data before it can be rendered using OpenGL. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention provides a three-dimensional noise map rendering data access method, system, device and storage medium.
[0006] The technical solution adopted by the present invention is:
[0007] In one aspect, an embodiment of the present invention includes a method for storing three-dimensional noise map rendering data, including:
[0008] Create obj files, mtl files and texture image files;
[0009] Writing a first set of data into the obj file, the first set of data including the mtl file path data, the offset data between the three-dimensional noise map rendering center coordinates and the actual coordinates, the ground rendering data and the building rendering data;
[0010] Writing a second set of data into the mtl file, wherein the second set of data includes building top surface color data, ground texture number and ground texture picture correspondence data, building texture number and building texture picture correspondence data;
[0011] A third set of data is written into the texture image file, wherein the third set of data includes ground texture image data and building texture image data.
[0012] Furthermore, the method further comprises:
[0013] Converting ground noise value data into color values of pixel points to generate the ground texture image data;
[0014] The building noise value data is converted into pixel color values, and the building faces of multiple buildings are merged to generate the building texture image data.
[0015] Furthermore, the ground rendering data includes a start symbol, a ground control point, a ground texture control point, and a correspondence between a texture number and the ground control point and the ground texture control point.
[0016] Furthermore, in the building rendering data, each building is stored as a subsection, and the storage content of each building subsection includes a start symbol, a building number, a building height, a building contour point, a building texture control point, a building top surface, and a correspondence between the texture number and the building contour point and the building texture control point.
[0017] On the other hand, an embodiment of the present invention includes a method for reading three-dimensional noise map rendering data, comprising:
[0018] Open the obj file, mtl file and texture image file;
[0019] The first set of data, the second set of data and the third set of data are read in sequence.
[0020] On the other hand, an embodiment of the present invention includes a three-dimensional noise map rendering data storage system, comprising:
[0021] Create a module to create obj files, mtl files and texture image files;
[0022] A first writing module is used to write a first set of data into the obj file, wherein the first set of data includes the mtl file path data, the offset data between the three-dimensional noise map rendering center coordinates and the actual coordinates, the ground rendering data and the building rendering data;
[0023] A second writing module is used to write a second set of data into the mtl file, wherein the second set of data includes building top surface color data, ground texture number and ground texture picture correspondence data, building texture number and building texture picture correspondence data;
[0024] The third writing module is used to write a third set of data into the texture image file, wherein the third set of data includes ground texture image data and building texture image data.
[0025] On the other hand, an embodiment of the present invention includes a three-dimensional noise map rendering data reading system, including:
[0026] An opening module is used to open the obj file, mtl file and texture image file;
[0027] The reading module is used to read the first group of data, the second group of data and the third group of data in sequence.
[0028] On the other hand, an embodiment of the present invention includes a three-dimensional noise map rendering data access device, including:
[0029] at least one processor;
[0030] at least one memory for storing at least one program;
[0031] When the at least one program is executed by the at least one processor, the at least one processor implements the three-dimensional noise map rendering data access method.
[0032] On the other hand, an embodiment of the present invention includes a computer-readable storage medium having a processor-executable program stored thereon, wherein the processor-executable program is used to implement the three-dimensional noise map rendering data access method when executed by the processor.
[0033] The beneficial effects of the present invention are:
[0034] The present invention can effectively improve the reading efficiency of three-dimensional noise map rendering data by creating an obj file, an mtl file and a texture image file, and writing a first set of data into the obj file, a second set of data into the mtl file, and a third set of data into the texture image file respectively, and after the data is read, OpenGL can be used directly for rendering.
[0035] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1This is a flowchart of the steps of the three-dimensional noise map rendering data storage method according to an embodiment of the present invention;
[0037] Figure 2 This is a flowchart of the steps of the method for reading three-dimensional noise map rendering data according to an embodiment of the present invention;
[0038] Figure 3 A schematic diagram of a rendering data storage structure of a noise map according to an embodiment of the present invention;
[0039] Figure 4 This is an example diagram of the obj file described in the embodiment of the present invention;
[0040] Figure 5 This is an example diagram of the mtl file described in the embodiment of the present invention;
[0041] Figure 6 This is a flow chart of a specific application example of the three-dimensional noise map rendering data storage method according to an embodiment of the present invention;
[0042] Figure 7 This is a flow chart of a specific application example of the method for reading three-dimensional noise map rendering data according to an embodiment of the present invention;
[0043] Figure 8 It is a structural schematic diagram of the three-dimensional noise map rendering data access device described in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0045] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0046] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0047] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0048] The embodiments of the present application are further described below in conjunction with the accompanying drawings.
[0049] Reference Figure 1 The embodiment of the present invention provides a method for storing three-dimensional noise map rendering data, including but not limited to the following steps:
[0050] S1. Create obj files, mtl files and texture image files;
[0051] S2. writing a first set of data into the obj file, the first set of data including the mtl file path data, the offset data of the three-dimensional noise map rendering center coordinates and the actual coordinates, the ground rendering data and the building rendering data;
[0052] S3. The second set of data is written into the mtl file, wherein the second set of data includes the building top color data, the ground texture number and the ground texture image correspondence data, the building texture number and the building texture image correspondence data;
[0053] S4. Writing a third set of data into the texture image file, the third set of data including ground texture image data and building texture image data.
[0054] Optionally, the method further comprises:
[0055] S5. Converting the ground noise value data into the color value of the pixel point to generate the ground texture image data;
[0056] S6. Convert the building noise value data into pixel color values, and merge the building surfaces of multiple buildings to generate the building texture image data.
[0057] In this embodiment, the ground rendering data includes a start symbol, a ground control point, a ground texture control point, and a correspondence between a texture number and the ground control point and the ground texture control point. In the building rendering data, each building is stored as a subsection, and the storage content of each building subsection includes a start symbol, a building number, a building height, a building contour point, a building texture control point, a building top surface, and a correspondence between a texture number and the building contour point and the building texture control point.
[0058] Reference Figure 2The embodiment of the present invention also provides a method for reading three-dimensional noise map rendering data, including but not limited to the following steps:
[0059] P1. Open the obj file, mtl file and texture image file;
[0060] P2. Read the first set of data, the second set of data and the third set of data in sequence.
[0061] Reference Figure 3 In this embodiment, considering that the currently known general storage structure is difficult to support the rapid reading of huge data of three-dimensional noise maps, a rendering data storage structure of three-dimensional noise maps is proposed. Using this storage structure is more conducive to reading and rendering three-dimensional noise map data.
[0062] Specifically, the rendering data storage structure of the 3D noise map includes the following storage files:
[0063] F1: Text file with the suffix “.obj”;
[0064] F2: Text file with the suffix “.mtl”;
[0065] F3: Texture image file.
[0066] In this embodiment, the ".obj" file stores data in text format. Figure 4 As shown, the following text type data is stored with line breaks as delimiters:
[0067] X1: mtl file path;
[0068] X2: offset distance;
[0069] X3: ground rendering data;
[0070] X4: Building rendering data.
[0071] The storage structure of data X1 is: "mtllib" + space + relative path of mtl file, such as Figure 4 As shown in the third line of , it means that the relative path of the mtl file is "building.mtl" in the same folder; data X2 records the offset between the rendering center coordinates and the actual coordinates, including X coordinates, Y coordinates and Z coordinates, and the storage structure is: "Offset" + 'X' or 'Y' or 'Z' + space + offset; specifically, Figure 4 As shown in the 4th to 6th lines in the figure, the X coordinate offset distance is 836100.00, the Y coordinate offset distance is 1300400.00, and the Z coordinate offset distance is 0;
[0072] Specifically, the storage content of data X3 includes:
[0073] G1: start symbol;
[0074] G2: ground control point;
[0075] G3: ground texture control point;
[0076] G4: The correspondence between texture number, ground control point and ground texture control point.
[0077] Among them, Figure 4 As shown in the 7th line of , the storage format of the storage content G1 is: "g GroundPoints"; the storage format of the storage content G2 is: 'v' + space + XYZ coordinates separated by spaces, such as Figure 4 As shown in the 8th to 11th lines of , the 3D noise map contains 4 ground control points, and the XYZ coordinates corresponding to the 4 ground control points are (-1000,-1000,0), (-1000,1000,0), (1000,1000,0), (1000,-1000,0); the storage format of the storage content G3 is: "vt" + space + texture control points separated by spaces, such as Figure 4 As shown in the 12th to 15th lines in , the 3D noise map contains 4 ground texture control points, whose coordinates are (0.0, 0.0), (1.0, 0.0), (1.0, 1.0), (0.0, 1.0) respectively; the storage format of storage content G4 is "usemtl" + space + ground texture number + line break + "fg" + space + 4 ground control points separated by spaces, and the storage format of each control point is: the point number in storage content G2 + ' / ' + the point number in storage content G3, such as Figure 4 As shown in the 16th to 17th lines in , the ground texture using the "ground_0" texture number, the ground control points and the ground texture control points are numbered starting with 0, the 0th ground control point corresponds to the 0th ground texture control point, the 1st ground control point corresponds to the 1st ground texture control point, the 2nd ground control point corresponds to the 2nd ground texture control point, and the 3rd ground control point corresponds to the 3rd ground texture control point. These four ground control points and the four ground texture control points form a ground texture.
[0078] In this embodiment, in the data X4, each building is stored as a subsection, and the storage content of each building subsection includes:
[0079] B1: start symbol and building number;
[0080] B2: building height;
[0081] B3: building outline points;
[0082] B4: building texture control point;
[0083] B5: top surface of the building;
[0084] B6: The correspondence between texture numbers, building contour points and building texture control points.
[0085] The storage format of the storage content B1 is: "g" + space + building number, such as Figure 4 As shown in the 19th line of , the building numbered "Building_0" is stored later; the storage format of the storage content B2 is: "h" + space + building height, such as Figure 4 As shown in the 20th line of , the building height is 3.5 meters; the storage format of the storage content B3 is: 'v' + space + XYZ coordinates separated by spaces. Since the top surface contour points of the building correspond to the ground contour points one by one, only the ground contour points of the building are stored. The number of the top surface contour points of the building is equal to the sum of the corresponding ground contour points and the number of ground contour points; Figure 4 As shown in lines 21 to 24 of , the building contains 4 ground contour points and 4 top contour points, and their corresponding XYZ coordinates are (-100,-100,0), (-100,100,0), (100,100,0), (100,-100,0) respectively; the storage format of storage content B4 is: "vt" + space + texture control points separated by spaces, such as Figure 4 As shown in lines 25 to 34 of , the building contains 10 building texture control points, namely (0.000, 0.000), (0.000, 0.002), (0.002, 0.000), (0.002, 0.002), (0.004, 0.000), (0.004, 0.002), (0.006, 0.000), (0.006, 0.002), (0.008, 0.000), (0.008, 0.002); in storage content B5, the top surface of the building is triangulated, and the storage format of each triangle is: "ftop" + space + three point numbers in storage content B3 separated by spaces, such as Figure 4 As shown in the 40th to 41st lines in , the top surface of the building is triangulated into two triangles, the first triangle is composed of the 4th, 5th and 6th building contour points, and the second triangle is composed of the 4th, 6th and 7th building contour points; in the storage content B6, the storage format is: "usemtl" + space + building texture number + line feed + the corresponding relationship between the building contour points and the building texture control points of each building face separated by a line feed, and the storage format of the corresponding relationship is: "fb" + space + 4 building control points separated by spaces, and the storage format of the control point is: the point number in the storage content B3 + ' / ' + the point number in the storage content B4, such as Figure 4 As shown in lines 35 to 39 in , the building texture with the texture number "building_0" is used. The building contains four faces, namely: the building contour points of the first face are 0, 1, 5, 4, and the corresponding building texture control points are 0, 2, 3, 1; the building contour points of the second face are 1, 2, 6, 5, and the corresponding building texture control points are 2, 4, 5, 3; the building contour points of the third face are 2, 3, 7, 6, and the corresponding building texture control points are 4, 6, 7, 5; the building contour points of the fourth face are 3, 0, 4, 7, and the corresponding building texture control points are 6, 8, 9, 7.
[0086] In this embodiment, the ".mtl" file stores data in text format. Figure 5 As shown, the following text type data is stored with line breaks as delimiters:
[0087] M1: building top color;
[0088] M2: The correspondence between the ground texture number and the texture image;
[0089] M3: The correspondence between building texture numbers and texture images.
[0090] The storage format of data M1 is: "newmtl topface" + line break + "Kd" + space + floating point RGB color values separated by spaces, such as Figure 5 As shown in the 3rd and 4th lines of , the top color of the building is defined as white, that is, the floating point values of RGB color values are: 1.0, 1.0, 1.0 respectively; the storage format of data M2 is: "newmtl" + space + ground texture number + line feed + "map_Kd" + space + relative path of the ground image, such as Figure 5 As shown in the 6th and 7th lines of , the ground texture with texture number "ground_0" is defined, and its relative path is "pic\ground_0.png"; the storage format of data M3 is: "newmtl" + space + building texture number + line break + "map_Kd" + space + relative path of building picture, such as Figure 5 Lines 9 to 13 in the image define building textures with texture numbers "building_0" and "building_1", whose relative paths are "pic\building_0.png" and "pic\building_1.png" respectively.
[0091] In this embodiment, the texture image file stores data in an image format, storing the following image type data:
[0092] P1: ground texture image;
[0093] P2: Building texture image.
[0094] Among them, P1 stores ground texture images, and divides the ground noise map into 1024×1024 images for storage; P2 stores building texture images, and merges the sides of buildings into 1024×1024 images for storage.
[0095] In this embodiment, the rendering data storage structure of the three-dimensional noise map uses pixels of different colors to represent different noise values, and then stores and records the three-dimensional mapping control points, texture control points and corresponding relationships, so that it can be directly applied to OpenGL rendering, thereby improving data reading efficiency and rendering efficiency.
[0096] Reference Figure 6 , Figure 6 A flowchart of a specific application example of the method for storing data in a three-dimensional noise map rendering according to an embodiment of the present invention is shown. The specific implementation steps of this specific application example are as follows:
[0097] (1) Create files with the suffix ".obj" and ".mtl";
[0098] (2) Write the mtl file path into the obj file, such as Figure 4 As shown in line 3 of ;
[0099] (3) Write the building top color into the mtl file, such as Figure 5 As shown in the 3rd to 4th lines of ;
[0100] (4) Write the offset distance into the obj file, such as Figure 4 As shown in lines 4 to 6 of ;
[0101] (5) Convert the ground noise value data into pixel color values and generate a ground texture image;
[0102] (6) Write the ground rendering data into the obj file, including the start symbol ( Figure 4 As shown in row 7), ground control points ( Figure 4 As shown in rows 8 to 11), ground texture control points ( Figure 4 12 to 15), the correspondence between texture numbers and ground control points and ground texture control points ( Figure 4 At the same time, the corresponding relationship between the ground texture number and the texture image is written into the mtl file ( Figure 5 (shown in lines 6-7);
[0103] (7) Convert building noise value data into pixel color values, merge building surfaces of multiple buildings, and generate building texture images;
[0104] (8) Write the storage subsection of each building into the obj file, including the start symbol and building number ( Figure 4 As shown in row 19), building height ( Figure 4 As shown in row 20), building contour points ( Figure 4 21 to 24), building texture control points ( Figure 4 As shown in lines 25 to 34), the top of the building ( Figure 4 40-41), the correspondence between the texture number and the building contour point and the building texture control point ( Figure 4 35 to 39), and write the corresponding relationship between the building texture number and the texture image into the mtl file ( Figure 5 (shown in lines 9 to 13).
[0105] Reference Figure 7 , Figure 7 A flowchart of a specific application example of the method for reading 3D noise map rendering data according to an embodiment of the present invention is shown. The specific implementation steps of this specific application example are as follows:
[0106] (1) Open the file with the suffix “.obj”;
[0107] (2) Read the mtl file path, that is Figure 4 In line 3, open the mtl file at the same time and read the contents of the mtl file: First read Figure 5 In the 3rd and 4th lines, we get the color of the top of the building is white, that is, the floating point values of RGB color are: 1.0, 1.0, 1.0 respectively; then read Figure 5 In lines 6 to 7, the ground texture image is read according to the relative path "pic\ground_0.png", and the corresponding texture number is "ground_0"; then read Figure 5 Lines 9 to 13 in the code read the building texture images according to the relative paths "pic\building_0.png" and "pic\building_1.png", and the corresponding texture numbers are "building_0" and "building_1" respectively;
[0108] (3) Read the offset distance, read Figure 4 From the 4th to 6th rows, we get the X-coordinate offset distance as 836100.00, the Y-coordinate offset distance as 1300400.00, and the Z-coordinate offset distance as 0;
[0109] (4) Read ground rendering data, start symbol ( Figure 4 Row 7), ground control points ( Figure 4Lines 8 to 11), ground texture control points ( Figure 4 Lines 12 to 15), the correspondence between texture numbers and ground control points and ground texture control points ( Figure 4 Lines 16-17);
[0110] (5) Read the storage subsection of each building, including the start symbol and building number ( Figure 4 Line 19), building height ( Figure 4 Line 20), building contour points ( Figure 4 Lines 21 to 24), building texture control points ( Figure 4 Lines 25 to 34), top surface of the building ( Figure 4 Lines 40 to 41), the correspondence between texture numbers and building contour points and building texture control points ( Figure 4 lines 35-39).
[0111] The method for storing three-dimensional noise map rendering data according to the embodiment of the present invention has the following technical effects:
[0112] The embodiment of the present invention creates an obj file, an mtl file and a texture image file, and writes a first set of data into the obj file, a second set of data into the mtl file, and a third set of data into the texture image file, respectively, thereby effectively improving the reading efficiency of three-dimensional noise map rendering data, and OpenGL can be used directly for rendering after the data is read.
[0113] Reference Figure 8 The embodiment of the present invention further provides a dimensional noise map rendering data access device 200, which specifically includes:
[0114] at least one processor 210;
[0115] At least one memory 220, used to store at least one program;
[0116] When the at least one program is executed by the at least one processor 210, the at least one processor 210 implements the following Figure 1 and Figure 2 The method shown.
[0117] Among them, the memory 220 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs and non-transitory computer executable programs. The memory 220 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 220 may optionally include a remote memory remotely arranged relative to the processor 210, and these remote memories may be connected to the processor 210 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.
[0118] It can be understood that Figure 8 The device structure shown in the figure does not constitute a limitation on the device 200, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0119] like Figure 8 In the device 200 shown, the processor 210 can call the program stored in the memory 220 and execute but is not limited to Figure 1 and Figure 2 Steps of the illustrated embodiment.
[0120] The above-described embodiment of the apparatus 200 is merely illustrative, wherein the units described as separate components may or may not be physically separated, i.e., may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment.
[0121] The embodiment of the present invention further provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to implement the following when executed by the processor: Figure 1 and Figure 2 The method shown.
[0122] The present application also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes Figure 1 and Figure 2 The method shown.
[0123] It is understood that all or some steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0124] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.
Claims
1. A method for storing three-dimensional noise map rendering data, characterized in that: include: Create obj files, mtl files and texture image files; Writing a first set of data into the obj file, the first set of data including mtl file path data, offset data between the three-dimensional noise map rendering center coordinates and the actual coordinates, ground rendering data, and building rendering data; The mtl file path data includes the mtl file relative path; the ground rendering data includes a start symbol, a ground control point, a ground texture control point, and a corresponding relationship between a texture number and the ground control point and the ground texture control point; In the building rendering data, each building is stored as a subsection, and the storage content of each building subsection includes a start symbol, a building number, a building height, a building outline point, a building texture control point, a building top surface, and a corresponding relationship between the texture number and the building outline point and the building texture control point; Writing a second set of data into the mtl file, wherein the second set of data includes building top surface color data, ground texture number and ground texture picture correspondence data, building texture number and building texture picture correspondence data; The method further comprises: Convert ground noise value data into pixel color values to generate ground texture image data; Convert building noise value data into pixel color values, merge building faces of multiple buildings, and generate building texture image data; A third set of data is written into the texture image file, wherein the third set of data includes ground texture image data and building texture image data.
2. A method for reading three-dimensional noise map rendering data, characterized in that: include: Open obj files, mtl files and texture image files; The method further comprises: Write the first set of data into the obj file, write the second set of data into the mtl file, and write the third set of data into the texture picture file; Convert ground noise value data into pixel color values to generate ground texture image data; Convert building noise value data into pixel color values, merge building faces of multiple buildings, and generate building texture image data; Read the first set of data, the second set of data and the third set of data in sequence; The first group of data includes mtl file path data, offset data between the rendering center coordinates of the three-dimensional noise map and the actual coordinates, ground rendering data and building rendering data; the mtl file path data includes the mtl file relative path; the ground rendering data includes a start symbol, a ground control point, a ground texture control point, and a corresponding relationship between a texture number and the ground control point and the ground texture control point; in the building rendering data, each building is stored as a subsection, and the storage content of each building subsection includes a start symbol, a building number, a building height, a building contour point, a building texture control point, a building top surface, and a corresponding relationship between a texture number and the building contour point and the building texture control point; The second set of data includes building top color data, ground texture number and ground texture picture correspondence data, building texture number and building texture picture correspondence data; The third set of data includes ground texture picture data and building texture picture data.
3. A three-dimensional noise map rendering data storage system, characterized in that: include: Create a module to create obj files, mtl files and texture image files; A first writing module is used to write a first set of data into the obj file, wherein the first set of data includes mtl file path data, offset data between the three-dimensional noise map rendering center coordinates and the actual coordinates, ground rendering data, and building rendering data; The mtl file path data includes the mtl file relative path; the ground rendering data includes a start symbol, a ground control point, a ground texture control point, and a corresponding relationship between a texture number and the ground control point and the ground texture control point; In the building rendering data, each building is stored as a subsection, and the storage content of each building subsection includes a start symbol, a building number, a building height, a building outline point, a building texture control point, a building top surface, and a corresponding relationship between the texture number and the building outline point and the building texture control point; A second writing module is used to write a second set of data into the mtl file, wherein the second set of data includes building top surface color data, ground texture number and ground texture picture correspondence data, building texture number and building texture picture correspondence data; The system is also used to: convert ground noise value data into pixel color values to generate ground texture image data; Convert building noise value data into pixel color values, merge building faces of multiple buildings, and generate building texture image data; The third writing module is used to write a third set of data into the texture image file, wherein the third set of data includes ground texture image data and building texture image data.
4. A three-dimensional noise map rendering data reading system, characterized in that: include: Open module, used to open obj files, mtl files and texture image files; The system is also used to: write the first set of data into the obj file, write the second set of data into the mtl file, and write the third set of data into the texture image file; convert the ground noise value data into the color value of the pixel point to generate ground texture image data; Convert building noise value data into pixel color values, merge building faces of multiple buildings, and generate building texture image data; A reading module, used to read the first set of data, the second set of data and the third set of data in sequence; the first set of data includes mtl file path data, offset data between the three-dimensional noise map rendering center coordinates and the actual coordinates, ground rendering data and building rendering data; The mtl file path data includes the mtl file relative path; the ground rendering data includes a start symbol, a ground control point, a ground texture control point, and a corresponding relationship between a texture number and the ground control point and the ground texture control point; In the building rendering data, each building is stored as a subsection, and the storage content of each building subsection includes a start symbol, a building number, a building height, a building contour point, a building texture control point, a building top surface, and a correspondence between the texture number and the building contour point and the building texture control point; the second group of data includes building top surface color data, correspondence data between ground texture numbers and ground texture images, and correspondence data between building texture numbers and building texture images; the third group of data includes ground texture image data and building texture image data.
5. A three-dimensional noise map rendering data access device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 2.
6. A computer-readable storage medium, characterized in that A processor-executable program is stored thereon, and when the processor-executable program is executed by the processor, it is used to implement the method according to any one of claims 1-2.
Citation Information
Patent Citations
An analysis and rendering method of a three-dimensional OBJ model and an MTL material in an iPhone
CN109636893A
Web-based 3D contents exhibition system
KR1020180112582A