Method and apparatus for generating rendering data of a building, rendering method and device

By obtaining the building block element index identifiers and rendering parameters, and combining them with planar geometric contour data to generate building rendering data, the problem of poor modeling data quality in existing technologies is solved, thereby improving the display effect and user experience of building models.

CN116244396BActive Publication Date: 2026-07-21ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2023-02-22
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The poor quality of building modeling data in existing electronic maps results in building models failing to effectively reflect their actual form, thus affecting user experience.

Method used

The index identifiers and rendering parameters of building blocks are obtained from the building's structural modeling data, and the rendering data of the building is generated by combining the planar geometric contour data, thereby improving the quality of the modeling data.

Benefits of technology

By generating more accurate building rendering data, the actual form of the building can be better reflected, thus improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116244396B_ABST
    Figure CN116244396B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for generating rendering data of a building, and a method and device for displaying. The method comprises: obtaining an index identifier of a building block element and a rendering parameter of the building block element from building body modeling data of the building; obtaining plane geometry contour data indexed by the index identifier from the building body modeling data of the building; and generating rendering data of the building based on the plane geometry contour data and the rendering parameter. The technical solution of the present disclosure improves the quality of the building modeling data. The building rendered by the rendering data of the present disclosure can better reflect the actual form of the building, improve the display effect of the building, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic map technology, and in particular to a method and apparatus for generating rendering data of buildings, a rendering method, and a device. Background Technology

[0002] Electronic maps are a digital representation of the real world. Typically, buildings in the real world are represented as Points of Interest (POIs) on electronic maps. Existing electronic map display modes include 2D floor plans, 3D stereoscopic views, and satellite maps. In 3D stereoscopic view mode, the stereoscopic display effect of buildings has a significant impact on user experience. Since the modeling data of a building determines its form, and the display effect is affected by the modeling data, improving the quality of building modeling data is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0003] This disclosure provides a method and apparatus for generating rendering data of a building, as well as a rendering method and device.

[0004] In a first aspect, embodiments of this disclosure provide a method for generating rendering data of a building, including:

[0005] From the building's building modeling data, obtain the index identifiers of the building's floor block elements and the rendering parameters of the floor block elements;

[0006] From the building's structural modeling data, obtain the planar geometric contour data of the index identifier;

[0007] Rendering data for buildings is generated based on planar geometric contour data and rendering parameters.

[0008] Secondly, embodiments of this disclosure provide a method for rendering buildings, applied to a terminal device, the method comprising:

[0009] Obtain the building modeling data of the building to be rendered;

[0010] Rendering data of a building is generated using the method for generating rendering data of a building in any embodiment of this disclosure;

[0011] Based on the building's rendering data, the building is rendered on the screen of the terminal device for the user to view.

[0012] Thirdly, embodiments of this disclosure provide an apparatus for generating rendering data of a building, comprising:

[0013] The first acquisition unit is used to obtain the index identifiers of the building block elements and the rendering parameters of the building block elements from the building block modeling data;

[0014] The second acquisition unit is used to acquire the planar geometric contour data of the index identifier from the building's building modeling data;

[0015] The data generation unit is used to generate rendering data for buildings based on planar geometric contour data and rendering parameters.

[0016] Fourthly, embodiments of this disclosure provide an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements the method provided in any embodiment of this disclosure when executing the computer program.

[0017] The technical solution of this disclosure embodiment allows the planar geometric contour to better reflect the shape of the building blocks. Therefore, the rendering data of the building generated based on the planar geometric contour data and rendering parameters improves the quality of the building modeling data. The building rendered from the rendering data of the building in this disclosure embodiment can better reflect the actual form of the building, improve the display effect of the building, and enhance the user experience.

[0018] The above overview is for illustrative purposes only and is not intended to be limiting in any way. Further aspects, embodiments, and features of this disclosure will become readily apparent from the accompanying drawings and the following detailed description, in addition to the illustrative aspects, embodiments, and features described above. Attached Figure Description

[0019] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments according to this disclosure and should not be construed as limiting the scope of this disclosure.

[0020] Figure 1 This is a flowchart of a method for generating rendering data of a building according to an embodiment of the present disclosure;

[0021] Figure 2 This is a schematic diagram of the frame structure of a building block in a three-dimensional spatial map in one embodiment;

[0022] Figure 3 This is a schematic diagram of the planar geometric outline of a building block in one embodiment;

[0023] Figure 4 This is a schematic diagram of the frame structure of a building block in a three-dimensional spatial map in another embodiment;

[0024] Figure 5 To be Figure 2 A schematic diagram of the bottom and top contours of the frame structure shown, after each vertex is split into two first child vertices.

[0025] Figure 6 To be Figure 4 A schematic diagram of the normals of each shape point in the solid frame shown;

[0026] Figure 7 This is a schematic diagram of the top surface profile in one embodiment;

[0027] Figure 8 This is a schematic diagram of the outline of the eaves foundation in one embodiment;

[0028] Figure 9 To adopt Figure 8 The outline of the eaves foundation shown is in Figure 7 This is a schematic diagram illustrating the process of generating the eaves outline from the top surface outline shown.

[0029] Figure 10 for Figure 9 A schematic diagram showing the decomposition of N1, N2, P1, and P2;

[0030] Figure 11 To Figure 2 A schematic diagram illustrating the process of generating roof surface data from the top surface profile;

[0031] Figure 12 This is a schematic diagram of the top surface profile in another embodiment;

[0032] Figure 13 This is a structural block diagram of a device for generating rendering data of a building according to an embodiment of the present disclosure;

[0033] Figure 14 This is a flowchart illustrating a method for displaying a building model according to an embodiment of this disclosure;

[0034] Figure 15 This is a structural block diagram of a building model display device according to an embodiment of the present disclosure;

[0035] Figure 16 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. Detailed Implementation

[0036] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of this disclosure. Therefore, the drawings and description are to be considered exemplary in nature and not restrictive.

[0037] To facilitate understanding of the technical solutions of the embodiments of this disclosure, the related technologies of the embodiments of this disclosure are described below. The following related technologies are optional solutions and can be combined with the technical solutions of the embodiments of this disclosure in any way, and they all fall within the protection scope of the embodiments of this disclosure.

[0038] The concepts involved in this article include vector data, fillets, and simplified models.

[0039] Vector data: Two-dimensional or three-dimensional coordinates used to describe the vertices or directions of a contour.

[0040] Rounded corners: The junction of two walls is usually where two surfaces intersect. To improve visual appeal, the junction of the two walls is constructed as a partial surface of an inscribed cylinder, so that the two intersecting walls are connected by an arc surface, which is represented as a rounded corner in the cross-sectional view.

[0041] Simplified model: A building model that supports lighting and can include roof boxes or railing-like eaves, and the building model can have rounded corners.

[0042] It should be noted that in this article, when a point is located in two-dimensional coordinates, the point's position information can be its two-dimensional coordinates; when a point is located in three-dimensional coordinates, the point's position information can be its three-dimensional coordinates.

[0043] Figure 1 This is a flowchart illustrating a method for generating rendering data for a building according to an embodiment of this disclosure. Figure 1 As shown, the method for generating rendering data for buildings may include steps S11 to S13.

[0044] In step S11, the index identifiers of the building block elements and the rendering parameters of the building block elements are obtained from the building block modeling data.

[0045] It is understood that a building comprises one or more building blocks, which can be floors or elevator shafts. Each building block element can have an index identifier, and the building's building modeling data can include multiple index identifiers corresponding to multiple building block elements. Therefore, the building described in this disclosure can be a building composed of one or more floors, and the building can also be a building with elevator shafts.

[0046] In step S12, the planar geometric contour data of the index identifier is obtained from the building modeling data.

[0047] A planar geometric contour can be a contour formed by connecting multiple vertices. For example, a planar geometric contour can be a planar polygon contour, such as a planar quadrilateral contour, a planar pentagon contour, etc. A planar polygon includes multiple vertices. Accordingly, the planar geometric contour data can include the number of vertices of the planar geometric contour and the position information of each vertex in the planar geometric contour. One of the multiple vertices of the polygon can be an initial point, and the position information of the initial point can be the absolute coordinates of the initial point in a plane of the map. For example, the two-dimensional coordinates of the initial point in the xy plane of the map can be (0, 0). The position information of the other vertices of the planar polygon can be the relative coordinates of the vertex relative to the initial point. Thus, the planar geometric contour data is two-dimensional vector data. The initial point can be a point in the polygon, the position information of the initial point is the absolute coordinates of the initial point, and the position information of the other points is the relative coordinates of the other points relative to the initial point.

[0048] In step S13, rendering data of the building is generated based on planar geometric contour data and rendering parameters.

[0049] In existing technologies, the quality of building modeling data is poor, and the building models generated based on the modeling data often fail to accurately reflect the shape of the building.

