Building rendering method and apparatus, and computer program product
By acquiring static and dynamic rendering data of the building, rendering the building's three-dimensional outline, and creating an ascending structure within it to the target floor, the problem of users not being able to see the destination inside the building at the end of navigation is solved, resulting in a more intuitive navigation experience.
Patent Information
- Application Number
- PCT/CN2025/078424
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-29
- Filing Date
- 2025-02-21
- Publication Date
- 2025-12-04
AI Technical Summary
In current navigation scenarios, users cannot intuitively see the destination location inside a building through an electronic map, which affects the user experience.
By acquiring static and dynamic rendering data of the building, the three-dimensional outline of the building is rendered and an ascending body rising from the bottom to the target floor is rendered within it. The top outline of the ascending body is consistent with the bottom surface but its area is smaller than the bottom surface. The color of the top surface of the dynamic ascending body changes to indicate the location of the target floor.
This allows users to clearly see the location of the target floor inside the building, improving the user experience at the end of navigation.
Smart Images

Figure CN2025078424_04122025_PF_FP_ABST
Abstract
Description
A method, apparatus, and computer program product for rendering buildings.
[0001] This disclosure claims priority to Chinese Patent Application No. 202410684462.3, filed on May 29, 2024, entitled “A Rendering Method, Apparatus and Computer Program Product for a Building”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of rendering technology, and in particular to a method, apparatus and computer program product for rendering buildings. Background Technology
[0003] Currently, applications with electronic map rendering capabilities use different rendering methods when rendering buildings on electronic maps. For example, for buildings with shops inside, such as large shopping malls, the shops inside the building are rendered floor by floor on the electronic map. Users can clearly see the shop information on each floor by switching floors in the electronic map. However, for some buildings, such as residential buildings and office buildings, existing technology only uses some simple geometric shapes to render the three-dimensional outline of the building on the electronic map.
[0004] The inventors of this disclosure have discovered that in certain scenarios, such as navigation completion scenarios, if the user's destination is on a certain floor inside a building, rendering only the three-dimensional outline of the building on the electronic map will prevent the user from intuitively and clearly seeing the location of their destination inside the building through the electronic map, thus affecting the user experience. Summary of the Invention
[0005] In view of this, the present disclosure provides a method, apparatus and computer program product for rendering buildings, so that users can more intuitively and clearly understand the location information of the destination in the building when navigating.
[0006] In a first aspect, this disclosure provides a method for rendering buildings, the method comprising:
[0007] Obtain static and dynamic rendering data of the building;
[0008] Based on the static rendering data, the three-dimensional outline of the building is rendered, and the three-dimensional outline includes the bottom surface, the top surface, and the exterior facade;
[0009] Based on the dynamic rendering data, a rising body is rendered within the three-dimensional outline of the building, ascending from the bottom surface of the building to the target floor of the building. The top surface outline of the rising body is consistent with the bottom surface outline but its area is smaller than that of the bottom surface.
[0010] In one possible implementation, the dynamically rendered data includes the top surface of a pre-generated rising body, and the method further includes:
[0011] Based on the bottom surface of the building, the top surface of the rising body of the building is generated.
[0012] In one possible implementation, generating the top surface of the rising body of the building based on the bottom surface of the building specifically includes:
[0013] Obtain the vertices of the bottom surface of the building;
[0014] For each vertex of the bottom surface, determine the angle bisector of the angle formed by the vertex and the two adjacent vertices;
[0015] The vertex is moved a predetermined distance along the angle bisector towards the inside of the bottom surface to obtain the vertex that constitutes the top surface of the ascending body.
[0016] In one possible implementation, the dynamic rendering data further includes: the height value and ascent duration of the target floor; the rendering of the rising body from the bottom of the building to the target floor within the three-dimensional outline of the building based on the dynamic rendering data specifically includes:
[0017] Based on the dynamic rendering data, including the vertex of the top surface of the rising body, the height value of the target floor, and the rising time, the rising body that rises from the bottom surface of the building to the target floor of the building is rendered within the three-dimensional outline of the building.
[0018] In one possible implementation, when the top surface of the ascending body rises to the target floor, the method further includes:
[0019] According to the set rendering strategy, the rising body is rendered on the top surface of the target floor.
[0020] In one possible implementation, the rendering strategy includes changing the color of the top surface from a first specified color to a second specified color within a first duration, and then changing it from the second specified color back to the first specified color within a second duration.
[0021] In one possible implementation, the dynamic rendering data further includes a texture image of the side of the rising body, the texture image including non-transparent areas and transparent areas, wherein the side of the rising body corresponding to the target floor is the non-transparent area;
[0022] The method further includes:
[0023] The texture image is applied to the side of the ascending body.
[0024] In one possible implementation, the building is the building where the navigation destination is located, and the method further includes:
[0025] Based on the location of the navigated object, determine the distance from the navigated object to the building;
[0026] If the distance is less than a preset distance value, then the step of obtaining the static rendering data and dynamic rendering data of the building is executed.
[0027] Secondly, this disclosure provides a rendering apparatus for buildings, the apparatus comprising:
[0028] The acquisition unit is used to acquire static and dynamic rendering data of buildings;
[0029] The first rendering unit is used to render the three-dimensional outline of the building based on the static rendering data. The three-dimensional outline includes a bottom surface, a top surface, and an exterior facade.
[0030] The second rendering unit is used to render, based on the dynamic rendering data, a rising body that ascends from the bottom of the building to the target floor of the building within the three-dimensional outline of the building. The top outline of the rising body is consistent with the bottom outline but has a smaller area than the bottom outline.
[0031] Thirdly, this disclosure provides a rendering device for buildings, the device including: a memory and a processor;
[0032] The memory is used to store the relevant program code;
[0033] The processor is used to call the program code to execute the building rendering method described in any of the implementations of the first aspect above.
[0034] Fourthly, this disclosure provides a computer-readable storage medium for storing a computer program for executing the building rendering method described in any implementation of the first aspect.
[0035] Fifthly, this disclosure provides a computer program product, which includes a computer program / instruction that, when executed by a processor, implements the building rendering method described in any of the implementations of the first aspect.
[0036] Therefore, this disclosure has the following beneficial effects:
[0037] Using the implementation method of this disclosure, when rendering a building, static rendering data and dynamic rendering data of the building are acquired. Based on the static rendering data, the three-dimensional outline of the building can be rendered, wherein the three-dimensional outline includes the bottom surface, top surface, and facade of the building. Based on the dynamic rendering data, an ascending body rising from the bottom surface of the building to the target floor of the building is rendered within the three-dimensional outline of the building; that is, a dynamically rising ascending body is rendered within the three-dimensional outline of the building. Since the area of the top surface outline of the ascending body is smaller than the area of the bottom surface, the ascending body can be located inside the three-dimensional outline of the building. At the same time, the top surface outline of the ascending body is consistent with the outline of the bottom surface of the building, ensuring that there is no display conflict between the ascending body and the building. Through the above-mentioned technology provided by this disclosure, an ascending body rising from the bottom surface of the building to the target floor of the building is rendered within the three-dimensional outline of the building, allowing users to intuitively and clearly see the location of the target floor inside the building, thus improving the user experience. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments provided in this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.
[0039] Figure 1a is a schematic diagram of a building provided in an embodiment of this disclosure;
[0040] Figure 1b is a schematic diagram of another building provided in an embodiment of this disclosure;
[0041] Figure 2 is a flowchart of a building rendering method provided in an embodiment of this disclosure;
[0042] Figure 3 is a schematic diagram of determining the vertex of the top surface of the ascending body according to an embodiment of this disclosure;
[0043] Figure 4 is a schematic diagram of a target floor of a building provided in an embodiment of this disclosure;
[0044] Figure 5 is a schematic diagram of another target floor of a building provided in an embodiment of this disclosure;
[0045] Figure 6 is a flowchart of a navigation method provided in an embodiment of this disclosure;
[0046] Figure 7 is a schematic diagram of a building rendering device provided in an embodiment of this disclosure;
[0047] Figure 8 is a schematic diagram of a building rendering device provided in an embodiment of this disclosure. Detailed Implementation
[0048] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are merely exemplary implementations of this disclosure and not all implementation methods. Those skilled in the art can obtain other embodiments in conjunction with the embodiments of this disclosure without creative effort, and these embodiments are also within the protection scope of this disclosure.
[0049] Figure 1a is a schematic diagram of a building provided in an embodiment of this disclosure. Figure 1b is a schematic diagram of another building provided in an embodiment of this disclosure. Currently, application software with electronic map rendering capabilities uses different rendering methods when rendering buildings on electronic maps. For example, for buildings with shops inside, such as large shopping malls, the shops inside the building are rendered floor by floor on the electronic map. Users can clearly see the shop information on each floor by switching floors in the electronic map, as shown in Figure 1a. The electronic map shown in Figure 1a displays a shopping mall. By selecting a floor in the shopping mall, information and distribution of each shop on each floor can be displayed. Figure 1a shows the information and distribution of each shop located on the 1F (Floor) of the shopping mall. However, for some buildings, such as residential buildings and office buildings, like Building 1 and Building 2 in Figure 1b, existing technology only uses some simple geometric shapes to render the three-dimensional outline of the building on the electronic map, as shown in Figure 1b.
[0050] The inventors of this disclosure have discovered that in certain scenarios, such as navigation completion scenarios, if the user's destination is on a certain floor inside a building, rendering only the 3D outline of the building on the electronic map will prevent the user from intuitively and clearly seeing the location of their destination inside the building through the rendering of the building on the electronic map, thus affecting the user experience.
[0051] Based on this, embodiments of this disclosure provide a method for rendering buildings, enabling users to more intuitively and clearly understand the location information of their destination within a building during navigation. Specifically, when rendering a building, static rendering data and dynamic rendering data of the building can be acquired. Based on the static rendering data, a three-dimensional outline of the building can be rendered, wherein the three-dimensional outline includes the building's bottom surface, top surface, and exterior facade; based on the dynamic rendering data, an ascending body rising from the building's bottom surface to the target floor is rendered within the building's three-dimensional outline, that is, a dynamically rising ascending body is rendered within the building's three-dimensional outline. Since the area of the ascending body's top surface outline is smaller than the area of its bottom surface, the ascending body can be located inside the building's three-dimensional outline. Simultaneously, the top surface outline of the ascending body is consistent with the outline of the building's bottom surface, ensuring no display conflict between the ascending body and the building. Through the above-mentioned technology provided by this disclosure, rendering an ascending body rising from the building's bottom surface to the target floor within the building's three-dimensional outline allows users to intuitively and clearly see the location of the target floor within the building, improving the user experience.
[0052] The building rendering method provided in this disclosure can be executed by a processing device, which can be a terminal or a server. The terminal includes, but is not limited to, desktop computers, laptops, tablets, and smartphones. The server can be a cloud server in a cloud environment or a server in a local data center.
[0053] The building rendering method provided in this disclosure can be used to render buildings in electronic maps or in non-electronic maps, and this disclosure does not impose any limitations. If the building is rendered in an electronic map, the electronic map can be an electronic map used to display navigation routes during navigation, or an electronic map available for user browsing. If the electronic map is used to display navigation routes during navigation, the building can be the destination of the navigation route; if the electronic map is available for user browsing, the building can be a building searched by the user, or a building selected by the user through gestures on the electronic map, and this disclosure does not impose any limitations in this regard.
[0054] The following uses the example of a building being the destination of a navigation route to introduce the building rendering method provided in this disclosure. The example is only for clearly illustrating the technical solution of this disclosure and should not be regarded as a limitation of this disclosure.
[0055] In practical applications, if the destination of the navigation route is located on a certain floor of a building, the distance from the navigable object to the destination (i.e., the building) can be determined based on the real-time location of the navigable object as it travels along the navigation route. When the distance is less than a preset distance value, it indicates that the navigable object has reached the vicinity of the building and the navigation is about to end. At this time, the building rendering method provided in this embodiment can be executed.
[0056] Figure 2 is a flowchart of a building rendering method provided in an embodiment of this disclosure. As shown in Figure 2, the method may include the following steps:
[0057] S201: Obtain static and dynamic rendering data of the building.
[0058] S202: Based on static rendering data, render the three-dimensional outline of the building, which includes the bottom, top, and facade.
[0059] Among them, the static rendering data of the building is the data used to render the three-dimensional outline of the building. The three-dimensional outline includes the bottom surface, top surface and facade of the building. The facade of the building can be understood as the facade part of the building located on the bottom surface excluding the roof, or it can be understood as the side outline of the building.
[0060] The static rendering data of a building can be represented by a mesh. Generally speaking, a mesh refers to the grid that makes up a 3D (Three-Dimensional) model. A 3D model is composed of polygons, and polygons are actually composed of multiple triangular faces. Therefore, the surface of a 3D model is composed of multiple interconnected triangular faces. In three-dimensional space, the set of points and edges that make up these triangular faces constitutes the mesh. For details on how to render the 3D outline of a building based on static rendering data, please refer to existing rendering methods; this will not be elaborated upon in this publication.
[0061] S203: Based on dynamic rendering data, render the rising body from the bottom of the building to the target floor within the three-dimensional outline of the building.
[0062] As mentioned earlier, if the destination of the navigation route is located on a floor of a building, such as the 10th floor, then that floor will be the target floor. In other words, the dynamic rendering data is used to render the rising structure that dynamically ascends from the bottom of the building to the target floor (e.g., the 10th floor). Therefore, the dynamic rendering data includes at least the top surface data of the rising structure, which can be predetermined by the server side.
[0063] In one possible implementation, to ensure that the three-dimensional outline of the building and the rising volume inside the building are distinguishable during display and to avoid display conflicts (occlusion, coverage, intersection, etc.), the outline of the top surface of the rising volume can be consistent with the outline of the bottom surface of the building. However, the area of the top surface of the rising volume is smaller than the area of the bottom surface of the building, to ensure that the rising volume is inside the building. Therefore, the top surface data of the rising volume can be generated based on the bottom surface of the building.
[0064] In practical implementation, each vertex of the building's base can be obtained. It's important to note that even if the building's base outline is a curved shape like an arc, this arc is composed of multiple line segments, and the endpoints of these line segments are the vertices of the base. Therefore, regardless of the shape of the base outline, each vertex can be obtained. For each vertex of the building's base, it can be used as a corner point, forming an angle with its two adjacent vertices. Then, the angle bisector of the angle formed by this vertex and its two adjacent vertices is determined, and the vertex is moved a predetermined distance inward along the angle bisector towards the base, thus obtaining the vertex of the top surface that constitutes the rising structure.
[0065] In the above embodiments, in order to ensure that the top surface of the rising body is consistent with the outline of the bottom surface of the building, the distance that each vertex of the bottom surface of the building moves inward is not necessarily the same. It is necessary to ensure that the line connecting two adjacent vertices after the movement (two adjacent vertices on the top surface of the rising body) is parallel to the line connecting the corresponding two adjacent vertices before the movement (two adjacent vertices on the bottom surface of the building).
[0066] In one possible implementation, it is also possible to ensure that only the area of the top surface of the rising body is smaller than the area of the bottom surface of the building, but the outlines of the top surface of the rising body and the bottom surface of the building are not necessarily the same. That is, for each vertex of the bottom surface of the building, some (one or more) vertices can be moved inward to obtain the vertices that constitute the top surface of the rising body. The distance moved by each vertex can be the same or different.
[0067] Figure 3 is a schematic diagram of determining the vertices of the top surface of the rising body according to an embodiment of this disclosure. As shown in Figure 3, the outline of the bottom surface of the building is an equilateral pentagon, including five vertices: vertex A, vertex B, vertex C, vertex D, and vertex E. For the angle ∠BAE formed by vertex A and its adjacent vertices B and E, the angle bisector is determined, i.e., the dashed line corresponding to vertex A in Figure 3, and vertex A is moved inward a predetermined distance along the angle bisector to vertex a. Similarly, the remaining vertices are moved inward the same predetermined distance along their corresponding angle bisectors (the dashed lines corresponding to each vertex in Figure 3), resulting in vertices b, c, d, and e, respectively. Vertices a, b, c, d, and e are the vertices of the top surface of the rising body.
[0068] In one possible implementation, the dynamically rendered data includes the target floor's height and ascent time. The height is the actual height of the target floor, and the ascent time refers to the time it takes for the object to rise from the building's base to the target floor. The target floor's height can be calculated by multiplying the target floor's height by a set floor height value. For example, if the target floor is the 10th floor, and each floor is 3 meters high, then the target floor's height is 30 meters.
[0069] Referring to Figure 4, which is a schematic diagram of a target floor of a building according to an embodiment of this disclosure, and continuing to take the building as the destination of the navigation route as an example. As shown in Figure 4, when the navigated object arrives near the building, the navigation ends and enters the destination display page. This page displays an electronic map of the area where the destination (the endpoint in Figure 4) is located. At the same time, the three-dimensional outline of the building where the endpoint is located is displayed through the method provided in this disclosure, such as the bottom surface, top surface, and exterior facade in Figure 4, as well as the rising body that rises from the bottom surface of the building to the target floor (i.e., the floor corresponding to the endpoint in Figure 4). This rising body dynamically rises and stops at the target floor, which is the final destination of the navigation route. As shown in Figure 4, the rising body is the part of the upper light-colored area in Figure 4.
[0070] When rendering buildings on an electronic map, the building's actual height needs to be converted to map height according to the map's scale. The scale refers to the ratio of map distance to actual geographical distance; for example, a scale of 1 meter to 100 meters means that 1 meter on the map corresponds to 100 meters in the real world. Therefore, when rendering a rising structure from the building's base to the target floor, the target floor's height must also be converted according to the scale to obtain its corresponding map height on the electronic map. Furthermore, since the electronic map renders at a set frequency, multiple rendering frames can be generated based on the rising time, the target floor's map height, and the rendering frequency. Rendering these frames one by one allows the rendered rising structure to smoothly ascend from the building's base to the target floor.
[0071] In one possible application scenario, taking the actual height of the target floor as 10 meters, with a scale of 1 meter:100 meters, the map height of the target floor as 10 centimeters, the ascent time as 5 seconds, and the rendering frequency as 1 second / time, then 5 rendering frames need to be generated. The map height of the target floor of 10 centimeters is rendered in 5 rendering frames. If the height change of the target floor in adjacent rendering frames is 2 centimeters, then the first rendering frame is rendered, and the top surface of the rising body rises 2 centimeters from the bottom surface of the building. The second rendering frame is rendered, and the top surface of the rising body rises to 4 centimeters. And so on, until the fifth rendering frame is rendered, and the top surface of the rising body reaches 10 centimeters, thus achieving the dynamic rendering effect of the rising body rising from the bottom surface to the target floor.
[0072] In one possible implementation, to allow users to see the location of the target floor more clearly within the building, after the ascending body reaches the target floor, its top surface can be rendered according to a set rendering strategy.
[0073] In practice, when the ascending body reaches the target floor, the color of its top surface can be controlled to change from a first specified color to a second specified color within a first time period. This second specified color can be a color that is clearly different from the first specified color. Then, the color of the ascending body's top surface is controlled to change from the second specified color back to the first specified color within a second time period. The first specified color can represent the initial color.
[0074] To ensure users have a clear visual perception of the target floor's location within the building, the color of the top surface of the rising structure changes directly from a first specified color to a second specified color within the first time period without any transition. However, a transition from the second specified color to the first specified color within the second time period can be implemented. This can be achieved by first obtaining the RGB (Red-Green-Blue) values of both the second and first specified colors. Based on the second time period and the rendering frequency, RGB interpolation is performed to determine the RGB values of the rising structure's top surface in each rendering frame. For example, the difference between the RGB values of the second and first specified colors can be determined. Based on the second time period and the rendering frequency, the rendering frames are determined, and then this RGB difference is interpolated to determine the corresponding RGB values for the rising structure's top surface in each rendering frame. The specific implementation principle can be found in the animation effect of the rising structure in the above embodiment, and will not be elaborated upon here.
[0075] In another embodiment, when the ascending body rises to the target floor, after the color of the ascending body changes from a first designated color to a second designated color within a first time period, the second designated color can remain unchanged.
[0076] It should be noted that the specific values of the first duration and the second duration can be determined based on actual needs, and this disclosure does not limit them.
[0077] In one possible implementation, after rendering the building, a plane can be rendered at the location of the target floor within the building. This plane can be rendered based on the vertices of the top surface of the rising body. That is, after determining the vertices of the top surface of the rising body, this disclosure can further render a plane at the location of the target floor within the building based on the vertices of the top surface. The color of this plane can be a first specified color. The target floor's position within the building is first statically displayed. Simultaneously, based on dynamic rendering data, the rising body, ascending from the bottom surface of the building to the target floor, is rendered within the building's three-dimensional outline. When the rising body reaches the target floor, the color of the plane is changed from the first specified color to a second specified color within a first time period. This embodiment first statically displays the target floor's position within the building while simultaneously rendering the dynamic rising body, indicating the target floor's position within the building through a combination of static and dynamic methods.
[0078] Since the rising structure is three-dimensional, with not only a top surface but also sides, a texture image can be pre-created and applied to the sides of the rising structure to optimize its display effect. This texture image includes transparent and non-transparent areas. The non-transparent areas of the texture image correspond to the target floor; that is, the target floor can be seen through the texture image. The effect of applying the texture image to the sides of the rising structure is shown in Figure 4. The sides of the rising structure are non-transparent areas, while the facades corresponding to floors other than the target floor are transparent areas. Figure 5 is a schematic diagram of another target floor of a building provided in an embodiment of this disclosure. As shown in Figure 5, to display the rising structure more clearly and intuitively, different texture images can be used for the sides of the rising structure and the facades corresponding to other floors. The size of the non-transparent areas in the texture image can be determined during implementation and is not limited in this disclosure.
[0079] In one possible implementation, if the building containing the target floor is obscured by other buildings on the electronic map, the rendering of the building and the rising structure can be completed through three rendering steps to display the building and the target floor. Specifically:
[0080] During the first render, depth testing and depth writing are enabled, while alpha blending and color writing are disabled. The depth value represents the distance of an object from the camera; the closer the object is to the camera, the smaller the depth value. During depth testing, if there is another building in front of the target floor, the building closer to the camera will pass the depth test. Enabling depth writing writes the depth value to the depth cache. During the first render, occluded parts of the target floor's building will fail the depth test, while unoccluded parts will pass and have their depth written.
[0081] During the second rendering, depth testing is enabled, depth writing is disabled, alpha blending and color writing are enabled, and stencil testing is enabled to obtain stencil values before the second rendering. Because depth testing is enabled, unoccluded parts can be drawn. When drawing transparency effects, depth writing needs to be disabled, and color writing needs to be enabled to store color information in the color cache before drawing the transparency effects on unoccluded parts. During the stencil testing process, the stencil values corresponding to the parts of the building that pass the depth test (unoccluded) are written as 1, while the stencil values corresponding to the parts that fail the depth test are written as 0.
[0082] In the third rendering, depth testing and depth writing are disabled, while alpha blending and color writing are enabled. The portion with a stencil value of 0 (occluded) is rendered. Because depth testing is disabled at this point, even occluded parts of the building can be drawn. To differentiate the occluded and unoccluded transparent parts of the building, the alpha of the occluded parts can be adjusted. Through these three rendering processes, the entire building can be made transparent, and parts obscured by other objects can also be seen through those objects.
[0083] The method provided by this disclosure enables the rendering of an ascending body that rises from the bottom of the building to the target floor within the three-dimensional outline of the building, even when other buildings are obscured. This allows users to see the location of the target floor inside the building more intuitively and clearly, thus improving the user experience.
[0084] Based on the above method embodiments, this disclosure also provides a navigation method. Referring to Figure 6, a flowchart of a navigation method provided by this disclosure is shown.
[0085] This method can be applied to application software with map navigation functions, and the method may include the following steps:
[0086] S601: Determines the destination of the navigating object to be on the target floor of the building.
[0087] Specifically, based on the address information of the destination (e.g., a floor of a building), the building corresponding to the destination and the target floor within that building can be determined. The destination can be retrieved based on keywords entered by the navigating object, or it can be selected by the navigating object through interactive operations on an electronic map. Step S601 can be executed after the navigating object determines the destination, or it can be executed after the navigating object selects a navigation route to the destination, without affecting the implementation of this disclosure.
[0088] S602: Based on the real-time location of the navigated object, guide the navigated object to travel along the navigation route selected by the navigated object, wherein the end point of the navigation route is the destination.
[0089] S603: When the distance between the real-time location of the navigated object and the building is less than the preset distance, execute the building rendering method provided in this disclosure to render the rising body from the bottom of the building to the target floor in the building corresponding to the destination.
[0090] The preset distance can be set to a small value, such as 5 meters or 10 meters. The length of the preset distance can be set according to the longest distance from the navigated object to the destination that does not require navigation. When the distance is less than the preset distance, it means that navigation is about to end. At this time, the location of the final destination (target floor of the building) of the navigated object can be dynamically displayed on the electronic map.
[0091] The above is the navigation method provided in this disclosure. This method can dynamically display the location of the final destination (target floor of the building) of the navigated object on the electronic map when the navigation ends or is about to end. This helps the navigated object to clearly understand the location of its final destination within the building through the electronic map, thus improving the user experience.
[0092] Based on the above method embodiments, this disclosure also provides a building rendering apparatus. Referring to Figure 7, it is a schematic diagram of a building rendering apparatus provided in this disclosure.
[0093] The device 700 includes:
[0094] Acquisition unit 701 is used to acquire static rendering data and dynamic rendering data of buildings;
[0095] The first rendering unit 702 is used to render the three-dimensional outline of the building based on the static rendering data. The three-dimensional outline includes a bottom surface, a top surface, and an exterior facade.
[0096] The second rendering unit 703 is used to render, based on the dynamic rendering data, a rising body that rises from the bottom surface of the building to the target floor of the building within the three-dimensional outline of the building. The top surface outline of the rising body is consistent with the bottom surface outline but its area is smaller than that of the bottom surface.
[0097] In one possible implementation, the dynamic rendering data includes the top surface of a pre-generated rising body, and the device 700 further includes: a generation unit for generating the top surface of the rising body of the building based on the bottom surface of the building.
[0098] In one possible implementation, the generating unit is specifically used to obtain the vertices of the bottom surface of the building; for each vertex of the bottom surface, determine the angle bisector of the angle formed by the vertex and two adjacent vertices; and move the vertex along the angle bisector inwards along the bottom surface by a preset distance to obtain the vertex of the top surface constituting the rising body.
[0099] In one possible implementation, the dynamic rendering data further includes: the height value of the target floor and the ascent duration. The second rendering unit 703 is specifically used to render an ascent body rising from the bottom of the building to the target floor of the building within the three-dimensional outline of the building based on the vertex of the top surface of the ascent body, the height value of the target floor, and the ascent duration included in the dynamic rendering data.
[0100] In one possible implementation, when the top surface of the ascending body rises to the target floor, the device further includes: a third rendering unit, configured to render the top surface of the ascending body on the target floor according to a set rendering strategy.
[0101] In one possible implementation, the rendering strategy includes changing the color of the top surface from a first specified color to a second specified color within a first duration, and then changing it from the second specified color back to the first specified color within a second duration.
[0102] In one possible implementation, the dynamic rendering data further includes a texture image of the side of the rising body, the texture image including non-transparent areas and transparent areas, the side area of the rising body corresponding to the target floor being the non-transparent area; the device further includes: a mapping unit for mapping the texture image onto the side of the rising body.
[0103] In one possible implementation, the building is the building where the navigation destination is located, and the device further includes: a determining unit, configured to determine the distance from the navigated object to the building based on the location of the navigated object; if the distance is less than a preset distance value, then the step of obtaining the static rendering data and dynamic rendering data of the building is performed.
[0104] Based on the above method and apparatus embodiments, this disclosure also provides a building rendering device. The following description will be provided in conjunction with the accompanying drawings.
[0105] Referring to Figure 8, Figure 8 is a schematic diagram of a building rendering device provided in an embodiment of this disclosure.
[0106] The device 800 includes: a memory 801 and a processor 802;
[0107] The memory 801 is used to store relevant program code;
[0108] The processor 802 is used to call the program code to execute the building rendering method described in the above method embodiment.
[0109] Furthermore, this disclosure also provides a computer-readable storage medium for storing a computer program for executing the building rendering method described in the above method embodiments.
[0110] This disclosure also provides a computer program product, which includes a computer program / instructions that, when executed by a processor, implement the building rendering method described in the above method embodiments.
[0111] It should be noted that the technical features of the higher-level means provided in the embodiments of this disclosure are clear to those skilled in the art, and the problems to be solved by the higher-level means are also clear. The means of obtaining the corresponding features can be selected by those skilled in the art according to specific implementation requirements. The means provided in this disclosure should not be regarded as a limitation on the solution or as the only means of implementation.
[0112] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. In particular, for system or device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are merely illustrative. The units or modules described as separate components may or may not be physically separate. The components shown as units or modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the units or modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0113] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and operations that may be implemented according to various embodiments of the present disclosure, including methods, apparatus, and devices. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0114] It should be understood that in this disclosure, "at least one item" means one or more, and "more than one" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0115] It should also be noted that, in this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0116] The steps of the methods or algorithms described in conjunction with the embodiments disclosed in this disclosure can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disk, removable disk, CD-ROM (compact disc read-only memory), or any other form of storage medium known in the art.
[0117] The above description of the disclosed embodiments enables those skilled in the art to make or use this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined in this disclosure may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method of rendering a building, wherein, The method includes: Obtain static and dynamic rendering data of the building; Based on the static rendering data, the three-dimensional outline of the building is rendered, and the three-dimensional outline includes the bottom surface, the top surface, and the exterior facade; Based on the dynamic rendering data, a rising body is rendered within the three-dimensional outline of the building, ascending from the bottom surface of the building to the target floor of the building. The top surface outline of the rising body is consistent with the bottom surface outline but its area is smaller than that of the bottom surface.
2. The method of claim 1, wherein, The dynamic rendering data includes the top surface of a pre-generated rising body, and the method further includes: Based on the bottom surface of the building, the top surface of the rising body of the building is generated.
3. The method of claim 2, wherein, The process of generating the top surface of the rising body of the building based on the bottom surface of the building specifically includes: Obtain the vertices of the bottom surface of the building; For each vertex of the bottom surface, determine the angle bisector of the angle formed by the vertex and the two adjacent vertices; The vertex is moved a predetermined distance along the angle bisector towards the inside of the bottom surface to obtain the vertex that constitutes the top surface of the ascending body.
4. The method of claim 2 or 3, wherein, The dynamic rendering data further includes: the height value and ascent time of the target floor. The rendering of the rising body from the bottom of the building to the target floor within the three-dimensional outline of the building, based on the dynamic rendering data, specifically includes: Based on the dynamic rendering data, including the vertex of the top surface of the rising body, the height value of the target floor, and the rising time, the rising body that rises from the bottom surface of the building to the target floor of the building is rendered within the three-dimensional outline of the building.
5. The method according to any one of claims 1 to 4, wherein, When the top surface of the ascending body rises to the target floor, the method further includes: According to the set rendering strategy, the rising body is rendered on the top surface of the target floor.
6. The method according to claim 5, wherein, The rendering strategy includes changing the color of the top surface from a first specified color to a second specified color within a first duration, and then changing it back to the first specified color within a second duration.
7. The method according to any one of claims 1 to 6, wherein, The dynamic rendering data also includes a texture image of the side of the rising body, the texture image including non-transparent areas and transparent areas, the side of the rising body corresponding to the target floor being the non-transparent area; The method further includes: The texture image is applied to the side of the ascending body.
8. The method according to any one of claims 1 to 7, wherein, The building is the building where the navigation destination is located, and the method further includes: Based on the location of the navigated object, determine the distance from the navigated object to the building; If the distance is less than a preset distance value, then the step of obtaining the static rendering data and dynamic rendering data of the building is executed.
9. A rendering device for a building, wherein, The device includes: The acquisition unit is used to acquire static and dynamic rendering data of buildings; The first rendering unit is used to render the three-dimensional outline of the building based on the static rendering data. The three-dimensional outline includes a bottom surface, a top surface, and an exterior facade. The second rendering unit is used to render, based on the dynamic rendering data, a rising body that ascends from the bottom of the building to the target floor of the building within the three-dimensional outline of the building. The top outline of the rising body is consistent with the bottom outline but has a smaller area than the bottom outline.
10. A rendering device for a building, wherein, The device includes: a memory and a processor; The memory is used to store the relevant program code; The processor is used to call the program code to execute the rendering method of the building according to any one of claims 1 to 8.
11. A computer-readable storage medium for storing a computer program for performing the rendering method of a building according to any one of claims 1 to 8.
12. A computer program product, wherein, The computer program product includes a computer program / instruction that, when executed by a processor, implements the building rendering method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Path display method and device and computer program product
CN113758486A
Field map applications and systems
CN116628120A
Dynamic Building Extrusion in Electronic Maps
US20210209842A1