Parapet rendering method, device, equipment and product
By drawing building reflections in map data and sampling to generate parapet wall textures, the problem of the lack of parapet wall models in map data is solved, achieving high-quality rendering effects without increasing data volume and rendering pressure.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2022-11-29
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, the lack of parapet wall models in map data makes rendering impossible. Adding models would increase the pressure on the rendering engine, which is especially unfriendly to engines with weaker rendering capabilities.
By drawing reflection textures on building models in the map data and sampling them, sampled textures are generated to draw parapet walls on the top of buildings, avoiding increasing the amount of map data and the pressure on the rendering engine.
This method enhances the richness and detail of map elements without increasing map data volume or rendering engine load, making it suitable for rendering engines with weaker rendering capabilities.
Smart Images

Figure CN116188715B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of map rendering technology, and in particular to a method, apparatus, device, and product for rendering parapet walls. Background Technology
[0002] A parapet wall is a low wall surrounding the roof of a building, primarily used for the safety of people on the roof. With the digitization of in-vehicle instrument clusters and central control systems, users have increasingly higher demands for the quality and aesthetics of 3D map rendering. Rendering parapet walls in 3D maps can enhance the richness and detail of map elements, meeting user requirements for rendering quality and effects. However, limitations in map data exist. On the one hand, existing map data generally lacks parapet wall models, making it impossible to render them; on the other hand, adding parapet wall models to map data would significantly increase the data volume and the rendering engine's workload, which is unfavorable for rendering engines, especially those with limited resources and low rendering capabilities. Therefore, how to quickly render parapet walls using limited rendering resources based on existing map data is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0003] To address the aforementioned technical problems, this disclosure provides a method, apparatus, device, and product for rendering parapet walls.
[0004] A first aspect of this disclosure provides a method for rendering a parapet wall, the method comprising: drawing a reflection of a building based on a building model in map data to obtain a reflection texture of the building; sampling the reflection texture to obtain a sampled texture; and drawing the parapet wall on the top surface of the building based on the sampled texture.
[0005] A second aspect of this disclosure provides a rendering apparatus, the apparatus comprising:
[0006] The first drawing module is used to draw the reflection of buildings based on the building models in the map data, and obtain the reflection texture of the buildings;
[0007] The sampling module is used to sample the reflection texture to obtain the sampled texture;
[0008] The second drawing module is used to draw the parapet wall on the top surface of the building based on the sampled texture.
[0009] A third aspect of this disclosure provides a terminal device, which includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, can implement the method described in the first aspect above.
[0010] A fourth aspect of this disclosure provides a computer program product stored in a storage medium, which, when run, can implement the method of the first aspect described above.
[0011] A fifth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed, can implement the method described in the first aspect.
[0012] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0013] In this embodiment, the reflection texture of a building is obtained by drawing a building model from map data; a sampled texture is obtained by sampling the reflection texture; and a parapet wall is drawn on the top surface of the building based on the sampled texture. Therefore, this embodiment can achieve the effects of building reflection and parapet walls based on the building model, without requiring an additional parapet wall model. While increasing the richness and detail of map elements, it does not increase the amount of map data, nor does it increase the pressure on the rendering engine due to the increased map data volume. Therefore, it can quickly generate parapet wall effects based on existing map data without improving the rendering engine's capabilities, which is very user-friendly for rendering engines, especially those with relatively weak rendering capabilities. Attached Figure Description
[0014] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0015] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of a rendering scene provided in an embodiment of this disclosure;
[0017] Figure 2 This is a flowchart of a rendering method for a parapet wall provided in an embodiment of this disclosure;
[0018] Figure 3 This is a schematic diagram of a reflection texture provided in an embodiment of this disclosure;
[0019] Figure 4 This is a schematic diagram of a sampling method provided in an embodiment of this disclosure;
[0020] Figure 5This is a schematic diagram of another sampling method provided in an embodiment of this disclosure;
[0021] Figure 6 This is a flowchart of another method for rendering a parapet wall provided in an embodiment of this disclosure;
[0022] Figure 7 This is a schematic diagram of a method for determining the width of a parapet wall;
[0023] Figure 8 This is a schematic diagram of the structure of a rendering apparatus provided in an embodiment of this disclosure;
[0024] Figure 9 This is a schematic diagram of the structure of a terminal device according to an embodiment of this disclosure. Detailed Implementation
[0025] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0026] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0027] In related technologies, the rendering effect of parapet walls is generally achieved by including a model of the parapet wall in the map data and rendering it based on that model. However, including the parapet wall model in the map data increases the amount of map data and the rendering engine's workload. For example, if a building model has eight vertices, rendering the building requires rendering based on those eight vertices. If the parapet wall effect needs to be rendered separately, an additional parapet wall model needs to be added to the map data. This parapet wall model also has at least eight vertices, meaning the rendering engine needs to process at least those eight vertices to render the parapet wall effect, further increasing the rendering engine's workload. In practice, the capabilities of rendering engines vary greatly; some weaker engines may not be able to handle this rendering load, thus affecting the map's display quality.
[0028] To address the aforementioned problems in related technologies, this disclosure provides a method for rendering parapet walls, for example, Figure 1 This is a schematic diagram of a rendering scene provided in an embodiment of this disclosure. For example... Figure 1As shown, in this embodiment, before rendering map elements, the reflection of a building is first drawn based on the building model in the map data, and the reflection is saved to the screen texture to obtain the building's reflection texture. When rendering map elements, the reflection texture is sampled, and the sampled texture is drawn onto the top surface of the building to obtain the parapet wall effect. Thus, the parapet wall rendering effect can be achieved without increasing the amount of map data, and the increased map data volume does not increase the pressure on the rendering engine. This is very user-friendly for rendering engines, especially those with relatively weak rendering capabilities.
[0029] The technical solutions of the embodiments of this disclosure will be described below with reference to exemplary embodiments.
[0030] Figure 2 This is a flowchart of a parapet wall rendering method provided in an embodiment of this disclosure. This method can be executed by a terminal device, which can be understood as a device with data processing and rendering capabilities, such as a mobile phone, in-vehicle infotainment system, tablet computer, or wearable device. Figure 2 As shown, the rendering method for a parapet wall provided in this embodiment may include the following steps:
[0031] Step 201: Draw the reflection of the building based on the building model in the map data to obtain the reflection texture of the building.
[0032] The map data provided in this embodiment can be understood as illustrative map data of a three-dimensional electronic map. This map data may include at least three-dimensional building model data. Three-dimensional architectural effects can be rendered using this building model data.
[0033] Before rendering map elements (such as buildings, lanes, traffic signs, etc., but not limited to those listed herein), this embodiment first draws the reflection of a building based on the building model in the map data, and saves the reflection to a screen texture (i.e., a texture image in the coordinate system of the screen (hereinafter referred to as the first coordinate system)) to obtain the reflection texture. There are several methods for drawing the reflection texture. For example, normally, the building model can be drawn based on a preset rendering matrix to obtain the building's rendering effect. In this case, the building's top is in a normal upward-facing shape. When drawing the reflection, the parameters of the rendering matrix can be adjusted so that the rendering matrix renders the building model upside down, resulting in a building effect with the top facing down. This effect can then serve as the building's reflection. Another example is that in another drawing method, the position coordinates in the building's height direction can be directly negatively taken in the shader, thereby directly rendering the building's reflection through the shader. Among them, the shader for drawing the reflection can be a shader with only Lambert lighting effects. This shader only draws the outline of the building when drawing the building reflection, which consumes less processing resources and the rendering speed is faster because the amount of data to be rendered is smaller.
[0034] Step 202: Sample the reflection texture to obtain the sampled texture.
[0035] There are several methods for sampling reflection textures. The following are some exemplary methods for illustration.
[0036] Method 1: In one sampling method, a preset height range (e.g., 0.5 cm, but not limited to 0.5 cm) of texture can be directly extracted from any height of the reflected texture. For example, Figure 3 This is a schematic diagram of a reflection texture provided in an embodiment of this disclosure. Figure 3 In the image, the area between the two dotted lines can be understood as the preset height range being cropped. The position of this preset height range on the reflection texture can be arbitrary. When sampling the reflection texture, the texture within the preset height range can be directly cropped from the reflection texture.
[0037] Method 2: In another sampling method, after drawing the top surface of the building (drawing is performed in the first coordinate system, so the obtained top surface is in the first coordinate system), the boundary of the top surface is first transformed from the first coordinate system to the second coordinate system based on the mapping relationship between the first coordinate system and the coordinate system where the building model is located (hereinafter referred to as the second coordinate system), obtaining the projection of the top surface boundary in the second coordinate system. Then, the coordinate height of the projection is lowered to the bottom surface of the building model or below the bottom surface of the model, and the projection after the coordinate height is lowered is transformed back to the first coordinate system to obtain the boundary projection of the top surface boundary on the reflection texture. At this time, textures within a preset height range (e.g., 0.5 cm) can be sampled downwards from the boundary projection as the upper boundary to obtain the sampled texture. For example, Figure 4 This is a schematic diagram of a sampling method provided in an embodiment of this disclosure, as shown below. Figure 4 As shown, the dashed line L1 is the boundary projection of the top surface boundary onto the reflection texture. Then, we can take L1 as the upper boundary and obtain the boundary L2 of the height interval between L1 and L2 as the preset height interval. By truncating the texture between L1 and L2, we can obtain the sampled texture.
[0038] Alternatively, after obtaining the boundary of the top surface on the reflection texture, the boundary projection can be used as a sampling frame. By moving the sampling frame downwards, sampling can be performed once at each position until the texture of the preset height range is sampled, thus obtaining the sampled texture. For example... Figure 5 This is a schematic diagram of another sampling method provided in an embodiment of this disclosure, as shown below. Figure 5 As shown, the dashed line L11 is the boundary projection of the top surface boundary onto the reflection texture. During sampling, a sample can be taken at the position of the dashed line L11, and then L11 can be moved down. The next sample can be taken at the next position, such as L12, until the position L1N is reached. At this time, the height interval between L1N and the dashed line L11 is the preset height interval, and the texture sampled from L11 to L1N is used as the sampling texture.
[0039] In summary, in one embodiment of this disclosure, the boundary of the building's top surface can be mapped onto the reflection texture to obtain the boundary projection of the top surface's boundary onto the reflection texture; then, based on the boundary projection, textures within a preset height range can be collected from the reflection texture as sampling textures.
[0040] It should be noted that the above two sampling methods are merely exemplary and not the only limitation on the sampling methods of the embodiments of this disclosure. In fact, the sampling method for reflection textures can be set as needed, and is not limited to one or more specific methods.
[0041] Step 203: Draw the parapet wall on the top surface of the building based on the sampled texture.
[0042] For example, in drawing a parapet wall, one feasible method is to directly draw the collected texture onto the boundary of the building's top surface, and then fill the remaining area according to the preset width of the parapet wall to obtain the parapet wall of the preset width. Another feasible method is to first determine the inner boundary of the parapet wall according to the preset width before drawing it, and then draw the collected sampled texture onto the boundary of the building's top surface to obtain the outer wall of the parapet wall. Next, the sampled texture drawn on the boundary is drawn a second time, and the resulting sampled texture is shrunk so that it shrinks to the position of the inner boundary of the parapet wall to obtain the inner wall of the parapet wall. Finally, the inner and outer walls are combined to generate the parapet wall.
[0043] In addition, to enhance the realism of the parapet wall effect, after generating the parapet wall or after collecting the sampled texture, the sampled texture can be processed to match the color of the building surface, thereby improving the overall rendering effect and making the rendering effect more realistic.
[0044] Of course, it should be noted that the above two methods for drawing parapet walls are only two exemplary methods and not the only methods. In fact, any method that can use sampled textures to draw parapet walls can be covered in the solutions of this disclosure.
[0045] In this embodiment, the reflection texture of a building is obtained by drawing a building model from map data; a sampled texture is obtained by sampling the reflection texture; and a parapet wall is drawn on the top surface of the building based on the sampled texture. Therefore, this embodiment can achieve the effects of building reflection and parapet walls based on the building model, without requiring an additional parapet wall model. While increasing the richness and detail of map elements, it does not increase the amount of map data, nor does it increase the pressure on the rendering engine due to the increased map data volume. Therefore, it can quickly generate parapet wall effects based on existing map data without improving the rendering engine's capabilities, which is very user-friendly for rendering engines, especially those with relatively weak rendering capabilities.
[0046] Figure 6 This is a flowchart of another parapet wall rendering method provided in this disclosure embodiment, such as... Figure 6 As shown, the method includes:
[0047] Step 601: Draw the reflection of the building based on the building model in the map data to obtain the reflection texture of the building.
[0048] The execution method and beneficial effects of step 601 can be found in step 201, and will not be repeated here.
[0049] Step 602: After drawing the top surface of the building based on the building model, draw the top surface of the building a second time to obtain an overlapping top surface.
[0050] In this embodiment of the disclosure, after the top surface of the building is drawn, the top surface of the building is drawn again according to the building model, and the redrawn top surface overlaps with the first drawn top surface. For ease of distinction, the redrawn top surface is referred to as the overlapping top surface in this embodiment of the disclosure. However, it should be understood that the shape and coordinates of the overlapping top surface are the same as those of the first drawn top surface.
[0051] Step 603: Shrink the overlapping top surface and use the shrunken area as the width of the parapet wall.
[0052] In this embodiment of the disclosure, one purpose of drawing the overlapping top surface is to determine the width of the parapet wall. For example, Figure 7 This is a schematic diagram of a method for determining the width of a parapet wall, as shown below. Figure 7 As shown, in one feasible implementation, after drawing the overlapping top surface, the direction vector of each vertex pointing to the center point G can be determined based on the relative positional relationship between each vertex on the overlapping top surface and the center point G of the overlapping top surface, and the normalized direction vector is stored in the vertex attribute information. Further, based on the direction vector of each vertex pointing to the center point G, each vertex is shrunk towards the center point according to the direction of the direction vector. After the shrinkage stops, the shrunk area of the overlapping top surface is used as the width of the parapet wall.
[0053] Step 604: Sample the reflection texture to obtain the sampled texture.
[0054] For example, in one embodiment of this disclosure, in the step of sampling the reflection texture, a mapping relationship between points on the boundary of the overlapping top surface and points on the reflection texture can be established first. Sampling is then performed based on this mapping relationship. Here, the overlapping top surface can be understood as either the overlapping top surface before shrinkage or the overlapping top surface after shrinkage. Taking the shrunken overlapping top surface as an example, when establishing the mapping relationship between points on the boundary of the overlapping top surface and points on the reflection texture, the shrunken overlapping top surface can first be stretched back to its pre-shrunken state; then, the overlapping top surface is projected from the first coordinate system to the second coordinate system, and the coordinate height of the projection of the boundary of the overlapping top surface in the second coordinate system is lowered to the position of the bottom surface of the building model. At this point, the projection with the lowered coordinate height is then transformed back to the first coordinate system to obtain the position of the projection with the lowered coordinate height in the reflection texture (i.e., the position of the boundary projection in the reflection texture as referred to in this disclosure embodiment). Sampling at this position yields a set of textures. Then, the position of the boundary projection is moved down, and a set of textures is collected at each position. The collection stops when the preset height range (e.g., a height range of 0.5 cm) is completed. All textures collected within the preset height range are referred to as the sampled textures in this embodiment of the disclosure.
[0055] Step 605: Based on the sampled texture and the width of the parapet wall, draw a parapet wall of the corresponding width on the area where the overlapping top surface shrinks.
[0056] For example, after obtaining the sampled texture based on the method in step 604, the sampled texture can be drawn onto the boundary positions of the overlapping top surface before shrinkage and the boundary positions of the overlapping top surface after shrinkage, respectively, to obtain the outer wall and inner wall of the parapet wall. Then, by combining the inner wall and the outer wall, the parapet wall can be generated. Furthermore, by adjusting the texture color of the parapet wall to match the color of the building surface, a realistic parapet wall effect can be obtained.
[0057] This embodiment of the disclosure, by performing a secondary drawing of the building's top surface and then shrinking the resulting top surface, can accurately obtain the width of the parapet wall and the position of its inner wall. Based on the width and position of the inner wall, the accuracy of parapet wall generation can be improved, thus enhancing the rendering effect of the parapet wall.
[0058] Figure 8 This is a schematic diagram of a rendering apparatus provided in an embodiment of this disclosure. This rendering apparatus can be understood as the terminal device or a functional module within the terminal device described in the above embodiments. Figure 8 As shown, the rendering device 80 includes:
[0059] The first drawing module 81 is used to draw the reflection of a building based on the building model in the map data, and obtain the reflection texture of the building.
[0060] Sampling module 82 is used to sample the reflection texture to obtain a sampled texture;
[0061] The second drawing module 83 is used to draw the parapet wall on the top surface of the building based on the sampled texture.
[0062] In one embodiment, the sampling module 82 includes:
[0063] The mapping submodule is used to map the boundary of the top surface of the building onto the reflection texture to obtain the boundary projection of the boundary onto the reflection texture;
[0064] The sampling submodule is used to collect textures within a preset height range from the reflection texture based on the boundary projection.
[0065] In one implementation, the mapping submodule is used for:
[0066] The boundary of the drawn top surface is transformed from the first coordinate system where the screen is located to the second coordinate system where the building model is located, so as to obtain the projection of the boundary in the second coordinate system;
[0067] The coordinate height of the projection is reduced to at least the height of the bottom surface of the building model, and the projection after the coordinate height is reduced is transformed to the first coordinate system to obtain the boundary projection of the boundary on the reflection texture.
[0068] In one implementation, the mapping submodule is used for:
[0069] Using the boundary projection as a sampling frame, samples are sequentially taken downwards on the reflection texture until a texture within a preset height range is collected.
[0070] In one embodiment, the rendering apparatus 80 may further include:
[0071] The third drawing module is used to draw the top surface of the building a second time after drawing the top surface of the building based on the building model, so as to obtain an overlapping top surface;
[0072] A shrinkage processing module is used to shrink the overlapping top surface and use the shrunken area as the width of the parapet wall;
[0073] The second drawing module 83 is used to draw a parapet wall of the width on the region based on the sampled texture and the width.
[0074] In one embodiment, the rendering apparatus 80 may further include:
[0075] The determining module is used to determine the direction vector of each vertex pointing to the center point based on the relative positional relationship between the vertices on the overlapping top surface and the center point of the overlapping top surface;
[0076] The shrinkage processing module is used to shrink each vertex in the direction pointing to the center point based on the direction vector of each vertex pointing to the center point, so as to obtain the shrinkage area of the overlapping top surface.
[0077] In one embodiment, the rendering apparatus 80 may further include:
[0078] The color processing module is used to process the color of the sampled texture to match the color of the building surface.
[0079] The rendering apparatus provided in this disclosure can execute the methods of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.
[0080] This disclosure also provides a terminal device, which includes a memory and a processor. The memory stores a computer program, which, when executed by the processor, can implement the method as described in any of the above method embodiments.
[0081] Example, Figure 9 This is a schematic diagram of the structure of a terminal device according to an embodiment of this disclosure. See below for details. Figure 9 The diagram illustrates a structural schematic suitable for implementing the terminal device 1400 in the embodiments of this disclosure. The terminal device 1400 in the embodiments of this disclosure may include, but is not limited to, devices with data processing and rendering capabilities such as mobile phones, in-vehicle systems, tablet computers, and wearable devices. Figure 9 The terminal device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0082] like Figure 9 As shown, the terminal device 1400 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1402 or a program loaded from a storage device 1408 into a random access memory (RAM) 1403. The RAM 1403 also stores various programs and data required for the operation of the terminal device 1400. The processing unit 1401, ROM 1402, and RAM 1403 are interconnected via a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.
[0083] Typically, the following devices can be connected to I / O interface 1405: input devices 1406 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1407 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1408 including, for example, magnetic tape, hard disk, etc.; and communication devices 1409. Communication device 1409 allows terminal device 1400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 9 A terminal device 1400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0084] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1409, or installed from storage device 1408, or installed from ROM 1402. When the computer program is executed by processing device 1401, it performs the functions defined in the methods of embodiments of this disclosure.
[0085] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0086] The aforementioned computer-readable medium may be included in the aforementioned terminal device; or it may exist independently and not assembled into the terminal device.
[0087] The aforementioned computer-readable medium carries one or more programs, which, when executed by a processing device, cause the processing device to: draw a reflection of a building based on a building model in map data, and obtain a reflection texture of the building; sample the reflection texture to obtain a sampled texture; and draw a parapet wall on the top surface of the building based on the sampled texture.
[0088] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. 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.
[0090] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0091] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0092] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0093] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can perform the above-described functions. Figures 3-7 The methods in any of the embodiments are similar in execution and beneficial effects, and will not be described again here.
[0094] This disclosure also provides a computer program product, which is stored in a storage medium. When the program product is run, it can achieve... Figures 3-7 The methods in any of the embodiments are similar in execution and beneficial effects, and will not be described again here.
[0095] It should be noted that, in this document, 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 limitations, 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.
[0096] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein 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 described 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 parapet wall, wherein, include: The reflection of a building is drawn based on the building model in the map data, and the reflection texture of the building is obtained. The reflection texture is sampled to obtain the sampled texture; The parapet wall is drawn on the top surface of the building based on the sampled texture.
2. The method of claim 1, wherein, The step of sampling the reflection texture to obtain the sampled texture includes: The boundary of the building's top surface is mapped onto the reflection texture to obtain the boundary projection of the boundary onto the reflection texture; Based on the boundary projection, textures within a preset height range are collected from the reflection texture.
3. The method of claim 2, wherein, The step of mapping the boundary of the building's top surface onto the reflection texture to obtain the boundary projection of the boundary onto the reflection texture includes: The boundary of the drawn top surface is transformed from the first coordinate system where the screen is located to the second coordinate system where the building model is located, so as to obtain the projection of the boundary in the second coordinate system; The coordinate height of the projection is reduced to at least the height of the bottom surface of the building model, and the projection after the coordinate height is reduced is transformed to the first coordinate system to obtain the boundary projection of the boundary on the reflection texture.
4. The method of claim 3, wherein, The step of acquiring textures within a preset height range from the reflection texture based on the boundary projection includes: Using the boundary projection as a sampling frame, samples are sequentially taken downwards on the reflection texture until a texture within a preset height range is collected.
5. The method of any one of claims 1-4, wherein, After drawing the reflection of a building based on a building model in map data and obtaining the reflection texture of the building, the method further includes: After drawing the top surface of the building based on the building model, the top surface is drawn a second time to obtain an overlapping top surface; The overlapping top surface is contracted, and the contracted area is used as the width of the parapet wall; The process of drawing the parapet wall on the roof surface of the building based on the sampled texture includes: Based on the sampled texture and the width, a daughter wall of the specified width is drawn on the region.
6. The method of claim 5, wherein, After drawing the top surface of the building based on the building model, the method further includes drawing the top surface a second time to obtain an overlapping top surface: Based on the relative positional relationship between the vertices on the overlapping top surface and the center point of the overlapping top surface, determine the direction vector of each vertex pointing to the center point; The step of shrinking the overlapping top surface and using the shrunken area as the width of the parapet wall includes: Based on the direction vectors of each vertex pointing to the center point, each vertex is shrunk in the direction pointing to the center point to obtain the region of the shrunk overlapping top surface.
7. The method of any one of claims 1-4, wherein, After sampling the reflection texture to obtain the sampled texture, the method further includes: The color of the sampled texture is processed to match the color of the building surface.
8. A rendering device, wherein, include: The first drawing module is used to draw the reflection of a building based on the building model in the map data, and obtain the reflection texture of the building; The sampling module is used to sample the reflection texture to obtain the sampled texture; The second drawing module is used to draw the parapet wall on the top surface of the building based on the sampled texture.
9. A terminal device, wherein, It includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the method as described in any one of claims 1-7.
10. A computer program product, wherein, The program product is stored in a storage medium, and when the program product is run, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Contour data generating device, and contour data generating method and program
JP2014010543A
Three-dimensional map image data generation system
JP2014044658A