[0050] The technical solution of this disclosure involves obtaining the index identifiers and rendering parameters of building block elements from the building's structural modeling data; obtaining the planar geometric contour data of the index identifiers from the building's structural modeling data; and generating rendering data of the building based on the planar geometric contour data and the rendering parameters. The building's structural modeling data includes not only the rendering parameters of the building block elements but also the planar geometric contour data of the building blocks. The planar geometric contour data can better reflect the geometric contours of the building blocks. Therefore, after generating the building's rendering data based on the planar geometric contour data and rendering parameters, the building rendered using this rendering data can better reflect the building's form, improving the user experience. Therefore, the technical solution of this disclosure allows the planar geometric contours to better reflect the shape of the building blocks. Thus, the building rendering data generated based on the planar geometric contour data and rendering parameters improves the quality of the building modeling data. The building rendered using the building rendering data in this disclosure can better reflect the actual form of the building, improving the building's display effect and enhancing the user experience.

[0051] In one embodiment, the building modeling data includes building block feature data and building block geometry data. The building block feature data includes index identifiers and rendering parameters; the building block geometry data includes planar geometric contour data.

[0052] From the building's building modeling data, obtain the index identifiers and rendering parameters of the building's floor block elements, including: from the floor block element data, obtain the index identifiers and rendering parameters of the building's floor block elements.

[0053] From the building's structural modeling data, obtain the planar geometric contour data of the index identifier, including: from the building block geometric data, obtain the planar geometric contour data of the index identifier.

[0054] When a building comprises multiple blocks, the block geometry data can include multiple planar geometric profile data. These planar geometric profile data can correspond to index identifiers, allowing the corresponding planar geometric profile data to be retrieved using these identifiers.

[0055] In related technologies, the data protocol for building models does not support multi-story model data. The downloaded model data is a single-unit vector model, which can only support single-story building models and cannot support complex building models, thus failing to meet the application scenarios of multi-story buildings.

[0056] In this embodiment, the building block elements include index identifiers and rendering parameters, and the building block geometric data includes planar geometric contour data. Using the building block's index identifier, the planar geometric contour data of the building block can be obtained from the building block's geometric data. Based on the planar geometric contour data and rendering parameters, the building block's rendering data can be generated. In this way, each building block can have a corresponding index identifier. When a building comprises multiple building blocks, the planar geometric contour data of each building block can be indexed using its index identifier, and then the rendering data of that building block can be generated based on the planar geometric contour data and rendering parameters, thereby obtaining the building's rendering data. Therefore, the technical solution of this disclosure can be applied not only to buildings with one floor, but also to buildings with two or more floors, and to buildings with complex structures such as elevator shafts, thus having a wider range of applications.

[0057] In one embodiment, the rendering parameters may include top scaling parameters, bottom scaling parameters, and building block height data. Based on the planar geometric contour data and the rendering parameters, generating rendering data for the building may include: determining the bottom contour data of the building block based on the planar geometric contour data and the bottom scaling parameters; determining the top contour data of the building block based on the planar geometric contour data, the top scaling parameters, and the building block height data; and generating rendering data based on the bottom contour data and the top contour data.

[0058] This method determines the bottom and top outline data of the building block, thereby determining the building block's frame structure. Based on the building block's frame structure, rendering data is generated. This rendering data can better reflect the shape of the building block, improve the quality of the building block's modeling data, and thus improve the quality of the building's modeling data.

[0059] For example, the planar geometric profiles of the bottom and top surfaces of a building block can be the same, so that the index identifier of the building block can index the data of one planar geometric profile. The planar geometric profiles of the bottom and top surfaces of a building block can be different, so that the index identifier of the building block can index the data of two planar geometric profiles.

[0060] The top scaling parameter can be the multiple of the building block's top profile relative to its planar geometric profile. The bottom scaling parameter can be the multiple of the building block's bottom profile relative to its planar geometric profile. The planar geometric profile data can be used to determine the planar geometric profile. The top geometric profile can be obtained by scaling the planar geometric profile according to the top scaling parameter, and then combined with the building block's height data to obtain the bottom geometric profile data.

[0061] When the top and bottom contours of a building block are the same, the vertices of the top contour and the bottom contour can be aligned in the height direction; that is, the Z-coordinates of the vertices of the top contour and the bottom contour are the same. When the top and bottom contours of a building block are different, the center of the top contour and the center of the bottom contour can be aligned in the height direction.

[0062] In one embodiment, the method for generating building rendering data can be applied to a terminal device, such as a client. For example, in map navigation on a terminal device, a user may not only want to obtain navigation routes for a Point of Interest (POI), but also want to view models of the buildings associated with that POI. The user can perform operations on the terminal device to generate building rendering data.

[0063] For example, the method for generating building rendering data may further include: acquiring building structure modeling data based on received instructions. For instance, a user can select or input operation instructions on a terminal device. Upon receiving the user's operation instructions, the terminal device acquires the building structure modeling data corresponding to the POI from the server. Thus, the building rendering data is generated on the terminal device.

[0064] In related technologies, to improve the visual effect of buildings under lighting conditions at large scales, model display scenes have been added. To display the model, the terminal device needs to download the model from the server. Understandably, the model has multiple faces, and the model data consists of these faces and the relationships between them. Therefore, when the terminal device downloads the model from the server, the amount of data downloaded is relatively large, resulting in a significant increase in downlink traffic.

[0065] In the technical solution of this disclosure embodiment, when applied to a terminal device, the terminal device obtains building modeling data of a building from the server. The building modeling data includes index identifiers, rendering parameters, planar geometric contour data, etc., which are all coordinate data or parameter data. Compared with obtaining the model data of the building from the server, obtaining the building modeling data of the building from the server can greatly reduce the downlink traffic.

[0066] In one embodiment, the planar geometric profile data may include the position information of each vertex of the planar geometric profile, such as the two-dimensional coordinates (x, y) of each vertex. The two-dimensional coordinates of the initial point of the planar geometric profile can be (0, 0), and the position information of other vertices can be their relative coordinates to the initial point. It should be noted that the planar geometric profile data can be applied to multiple building blocks. For example, if the planar geometric profile data represents a square, then all building blocks with a positive orientation can use this planar geometric profile data. The planar geometric profiles corresponding to the top and bottom surfaces of a building block can be the same, or the planar geometric profiles corresponding to the top and bottom surfaces of a building block can be different, or the planar geometric profiles corresponding to two building blocks can be the same.

[0067] In one embodiment, a floor block can be a floor. The planar geometric contours corresponding to the top and bottom surfaces of a floor can be the same. That is, the top and bottom contours of a floor have similar shapes, and their dimensions can be the same or different. The planar geometric contour can be determined based on the planar geometric contour data; the top contour can be determined based on the planar geometric contour and the top surface scaling parameter; the bottom contour can be determined based on the planar geometric contour and the bottom surface scaling parameter. When the top and bottom surface scaling parameters are different, the floor is a terraced floor. Therefore, the technical solution of this disclosure can support terraced floors.

[0068] In one embodiment, the planar geometric profiles corresponding to the top and bottom surfaces of a floor may be different. For example, the top surface may correspond to a first planar geometric profile, and the bottom surface may correspond to a second planar geometric profile. The planar geometric profile data may include the position information of each vertex of the first planar geometric profile and the position information of each vertex of the second planar geometric profile. Based on the position information of each vertex of the first planar geometric profile, the first planar geometric profile can be determined; the top surface profile can be determined based on the first planar geometric profile and the top surface scaling parameter. Based on the position information of each vertex of the second planar geometric profile, the second planar geometric profile can be determined; the bottom surface profile can be determined based on the second planar geometric profile and the bottom surface scaling parameter.

[0069] For example, when the top and bottom surfaces of a floor have different planar geometric contours, each side of the top and bottom contours of the floor can correspond one-to-one. For instance, if the bottom contour is a square and the top contour is a parallelogram, even though the shapes of the bottom and top contours are different, each side of the bottom contour can correspond one-to-one with each side of the top contour. Therefore, the technical solution of this disclosure can support irregularly shaped floors. A floor whose top and bottom surfaces have different shapes is called an irregularly shaped floor.

[0070] After obtaining the planar geometric contour data with index identifiers, collinear points need to be removed. For example, in the planar geometric contour determined by the planar geometric contour data, if there exists a first point (excluding the endpoints of the line edge) located on the contour line, then that first point is removed. For example, if the planar geometric contour includes the line edge AB, and a vertex M of the planar geometric contour is located on the line edge AB, that is, vertex M is located between vertex A and vertex B, and vertices A, M, and B are collinear, then vertex M is removed.

