CN114842125A - Building rendering method and device, electronic equipment and program product - Google Patents

Building rendering method and device, electronic equipment and program product Download PDF

Info

Publication number
CN114842125A
CN114842125A CN202210316877.6A CN202210316877A CN114842125A CN 114842125 A CN114842125 A CN 114842125A CN 202210316877 A CN202210316877 A CN 202210316877A CN 114842125 A CN114842125 A CN 114842125A
Authority
CN
China
Prior art keywords
pane
building
wall surface
target wall
rendering
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210316877.6A
Other languages
Chinese (zh)
Inventor
白高成
林燕腾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210316877.6A priority Critical patent/CN114842125A/en
Publication of CN114842125A publication Critical patent/CN114842125A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/04Texture mapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/50Lighting effects
    • G06T15/80Shading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/04Architectural design, interior design

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Remote Sensing (AREA)
  • Instructional Devices (AREA)

Abstract

The embodiment of the disclosure discloses a building rendering method, a building rendering device, electronic equipment and a program product, wherein the method comprises the following steps: acquiring solid geometric information of a building to be rendered under a visual angle to be displayed; determining pane rendering parameters of a target wall of the building based on the solid geometry information; and rendering a pane of a stereoscopic effect on a target wall surface of the building based on the pane rendering parameters, wherein the stereoscopic effect of the pane of the building is changed along with the change of the visual angle to be displayed. The technical scheme can enhance the sense of reality of the three-dimensional buildings in the three-dimensional electronic map.

Description