[0071] It is understandable that planar geometric contour data can be data collected by a data acquisition device on-site based on actual buildings. Due to building errors, acquisition errors, and data storage errors in the actual buildings, redundant vertices may exist in the planar geometric contour data. The first point mentioned above can be a redundant vertex. By removing the first point, the calculation of the first point during the rendering data generation process can be reduced, thereby improving the speed of rendering data generation. In addition, even if the first point, such as vertex M, does exist in an actual building, since vertex M is located between vertex A and vertex B, and the three vertices are collinear, the existence of vertex M will not affect the final building model. Therefore, removing vertex M will not affect the final constructed building model, and it can also save various calculations of vertex M during the rendering data generation process, thereby improving the speed of rendering data generation.

[0072] It's important to note that while users on terminal devices may want to see the building model corresponding to a POI on the map, this model only needs to be a simplified version. By setting the bottom and top surfaces to have the same corresponding planar geometric contours, the amount of data in the building modeling data can be further reduced, thus lowering downlink traffic. Furthermore, this approach simplifies the final building generation process, improving the speed of building rendering data generation and enhancing the user experience.

[0073] In one embodiment, the rendering parameters may further include offset data and elevation data, and the rendering data may further include the building's location information on the map. The method for generating the building's rendering data may further include: determining the building's location information on the map based on its base contour data, offset data, and elevation data.

[0074] For example, the offset data can be the relative position coordinates (x1, y1) of the initial point of the bottom profile relative to the initial point of the planar geometric profile. In another embodiment, the offset data of the building block can be the relative position coordinates (x2, y2) of the initial point of the top profile relative to the initial point of the planar geometric profile. The bottom profile data corresponds to the planar geometric profile data, and the bottom profile corresponds to the vertices in the planar geometric profile. The point in the bottom profile corresponding to the initial point of the planar geometric profile is the initial point of the bottom profile. The point in the top profile corresponding to the initial point of the planar geometric profile is the initial point of the top profile.

[0075] It should be noted that the offset data is not limited to rectangular two-dimensional coordinate data. In other embodiments, the offset data can be polar coordinate data, etc., as long as the position of the bottom surface on the map can be determined based on the offset data.

[0076] For example, when a user needs to view the building model corresponding to a Point of Interest (POI) on a 3D map, the position of the building's bottom outline in the XY plane can be determined based on offset data. Based on the elevation of the building's bottom surface, its Z-coordinate can be determined, thus determining the specific location of the building's bottom surface on the 3D map, and consequently, the building's exact location on the 3D map. Therefore, after rendering the building model based on the building's rendering data, the building model's position on the map corresponds to the POI's location, further improving the user experience.

[0077] In one embodiment, the centers of the top and bottom surfaces of the building block correspond to each other. That is, the line connecting the centers of the top and bottom surfaces of the building block is perpendicular to the Z-axis in the three-dimensional space map. Such a building block can be an isosceles frustum, for example, the vertical cross-section of the building block is an isosceles trapezoid.

[0078] In one embodiment, the rendering parameters may further include offset data of the top surface of the building block relative to its bottom surface. For example, the rendering parameters may also include the relative position coordinates (x3, y3) of the initial point of the top surface profile of the building block relative to the initial point of the bottom surface profile. Based on the offset data of the top surface of the building block relative to its bottom surface and the height of the building block, the position of the top surface profile of the building block relative to its bottom surface profile can be determined. This approach can support the construction of irregularly shaped building blocks, such as those with a vertical cross-section that is a parallelogram or a non-isosceles trapezoid.

[0079] Figure 2 This is a schematic diagram of the frame structure of a building block in a 3D spatial map in one embodiment. The following explanation uses a quadrilateral planar geometric outline of the building block as an example to illustrate the determination... Figure 2 The process of constructing the frame structure of the building block shown. The scaling parameters for both the bottom and top surfaces are 1.

[0080] Based on the planar geometric profile data and the bottom scaling parameters, the bottom profile data of the building block is determined. For example... Figure 2 As shown, the bottom profile determined by the bottom profile data is the first quadrilateral EFGH. Based on the planar geometric profile data, top scaling parameters, and building block height data, the top profile data of the building block is determined. (See figure) Figure 2 As shown, the top profile determined by the top profile data is the first quadrilateral EFGH. The top profile EFGH is the same as the bottom profile EFGH. The distance between the first quadrilateral EFGH and the first quadrilateral ABCD represents the building height. Based on the bottom profile data, offset data, and elevation data, the building's location on the map can be determined, thus identifying the... Figure 2 The location of the framework structure shown on the map.

[0081] In a planar geometric profile, the points used to define its shape are called shape points. A shape point where two straight lines intersect can be defined as a vertex, for example... Figure 2 In a geometric diagram, the point B where lines AB and BC intersect can be called vertex B. A plane geometric profile can be a polygon, for example... Figure 2 The quadrilateral shown. In another embodiment, the planar geometric profile data may include vertex fillet identifiers.

[0082] For example, a vertex fillet identifier corresponds to a vertex. When a vertex in the planar geometric contour data has a corresponding vertex fillet identifier, it indicates that the vertex position is a fillet. For example, the planar geometric contour data may also include a fillet size corresponding to the vertex fillet identifier, such as a fillet radius. Thus, a fillet of a preset size can be generated at the vertex position corresponding to the planar geometric contour based on the vertex fillet identifier and the fillet size. Figure 3 This is a schematic diagram of the planar geometric outline of a building block in one embodiment. Figure 3 In the illustrated embodiment, the planar geometric profile includes straight edges, circular arc edges located between two straight edges, and vertices where the two straight edges intersect.

[0083] Figure 4 This is a schematic diagram of the frame structure of a building block in a three-dimensional spatial map in another embodiment. Figure 4 The planar geometric profile of the building block shown is as follows Figure 3 As shown, the scaling parameters for both the bottom and top surfaces are 1.

[0084] The building blocks constructed in this way are not limited to polygonal shapes; they can include rounded corners, increasing the diversity of building models.

[0085] It should be noted that in planar geometric contour data, the data for circular arc edges includes the positional information of multiple construction points that constitute the circular arc edge. For example, in Figure 4 In the frame structure shown, the shape points of the bottom contour of the building block include vertices A, C, and D, as well as construction points M1, K1, Q1, and N1; the shape points of the top contour of the building block include vertices E, G, and H, as well as construction points M2, K2, Q2, and N2.

[0086] In one embodiment, the bottom contour data includes first shape point position information, and the top contour data includes second shape point position information. Based on the bottom contour data and the top contour data, generating rendering data may include: generating wall contour data of the building based on adjacent first shape point position information in the bottom contour data and adjacent second shape point position information in the top contour data. The rendering data includes at least the wall contour data.

[0087] For example, adjacent first shape points in the bottom contour correspond to adjacent second shape points in the top contour, for example, Figure 4 In the bottom contour, adjacent first shape points are A and D, and adjacent second shape points are E and H. The edge formed by connecting AD is corresponding to the edge formed by connecting E and H.

[0088] The wall profile data includes wall triangle profile data. Based on the positional information of adjacent first shape points in the bottom profile data and adjacent second shape points in the top profile data, the wall profile data of the building is generated. This may include: generating at least two wall triangle profiles based on the positional information of adjacent first shape points in the bottom profile data and adjacent second shape points in the top profile data. The wall triangles determined by the wall triangle profile data do not have overlapping areas. For example, based on the positional information of first shape points A and B and second shape points E and F, two wall triangles ABF and AFE are generated. Wall triangles ABF and AFE do not have overlapping areas. The wall triangle profile data includes the positional information of the vertices in the wall triangle profile. For example, the profile data of wall triangle ABF includes the positional information of vertices A, B, and F.

[0089] For example, starting from one of the four shape points, at least two wall triangles can be sequentially divided in a direction such as counterclockwise. For example, in Figure 2 In the process, starting from vertex A, wall triangles ABF and AFE are created in a counter-clockwise direction. This method of dividing the wall triangles avoids overlapping areas between the two triangles, thus improving the speed of generating wall contour data.

[0090] It should be noted that the method of dividing the wall into triangles is not limited to the above. Two wall triangles can be divided as needed, as long as there is no overlap between any two wall triangles.

[0091] It is understood that the terminal device can support the generation of triangular planes. Generating the entire wall surface by generating wall triangles allows the terminal device to generate the wall surface, which is beneficial for implementing the solutions of this disclosure embodiment on the terminal device.

[0092] In one embodiment, the first shape point may include a first vertex, the second shape point may include a second vertex, and the wall contour data may include first wall contour data, which includes the position information of the first vertex and the position information of the second vertex. The first wall contour data includes first wall triangle contour data. The process of generating the first wall contour data may include: generating the first wall triangle contour data of the building based on the position information of adjacent first vertices in the bottom contour data and the position information of adjacent second vertices in the top contour data.

[0093] The rendering data generated based on the bottom and top contour data may further include: generating normal direction information for vertices in the first wall based on the position information of vertices in the first wall contour data, wherein the normals of the vertices are perpendicular to the first wall. The rendering data also includes the normal direction information of the vertices in the first wall. The position information of vertices in the first wall contour data may include the position information of the first vertex and the position information of the second vertex in the first wall.

[0094] Figure 5 To be Figure 2 The diagram illustrates the bottom and top contours of the frame structure after each vertex is broken down into two first child vertices. It should be noted that when displaying a building model, the building's rendering data needs to be rendered to obtain the model for display. During rendering, the normal directions of the surfaces to be rendered need to be determined. In the bottom and top contours, the vertices where two straight lines intersect belong to the two straight lines respectively. For example, Figure 2 Vertex B in the diagram is a vertex of both line AB and line BC. The rendering effects of the wall containing line AB and the wall containing line BC are obviously different. To obtain the normal to the first wall, the vertex can be split into two child vertices, such as... Figure 5As shown, vertices in the bottom and top contours can be split into two first child vertices. For example, vertex A can be split into first child vertices A1 and A2, vertex B into first child vertices B1 and B2, vertex E into first child vertices E1 and E2, and vertex F into first child vertices F1 and F2. Based on adjacent first vertices A2 and B1 in the bottom contour data and adjacent second vertices E2 and F1 in the top contour data, the generated first wall triangles are A2B1 F1 and A2F1 E2, and there is no overlap between the first wall triangles A2B1 F1 and A2F1 E2. The normals of each vertex in the first wall triangle A2B1 F1 are perpendicular to the first wall triangle A2B1 F1. The normals of each vertex in the first wall triangle A2F1 E2 are perpendicular to the first wall triangle A2F1 E2. The first wall profile data may include the position information and normal direction information of each vertex in the first wall triangle A2B1F1 and the position information and normal direction information of each vertex in the first wall triangle A2F1E2.

[0095] It should be noted that, in order to explain more clearly, Figure 5 In this context, when a vertex is split into two child vertices and drawn as two points, it should be understood that these two child vertices are the same vertex. For example, when the first child vertex A1 and the first child vertex A2 of vertex A are split into two points, it should be understood that the first child vertex A1 and the first child vertex A2 are the same point, i.e., vertex A. In other words, the position information of the first child vertex A1 and the first child vertex A2 is the same as the position information of vertex A.

[0096] In one embodiment, the planar geometric profile data includes vertex fillet identifiers, and the first shape point includes a first construction point used to determine a first rounded edge in the bottom profile. The second shape point includes a second construction point used to determine a second rounded edge in the top profile. For example... Figure 4 In the diagram, the first construction points M1, K1, Q1, and N1 are used to determine the first circular arc edge in the bottom contour, and the second construction points M2, K2, Q2, and N2 are used to determine the second circular arc edge in the top contour. It can be understood that the endpoints of the circular arc edge are the points of tangency between the circular arc edge and the straight line edge; for example, construction point M1 is the point of tangency between the first circular arc edge M1N1 and the straight line edge AM1.

[0097] It should be noted that in the graphic display, circles are constructed from polygons; the more vertices a polygon has, the smoother the circle. Correspondingly, an arc edge is composed of multiple edges connected sequentially, and the construction point of an arc edge can be the intersection of two edges. To reduce the number of construction points and improve the generation speed of wall contour data, additional construction points can be created on the arc edge. For example, in... Figure 4In the process, except for the endpoints of the first arc edge, construct points K1 and Q1 on the first arc edge. The number of construction points can be set as needed.

[0098] The wall profile data includes second wall profile data, which includes the positional information of the first and second construction points. The second wall profile data also includes second wall triangle profile data. The process of generating the second wall profile data may include: generating the building's second wall triangle profile data based on the positional information of adjacent first construction points in the bottom profile data and adjacent second construction points in the top profile data.

[0099] The rendering data generated based on the bottom and top contour data may further include: generating normal direction information for the construction points in the second wall surface based on the position information of the construction points in the second wall surface contour data. The normal of the construction point is along the direction of the radius of the arc corresponding to the construction point. The rendering data also includes the normal direction information of the construction points in the second wall surface. The position information of the construction points in the second wall surface contour data may include the position information of the first and second construction points in the second wall surface.

[0100] Figure 6 To be Figure 4 The diagram shows the normals of various shape points in the solid frame. It should be noted that the first adjacent construction point in the bottom contour corresponds to the second adjacent construction point in the top contour. For example, Figure 6 In the bottom contour, adjacent first construction points M1 and K1, and adjacent second construction points M2 and K2, are located. For example, based on the positional information of adjacent first construction points M1 and K1 in the bottom contour data and adjacent second construction points M2 and K2 in the top contour data, second wall triangles M1K1K2 and M1K2M2 can be generated. Second wall triangles M1K1K2 and M1K2M2 do not overlap. The second wall contour data may include the positional information of each construction point in second wall triangle M1K1K2 and the positional information of each construction point in second wall triangle M1K2M2.

[0101] For a construction point, the normal to the construction point is along the direction of the radius of the arc corresponding to the construction point. Figure 6 The diagram shows the normal direction of each construction point, which is along the direction of the radius of the arc corresponding to the construction point. For example, the normal of construction point M2 is along the direction of the radius of the arc corresponding to construction point M2. The second wall profile data may also include the normal direction information of each construction point in the second wall triangle M1K1K2 and the normal direction information of each construction point in the second wall triangle M1K2M2.

[0102] In one embodiment, the planar geometric contour data includes vertex fillet identifiers, a first shape point including a first vertex and a first construction point, a second shape point including a second vertex and a second construction point, the first construction point being used to determine a first rounded edge in the bottom contour, and the second construction point being used to determine a second rounded edge in the top contour. The wall contour data includes third wall contour data, which includes positional information of adjacent first vertices and first construction points, as well as positional information of adjacent second vertices and second construction points.

[0103] The third wall profile data includes the third wall triangle profile data. The process of generating the third wall profile data may include: generating the building's third wall triangle profile data based on the position information of the adjacent first vertex and the position information of the first construction point in the bottom profile data, and the position information of the adjacent second vertex and the position information of the second construction point in the top profile data.

[0104] Based on the bottom and top contour data, rendering data is generated, including: generating normal direction information for the construction points in the third wall based on the position information of the construction points in the third wall contour data, with the normal direction of the construction points along the direction of the radius of the arc corresponding to the construction point; generating normal direction information for the vertices in the third wall based on the position information of the vertices in the third wall contour data, with the normal of the vertices perpendicular to the third wall. The rendering data also includes the normal direction information of the vertices in the third wall and the normal direction information of the construction points in the third wall. The position information of the construction points in the third wall contour data can include the position information of the first and second construction points in the third wall, and the position information of the vertices in the third wall contour data can include the position information of the first and second vertices in the third wall.

[0105] It should be noted that the first vertex A2 and the first construction point M1 adjacent in the bottom contour correspond to the second vertex E2 and the second construction point M2 adjacent in the top contour. That is to say, for example, the straight edge A2M1 in the bottom contour corresponds to the straight edge E2M2 in the top contour.

[0106] For example, based on the position information of the adjacent first vertex A2 and the first construction point M1 in the bottom contour data, and the position information of the adjacent second vertex E2 and the second construction point M2 in the top contour data, third wall triangles A2M1M2 and A2M2E2 can be generated. The second wall triangles A2M1M2 and A2M2E2 do not overlap. The third wall contour data may include the position information of each point in the third wall triangle A2M1M2 and the position information of each point in the third wall triangle A2M2E2.

[0107] For construction points within the third wall triangle, the normal direction of each construction point is along the direction of the radius of the corresponding arc. For vertices within the third wall triangle, the normal direction of each vertex is perpendicular to the third wall triangle. The third wall profile data may also include the normal direction information for each point in the third wall triangle A2M1M2 and the normal direction information for each point in the third wall triangle A2M2E2.

[0108] When rendering the wall surface corresponding to a wall triangle, the rendering can be performed based on the position information and normal direction of each point on the wall surface corresponding to the wall triangle. For example, based on the normal direction of each shape point on the wall surface corresponding to the wall triangle, the illumination angle of the light source at each shape point is determined; based on the position information of the shape points, the illumination distance between the light source and the shape points is determined; based on the illumination angle and illumination distance, the lighting effect of the corresponding shape points is rendered. Thus, the lighting effect at each position on the wall surface corresponding to the wall triangle can be rendered. Using this method, the illumination angle and illumination distance of each point on the wall surface corresponding to the wall triangle can be determined based on the normal direction and position information of each point on the wall surface corresponding to the wall triangle, thereby rendering the lighting effect of the corresponding points and achieving the rendering of the entire wall surface corresponding to the wall triangle.