Building rendering method and device, electronic equipment and program product
Technical Field
The embodiment of the disclosure relates to the technical field of rendering processing, in particular to a building rendering method, a building rendering device, electronic equipment and a program product.
Background
The rendering effect of the existing electronic map includes: two-dimensional electronic maps, three-dimensional electronic maps, and the like, three-dimensional electronic maps have the characteristics of being stereoscopic, intuitive, and the like, compared with two-dimensional electronic maps. The building in the three-dimensional electronic map can be rendered in a three-dimensional form, namely the building has length, width and height, but in the prior art, when the building in the three-dimensional electronic map is rendered, the window of the building is not rendered, namely, the wall surface of the building is rendered into a pure-color wall surface, or the window of the building is rendered, but only the pane texture is rendered on the wall surface, so that the rendered building is not vivid enough. Therefore, it is necessary to provide new rendering techniques to enhance the realism of buildings in three-dimensional electronic maps.
Disclosure of Invention
The embodiment of the disclosure provides a building rendering method, a building rendering device, electronic equipment and a program product.
In a first aspect, a building rendering method is provided in an embodiment of the present disclosure.
Specifically, the building rendering method includes:
acquiring solid geometric information of a building to be rendered under a visual angle to be displayed;
determining pane rendering parameters of a target wall of the building based on the solid geometry information;
and rendering a pane of a stereoscopic effect on a target wall surface of the building based on the pane rendering parameters, wherein the stereoscopic effect of the pane of the building is changed along with the change of the visual angle to be displayed.
With reference to the first aspect, in a first implementation manner of the first aspect, the determining, based on the solid geometry information, a pane rendering parameter of a target wall of the building includes:
acquiring the length and direction of a first edge and the length and direction of a second edge of a target wall surface of the building from the solid geometry information, wherein the first edge and the second edge are two edges connected with the target wall surface;
determining the number of panes corresponding to the target wall surface based on the lengths of the first edge and the second edge of the target wall surface and the preset size of the panes;
and determining the stereoscopic state parameters of the panes of the target wall surface based on the directions of the first edge and the second edge of the target wall surface, wherein the pane rendering parameters comprise the number of the panes and the stereoscopic state parameters of the panes.
With reference to the first aspect and the first implementation manner of the first aspect, an embodiment of the present disclosure is in a second implementation manner of the first aspect, wherein the pane includes: a top level diagram and a bottom level diagram;
the top layer diagram comprises a middle hollow-out area and a top layer peripheral area,
the bottom layer image comprises a middle pane area and a bottom layer gradient area, and the pixel brightness of the bottom layer gradient area is gradually increased or decreased from inside to outside;
and rendering the top layer graph on the bottom layer graph, wherein a middle hollow area of the top layer graph is larger than a middle pane area of the bottom layer graph, so that the middle pane area of the bottom layer graph is completely displayed, and the bottom gradient area displays the part which is not shielded by the top layer peripheral area of the top layer graph.
With reference to the first aspect and the foregoing implementation manners of the first aspect, the present disclosure is in a third implementation manner of the first aspect, wherein the method further includes:
acquiring a camera direction vector under the visual angle to be displayed;
based on the directions of the first edge and the second edge of the target wall surface, the stereoscopic state parameters of the pane of the target wall surface are determined, and the method comprises the following steps:
determining the offset of the bottom map based on the directions of the first edge and the second edge of the target wall surface and the direction vector of the camera under the to-be-displayed visual angle;
the offset is an offset of a position of a bottom layer diagram under a to-be-displayed visual angle relative to an original position of the bottom layer diagram, and the original position of the bottom layer diagram is a position of the bottom layer diagram when centers of the bottom layer diagram and the top layer diagram are aligned.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the determining, based on the directions of the first edge and the second edge of the target wall surface and the camera direction vector at the viewing angle to be displayed, an offset of the floor map includes:
calculating the offset of the underlying map according to the following formula:
offsetx=dot(u,k)*d;offsety=dot(v,k)*d;
wherein, offset is the offset in the x direction, and offset is the offset in the y direction, u is the direction vector on first limit, v is the direction vector on second limit, k is the camera direction vector under the visual angle of waiting to show, u, v and k's vector size are 1, d is the empirical constant, dot represents the inner product of two vectors.
With reference to the first aspect and the foregoing implementation manner of the first aspect, in a fifth implementation manner of the first aspect, the acquiring the solid geometry information of the building to be rendered under the viewing angle to be displayed includes:
and when responding to the view angle switching instruction, acquiring the solid geometry information of the building to be rendered under the switching view angle indicated by the view angle switching instruction.
With reference to the first aspect and the foregoing implementation manner of the first aspect, the present disclosure provides in a sixth implementation manner of the first aspect, where the pane rendering parameter further includes an inclination direction and a scaling of the target wall surface, and the pane rendering a stereoscopic effect on the target wall surface of the building based on the pane rendering parameter further includes:
and according to the inclination direction and the scaling of the target wall surface, inclining in the same direction and scaling the pane for rendering the three-dimensional effect in the same scale.
In a second aspect, a building rendering apparatus is provided in embodiments of the present disclosure.
Specifically, the building rendering device includes:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is configured to acquire the solid geometric information of a building to be rendered under a to-be-displayed visual angle;
a determination module configured to determine pane rendering parameters for a target wall of the building based on the solid geometry information;
a rendering module configured to render a pane of a stereoscopic effect on a target wall surface of the building based on the pane rendering parameters, wherein the stereoscopic effect of the pane of the building changes as the perspective to be displayed changes.
With reference to the second aspect, in a first implementation manner of the second aspect, the determining module is configured to:
acquiring the length and direction of a first edge and the length and direction of a second edge of a target wall surface of the building from the solid geometry information, wherein the first edge and the second edge are two edges connected with the target wall surface;
determining the number of panes corresponding to the target wall surface based on the lengths of the first edge and the second edge of the target wall surface and the preset size of the panes;
and determining the stereoscopic state parameters of the panes of the target wall surface based on the directions of the first edge and the second edge of the target wall surface, wherein the pane rendering parameters comprise the number of the panes and the stereoscopic state parameters of the panes.
With reference to the second aspect and the first implementation manner of the second aspect, in a second implementation manner of the second aspect, an embodiment of the present disclosure includes: a top level diagram and a bottom level diagram;
the top layer diagram comprises a middle hollow area and a top layer peripheral area,
the bottom layer image comprises a middle pane area and a bottom layer gradient area, and the pixel brightness of the bottom layer gradient area is gradually increased or decreased from inside to outside;
and rendering the top layer graph on the bottom layer graph, wherein a middle hollow area of the top layer graph is larger than a middle pane area of the bottom layer graph, so that the middle pane area of the bottom layer graph is completely displayed, and the bottom gradient area displays the part which is not shielded by the top layer peripheral area of the top layer graph.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in a third implementation manner of the second aspect, the present disclosure further includes:
a camera direction acquisition module configured to acquire a camera direction vector under the viewing angle to be displayed;
the determining module is configured to determine a part of the stereoscopic status parameter of the pane of the target wall surface based on the directions of the first edge and the second edge of the target wall surface, and configured to:
determining the offset of the bottom map based on the directions of the first edge and the second edge of the target wall surface and the direction vector of the camera under the to-be-displayed visual angle;
the offset is an offset of a position of a bottom layer diagram under a to-be-displayed visual angle relative to an original position of the bottom layer diagram, and the original position of the bottom layer diagram is a position of the bottom layer diagram when centers of the bottom layer diagram and the top layer diagram are aligned.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the determining, by the determining module, an offset of the floor map based on the directions of the first edge and the second edge of the target wall surface and the camera direction vector at the viewing angle to be displayed includes:
calculating the offset of the underlying map according to the following formula:
offsetx=dot(u,k)*d;offsety=dot(v,k)*d;
wherein, offset is the offset in the x direction, and offset is the offset in the y direction, u is the direction vector on first limit, v is the direction vector on second limit, k is the camera direction vector under the visual angle of waiting to show, u, v and k's vector size are 1, d is the empirical constant, dot represents the inner product of two vectors.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in a fifth implementation manner of the second aspect, the obtaining module is configured to:
and when responding to a view angle switching instruction, acquiring the solid geometry information of the building to be rendered under the switching view angle indicated by the view angle switching instruction.
With reference to the second aspect and the foregoing implementation manner of the second aspect, in a sixth implementation manner of the second aspect, the pane rendering parameters further include a tilt direction and a scale of the target wall surface, and the rendering module includes:
and according to the inclination direction and the scaling of the target wall surface, inclining in the same direction and scaling the pane for rendering the three-dimensional effect in the same scale.
In a third aspect, the disclosed embodiments provide an electronic device comprising a memory for storing one or more computer instructions that support a building rendering apparatus to perform the above building rendering method, and a processor configured to execute the computer instructions stored in the memory. The building rendering apparatus may further comprise a communication interface for the building rendering apparatus to communicate with other devices or a communication network.
In a fourth aspect, the disclosed embodiments provide a computer-readable storage medium for storing computer instructions for a building rendering apparatus, which includes computer instructions for performing the building rendering method described above as a building rendering apparatus.
In a fifth aspect, the disclosed embodiments provide a computer program product comprising computer programs/instructions, wherein the computer programs/instructions, when executed by a processor, implement the steps in the building rendering method described above.
In a sixth aspect, an embodiment of the present disclosure provides a navigation method, where a navigation route planned based on at least a starting point, an end point, and a road condition is obtained, and the navigation route is rendered in a three-dimensional electronic map for map-based guidance, where a building in the three-dimensional electronic map is rendered based on any one of the above methods.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
according to the technical scheme, the solid geometric information of the building is determined based on the visual angle to be displayed, and then the solid panes at the visual angle are visually displayed in a three-dimensional manner on the wall surface of the building, so that the panes on the wall surface of the building can present different solid effects at different visual angles, the sense of reality of the solid building is improved, and the sense of reality of the three-dimensional electronic map is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of embodiments of the disclosure.
Drawings
Other features, objects, and advantages of embodiments of the disclosure will become more apparent from the following detailed description of non-limiting embodiments when taken in conjunction with the accompanying drawings. In the drawings:
FIG. 1 shows a flow diagram of a building rendering method according to an embodiment of the present disclosure;
FIG. 2 shows a schematic structural view of a building according to an embodiment of the present disclosure;
FIG. 3 illustrates a layer diagram of a pane according to an embodiment of the present disclosure;
FIG. 4 shows a schematic view of a pane on a target wall surface, according to an embodiment of the present disclosure;
FIG. 5 shows a block diagram of a building rendering apparatus according to an embodiment of the present disclosure;
FIG. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 7 is a schematic block diagram of a computer system suitable for use in implementing a building rendering method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, exemplary embodiments of the disclosed embodiments will be described in detail with reference to the accompanying drawings so that they can be easily implemented by those skilled in the art. Also, for the sake of clarity, parts not relevant to the description of the exemplary embodiments are omitted in the drawings.
In the disclosed embodiments, it is to be understood that terms such as "including" or "having," etc., are intended to indicate the presence of the disclosed features, numbers, steps, behaviors, components, parts, or combinations thereof, and are not intended to preclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or combinations thereof may be present or added.
It should be further noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
The technical scheme provided by the embodiment of the disclosure determines the solid geometric information of the building based on the visual angle to be displayed, and then displays the solid pane under the visual angle in a three-dimensional visual manner on the wall surface of the building, so that the technical scheme of the disclosure can realize that the pane on the wall surface of the building presents different solid effects under different visual angles, improve the sense of reality of the solid building, and further improve the sense of reality of the three-dimensional electronic map.
Fig. 1 shows a flowchart of a building rendering method according to an embodiment of the present disclosure, as shown in fig. 1, the building rendering method includes the following steps S101-S103:
in step S101, acquiring solid geometry information of a building to be rendered at a viewing angle to be displayed;
in step S102, determining a pane rendering parameter of a target wall of the building based on the solid geometry information;
in step S103, based on the pane rendering parameter, rendering a pane with a stereoscopic effect on a target wall surface of the building, where the stereoscopic effect of the pane of the building changes with a change of the viewing angle to be displayed.
As mentioned above, the rendering effect of the existing electronic map includes: two-dimensional electronic maps, three-dimensional electronic maps, and the like, three-dimensional electronic maps have the characteristics of being stereoscopic, intuitive, and the like, compared with two-dimensional electronic maps. The building in the three-dimensional electronic map can be rendered in a three-dimensional form, namely the building has length, width and height, but in the prior art, when the building in the three-dimensional electronic map is rendered, the window of the building is not rendered, namely, the wall surface of the building is rendered into a pure-color wall surface, or the window of the building is rendered, but only the pane texture is rendered on the wall surface, so that the rendered building is not vivid enough. Therefore, it is necessary to provide a new rendering technology to enhance the sense of realism of buildings in a three-dimensional electronic map.
In view of the above problems, in this embodiment, a building rendering method is provided, and because the method determines the solid geometric information of a building based on a viewing angle to be displayed, and then displays a solid pane at the viewing angle in a three-dimensional visual manner on a wall surface of the building, the technical solution of the present disclosure can realize that panes on the wall surface of the building present different solid effects at different viewing angles, thereby improving the sense of reality of a solid building and further improving the sense of reality of a three-dimensional electronic map.
In an embodiment of the present disclosure, the building rendering method may be applied to a computer, a computing device, an electronic device, and the like that may perform building rendering.
In an embodiment of the present disclosure, the building to be rendered may be each building in a geographic area corresponding to a display range of a terminal screen. The terminal can acquire a geographical area corresponding to a display range of a terminal screen according to current positioning information or position information input by a user, and acquire each building in the geographical area.
In an embodiment of the present disclosure, the solid geometry information is solid geometry information in a map world space, the solid geometry information at a to-be-displayed viewing angle includes a width and a height of a wall surface to be displayed of the building at the to-be-displayed viewing angle, an inclination angle of the wall surface to be displayed, and the like, which can construct a space shape of the building, and the inclination direction and the inclination angle of the wall surface are different at different viewing angles.
In an embodiment of the present disclosure, the target wall surface refers to a wall surface of a building that needs to render a pane at a viewing angle to be displayed, and in a general case, a side wall surface of a three-dimensional building needs to render a pane, so the target wall surface is the side wall surface of the three-dimensional building that is displayed by a terminal screen at the viewing angle to be displayed.
In an embodiment of the present disclosure, the pane rendering parameter refers to a parameter required for rendering a pane of a stereoscopic effect on a target wall surface.
In the above embodiment, first, the solid geometry information of the building to be rendered at the viewing angle to be displayed is acquired; then determining pane rendering parameters of a target wall surface of the building under the view angle to be displayed based on the solid geometric information; so that a pane of a stereoscopic effect can be rendered on a target wall surface of the building based on the pane rendering parameters; due to the fact that the stereoscopic geometric information of the building is different at different visual angles, the obtained pane rendering parameters are different, and the stereoscopic effect of the pane rendered on the target wall surface of the building is different, therefore, the stereoscopic effect of the pane of the building is changed along with the change of the visual angle to be displayed, the sense of reality of the stereoscopic building is improved, and the sense of reality of the three-dimensional electronic map is further improved.
In an embodiment of the present disclosure, the step S102, namely the step of determining a pane rendering parameter of a target wall of the building based on the solid geometry information, may further include the steps of:
acquiring the length and direction of a first edge and the length and direction of a second edge of a target wall surface of the building from the solid geometry information, wherein the first edge and the second edge are two edges connected with the target wall surface;
determining the number of panes corresponding to the target wall surface based on the lengths of the first edge and the second edge of the target wall surface and the preset size of the panes;
and determining pane rendering parameters of the target wall surface based on the directions of the first edge and the second edge of the target wall surface.
In this embodiment, fig. 2 shows a schematic structural diagram of a building according to an embodiment of the present disclosure, and the solid geometry information of the building shown in fig. 2 at a viewing angle to be displayed includes solid geometry information of side wall surfaces, i.e., a target wall surface 201 and a target wall surface 202, which need to be displayed by the solid building at the viewing angle to be displayed, including: the length and direction of the first side AB of the target wall surface 201
Figure BDA0003569210810000091
Length and direction of the second side AC
Figure BDA0003569210810000092
The length and direction of the first edge CD of the target wall 202
Figure BDA0003569210810000093
Length and direction of the second edge CE
Figure BDA0003569210810000094
In this embodiment, taking the target wall surface 201 as an example for description, the shape and size of the panes on the target wall surface may be preset, for example, may be preset dimensions, and the interval range between adjacent panes is also preset, M rows of panes that need to be arranged on the target wall surface may be calculated based on the length of the first side AB of the target wall surface 201, N columns of panes that need to be arranged on the target wall surface may be calculated based on the length of the second side AC of the target wall surface 201, and thus, the number of the panes corresponding to the target wall surface 201 may be calculated to be M × N. It should be noted here that M and N are both integers, and if M and N are not calculated to be integers, then rounding is performed.
In this embodiment, the target wall surface 201 is also described as an example, and the direction of the first side AB of the target wall surface
Figure BDA0003569210810000095
And the direction of the second side AC
Figure BDA0003569210810000096
The inclination state of the target wall surface under the visual angle to be displayed can be identified, so that the pane rendering parameters corresponding to the target wall surface under the visual angle to be displayed can be determined accordingly.
In the embodiment, the pane rendering parameters include the number of panes corresponding to a target wall surface and the three-dimensional state parameters of the panes, the number of panes corresponding to the target wall surface is fixed, calculation is only needed when the target wall surface is rendered for the first time, the pane rendering parameters can be obtained according to the first calculation result during each subsequent rendering, and calculation is not needed each time; the stereoscopic state parameters of the panes corresponding to the target wall surface are different at different viewing angles, so that the stereoscopic state parameters at the corresponding viewing angles need to be calculated when the viewing angles are changed every time, and certainly, the stereoscopic state parameters corresponding to each viewing angle can be cached after calculation is completed, and the previous calculation results can be directly used when the same viewing angle is switched next time.
In an embodiment of the present disclosure, the pane includes: a top level diagram and a bottom level diagram;
the top layer diagram comprises a middle hollow area and a top layer peripheral area,
the bottom layer image comprises a middle pane area and a bottom layer gradient area, and the pixel brightness of the bottom layer gradient area is gradually increased or decreased from inside to outside;
and rendering the top layer graph on the bottom layer graph, wherein a middle hollow area of the top layer graph is larger than a middle pane area of the bottom layer graph, so that the middle pane area of the bottom layer graph is completely displayed, and the bottom gradient area displays the part which is not shielded by the top layer peripheral area of the top layer graph.
In the embodiment, in order to reduce the rendering cost, the rendering of the stereoscopic effect of the pane can be realized by overlapping and displaying two layers, namely a top layer diagram and a bottom layer diagram, and the rendering is simple and quick without additional modeling and displaying.
For example, fig. 3 shows a layer diagram of a pane according to an embodiment of the present disclosure, fig. 3A in fig. 3 is a top layer diagram 301 of the pane, fig. 3B is a bottom layer diagram 302 of the pane, and fig. 3C is a perspective pane rendered on the bottom layer diagram 302 by the top layer diagram 301.
As shown in fig. 3A, the top-layer diagram 301 includes a middle hollow-out region 3011 and a top-layer peripheral region 3012, the middle hollow-out region 3011 is a blank transparent region, and the filling pattern of the top-layer peripheral region 3012 is a pattern of a target wall surface, and may be a pure color pattern as shown in fig. 3, or may be other patterns such as lines. There is a distinct boundary between the central hollowed-out region 3011 and the top layer peripheral region 3012. As shown in fig. 3B of fig. 3, the bottom layer map 302 includes a middle pane area 3021 and a bottom layer gradient area 3022, the middle pane area 3021 may be a solid color area as shown in fig. 3, the pixel brightness of the bottom layer gradient area 3022 gradually increases from inside to outside, so that the bottom layer gradient area 3022 assumes an inward concave state, the middle hollow area 3011 is larger than the middle pane area 3021, so that after the top layer map 301 is rendered on the bottom layer map 302 as shown in the diagram C of fig. 3, the middle pane area 3021 of the bottom layer 302 is fully displayed, and the bottom layer gradient area 3022 may display a portion which is not blocked by the top layer peripheral area 3012 of the top layer 301. As such, the middle pane area 3021 exhibits an inwardly concave relief effect relative to the top perimeter area 3012, against the bottom graded area 3022.
In this embodiment, the bottom gradation region 3022 can make the middle pane area 3021 exhibit an inwardly concave stereoscopic effect with respect to the top-layer peripheral area 3012, which is implemented by gradually brightening the brightness of the pixels of the bottom gradation region 3022 from inside to outside, and setting dimension lines according to the shape of the pane, where the shape of the pane is generally rectangular, in which case, as shown in fig. 3, a dimension line 3023 is set on a diagonal line of the bottom layer diagram 302, and the brightness of the pixels of the dimension line 3023 is gradually brightened from inside to outside, but the brightness of the pixels on the dimension line 3023 is lower than that of the surrounding pixels.
It should be noted that fig. 3 only realizes that the window pane has an inward concave stereoscopic effect, and in other implementation manners, the pixel brightness of the bottom layer gradient area may also be gradually darkened from inside to outside to realize an outward convex stereoscopic effect, as long as the window pane has the stereoscopic effect.
In this embodiment, the top and bottom layer panels may be the same size and shape.
In this embodiment, distances L between each pixel point on the middle hollow-out region 3011 and the nearest pixel point of the middle pane region 3021 are the same, and the value of L is an empirical value.
In an embodiment of the present disclosure, the method further includes:
acquiring a camera direction vector under the visual angle to be displayed;
the step of determining the stereoscopic state parameter of the pane of the target wall surface based on the directions of the first edge and the second edge of the target wall surface may be implemented as the following steps:
determining the offset of the bottom map based on the directions of the first edge and the second edge of the target wall surface and the direction vector of the camera under the to-be-displayed visual angle;
the offset is an offset of a position of a bottom layer diagram under a to-be-displayed visual angle relative to an original position of the bottom layer diagram, and the original position of the bottom layer diagram is a position of the bottom layer diagram when centers of the bottom layer diagram and the top layer diagram are aligned.
In this embodiment, the stereoscopic effect of the pane is realized by superimposing two layers, namely a bottom layer diagram and a top layer diagram, and the stereoscopic state parameter is an offset of the bottom layer diagram under the viewing angle to be displayed, where the offset of the bottom layer diagram under the viewing angle to be displayed is an offset of a position of the bottom layer diagram under the viewing angle to be displayed relative to an original position of the bottom layer diagram, and the original position of the bottom layer diagram is a position of the bottom layer diagram when centers of the bottom layer diagram and the top layer diagram are aligned.
In this embodiment, the offsets of the underlying maps of the panes on the same target wall are the same. For example, fig. 4 is a schematic diagram illustrating a pane on a target wall surface according to an embodiment of the present disclosure, as shown in fig. 4, three rows and two columns of panes 402 may be disposed on the target wall surface 401, and a viewing angle to be displayed is a viewing angle viewed from the lower right to the upper left, at this time, a bottom layer diagram of the pane 402 is slightly shifted to the lower right, so that as shown in fig. 4, the pane on the target wall surface exhibits a stereoscopic effect viewed from the lower right to the upper left.
In this embodiment, the offset of the floor map can be calculated by the directions of the first edge and the second edge of the target wall surface and the camera direction vector at the viewing angle to be displayed. The process of acquiring the camera direction vector may be to acquire the position of the camera first, then to take a point on the target wall surface, such as the central point of the wall surface, and to mark the direction of the central point pointing to the position of the camera as the direction of the camera direction vector.
In an embodiment of the present disclosure, the step of determining an offset of the floor map based on directions of the first edge and the second edge of the target wall surface and the camera direction vector at the viewing angle to be displayed may further include the following steps:
calculating the offset of the underlying map according to the following formula:
offsetx=dot(u,k)*d;offsety=dot(v,k)*d;
wherein, offset is the offset in the x direction, and offset is the offset in the y direction, u is the direction vector on first limit, v is the direction vector on second limit, k is the camera direction vector under the visual angle of waiting to show, u, v and k's vector size are 1, d is the empirical constant, dot represents the inner product of two vectors.
In this embodiment, an XY coordinate system may be established on the target wall surface to obtain a direction vector u of the first side and a direction vector v of the second side, and the target wall surface is taken as an example of the target wall surface 201 in fig. 2, and the direction of the direction vector u of the first side AB is taken as an example
Figure BDA0003569210810000121
A magnitude of 1, the direction vector v of the second side AC being in the direction of
Figure BDA0003569210810000122
The size is 1.
In this embodiment, the position of the camera may be directly obtained, then a point on the target wall surface, such as the center point of the wall surface, is taken, and the direction in which the center point points to the position of the camera is recorded as the direction of the camera direction vector, and the magnitude of the camera direction vector is also 1.
In this embodiment, d is the maximum offset of the underlying map.
In this embodiment, after calculating the offsets of the bottom map in the x direction and the y direction according to the above formulas, the offset of the bottom map in the x direction and the offset of the bottom map in the y direction are obtained, so that when displaying the pane with the stereoscopic effect on the target wall surface of the building, it is only necessary to superimpose the top map and the bottom map and shift the bottom map by the offsets of the x direction and the y direction with respect to the original position, so that the stereoscopic effect of the pane in the viewing angle can be displayed.
In an embodiment of the present disclosure, the step of acquiring the solid geometry information of the building to be rendered under the viewing angle to be displayed may further include the following steps:
and responding to a view angle switching instruction, and acquiring the solid geometry information of the building to be rendered under the view angle to be displayed indicated by the view angle switching instruction.
In this embodiment, the instruction for switching the viewing angle is various instructions for switching the viewing angle, such as an upward, downward, leftward and rightward rotation, which are input by a user on a terminal touch screen.
In this embodiment, when receiving a view switching instruction, the view switching instruction instructs to switch from a current view to a view to be displayed, and at this time, steps S101 to S103 may be performed to obtain stereoscopic geometric information at the view to be displayed, and then determine pane rendering information of the target wall of the building at the time to be displayed, and further display a pane with a stereoscopic effect at the view on the target wall of the building based on the pane rendering parameters. Therefore, when a user observes the wall surface at different visual angles, the user can see different three-dimensional effects of the pane, and the three-dimensional effects are similar to those of a real modeling building.
In an embodiment of the present disclosure, the pane rendering parameters further include a tilt direction and a scale of the target wall surface, and the method may further include the following steps:
and according to the inclination direction and the scaling of the target wall surface, inclining in the same direction and scaling the pane for rendering the three-dimensional effect in the same scale.
In this embodiment, when rendering the stereoscopic pane at the viewing angle to be displayed on the target wall surface, the pane with the stereoscopic effect may be displayed according to the number of panes and the offset of the floor map, and then the pane with the stereoscopic effect may be displayed by tilting in the same direction and scaling in the same direction according to the tilting direction and scaling of the target wall surface.
It should be noted that, if the user does not change the angle of view, only the target wall is increased or decreased, the pane on the target wall is also increased or decreased in the same proportion, and if the user changes the angle of view, the target wall is also changed in the direction of inclination, at this time, the pane on the target wall is also inclined in the same direction, and the pane is the pane with the stereoscopic effect corresponding to the changed angle of view.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 5 illustrates a block diagram of a building rendering apparatus according to an embodiment of the present disclosure, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 5, the building rendering apparatus includes:
an obtaining module 501, configured to obtain solid geometry information of a building to be rendered at a viewing angle to be displayed;
a determination module 502 configured to determine pane rendering parameters for a target wall of the building based on the solid geometry information;
a rendering module 503 configured to render a pane of a stereoscopic effect on a target wall surface of the building based on the pane rendering parameters, wherein the stereoscopic effect of the pane of the building varies with the change of the perspective to be displayed.
As mentioned above, the rendering effect of the existing electronic map includes: two-dimensional electronic maps, three-dimensional electronic maps, and the like, three-dimensional electronic maps have the characteristics of being stereoscopic, intuitive, and the like, compared with two-dimensional electronic maps. The building in the three-dimensional electronic map can be rendered in a three-dimensional form, namely the building has length, width and height, but in the prior art, when the building in the three-dimensional electronic map is rendered, the window of the building is not rendered, namely, the wall surface of the building is rendered into a pure-color wall surface, or the window of the building is rendered, but only the pane texture is rendered on the wall surface, so that the rendered building is not vivid enough. Therefore, it is necessary to provide a new rendering technology to enhance the sense of realism of buildings in a three-dimensional electronic map.
In view of the above problems, in this embodiment, a building rendering apparatus is provided, and because the apparatus determines the solid geometry information of a building based on a viewing angle to be displayed, and then displays a solid pane at the viewing angle in a three-dimensional visual manner on a wall surface of the building, the technical solution of the present disclosure can realize that panes on the wall surface of the building present different solid effects at different viewing angles, thereby improving the sense of reality of a solid building and further improving the sense of reality of a three-dimensional electronic map.
In an embodiment of the present disclosure, the building rendering apparatus may be applied to a computer, a computing device, an electronic device, and the like that may perform building rendering.
In an embodiment of the present disclosure, the building to be rendered may be each building in a geographic area corresponding to a display range of a terminal screen. The terminal can acquire a geographical area corresponding to a display range of a terminal screen according to current positioning information or position information input by a user, and acquire each building in the geographical area.
In an embodiment of the present disclosure, the solid geometry information is solid geometry information in a map world space, the solid geometry information at a to-be-displayed viewing angle includes a width and a height of a wall surface to be displayed of the building at the to-be-displayed viewing angle, an inclination angle of the wall surface to be displayed, and the like, which can construct a space shape of the building, and the inclination direction and the inclination angle of the wall surface are different at different viewing angles.
In an embodiment of the present disclosure, the target wall surface refers to a wall surface of a building that needs to render a pane at a viewing angle to be displayed, and in a general case, a side wall surface of a three-dimensional building needs to render a pane, so the target wall surface is the side wall surface of the three-dimensional building that is displayed by a terminal screen at the viewing angle to be displayed.
In an embodiment of the present disclosure, the pane rendering parameter refers to a parameter required for rendering a pane of a stereoscopic effect on a target wall surface.
In the above embodiment, first, the solid geometry information of the building to be rendered at the viewing angle to be displayed is acquired; then determining pane rendering parameters of a target wall surface of the building under the view angle to be displayed based on the solid geometric information; so that a pane of a stereoscopic effect can be rendered on a target wall surface of the building based on the pane rendering parameters; due to the fact that the stereoscopic geometric information of the building at different visual angles is different, the obtained pane rendering parameters are also different, and the stereoscopic effect of the pane rendered on the target wall surface of the building is also different, so that the stereoscopic effect of the pane of the building changes along with the change of the visual angle to be displayed, the sense of reality of the stereoscopic building is improved, and the sense of reality of the three-dimensional electronic map is further improved.
In one possible embodiment, the determining module is configured to:
acquiring the length and direction of a first edge and the length and direction of a second edge of a target wall surface of the building from the solid geometry information, wherein the first edge and the second edge are two edges connected with the target wall surface;
determining the number of panes corresponding to the target wall surface based on the lengths of the first edge and the second edge of the target wall surface and the preset size of the panes;
and determining the stereoscopic state parameters of the panes of the target wall surface based on the directions of the first edge and the second edge of the target wall surface, wherein the pane rendering parameters comprise the number of the panes and the stereoscopic state parameters of the panes.
In this embodiment, fig. 2 shows a schematic structural diagram of a building according to an embodiment of the present disclosure, and the solid geometry information of the building shown in fig. 2 at a viewing angle to be displayed includes solid geometry information of side wall surfaces, i.e., a target wall surface 201 and a target wall surface 202, which need to be displayed by the solid building at the viewing angle to be displayed, including: the length and direction of the first side AB of the target wall surface 201
Figure BDA0003569210810000151
Length and direction of the second side AC
Figure BDA0003569210810000152
The length and direction of the first edge CD of the target wall 202
Figure BDA0003569210810000153
Length and direction of the second edge CE
Figure BDA0003569210810000154
In this embodiment, taking the target wall surface 201 as an example for description, the shape and size of the panes on the target wall surface may be preset, for example, may be preset dimensions, and the interval range between adjacent panes is also preset, M rows of panes that need to be arranged on the target wall surface may be calculated based on the length of the first side AB of the target wall surface 201, N columns of panes that need to be arranged on the target wall surface may be calculated based on the length of the second side AC of the target wall surface 201, and thus, the number of the panes corresponding to the target wall surface 201 may be calculated to be M × N. It should be noted here that M and N are both integers, and if M and N are not calculated to be integers, then rounding is performed.
In this embodiment, the target wall surface 201 is also described as an example, and the direction of the first side AB of the target wall surface
Figure BDA0003569210810000155
And the direction of the second side AC
Figure BDA0003569210810000156
The inclination state of the target wall surface under the visual angle to be displayed can be identified, so that the pane rendering parameters corresponding to the target wall surface under the visual angle to be displayed can be determined accordingly.
In the embodiment, the pane rendering parameters include the number of panes corresponding to a target wall surface and the three-dimensional state parameters of the panes, the number of panes corresponding to the target wall surface is fixed, calculation is only needed when the target wall surface is rendered for the first time, the pane rendering parameters can be obtained according to the first calculation result during each subsequent rendering, and calculation is not needed each time; the stereoscopic state parameters of the panes corresponding to the target wall surface are different at different viewing angles, so that the stereoscopic state parameters at the corresponding viewing angles need to be calculated when the viewing angles are changed every time, and certainly, the stereoscopic state parameters corresponding to each viewing angle can be cached after calculation is completed, and the previous calculation results can be directly used when the same viewing angle is switched next time.
In one possible embodiment, the pane comprises: a top level diagram and a bottom level diagram;
the top layer diagram comprises a middle hollow area and a top layer peripheral area,
the bottom layer image comprises a middle pane area and a bottom layer gradient area, and the pixel brightness of the bottom layer gradient area is gradually increased or decreased from inside to outside;
and rendering the top layer graph on the bottom layer graph, wherein a middle hollow area of the top layer graph is larger than a middle pane area of the bottom layer graph, so that the middle pane area of the bottom layer graph is completely displayed, and the bottom gradient area displays the part which is not shielded by the top layer peripheral area of the top layer graph.
In the embodiment, in order to reduce the rendering cost, the rendering of the stereoscopic effect of the pane can be realized by overlapping and displaying two layers, namely a top layer diagram and a bottom layer diagram, and the rendering is simple and quick without additional modeling and displaying.
For example, fig. 3 shows a layer diagram of a pane according to an embodiment of the present disclosure, fig. 3A in fig. 3 is a top layer diagram 301 of the pane, fig. 3B is a bottom layer diagram 302 of the pane, and fig. 3C is a perspective pane rendered on the bottom layer diagram 302 by the top layer diagram 301.
As shown in fig. 3A, the top-layer diagram 301 includes a middle hollow-out region 3011 and a top-layer peripheral region 3012, the middle hollow-out region 3011 is a blank transparent region, and the filling pattern of the top-layer peripheral region 3012 is a pattern of a target wall surface, and may be a pure color pattern as shown in fig. 3, or may be other patterns such as lines. There is a distinct boundary between the central hollowed-out region 3011 and the top layer peripheral region 3012. As shown in fig. 3B of fig. 3, the bottom layer map 302 includes a middle pane area 3021 and a bottom layer gradient area 3022, the middle pane area 3021 may be a solid color area as shown in fig. 3, the pixel brightness of the bottom layer gradient area 3022 gradually increases from inside to outside, so that the bottom layer gradient area 3022 is in a concave state, the middle hollow area 3011 is larger than the middle pane area 3021, so that after the top layer map 301 is rendered on the bottom layer map 302 as shown in fig. 3C, the middle pane area 3021 of the bottom layer 302 is fully displayed, and the bottom layer gradient area 3022 may display a portion that is not shaded by the top layer peripheral area 3012 of the top layer 301. As such, the middle pane area 3021 exhibits an inwardly concave relief effect relative to the top perimeter area 3012, against the bottom graded area 3022.
In this embodiment, the bottom gradation region 3022 can make the middle pane area 3021 exhibit an inwardly concave stereoscopic effect with respect to the top-layer peripheral area 3012, which is implemented by gradually brightening the brightness of the pixels of the bottom gradation region 3022 from inside to outside, and setting dimension lines according to the shape of the pane, where the shape of the pane is generally rectangular, in which case, as shown in fig. 3, a dimension line 3023 is set on a diagonal line of the bottom layer diagram 302, and the brightness of the pixels of the dimension line 3023 is gradually brightened from inside to outside, but the brightness of the pixels on the dimension line 3023 is lower than that of the surrounding pixels.
It should be noted that fig. 3 only realizes that the window pane has an inward concave stereoscopic effect, and in other implementation manners, the pixel brightness of the bottom layer gradient area may also be gradually darkened from inside to outside to realize an outward convex stereoscopic effect, as long as the window pane has the stereoscopic effect.
In this embodiment, the top and bottom layer panels may be the same size and shape.
In this embodiment, distances L between each pixel point on the middle hollow-out region 3011 and the nearest pixel point of the middle pane region 3021 are the same, and the value of L is an empirical value.
In a possible embodiment, the apparatus further comprises:
a camera direction acquisition module configured to acquire a camera direction vector under the viewing angle to be displayed;
the determining module is configured to determine a part of the stereoscopic status parameter of the pane of the target wall surface based on the directions of the first edge and the second edge of the target wall surface, and configured to:
determining the offset of the bottom map based on the directions of the first edge and the second edge of the target wall surface and the direction vector of the camera under the to-be-displayed visual angle;
the offset is an offset of a position of a bottom layer diagram under a to-be-displayed visual angle relative to an original position of the bottom layer diagram, and the original position of the bottom layer diagram is a position of the bottom layer diagram when centers of the bottom layer diagram and the top layer diagram are aligned.
In this embodiment, the stereoscopic effect of the pane is realized by superimposing two layers, namely a bottom layer diagram and a top layer diagram, and the stereoscopic state parameter is an offset of the bottom layer diagram under the viewing angle to be displayed, where the offset of the bottom layer diagram under the viewing angle to be displayed is an offset of a position of the bottom layer diagram under the viewing angle to be displayed relative to an original position of the bottom layer diagram, and the original position of the bottom layer diagram is a position of the bottom layer diagram when centers of the bottom layer diagram and the top layer diagram are aligned.
In this embodiment, the offsets of the underlying maps of the panes on the same target wall are the same. For example, fig. 4 is a schematic diagram illustrating a pane on a target wall surface according to an embodiment of the present disclosure, as shown in fig. 4, three rows and two columns of panes 402 may be disposed on the target wall surface 401, and a viewing angle to be displayed is a viewing angle viewed from the lower right to the upper left, at this time, a bottom layer diagram of the pane 402 is slightly shifted to the lower right, so that as shown in fig. 4, the pane on the target wall surface exhibits a stereoscopic effect viewed from the lower right to the upper left.
In this embodiment, the offset of the floor map can be calculated by the directions of the first edge and the second edge of the target wall surface and the camera direction vector at the viewing angle to be displayed.
In a possible implementation manner, the determining, by the determining module, an offset of the floor map based on directions of the first edge and the second edge of the target wall surface and the camera direction vector at the viewing angle to be displayed includes:
calculating the offset of the underlying map according to the following formula:
offsetx=dot(u,k)*d;offsety=dot(v,k)*d;
wherein, offset is the offset in the x direction, and offset is the offset in the y direction, u is the direction vector on first limit, v is the direction vector on second limit, k is the camera direction vector under the visual angle of waiting to show, u, v and k's vector size are 1, d is the empirical constant, dot represents the inner product of two vectors.
In this embodiment, an XY coordinate system may be established on the target wall surface to obtain a direction vector u of the first side and a direction vector v of the second side, and the target wall surface is taken as an example of the target wall surface 201 in fig. 2, and the direction of the direction vector u of the first side AB is taken as an example
Figure BDA0003569210810000181
A magnitude of 1, the direction vector v of the second side AC being in the direction of
Figure BDA0003569210810000182
The size is 1.
In this embodiment, the position of the camera may be directly obtained, then a point on the target wall surface, such as the center point of the wall surface, is taken, and the direction in which the center point points to the position of the camera is recorded as the direction of the camera direction vector, and the magnitude of the camera direction vector is also 1.
In this embodiment, d is the maximum offset of the underlying graph.
In this embodiment, after calculating the offsets of the bottom map in the x direction and the y direction according to the above formulas, the offset of the bottom map in the x direction and the offset of the bottom map in the y direction are obtained, so that when displaying the pane with the stereoscopic effect on the target wall surface of the building, it is only necessary to superimpose the top map and the bottom map and shift the bottom map by the offsets of the x direction and the y direction with respect to the original position, so that the stereoscopic effect of the pane in the viewing angle can be displayed.
In one possible embodiment, the obtaining module is configured to:
and when responding to a view angle switching instruction, acquiring the solid geometry information of the building to be rendered under the switching view angle indicated by the view angle switching instruction.
In this embodiment, the instruction for switching the viewing angle is various instructions for switching the viewing angle, such as an upward, downward, leftward and rightward rotation, which are input by a user on a terminal touch screen.
In this embodiment, when receiving a view switching instruction, the view switching instruction instructs to switch from a current view to a view to be displayed, and at this time, steps S101 to S103 may be performed to obtain stereoscopic geometric information at the view to be displayed, and then determine pane rendering information of the target wall of the building at the time to be displayed, and further display a pane with a stereoscopic effect at the view on the target wall of the building based on the pane rendering parameters. Therefore, when a user observes the wall surface at different visual angles, the user can see different three-dimensional effects of the pane, and the three-dimensional effects are similar to those of a real modeling building.
In a possible embodiment, the pane rendering parameters further include a tilt direction and a scale of the target wall surface, and the rendering module includes:
and according to the inclination direction and the scaling of the target wall surface, inclining in the same direction and scaling the pane for rendering the three-dimensional effect in the same scale.
In this embodiment, when rendering the stereoscopic pane at the viewing angle to be displayed on the target wall surface, the pane with the stereoscopic effect may be displayed according to the number of panes and the offset of the floor map, and then the pane with the stereoscopic effect may be displayed by tilting in the same direction and scaling in the same direction according to the tilting direction and scaling of the target wall surface.
It should be noted that, if the user does not change the angle of view, only the target wall is increased or decreased, the pane on the target wall is also increased or decreased in the same proportion, and if the user changes the angle of view, the target wall is also changed in the direction of inclination, at this time, the pane on the target wall is also inclined in the same direction, and the pane is the pane with the stereoscopic effect corresponding to the changed angle of view.
The embodiment of the disclosure also discloses a navigation service, wherein based on the building rendering method, a building rendering result of an area where a navigated object is located is obtained, and based on the building rendering result, a navigation guidance service of a corresponding scene is provided for the navigated object. Wherein, the corresponding scene is one or a combination of more of AR navigation, overhead navigation or main and auxiliary road navigation.
The embodiment of the disclosure also discloses a navigation method, wherein a navigation route planned at least based on the starting point, the end point and the road condition is obtained, the navigation route is rendered in a three-dimensional electronic map for drawing guidance, and a building in the three-dimensional electronic map is rendered based on any one of the methods.
The present disclosure also discloses an electronic device, fig. 6 shows a block diagram of an electronic device according to an embodiment of the present disclosure, and as shown in fig. 6, the electronic device 600 includes a memory 601 and a processor 602; wherein the content of the first and second substances,
the memory 601 is used to store one or more computer instructions, which are executed by the processor 602 to implement the above-described method steps.
FIG. 7 is a schematic block diagram of a computer system suitable for use in implementing a building rendering method according to an embodiment of the present disclosure.
As shown in fig. 7, the computer system 700 includes a processing unit 701 that can execute various processes in the above-described embodiments according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data necessary for the operation of the system 700 are also stored. The processing unit 701, the ROM702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary. The processing unit 701 may be implemented as a CPU, a GPU, a TPU, an FPGA, an NPU, or other processing units.
In particular, the above described methods may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the building rendering method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software or hardware. The units or modules described may also be provided in a processor, and the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
As another aspect, the disclosed embodiment also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus in the foregoing embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the embodiments of the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept. For example, the above features and (but not limited to) the features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (11)