[0109] For example, in Figure 5 In this method, based on the position information of the first child vertices A2, B1, and F1 in the first wall triangle A2B1F1, the illumination angles of the light rays at these vertices can be determined. Based on the position information of the first child vertices A2, B1, and F1, the illumination distances between the light source and these vertices can be determined. Based on the illumination angles and distances, the illumination effects of the first child vertices A2, B1, and F1 are rendered. Through interpolation calculations, the illumination effects of other positions on the wall corresponding to the first wall triangle A2B1F1 can be rendered, thus achieving the rendering of the entire wall corresponding to the first wall triangle A2B1F1. Following this method, the wall corresponding to the first wall triangle A2F1E2 is rendered, thereby achieving the rendering of the first wall.

[0110] It should be noted that in this embodiment of the disclosure, the walls can be rendered after the wall outline data of the building is generated. In this way, when the technical solution of this disclosure is applied to a terminal device, the user can view the rendered image of the walls in a timely manner. It is understood that in other embodiments, the entire building model can also be rendered after the entire rendering data of the building is generated.

[0111] In related technologies, the wall surface is divided into multiple grid surfaces, and each grid surface is rendered individually. This method involves a large amount of computational data and a slow construction speed. In this embodiment, the wall surface of the floor is rendered by generating wall triangle outline data and rendering the wall triangles. This process of rendering floor walls greatly reduces the amount of computational data, improving the generation speed of the building model; moreover, this method can meet the visual effect of the building model under lighting conditions and also meets the user's needs for the displayed building model.

[0112] In one implementation, the rendering parameters further include eaves identifiers and eaves base outline data, and the rendering data may also include eaves data. For example, if the eaves identifier is 1, it indicates that the floor has eaves, and if the eaves identifier is 0, it indicates that the floor does not have eaves.

[0113] When eaves exist on a building, the rendering data of the building can be generated based on planar geometric contour data and rendering parameters. This may also include: determining the direction information and length of the angle bisector vector of the interior angle corresponding to the second shape point in the top contour, where the length of the angle bisector vector is the projection length of the bottom edge in the eaves base contour onto the angle bisector of the interior angle; generating eaves contour data corresponding to the second shape point in the top contour based on the direction information of the angle bisector vector, the length of the angle bisector vector, and the eaves base contour data; and generating eaves data based on the eaves contour data.

[0114] Figure 7 This is a schematic diagram of the top surface profile in one embodiment. Figure 7 The top surface profile is a polygon, and the interior angles of the top surface profile are the interior angles corresponding to each vertex. Based on the position information of each vertex in the top surface profile, the direction of the angle bisector vector of the interior angle can be determined. Figure 7 The diagram shows the direction of the angle bisector vectors of each interior angle. For example, the direction from E to E' is the direction of the angle bisector vector of the interior angle of vertex E.

[0115] Figure 8 This is a schematic diagram of the eaves foundation outline in one embodiment. For example... Figure 8 As shown, the width of the base of the eaves foundation profile KMNPQ (i.e., the length of the base KM) is w. The distance between the endpoint of the angle bisector vector and the corresponding straight side is the width of the base of the eaves foundation profile, w. For example, in Figure 7In the diagram, the distance between the endpoint E' of the angle bisector vector EE' corresponding to vertex E and the side EF is the width w of the base; the distance between the endpoint E' and the side EH is also the width w of the base. Based on this condition, the position of the endpoint E' of the angle bisector vector EE' on the angle bisector can be determined, thus determining the length of the angle bisector vector of the interior angle. It should be noted that in the eaves foundation profile KMNPQ, vertex K is the initial point of the eaves foundation profile, which is the bottom vertex facing outwards in the eaves foundation profile.

[0116] For example, each edge in the top surface profile can be moved inward by a distance w, and the intersection of the four inner edges can be the endpoints of the angle bisector vectors, thereby obtaining the angle bisector vectors of each interior angle.

[0117] For a top surface profile that includes rounded corners, the interior angles in the top surface profile can include the interior angles corresponding to each vertex and the interior angles corresponding to each construction point, such as... Figure 4 As shown, the interior angles in the top surface contour include the interior angles corresponding to vertices E, G, and H, and the interior angles corresponding to construction points M2, K2, Q2, and N2. It should be noted that when determining the interior angles corresponding to construction points, the interior angle of construction point M2 is the interior angle between line sides EM2 and M2K2; the interior angle of construction point K2 is the interior angle between line sides M2K2 and K2Q2.

[0118] In one embodiment, the method for generating eaves contour data corresponding to a second shape point in the top surface contour is based on the direction information of the angle bisector vector, the length of the angle bisector vector, and the eaves foundation contour data. This includes: setting the eaves foundation contour on the angle bisector vector such that the initial point of the eaves foundation contour coincides with the second shape point, and making the bottom edge of the eaves foundation contour coincide with the angle bisector vector; scaling the eaves foundation contour along the direction of the angle bisector vector so that the bottom edge of the eaves foundation contour is equal to the length of the angle bisector vector, thereby generating eaves contour data corresponding to the second shape point. The eaves contour data includes the position information of the vertices in the eaves contour.

[0119] Figure 9 To adopt Figure 8 The outline of the eaves foundation shown is in Figure 7 This is a schematic diagram illustrating the process of generating the eaves outline from the top surface profile shown. For example, [the process involves...] Figure 8 The eaves foundation outline shown is set on the angle bisector vector EE'. The initial point K of the eaves foundation outline coincides with the second shape point E, and the bottom edge KM of the eaves foundation outline coincides with the angle bisector vector EE'. The eaves foundation outline is scaled along the direction of the angle bisector vector EE' so that the length of the bottom edge KM of the eaves foundation outline is equal to the length of the angle bisector vector EE', thus generating the eaves outline data corresponding to the second shape point. Figure 9 The diagram shows the eaves profile K1M1N1P1Q1 on the angle bisector vector EE', and the eaves profile K2M2N2P2Q2 on the angle bisector vector FF'. The same method is used to obtain the eaves profiles on other angle bisector vectors. Extruding the eaves base profile along the direction of the angle bisector vector EE' does not change the height of the eaves base profile. The eaves profile data includes positional information of the vertices in the eaves profile; for example, the eaves profile data for eaves profile K1M1N1P1Q1 may include the positional information of each vertex in eaves profile K1M1N1P1Q1.

[0120] Based on the eaves outline data, generate eaves data, including: along the circumferential direction of the top surface outline, generate eaves surface outline data based on the eaves vertex position information of adjacent and corresponding eaves edges, the eaves edges are determined by the adjacent eaves vertices in the eaves outline data, and the eaves data includes the eaves surface outline data.

[0121] For example, in Figure 9 In the diagram, the eaves edges of the eaves outline K1M1N1P1Q1 include K1 M1, M1 N1, N1 P1, P1 Q1, and Q1K1. The eaves edges of the eaves outline K2M2N2P2Q2 include K2 M2, M2 N2, N2 P2, P2 Q2, and Q2 K2. The corresponding eaves edges in the eaves outlines K1M1N1P1Q1 and K2M2 include K1 M1 and K2 M2, M1 N1 and M2N2, N1 P1 and N2 P2, P1 Q1 and P2 Q2, and Q1 K1 and Q2 K2. Since the eaves edges K1 M1 and K2 M2 are located on the plane of the top surface outline, and the plane formed by the eaves edges K1 M1 and K2 M2 is an invisible bottom surface in the building model, it is not necessary to generate the eaves surface outline data based on the eaves edges K1 M1 and K2 M2 when generating the eaves surface outline data.

[0122] In one embodiment, generating eaves surface contour data based on the eaves vertex position information of adjacent and corresponding eaves edges includes: generating at least two eaves triangle contour data based on the eaves vertex position information of adjacent and corresponding eaves edges, wherein the eaves triangles determined by the eaves triangle contour data do not have overlapping areas. The eaves surface contour data includes the eaves triangle contour data.

[0123] An eaves triangle is a triangle formed by connecting the three vertices of the eaves, and its three sides lie in a single plane. At least two eaves triangles must not overlap. This can be understood as the planar regions defined by the two eaves triangles not overlapping, or the wall surfaces corresponding to the two eaves triangles not overlapping. However, the eave surfaces corresponding to the two eaves triangles can be connected to each other.

[0124] For example, based on the eaves vertices P1, P2, N2, and N1, eaves triangles P1P2N2 and P1N2N1 can be generated. The eaves surface contour data includes the eaves triangle contour data, which includes the position information and normal direction information of each vertex in eaves triangle P1P2N2, and the position information and normal direction information of each vertex in eaves triangle P1N2N1. The method for generating the eaves triangle contour data is the same as the method for generating the wall triangle contour data, and will not be described again here.

[0125] For example, Figure 9 In the diagram, the second shape point G corresponds to the eaves contour K3M3N3P3Q3 (not shown). Vertex P2 is located on the eaves surface P1P2Q2Q1; vertex P2 is also located on the eaves surface P1P2N2N1; vertex P2 is also located on the straight edge P2P3Q3Q2; vertex P2 is also located on the eaves surface P2P3N3N2. Vertex P2 is located on four eaves surfaces, and the normal direction of vertex P2 is different on each eaves surface. Therefore, vertex P2 can be split into four second child vertices. The method of splitting vertices in the eaves contour into multiple second child vertices during the generation of eaves data is the same as the method of splitting vertices in the bottom contour into two first child vertices. This will not be elaborated further here.

[0126] After splitting the vertices in the eaves outline into second child vertices, the position information of the second child vertex is the same as the position information of the vertex to which it belongs. Based on the position information of the second child vertex in the eaves surface and the eaves surface in which the second child vertex is located, the normal direction of the second child vertex in the eaves surface can be determined.

[0127] Figure 10 for Figure 9 A schematic diagram showing the breakdown of N1, N2, P1, and P2. (See diagram below.) Figure 10 As shown, after splitting the vertex into multiple second child vertices, the roof surface P1P2 N2N1 is represented as P 12 P 21 N 21 N 12 .

[0128] For example, in Figure 10 In the middle, it can be determined based on the four second child vertices, i.e., the second child vertex P. 12Second sub-vertex P 21 Second sub-vertex N 12 Second sub-vertex N 21 The location information is used to divide the roof into two eaves triangles, which are eaves triangle P. 12 P 21 N 21 And the roof triangle P 12 N 21 N 12 And the eaves triangle P 12 P 21 N 21 And the roof triangle P 12 N 21 N 12 There are no overlapping regions.

[0129] For example, starting from a second child vertex, at least two eaves triangles can be sequentially divided in a direction, such as counterclockwise. For example, in Figure 10 In the middle, with the second child vertex P 12 Starting from point P, divide the roof into triangles P and P', moving counterclockwise. 12 P 21 N 21 And the roof triangle P 12 N 21 N 12 This method of dividing the eaves into triangles avoids overlapping areas between two eaves triangles, thus improving the speed of generating eaves surface contour data.

[0130] In one embodiment, generating eaves data based on eaves contour data further includes: generating normal direction information of eaves vertices in the eaves surface based on the position information of eaves vertices in the eaves surface contour data, wherein the normal of the eaves vertices is perpendicular to the eaves surface, and the eaves data also includes normal direction information of eaves vertices in the eaves surface.

[0131] When rendering the eaves surface corresponding to the eaves triangle, the rendering can be performed based on the position information and normal direction of each point in the eaves surface outline. In one embodiment, the steps for rendering the eaves surface may include: determining the illumination angle of the light at each of the second-child vertices in the eaves surface corresponding to the eaves triangle based on the normal direction of each second-child vertex; determining the illumination distance between the light source and the second-child vertex based on the position information of the second-child vertex; and rendering the illumination effect of the corresponding second-child vertex based on the illumination angle and illumination distance. Thus, the illumination effect of each of the second-child vertices in the eaves surface corresponding to the eaves triangle can be rendered. Using this method, the illumination angle and illumination distance of each point in the eaves surface corresponding to the eaves triangle can be determined based on the normal direction and position information of each point, thereby rendering the illumination effect of the corresponding point and achieving the rendering of the entire eaves surface corresponding to the eaves triangle.

[0132] For example, in Figure 10 In the middle, according to the eaves triangle P 12 P 21 N 21 The second sub-vertex P in the middle 12 P 21 N 21 The position information allows us to determine that the light rays are located at the second sub-vertex P. 12 P 21 N 21 The lighting angle; based on the second sub-vertex P 12 P 21 N 21 The position information determines the relationship between the light source and the second sub-vertex P. 12 P 21 N 21 The lighting distance; based on the lighting angle and lighting distance, render the second child vertex P respectively. 12 P 21 N 21 The lighting effects. Through interpolation calculations, the roof triangle P can be rendered. 12 P 21 N 21 The corresponding lighting effects on other parts of the wall are used to achieve lighting effects on the entire triangular P of the eaves. 12 P 21 N 21 The corresponding wall surface is rendered. Following this method, the eaves triangle P is rendered. 12 P 21 N 21 Rendering is performed to achieve the rendering of the roof surface.

[0133] The solution of this disclosure supports the construction of eaves, enriching the diversity of building models.

[0134] In one implementation, the rendering parameters further include a roof identifier, and the rendering data may also include roof surface data. When a building block has a roof, the rendering data for the building is generated based on the planar geometric contour data and the rendering parameters, and further includes: generating roof surface contour data based on the position information of the second vertex in the roof surface contour data; generating normal direction information of the second vertex in the roof surface based on the position information of the second vertex in the roof surface contour data, wherein the normal of the second vertex in the roof surface is perpendicular to the roof surface, and the roof surface data includes the roof surface contour data and the normal direction information of the vertices in the roof surface.

[0135] For example, generating roof surface contour data based on the position information of the second vertex in the top surface contour data may include: generating roof triangle contour data based on the position information of the second vertex in the top surface contour data, wherein the roof surface contour data includes roof triangle contour data. The roof triangle contour data includes the position information of each second vertex in the roof triangle.

[0136] Based on the positional information of each second vertex in the roof triangle contour data, the normal direction information of the second vertex in the roof triangle can be generated. The normal of the second vertex is perpendicular to the roof surface. The roof surface data includes the roof triangle contour data and the normal direction information of the second vertex in the roof surface. It can be understood that the direction of the normal of the second vertex in the roof surface is upward towards the roof surface.

[0137] For example, a roof identifier of 1 indicates that the floor has a roof; a roof identifier of 0 indicates that the floor has no roof.

[0138] Figure 11 To Figure 2 This diagram illustrates the process of generating roof surface data from the top surface profile. After determining the top surface profile EFGH, the positional information of each vertex in the top surface profile can be determined. Since the top surface profile is a plane, the normal direction of each vertex in the top surface profile is vertically upward.

[0139] Based on the position information of the second vertex in the top surface profile, the roof triangles can be segmented, with no overlap between any two roof triangles. This generates the roof triangle profile data. The roof surface profile data includes the roof triangle profile data. Based on the position information of each second vertex in the roof surface and the roof surface itself, the normal direction information of the second vertices can be generated. Figure 11 In the diagram, the roof triangles that are divided include roof triangle EFG and roof triangle EGH.

[0140] When rendering the roof surface corresponding to the roof triangle, the rendering can be performed based on the position information and normal direction of each second vertex in the roof surface corresponding to the roof triangle. For example, based on the normal direction of each second vertex in the roof surface corresponding to the roof triangle, the illumination angle of the light source at each second vertex is determined; based on the position information of the second vertex, the illumination distance between the light source and the second vertex is determined; based on the illumination angle and illumination distance, the illumination effect of the corresponding second vertex is rendered. Thus, the illumination effect of each second vertex in the roof surface corresponding to the roof triangle can be rendered. Using this method, the illumination angle and illumination distance of each point in the roof surface corresponding to the roof triangle can be determined based on the normal direction and position information of each point, thereby rendering the illumination effect of the corresponding point and achieving the rendering of the entire roof surface corresponding to the roof triangle.

[0141] For example, in Figure 11 In this process, based on the position information of the second vertices E, F, and G on the roof surface corresponding to roof triangle EFG, the illumination angles of the light rays at vertices E, F, and G can be determined. Based on the position information of the second vertices E, F, and G, the illumination distances between the light source and vertices E, F, and G can be determined. Based on the illumination angles and distances, the illumination effects of the second vertices E, F, and G are rendered respectively. Through interpolation calculations, the illumination effects of other positions on the roof surface corresponding to roof triangle EFG can be rendered, achieving the rendering of the entire roof surface corresponding to roof triangle EFG. Following this method, the roof surface corresponding to roof triangle EGH is rendered, thus achieving the rendering of the entire roof.

[0142] In one embodiment, the planar geometric contour data may further include a contour identifier. When the contour identifier is 1, it indicates that the planar geometric contour is a convex polygon, and the interior angles corresponding to each vertex of the convex polygon are all less than 180°.

[0143] When the contour identifier is 0, it indicates that the planar geometric contour is a concave polygon, and at least one vertex of the concave polygon has an interior angle greater than 180°. Therefore, the determined top surface contour is a concave polygon, such as... Figure 12 As shown, Figure 12 This is a schematic diagram of the top surface profile in another embodiment. For a concave polygonal top surface profile, during the generation of roof surface data, any available method can be used to subdivide the top surface profile into multiple roof triangles. For example, in Figure 12 In the process, the roof triangles of the top surface outline include roof triangle A1B1D1, roof triangle A1D1E1, roof triangle A1E1F1 and roof triangle B1C1D1. The roof surfaces corresponding to the four roof triangles are rendered respectively, and then the entire roof is rendered.

[0144] It should be noted that during the rendering process of building models, the walls, eaves, and roofs can be rendered in different colors as needed to improve the aesthetics and visibility of the building models.

[0145] The technical solutions of this disclosure can be applied to multi-story buildings, platform-shaped building blocks, building blocks with different bottom and top shapes but corresponding edges of the bottom and top surfaces, floor eaves, and rooftops. The method for generating rendering data for this building can also be applied to buildings with elevator shafts; when an elevator shaft exists in a building, the elevator shaft can be considered as a building block.

[0146] Therefore, the technical solutions of this disclosure can be applied to multi-story buildings, platform-shaped buildings, and irregular buildings with inconsistent outlines of low and high floors. The building models constructed using rendering data are richer and can better meet customer needs.

[0147] Figure 13 This is a structural block diagram of a device for generating rendering data of a building according to an embodiment of the present disclosure. In one embodiment, the generation device may include: a first acquisition unit 131, used to acquire the index identifiers of building block elements and the rendering parameters of building block elements from the building's building modeling data; a second acquisition unit 132, used to acquire the planar geometric contour data of the index identifiers from the building's building modeling data; and a data generation unit 133, used to generate rendering data of the building based on the planar geometric contour data and the rendering parameters.

[0148] In one embodiment, the building modeling data includes building block feature data and building block geometry data. The building block feature data includes index identifiers and rendering parameters; the building block geometry data includes planar geometric contour data. The first acquisition unit 131 is used to acquire the index identifiers and rendering parameters of the building block features from the building block feature data. The second acquisition unit 132 is used to acquire the planar geometric contour data indexed by the index identifiers from the building block geometry data.

[0149] In one embodiment, the rendering data includes top scaling parameters, bottom scaling parameters, and building block height data. The data generation unit 133 includes: a bottom data generation subunit, used to determine the bottom profile data of the building block based on the planar geometric profile data and the bottom scaling parameters; a top data generation subunit, used to determine the top profile data of the building block based on the planar geometric profile data, the top scaling parameters, and the building block height data; and a rendering data generation subunit, used to generate rendering data based on the bottom profile data and the top profile data.

[0150] In one embodiment, the bottom contour data includes first shape point position information, and the top contour data includes second shape point position information. A rendering data generation subunit is used to generate building wall contour data based on adjacent first shape point position information in the bottom contour data and adjacent second shape point position information in the top contour data. The rendering data includes at least the wall contour data.

[0151] In one embodiment, the first shape point includes a first vertex, the second shape point includes a second vertex, and the wall contour data includes first wall contour data, which includes the position information of the first vertex and the position information of the second vertex. A rendering data generation subunit is used to generate normal direction information of vertices in the first wall based on the position information of the vertices in the first wall contour data. The normals of the vertices are perpendicular to the first wall. The rendering data also includes the normal direction information of the vertices in the first wall.

[0152] In one embodiment, the planar geometric contour data includes vertex fillet identifiers; the first shape point includes a first construction point, which is used to determine a first arc edge in the bottom contour; the second shape point includes a second construction point, which is used to determine a second arc edge in the top contour; the wall contour data includes second wall contour data, which includes the position information of the first and second construction points. The rendering data generation subunit generates normal direction information for the construction points in the second wall based on the position information of the construction points in the second wall contour data. The normal of the construction point is along the direction of the arc radius corresponding to the construction point. The rendering data also includes the normal direction information of the construction points in the second wall.

[0153] In one embodiment, the planar geometric contour data includes vertex fillet identifiers, the first shape point includes a first vertex and a first construction point, the second shape point includes a second vertex and a second construction point, the first construction point is used to determine a first rounded edge in the bottom contour, and the second construction point is used to determine a second rounded edge in the top contour.

[0154] The wall contour data includes third wall contour data, which includes the position information of adjacent first vertices and first construction points, as well as the position information of adjacent second vertices and second construction points. The rendering data generation subunit: Based on the position information of construction points in the third wall contour data, it generates the normal direction information of the construction points in the third wall. The normal direction of the construction points is along the direction of the radius of the arc corresponding to the construction point. Based on the position information of vertices in the third wall contour data, it generates the normal direction information of the vertices in the third wall. The normals of the vertices are perpendicular to the third wall. The rendering data also includes the normal direction information of the vertices in the third wall and the normal direction information of the construction points in the third wall.

[0155] In one embodiment, the rendering parameters further include eaves identifiers and eaves basic outline data, the rendering data further includes eaves data, and the data generation unit further includes an eaves data generation subunit. The eaves data generation subunit is used to determine the direction information and length of the angle bisector vector of the interior angle corresponding to the second shape point in the top surface outline, the length of the angle bisector vector being the projection length of the bottom edge in the eaves basic outline onto the angle bisector of the interior angle; and is used to generate eaves outline data corresponding to the second shape point in the top surface outline based on the direction information of the angle bisector vector, the length of the angle bisector vector, and the eaves basic outline data; and to generate eaves data based on the eaves outline data.

[0156] In one embodiment, the eaves data generation subunit is further configured to set the eaves base contour on the angle bisector vector, such that the initial point of the eaves base contour coincides with the second shape point, and that the bottom edge of the eaves base contour coincides with the angle bisector vector; and to scale the eaves base contour along the direction of the angle bisector vector, such that the bottom edge of the eaves base contour is equal to the length of the angle bisector vector, so as to generate eaves contour data corresponding to the second shape point, wherein the eaves contour data includes the position information of the vertices in the eaves contour.

[0157] In one embodiment, the eaves data generation subunit is further configured to generate eaves surface profile data along the circumferential direction of the top surface profile, based on the eaves vertex position information of adjacent and corresponding eaves edges, wherein the eaves edges are determined by the adjacent eaves vertices in the eaves profile data, and the eaves data includes the eaves surface profile data.

[0158] In one embodiment, the eaves data generation subunit is further configured to generate the normal direction information of the eaves vertex in the eaves surface based on the position information of the eaves vertex in the eaves surface contour data, wherein the normal of the eaves vertex is perpendicular to the eaves surface, and the eaves data also includes the normal direction information of the eaves vertex in the eaves surface.

[0159] In one embodiment, the rendering parameters further include a roof identifier, the rendering data further includes roof surface data, and the data generation unit further includes a roof data generation subunit. The roof data generation subunit is used to generate roof surface contour data based on the position information of the second vertex in the roof surface contour data; and to generate normal direction information of the second vertex in the roof surface based on the position information of the second vertex in the roof surface contour data. The normal of the second vertex in the roof surface is perpendicular to the roof surface. The roof surface data includes the roof surface contour data and the normal direction information of the second vertex in the roof surface.

[0160] In one embodiment, the rendering parameters further include offset data and altitude data, and the rendering data also includes the location information of the building on the map. The generating apparatus further includes a location determination unit for determining the location information of the building on the map based on the bottom contour data, offset data, and altitude data.

[0161] In one embodiment, the generating apparatus further includes a receiving unit for acquiring building modeling data of the building according to the received instructions.

[0162] Figure 14 This is a flowchart illustrating a building rendering method in one embodiment of the present disclosure. In one embodiment, the building rendering method can be applied to a terminal device, and the method may include steps S141 to S143.

[0163] In step S141, the building modeling data of the building to be rendered is obtained.

[0164] For example, in a map navigation application on a terminal device, such as a client, when a user wants to view the building model corresponding to a Point of Interest (POI), the user can issue a request command to render the building by selecting a button. The request command may include the building's structural modeling data to be rendered. The terminal device obtains the building's structural modeling data to be rendered based on the received request command. For example, the map navigation application can respond to this request command by obtaining the building's structural modeling data to be rendered from a server based on the received request command.

[0165] In step S142, the rendering data of the building is generated using the method for generating rendering data of the building in any embodiment of the present disclosure.

[0166] In step S143, based on the building's rendering data, the building is rendered on the screen of the terminal device for the user to view.

[0167] For example, after generating rendering data for a building, the terminal device renders the building on the screen for the user to view, based on the building's rendering data. The terminal device can render the building from multiple angles.

[0168] Figure 15 This is a structural block diagram of a building rendering apparatus according to an embodiment of the present disclosure. A building rendering apparatus is applied to a terminal device and includes: an acquisition module 151 for acquiring building modeling data of a building to be rendered; a generation module 152 for generating building rendering data using a building rendering data generation method according to any embodiment of the present disclosure; and a rendering module 153 for rendering the building on the screen of the terminal device for the user to view based on the building rendering data.