1. A building rendering method, comprising:
acquiring solid geometric information of a building to be rendered under a visual angle to be displayed;
determining pane rendering parameters of a target wall of the building based on the solid geometry information;
and rendering a pane of a stereoscopic effect on a target wall surface of the building based on the pane rendering parameters, wherein the stereoscopic effect of the pane of the building is changed along with the change of the visual angle to be displayed.
2. The method of claim 1, wherein said determining pane rendering parameters for a target wall of said building based on said solid geometry information comprises:
acquiring the length and direction of a first edge and the length and direction of a second edge of a target wall surface of the building from the solid geometry information, wherein the first edge and the second edge are two edges connected with the target wall surface;
determining the number of panes corresponding to the target wall surface based on the lengths of the first edge and the second edge of the target wall surface and the preset size of the panes;
and determining the stereoscopic state parameters of the panes of the target wall surface based on the directions of the first edge and the second edge of the target wall surface, wherein the pane rendering parameters comprise the number of the panes and the stereoscopic state parameters of the panes.
3. The method of claim 2, wherein the pane comprises: a top level diagram and a bottom level diagram;
the top layer diagram comprises a middle hollow-out area and a top layer peripheral area,
the bottom layer image comprises a middle pane area and a bottom layer gradient area, and the pixel brightness of the bottom layer gradient area is gradually increased or decreased from inside to outside;
and rendering the top layer graph on the bottom layer graph, wherein a middle hollow area of the top layer graph is larger than a middle pane area of the bottom layer graph, so that the middle pane area of the bottom layer graph is completely displayed, and the bottom gradient area displays the part which is not shielded by the top layer peripheral area of the top layer graph.
4. The method of claim 3, wherein the method further comprises:
acquiring a camera direction vector under the visual angle to be displayed;
the determining of the stereoscopic state parameters of the pane of the target wall surface based on the directions of the first edge and the second edge of the target wall surface comprises:
determining the offset of the bottom map based on the directions of the first edge and the second edge of the target wall surface and the direction vector of the camera under the to-be-displayed visual angle;
the offset is an offset of a position of a bottom layer diagram under a to-be-displayed visual angle relative to an original position of the bottom layer diagram, and the original position of the bottom layer diagram is a position of the bottom layer diagram when centers of the bottom layer diagram and the top layer diagram are aligned.
5. The method of claim 4, wherein the determining an offset of the floor map based on the directions of the first edge and the second edge of the target wall surface and the camera direction vector at the viewing angle to be displayed comprises:
calculating the offset of the underlying map according to the following formula:
offsetx=dot(u,k)*d;offsety=dot(v,k)*d;
wherein, offset is the offset in the x direction, and offset is the offset in the y direction, u is the direction vector on first limit, v is the direction vector on second limit, k is the camera direction vector under the visual angle of waiting to show, u, v and k's vector size are 1, d is the empirical constant, dot represents the inner product of two vectors.
6. The method according to any one of claims 1 to 5, wherein the acquiring of the solid geometry information of the building to be rendered in the view angle to be displayed comprises:
and when responding to a view angle switching instruction, acquiring the solid geometry information of the building to be rendered under the switching view angle indicated by the view angle switching instruction.
7. The method of any of claims 1 to 5, wherein the pane rendering parameters further include a tilt direction and a zoom scale of the target wall surface, the rendering of the stereoscopic pane on the target wall surface of the building based on the pane rendering parameters further comprising:
and according to the inclination direction and the scaling of the target wall surface, inclining in the same direction and scaling the pane for rendering the three-dimensional effect in the same scale.
8. A building rendering apparatus comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is configured to acquire the solid geometric information of a building to be rendered under a to-be-displayed visual angle;
a determination module configured to determine pane rendering parameters for a target wall of the building based on the solid geometry information;
a rendering module configured to render a pane of a stereoscopic effect on a target wall surface of the building based on the pane rendering parameters, wherein the stereoscopic effect of the pane of the building changes as the perspective to be displayed changes.
9. An electronic device comprising a memory and at least one processor; wherein the memory is to store one or more computer instructions, wherein the one or more computer instructions are to be executed by the at least one processor to implement the method steps of any one of claims 1-7.
10. A computer program product comprising computer programs/instructions, wherein the computer programs/instructions, when executed by a processor, implement the method steps of any of claims 1-7.
11. A navigation method, wherein a navigation route planned at least based on a starting point, a terminal point and a road condition is obtained, the navigation route is rendered in a three-dimensional electronic map for drawing guidance, and a building in the three-dimensional electronic map is rendered based on any one method of claims 1-7.
CN202210316877.6A 2022-03-28 2022-03-28 Building rendering method and device, electronic equipment and program product Pending CN114842125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210316877.6A CN114842125A (en) 2022-03-28 2022-03-28 Building rendering method and device, electronic equipment and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210316877.6A CN114842125A (en) 2022-03-28 2022-03-28 Building rendering method and device, electronic equipment and program product