[0169] Figure 16 This is a block diagram of an electronic device used to implement embodiments of the present disclosure. For example... Figure 16As shown, the electronic device includes a memory 1610 and a processor 1620. The memory 1610 stores a computer program that can run on the processor 1620. When the processor 1620 executes the computer program, it implements the method described in the above embodiments. The number of memories 1610 and processors 1620 can be one or more.

[0170] The electronic device also includes:

[0171] The communication interface 1630 is used to communicate with external devices and exchange and transmit data.

[0172] If the memory 1610, processor 1620, and communication interface 1630 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 16 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0173] Optionally, in a specific implementation, if the memory 1610, processor 1620 and communication interface 1630 are integrated on a single chip, the memory 1610, processor 1620 and communication interface 1630 can communicate with each other through an internal interface.

[0174] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods provided in this disclosure.

[0175] This disclosure also provides a chip, which includes a processor for calling and executing instructions stored in a memory, causing a communication device on which the chip is installed to perform the methods provided in this disclosure.

[0176] This disclosure also provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, output interface, processor, and memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method provided in the application embodiment.

[0177] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.

[0178] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Sync Link DRAM (SLDRAM), and Direct Rambus RAM (DR RAM).

[0179] In the above embodiments, implementation can be achieved, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.

[0180] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0181] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.

[0182] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process. Furthermore, the scope of the preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functionality involved.

[0183] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).

[0184] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. All or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware, the program being stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiments.

[0185] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. This storage medium can be a read-only memory, a disk, or an optical disk, etc.

[0186] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this disclosure, and these should all be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A method for generating rendering data for a building, characterized in that, include: From the building's building modeling data, obtain the index identifiers of the building's block elements and the rendering parameters of the block elements. The rendering parameters include top scaling parameters, bottom scaling parameters, and block height data. From the building modeling data, obtain the planar geometric contour data of the index identifier; Based on the planar geometric contour data and the bottom scaling parameters, the bottom contour data of the building block is determined; Based on the planar geometric contour data, the top surface scaling parameters, and the building block height data, the top surface contour data of the building block is determined; Based on the bottom contour data and the top contour data, the rendering data of the building is generated.

2. The method according to claim 1, characterized in that, The building modeling data includes building block feature data and building block geometric data. The building block feature data includes the index identifier and the rendering parameters; the building block geometric data includes the planar geometric contour data. The step of obtaining the index identifier of the building block element and the rendering parameters of the building block element from the building block modeling data includes: obtaining the index identifier of the building block element and the rendering parameters of the building block element from the building block element data. Obtaining the planar geometric contour data of the index identifier from the building structure modeling data includes: obtaining the planar geometric contour data of the index identifier from the building block geometry data.

3. The method according to claim 1, characterized in that, The bottom contour data includes first shape point position information, and the top contour data includes second shape point position information. Based on the bottom contour data and the top contour data, the rendering data is generated, including: Based on the position information of adjacent first shape points in the bottom contour data and the position information of adjacent second shape points in the top contour data, the wall contour data of the building is generated, and the rendering data includes at least the wall contour data.

4. The method according to claim 3, characterized in that, The first shape point includes a first vertex, the second shape point includes a second vertex, the wall contour data includes first wall contour data, the first wall contour data includes the position information of the first vertex and the position information of the second vertex, and the rendering data is generated based on the bottom contour data and the top contour data, further including: Based on the position information of the vertices in the first wall contour data, the normal direction information of the vertices in the first wall is generated, wherein the normal of the vertex is perpendicular to the first wall, and the rendering data also includes the normal direction information of the vertices in the first wall.

5. The method according to claim 3, characterized in that, The planar geometric contour data includes vertex fillet markers; the first shape point includes a first construction point, which is used to determine the first rounded edge in the bottom contour; the second shape point includes a second construction point, which is used to determine the second rounded edge in the top contour; the wall contour data includes second wall contour data, which includes the position information of the first construction point and the position information of the second construction point; generating the rendering data based on the bottom contour data and the top contour data further includes: Based on the location information of the construction points in the second wall contour data, the normal direction information of the construction points in the second wall is generated. The normal of the construction point is along the direction of the radius of the arc corresponding to the construction point. The rendering data also includes the normal direction information of the construction points in the second wall.

6. The method according to claim 3, characterized in that, The planar geometric contour data includes vertex rounded corner identifiers. The first shape point includes a first vertex and a first construction point. The second shape point includes a second vertex and a second construction point. The first construction point is used to determine the first rounded edge in the bottom contour. The second construction point is used to determine the second rounded edge in the top contour. The wall contour data includes third wall contour data, which includes position information of adjacent first vertices and first construction points, as well as position information of adjacent second vertices and second construction points. Generating the rendering data based on the bottom contour data and the top contour data further includes: Based on the position information of the construction points in the third wall contour data, the normal direction information of the construction points in the third wall is generated, and the normal direction of the construction points is along the direction of the radius of the arc corresponding to the construction point; based on the position information of the vertices in the third wall contour data, the normal direction information of the vertices in the third wall is generated, and the normal of the vertices is perpendicular to the third wall. The rendering data also includes the normal direction information of the vertices in the third wall and the normal direction information of the construction points in the third wall.

7. The method according to any one of claims 1-6, characterized in that, The rendering parameters also include eaves identifiers and eaves basic outline data. The rendering data also includes eaves data. Based on the planar geometric outline data and the rendering parameters, the rendering data of the building is generated, and further includes: Determine the direction information of the angle bisector vector of the interior angle corresponding to the second shape point in the top surface profile and the length of the angle bisector vector. The length of the angle bisector vector is the projection length of the bottom edge in the eaves foundation profile onto the angle bisector of the interior angle. Based on the direction information of the angle bisector vector, the length of the angle bisector vector, and the eaves foundation contour data, generate the eaves contour data corresponding to the second shape point in the top surface contour; The eaves data is generated based on the eaves outline data.

8. The method according to claim 7, characterized in that, Based on the direction information of the angle bisector vector, the length of the angle bisector vector, and the eaves foundation contour data, generate the eaves contour data corresponding to the second shape point in the top surface contour, including: The basic outline of the eaves is set on the angle bisector vector, such that the initial point of the basic outline of the eaves coincides with the second shape point, and the bottom edge of the basic outline of the eaves coincides with the angle bisector vector. The eaves base contour is scaled along the direction of the angle bisector vector so that the bottom edge of the eaves base contour is equal to the length of the angle bisector vector, thereby generating the eaves contour data corresponding to the second shape point. The eaves contour data includes the position information of the vertices in the eaves contour.

9. The method according to claim 7, characterized in that, Based on the eaves outline data, the eaves data is generated, including: Along the circumferential direction of the top surface profile, eaves surface profile data is generated based on the position information of the eaves vertices of adjacent and corresponding eaves edges. The eaves edges are determined by the adjacent eaves vertices in the eaves profile data, and the eaves data includes the eaves surface profile data.

10. The method according to claim 9, characterized in that, Generating the eaves data based on the eaves outline data also includes: Based on the position information of the eaves vertex in the eaves surface contour data, the normal direction information of the eaves vertex in the eaves surface is generated. The normal of the eaves vertex is perpendicular to the eaves surface. The eaves data also includes the normal direction information of the eaves vertex in the eaves surface.

11. The method according to any one of claims 1-6, characterized in that, The rendering parameters also include roof identification, and the rendering data also includes roof surface data. Based on the planar geometric contour data and the rendering parameters, the rendering data for the building is generated, and further includes: Based on the position information of the second vertex in the top surface contour data, roof surface contour data is generated; Based on the position information of the second vertex in the roof surface contour data, the normal direction information of the second vertex in the roof surface is generated. The normal of the second vertex in the roof surface is perpendicular to the roof surface. The roof surface data includes the roof surface contour data and the normal direction information of the second vertex in the roof surface.

12. A method for rendering a building, characterized in that, Applied to a terminal device, the method includes: Obtain the building modeling data of the building to be rendered; The rendering data of the building is generated using the method for generating rendering data of the building as described in any one of claims 1-11; Based on the rendering data of the building, the building is rendered on the screen of the terminal device for the user to view.

13. A device for generating rendering data for a building, characterized in that, include: The first acquisition unit is used to acquire the index identifier of the building block element and the rendering parameters of the building block element from the building block modeling data. The rendering parameters include the top scaling parameter, the bottom scaling parameter and the building block height data. The second acquisition unit is used to acquire the planar geometric contour data of the index identifier from the building modeling data of the building. The data generation unit is used to determine the bottom surface contour data of the building block based on the planar geometric contour data and the bottom surface scaling parameters; determine the top surface contour data of the building block based on the planar geometric contour data, the top surface scaling parameters and the building block height data; and generate the rendering data of the building based on the bottom surface contour data and the top surface contour data.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor, when executing the computer program, implements the method of any one of claims 1-12.