Publications (1)

Publication Number Publication Date
CN114842125A true CN114842125A (en) 2022-08-02

Family

ID=82563513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210316877.6A Pending CN114842125A (en) 2022-03-28 2022-03-28 Building rendering method and device, electronic equipment and program product

Country Status (1)

Country Link
CN (1) CN114842125A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117931979A (en) * 2024-03-22 2024-04-26 腾讯科技(深圳)有限公司 Building display method and related device in electronic map

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117931979A (en) * 2024-03-22 2024-04-26 腾讯科技(深圳)有限公司 Building display method and related device in electronic map

Similar Documents

Publication Publication Date Title
CN108474666B (en) System and method for locating a user in a map display
EP3170151B1 (en) Blending between street view and earth view
CN103875024B (en) Systems and methods for navigating camera
US20030179198A1 (en) Stereoscopic image processing apparatus and method, stereoscopic vision parameter setting apparatus and method, and computer program storage medium information processing method and apparatus
US20060267803A1 (en) Non-perspective variable-scale map displays
JP3675488B2 (en) Circuit for determining non-homogeneous secondary perspective texture mapping coordinates using linear interpolation
US20100321380A1 (en) Image Processing Method and Associated Apparatus for Rendering Three-dimensional Effect Using Two-dimensional Image
NO853061L (en) PROCEDURE AND FACILITIES FOR DISPLAY AND FOR INTERACTIVE EXCAVATION AND INSPECTION OF A THREE-DIMENSIONAL VOLUME.
US10540918B2 (en) Multi-window smart content rendering and optimizing method and projection method based on cave system
JPH09292830A (en) Method and device for electronic map display
JPH0375682A (en) High frequency signal detecting apparatus
US9092897B2 (en) Method and apparatus for displaying interface elements
EP2595118A2 (en) Methods for providing 3d building information
CN101122464A (en) GPS navigation system road display method, device and apparatus
US20130169664A1 (en) Method of displaying points of interest
CN105823475B (en) Three-dimensional representation method of scene
CN114842125A (en) Building rendering method and device, electronic equipment and program product
KR102191861B1 (en) Three-dimensional map display system
JP2738588B2 (en) 3D model drawing method
JP2008083600A (en) Display control device, three-dimensional image display apparatus and program
CN111563929B (en) 2.5D webpage development method based on browser
CN112330769B (en) Method and device for generating dotted line texture and electronic equipment
US6570562B1 (en) Method for drawing patterned lines in a system supporting off-screen graphics
JP3615660B2 (en) Image display apparatus and method
CN111429549A (en) Route image generation method and device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination