Map rendering method and device, equipment and storage medium

By setting Unreal Engine style files for different styles, real-time switching of map rendering styles and high-fidelity rendering are achieved, which solves the problems in the existing technology of monotonous rendering effects and inability to meet high simulation needs.

CN118628622APending Publication Date: 2024-09-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310262108.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-09
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The existing map rendering technology based on vector tiles is monotonous in terms of efficiency and energy consumption, cannot meet the needs of high-simulation and high-fidelity usage scenarios, and cannot realize real-time switching of rendering styles.

Method used

Provides a map rendering method that sets different Unreal Engine style files for different styles, obtains the Unreal Engine style file corresponding to the target rendering style, and renders vector tiles based on the file to achieve real-time switching of rendering styles and high-performance rendering. Photorealistic rendering.

Benefits of technology

It realizes real-time switching of map rendering styles and high-fidelity rendering effects, fully utilizes the characteristics of vector tile data, and utilizes the PBR material system of Unreal Engine to improve the map rendering effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628622A
    Figure CN118628622A
Patent Text Reader

Abstract

The invention provides an image processing method and device, equipment and a storage medium, which can be applied to various scenes such as electronic maps, navigation, intelligent travel, games and the like. The method comprises the steps of obtaining a first unreal engine style file corresponding to a target rendering style in response to a rendering style switching request for a current map image; determining vector data of N vector tiles to be rendered in the current map image; for the ith vector tile in the N vector tiles, determining unreal engine rendering information corresponding to the ith vector tile in the first unreal engine style file based on the vector data of the ith vector tile; and rendering the N vector tiles based on the unreal engine rendering information corresponding to each vector tile in the N vector tiles. According to the method and the device, real-time switching of styles can be realized based on the new unreal engine style file, the rendering styles of the map are increased, and the map rendering effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a map rendering method, apparatus, device and storage medium. Background Art

[0002] With the rapid development of image processing and intelligent navigation technology, navigation maps play an important role in daily travel. In order to meet the needs of different users, different styles of electronic maps have been developed. For example, electronic maps with bright backgrounds and bright buildings, electronic maps with dark backgrounds and dark buildings, etc.

[0003] Electronic maps based on vector tiles are mainly used on the Web or mobile terminals, and are characterized by high data accuracy and rich data types. However, for the sake of efficiency and energy consumption, the rendering style is monotonous and the rendering effect is poor, which cannot meet the needs of high-simulation and high-fidelity usage scenarios. Summary of the invention

[0004] The present application provides a map rendering method, apparatus, device and storage medium, and provides an Unreal Engine style file, which can realize real-time switching of map rendering styles and improve the rendering effect of the map.

[0005] In a first aspect, the present application provides a map rendering method, comprising:

[0006] In response to a request for switching the rendering style of the current map image, obtaining a first Unreal Engine style file corresponding to a target rendering style, wherein the first Unreal Engine style file includes Unreal Engine rendering information corresponding to the target rendering style;

[0007] Determine vector data of N vector tiles to be rendered in the current map image, where N is a positive integer;

[0008] For an i-th vector tile among the N vector tiles, based on the vector data of the i-th vector tile, determining Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file, where i is a positive integer less than or equal to N;

[0009] Based on the Unreal Engine rendering information corresponding to each of the N vector tiles, the N vector tiles are rendered to obtain a map image corresponding to the target rendering style.

[0010] In a second aspect, the present application provides a map rendering device, comprising:

[0011] An acquisition unit, configured to acquire, in response to a request for switching a rendering style of a current map image, a first Unreal Engine style file corresponding to a target rendering style, wherein the first Unreal Engine style file includes Unreal Engine rendering information corresponding to the target rendering style;

[0012] A vector data determination unit, used to determine vector data of N vector tiles to be rendered in the current map image, where N is a positive integer;

[0013] a rendering information determining unit, configured to determine, for an i-th vector tile among the N vector tiles, Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on vector data of the i-th vector tile, where i is a positive integer less than or equal to N;

[0014] The rendering unit is used to render the N vector tiles based on Unreal Engine rendering information corresponding to each of the N vector tiles to obtain a map image corresponding to the target rendering style.

[0015] In some embodiments, the acquisition unit is specifically used to obtain the first Unreal Engine style file from the style cache if the first Unreal Engine style file is found in the style cache based on the identification information of the target rendering style included in the rendering style switching request; if the first Unreal Engine style file is not found in the style cache, load the first Unreal Engine style file.

[0016] In some embodiments, the acquisition unit is specifically used to update the rendering style update number in response to a rendering style switching request for the current map image to obtain an updated rendering style update number; if the updated rendering style update number is greater than the current rendering style number, the first Unreal Engine style file is acquired.

[0017] In some embodiments, the acquisition unit is further configured to update the current rendering style number to the updated rendering style update number after detecting that the first Unreal Engine style file is successfully acquired, to obtain a new current rendering style number.

[0018] In some embodiments, the vector data determination unit is used to obtain vector data of at least one first vector tile in the current map image from a vector data cache, and / or load vector data of at least one second vector tile in the current map image; based on the vector data of the at least one first vector tile and / or the vector data of the at least one second vector tile, determine the vector data of N vector tiles to be rendered in the current map image.

[0019] In some embodiments, the rendering information determination unit is specifically used to determine the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on the vector data of the i-th vector tile if the i-th vector tile is a first vector tile among the at least one first vector tile and the first rendering style number bound to the i-th vector tile is less than the new current rendering style number; if the i-th vector tile is a second vector tile among the at least one second vector tile, then determine the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on the vector data of the i-th vector tile.

[0020] In some embodiments, after determining the Unreal Engine rendering information corresponding to the i-th vector tile, the rendering information determination unit is further used to bind the current new rendering style number to the i-th vector tile as the new first rendering style number of the i-th vector tile.

[0021] In some embodiments, the first Unreal Engine style file includes an Unreal Engine material list, the Unreal Engine rendering information corresponding to the i-th vector tile includes material information, and the rendering information determination unit is specifically used to determine the material information corresponding to the i-th vector tile in the Unreal Engine material list based on the vector data of the i-th vector tile.

[0022] In some embodiments, the first Unreal Engine style file also includes an Unreal Engine vector style mapping table, the Unreal Engine vector style mapping table includes material identifiers corresponding to data types and level information of different vector tiles, and the rendering information determination unit is specifically used to determine the material identifier corresponding to the i-th tile vector in the Unreal Engine vector style mapping table based on the data type and level information included in the vector data of the i-th vector tile; based on the material identifier corresponding to the i-th tile vector, determine the material information corresponding to the i-th vector tile in the Unreal Engine material list.

[0023] In some embodiments, the rendering information determination unit is further used to create material information corresponding to the i-th vector tile based on a preset basic material if the material identifier corresponding to the i-th tile vector is not determined in the Unreal Engine vector style mapping table, or the material information corresponding to the i-th vector tile is not found in the Unreal Engine material list.

[0024] In some embodiments, the first Unreal Engine style file also includes Unreal Engine environment parameters corresponding to the target rendering style, and the rendering information determination unit is further used to perform global environment rendering on the current map image based on the Unreal Engine environment parameters.

[0025] In some embodiments, the acquisition unit is specifically configured to acquire the first Unreal Engine style file through a game thread in response to a request to switch the rendering style of the current map image.

[0026] In some embodiments, the acquiring unit is further configured to, if multiple rendering style switching requests are received in the current map image, determine the last rendering style switching request among the multiple rendering style switching requests as the target rendering style switching request.

[0027] In some embodiments, the vector data determination unit is specifically configured to load the vector data of the at least one second vector tile through a data loading thread.

[0028] In some embodiments, the rendering unit is specifically configured to render the N vector tiles through a rendering thread based on Unreal Engine rendering information corresponding to each of the N vector tiles.

[0029] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method of the first aspect.

[0030] In a fourth aspect, a chip is provided for implementing the method in each implementation of the first aspect. Specifically, the chip includes: a processor for calling and running a computer program from a memory so that a device equipped with the chip executes the method in the first aspect.

[0031] In a fifth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method of the first aspect.

[0032] In a sixth aspect, a computer program product is provided, comprising computer program instructions, wherein the computer program instructions enable a computer to execute the method of the first aspect.

[0033] In a seventh aspect, a computer program is provided, which, when executed on a computer, enables the computer to execute the method of the first aspect.

[0034] In summary, the present application sets different Unreal Engine style files for different styles, so that when the rendering style needs to be switched, the terminal device can obtain the first Unreal Engine style file corresponding to the target rendering style, and at the same time determine the N vector tiles to be rendered in the current map image, and then render the N vector tiles to be rendered based on the Unreal Engine rendering information included in the first Unreal Engine style file, and then obtain the map image corresponding to the target rendering style. In other words, the embodiment of the present application designs a new set of Unreal Engine style files, and the new Unreal Engine style files are fully compatible with the original data styles. The terminal device can realize the real-time switching of styles based on the new Unreal Engine style files, increase the rendering style of the map, and realize the real-time switching of the map rendering style without triggering data scheduling. In addition, the embodiment of the present application can not only give full play to the data characteristics of the vector tiles, but also make full use of the PBR material system of the Unreal Engine to realize high-fidelity rendering of the map and improve the map rendering effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 A schematic diagram of an implementation environment of a map rendering method provided in an embodiment of the present application;

[0037] Figure 2 A flowchart of a map rendering method provided in one embodiment of the present application;

[0038] Figures 3 to 5 A schematic diagram of an application scenario involved in an embodiment of the present application;

[0039] Fig. 6A This is a schematic diagram of a bright material;

[0040] Figure 6B This is a schematic diagram of a dark material;

[0041] Fig. 7A This is a schematic diagram of the effect obtained by rendering map image 1 when the target rendering style is a vector base map bright color style;

[0042] Figure 7B It is a schematic diagram of the effect obtained by rendering the map image 1 when the target rendering style is the vector base map dark style;

[0043] Fig. 8AIt is a schematic diagram of the effect obtained by rendering the map image 2 when the target rendering style is the three-dimensional vector building bright color style;

[0044] Figure 8B It is a schematic diagram of the effect obtained by rendering the map image 2 when the target rendering style is the three-dimensional vector building dark style;

[0045] Fig. 9 and Fig.10 It is a rendering effect diagram obtained by rendering a map image of a certain city area using the material information and Unreal Engine environment parameters corresponding to the light rendering mode and the dark rendering mode respectively;

[0046] Fig.11A and Fig. 11B It is a rendering effect diagram obtained by rendering a map image of a local urban area using the material information and Unreal Engine environment parameters corresponding to the light rendering mode and the dark rendering mode respectively;

[0047] Fig.12 A flowchart of a map rendering method provided in one embodiment of the present application;

[0048] Fig.13 Another flowchart of a map rendering method provided in one embodiment of the present application;

[0049] Fig.14 is a schematic block diagram of a map rendering device provided in an embodiment of the present application;

[0050] Fig.15 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In an embodiment of the present invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is determined only according to A, but B can also be determined according to A and / or other information. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units does not have to be limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In the description of the present application, unless otherwise specified, "multiple" refers to two or more than two.

[0053] The map rendering method provided in the embodiment of the present application can be applied to various scenarios such as electronic maps, navigation, smart travel, games, etc., and provides a set of Unreal Engine style files to enrich the map rendering style. The client can realize real-time switching of map rendering styles, thereby improving the rendering effect of the map.

[0054] In order to facilitate understanding of the embodiments of the present application, the relevant concepts involved in the embodiments of the present application are first introduced:

[0055] Unreal Engine (UE Engine for short): is a complete game development tool suite made by game developers and used by game developers.

[0056] High-simulation engine: Based on the UE engine, it supports large-scale, highly realistic, and multi-effect scene rendering.

[0057] Vector base map: A digital electronic map based on a vector tile map, containing data information and style information.

[0058] Vector tile: Vector data is divided into vector elements using a multi-level model. A single vector tile stores geometric information and attribute information projected into a rectangular area.

[0059] Style: The display style of vector data in the rendering engine.

[0060] Style number: Atomic variable, automatically updated each time the user switches to a new style, used to implement dynamic style updates.

[0061] Material: Material in UE is a resource that can be applied to a mesh object, which can be used to control the visual appearance of the scene.

[0062] Physically Based Rendering (PBR): PBR is a shading and rendering method that can more accurately express how light interacts with surfaces. It is a process based on physical rendering (PBR) or physically based shading (PBS). PBS usually refers to the concept of shading. PBR refers to rendering and lighting. Advantages: (1) The PBR algorithm is based on a physical approximation formula, so the feedback on parameter adjustments is in line with natural habits. (2) From an artistic effect point of view, objects in the PBR process look realistic under any lighting conditions. (3) A consistent workflow can be formed, so that even if different artists create the same object, they can work well together.

[0063] Dynamic scheduling: Based on multi-threading technology, asynchronous loading, rendering, and release of vector tile data are realized, and real-time rendering of massive data is achieved under limited hardware conditions.

[0064] Current maps mainly include maps based on vector tiles and maps based on image tiles.

[0065] Among them, a map based on vector tiles means that vector data is divided into vector feature description files using a multi-level model and stored on the server side. When the client needs to render a map, it requests vector tile data from the server side and renders the vector tile data according to the specified style to draw the map. After the client obtains vector tiles, map annotation fonts, icons, style files and other data through a distributed network, it finally renders and outputs the map on the client side.

[0066] A map based on image tiles refers to a collection of images in Portable Network Graphics (PNG) or other formats that are pre-rendered on the server. The client requests the rendered images from the server for display.

[0067] As can be seen from the above, for maps based on image tiles, data and styles are rendered into images in real time during the preprocessing stage or in the background, and the images are directly displayed on the front end. To achieve style switching, the terminal device can only reload the image of the new style, and it is impossible to achieve real-time style switching without triggering data scheduling (i.e. loading). For maps based on vector tiles, for the sake of efficiency and energy consumption, the rendering style is monotonous, and simple styles such as line and surface color and width are used for rendering. It cannot meet the needs of high-simulation and high-fidelity usage scenarios, and the original style settings cannot give full play to the capabilities of the game-level rendering engine, resulting in poor map rendering effects.

[0068] In order to solve the above technical problems, the embodiment of the present application provides a map rendering method, by setting different Unreal Engine style files for different styles, so that when the rendering style needs to be switched, the terminal side can obtain the first Unreal Engine style file corresponding to the target rendering style, and at the same time determine the N vector tiles to be rendered in the current map image, and then render the N vector tiles to be rendered based on the Unreal Engine rendering information included in the first Unreal Engine style file, and then obtain the map image corresponding to the target rendering style. In other words, the embodiment of the present application designs a new set of Unreal Engine style files, and the new Unreal Engine style files are fully compatible with the original data styles. The terminal side can realize the real-time switching of styles based on the new Unreal Engine style files, increase the rendering styles of the map, and can realize the real-time switching of the map rendering style without triggering data scheduling. In addition, the embodiment of the present application can not only give full play to the data characteristics of the vector tiles, but also make full use of the PBR material system of the Unreal Engine to realize the high-fidelity rendering of the map and improve the map rendering effect.

[0069] The implementation environment of the embodiments of the present application is introduced below.

[0070] Figure 1 A schematic diagram of an implementation environment of a map rendering method provided in an embodiment of the present application, such as Figure 1 As shown, the implementation environment includes: terminal device 101, server 102 and server 103.

[0071] The terminal device 101 is connected to the server 102 and the server 103 via wired or wireless means.

[0072] In some embodiments, server 102 and server 103 may be the same server.

[0073] In the embodiment of the present application, a map client is installed on the terminal device 101, and the user can change the map rendering style on the map client. The server 101 stores vector tile data of the map, and the server 102 stores a rendering style file.

[0074] In some embodiments, the terminal device 101 is also installed with an Unreal Engine, and the terminal device can execute the method of the embodiment of the present application through the Unreal Engine.

[0075] In some embodiments, the terminal device 101 includes but is not limited to: desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. Terminal devices are often equipped with display devices, which can also be displays, display screens, touch screens, etc., and touch screens can also be touch screens, touch panels, etc.

[0076] In some embodiments, the above-mentioned server 102 and / or server 103 may be one or more. When there are multiple servers, there are at least two servers for providing different services, and / or there are at least two servers for providing the same service, such as providing the same service in a load balancing manner, which is not limited in the embodiments of the present application. Among them, the above-mentioned server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server can also become a node of the blockchain.

[0077] In some embodiments, the map rendering method provided by the embodiments of the present application is executed by the terminal device 101. At this time, the terminal device 101 can be any terminal device that can provide map rendering services. The server 102 can be any server that can provide data download services. In one example, the vector tile data of the map is stored in the above-mentioned server 102, and a map client is installed on the terminal device 101. The map client can request the vector tile data corresponding to the current map interface from the server 102 based on the user's request, and draw and render the current map image on the client based on the requested vector tile data. Furthermore, the user can select the target rendering style on the current map image currently displayed on the client. In response to a request to switch the target rendering style of the current map image, the client obtains a first Unreal Engine style file corresponding to the target rendering style, for example, obtains the first Unreal Engine style file corresponding to the target rendering style from server 103, and at the same time, determines the N vector tiles to be rendered in the current map image; for the i-th vector tile among the N vector tiles, based on the vector data of the i-th vector tile, determines the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file; based on the Unreal Engine rendering information corresponding to each of the N vector tiles, renders the N vector tiles to obtain a map image corresponding to the target rendering style.

[0078] In some embodiments, the map rendering method provided by the embodiments of the present application is jointly executed by the terminal device 101 and the server 102. For example, the terminal device 101 sends a user's rendering style switching request for the current map image to the server 102. In response to the rendering style switching request for the current map image, the server 102 obtains the first Unreal Engine style file corresponding to the target rendering style from the server 103, and the first Unreal Engine style file includes Unreal Engine rendering information corresponding to the target rendering style; determines the N vector tiles to be rendered in the current map image; for the i-th vector tile among the N vector tiles, based on the vector data of the i-th vector tile, in the first Unreal Engine style file, determines the Unreal Engine rendering information corresponding to the i-th vector tile. Then, the server 102 sends the Unreal Engine rendering information corresponding to each of the N vector tiles to the terminal device 101. The terminal device 101 renders the N vector tiles based on the Unreal Engine rendering information corresponding to each of the N vector tiles to obtain a map image corresponding to the target rendering style.

[0079] This embodiment of the application does not limit the storage device of the first Unreal Engine style file.

[0080] In some embodiments, the server 103 is a distributed storage system. The terminal device 101 or the server 102 can read the first Unreal Engine style file from the distributed storage system.

[0081] In some embodiments, the server 103 is a database server, that is, the first Unreal Engine style file is stored in a database. The terminal device 101 or the server 102 can read the first Unreal Engine style file from the database.

[0082] It should be noted that the implementation environment of the embodiments of the present application includes but is not limited to Figure 1 shown.

[0083] The technical solutions of the embodiments of the present application are described in detail below through some embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0084] Figure 2 A flowchart of a map rendering method provided in an embodiment of the present application is shown in FIG. The execution subject of the embodiment of the present application may be a device having a map rendering function, such as a map rendering device. The map rendering device may be the above-mentioned Figure 1 The server 102 or terminal device 101 shown may also be Figure 1 The system is composed of the server 102 or 101 shown. For the convenience of description, the following embodiments are described by taking the execution subject as a terminal device as an example.

[0085] like Figure 2 As shown, the map rendering method of the embodiment of the present application includes:

[0086] S101. In response to a request to switch a rendering style of a current map image, obtain a first Unreal Engine style file corresponding to a target rendering style.

[0087] The rendering style switching request includes identification information of the target rendering style, and the first Unreal Engine style file includes Unreal Engine rendering information corresponding to the target rendering style.

[0088] In an embodiment of the present application, the server includes vector tile data of a map. The terminal device first requests the vector tile data corresponding to the current map image from the server, and renders and displays the current map image on the terminal device based on the vector tile data.

[0089] During the current map image rendering process or after the rendering is completed, the terminal device receives a rendering style switching request input by the user.

[0090] The embodiment of the present application does not limit the specific manner in which the user inputs a rendering style switching request to the terminal device.

[0091] In one possible implementation, Figure 3 As shown, a map client is installed on the terminal device. When a user triggers the icon of the map client, the terminal device requests vector tile data from the server and draws a vector tile data based on the requested vector tile data. Figure 4 The current map image shown. It should be noted that the user can also adjust the current map image to obtain the desired map. Figure 4 As shown, the interface of the current map image displays a style option, which can be set at any position in the current interface or hidden in other options. The embodiment of the present application does not limit this. The user triggers the style option in the current interface, and the display is as follows: Figure 5 The style option list shown in the figure includes a variety of rendering styles, such as vector base map light color style, 3D vector building light color style, vector base map dark color style, 3D vector building dark color style, etc. Users can Figure 5 Select a rendering style from the style option list shown, and determine the selected rendering style as the target rendering style.

[0092] In a possible implementation, the user may also input a rendering style switching instruction in language on the currently displayed map image interface, such as inputting a "switch to bright color style" instruction, and then determining the bright color style as the target rendering style.

[0093] In some embodiments, if multiple rendering style switching requests are received in the current map image, the last rendering style switching request among the multiple rendering style switching requests is determined as the target rendering style switching request.

[0094] Of course, the user may also input a request to switch the rendering style of the current map image to the terminal device in other ways, and this embodiment of the present application does not limit this.

[0095] After receiving the rendering style switching request of the current map image input by the user, the terminal device acquires the first Unreal Engine style file corresponding to the target rendering style based on the identification information of the target rendering style included in the rendering style switching request.

[0096] In an embodiment of the present application, in order to improve the rendering effect of the map, different Unreal Engine style files are provided for different rendering styles, and the Unreal Engine style file corresponding to each rendering style includes the Unreal Engine rendering information corresponding to the rendering style. For example, the Unreal Engine style file corresponding to the bright rendering style includes the Unreal Engine rendering information corresponding to the bright rendering style, and the Unreal Engine style file corresponding to the dark rendering style includes the Unreal Engine rendering information corresponding to the dark rendering style. In this way, the terminal device can render map images of different styles based on the Unreal Engine rendering information corresponding to different rendering styles.

[0097] In one example, the corresponding relationship between the identification information of the rendering style and the Unreal Engine style file is shown in Table 1:

[0098] Table 1

[0099] Rendering style identifier Unreal Engine Style File 0 Unreal Engine Style File 0 1 Unreal Engine Style File 1 2 Unreal Engine Style File 2 …… ……

[0100] It can be seen from Table 1 that different rendering styles correspond to different Unreal Engine style files, and the corresponding Unreal Engine style file can be obtained from Table 1 according to the identification information of the rendering style.

[0101] The following describes a specific method for obtaining the first Unreal Engine style file corresponding to the target rendering style.

[0102] In some embodiments, after receiving the rendering style switching request, the terminal device directly requests the first Unreal Engine style file corresponding to the target rendering style from the server. For example, after receiving the rendering style switching request, the terminal device sends the rendering style switching request to the server. The server parses the rendering style switching request, obtains the identification information of the target rendering style included in the rendering style switching request, and then searches the above Table 1 based on the identification information of the target rendering style to obtain the first Unreal Engine style file corresponding to the target rendering style, and then sends the first Unreal Engine style file corresponding to the target rendering style to the terminal device.

[0103] In some embodiments, the terminal device includes a style cache, which stores the Unreal Engine style file previously requested by the terminal device. Based on this, after receiving the rendering style switching request, the terminal device does not directly load the first Unreal Engine style file corresponding to the target rendering style from the server, but first queries whether the first Unreal Engine style file corresponding to the target rendering style is cached in the style cache on the terminal device side. If the terminal device queries the first Unreal Engine style file in the style cache based on the identification information of the target rendering style included in the rendering style switching request, the first Unreal Engine style file is obtained from the style cache without loading the first Unreal Engine style file from the server side, thereby improving the efficiency of obtaining the first Unreal Engine style file.

[0104] In some embodiments, if the terminal device does not find the first Unreal Engine style file in the style cache, the first Unreal Engine style file is loaded. That is, the terminal device sends the rendering style switching request to the server. The server parses the rendering style switching request, obtains the identification information of the target rendering style included in the rendering style switching request, and then searches the above Table 1 based on the identification information of the target rendering style to obtain the first Unreal Engine style file corresponding to the target rendering style, and then sends the first Unreal Engine style file corresponding to the target rendering style to the terminal device.

[0105] In some embodiments, before obtaining the first Unreal Engine style file, the terminal device needs to determine whether the current rendering style has changed, and only obtain the first Unreal Engine style file when the rendering style has changed. In this case, the above S101 includes the following steps:

[0106] S101-A, in response to a request for switching a rendering style of a current map image, updating a rendering style update number to obtain an updated rendering style update number;

[0107] S101-B. If the updated rendering style update number is greater than the current rendering style number, obtain the first Unreal Engine style file.

[0108] In the embodiment of the present application, the terminal device saves two style numbers, one is the current rendering style number StyleCurrentNumber, and the other is the rendering style update number StyleUpdateNumber.

[0109] In the initialization phase, the current rendering style number StyleCurrentNumber and the rendering style update number StyleUpdateNumber may be set to be the same. For example, in the initialization phase, the current rendering style number StyleCurrentNumber = -1, and the rendering style update number StyleUpdateNumber = -1.

[0110] After receiving the rendering style switching request input by the user, the terminal device updates the rendering style update number StyleUpdateNumber to obtain an updated rendering style update number.

[0111] Exemplarily, assuming that the current rendering style update number StyleUpdateNumber is 10, in response to a rendering style switching request for the current map image, the terminal device updates the rendering style update number StyleUpdateNumber, for example, adds 1 to StyleUpdateNumber to obtain an updated rendering style update number StyleUpdateNumber=11.

[0112] Next, the terminal device determines whether the updated rendering style update number is greater than the current rendering style number. If the updated rendering style update number is greater than the current rendering style number, the first Unreal Engine style file is obtained.

[0113] Exemplarily, the current rendering style number before the update is the same as the rendering style update number before the update, both of which are 10. Based on the above steps, the terminal device updates the rendering style update number from 10 to 11. Therefore, it can be determined that the updated rendering style update number is greater than the current rendering style number. In this way, the terminal device can obtain the first Unreal Engine style file based on the above method.

[0114] In some embodiments, after detecting that the first Unreal Engine style file is successfully obtained, the terminal device updates the current rendering style number to the updated rendering style update number to obtain the current new rendering style number, that is, updates StyleCurrentNumber from 10 to 11.

[0115] The above describes the specific process of the terminal device acquiring the first Unreal Engine style file corresponding to the target rendering style in response to the request to switch the rendering style of the current map image.

[0116] S102: Determine vector data of N vector tiles to be rendered in the current map image.

[0117] Wherein N is a positive integer.

[0118] It should be noted that the embodiment of the present application does not restrict the order in which the terminal device determines the vector data of the N vector tiles to be rendered in the current map image and obtains the first Unreal Engine style file corresponding to the target rendering style.

[0119] In some embodiments, the terminal device may respond to a request to switch the rendering style of the current map image by first obtaining a first Unreal Engine style file corresponding to the target rendering style, and then determining vector data of N vector tiles to be rendered in the current map image.

[0120] In some embodiments, the terminal device may respond to a request to switch the rendering style of the current map image by first determining the vector data of N vector tiles to be rendered in the current map image, and then obtaining a first Unreal Engine style file corresponding to the target rendering style.

[0121] In some embodiments, the terminal device can respond to a rendering style switching request for the current map image, simultaneously determine vector data of N vector tiles to be rendered in the current map image, and obtain a first Unreal Engine style file corresponding to the target rendering style.

[0122] The embodiment of the present application does not limit the specific manner in which the terminal device determines the vector data of the N vector tiles to be rendered in the current map image.

[0123] In some embodiments, the current map image includes multiple vector tiles, and the terminal device can select some vector tiles from these vector tiles as vector tiles to be rendered. For example, the terminal device determines the vector tiles to be displayed in the current map image as the vector tiles to be rendered, and then obtains the vector data of the N vector tiles to be rendered in the current image.

[0124] In some embodiments, at this time, the above S102 includes the following steps S102-A1 to S102-A2:

[0125] S102-A1, obtaining vector data of at least one first vector tile in the current map image from a vector data cache, and / or loading vector data of at least one second vector tile in the current map image;

[0126] S102-A2: Determine vector data of N vector tiles to be rendered in the current map image based on vector data of at least one first vector tile and / or vector data of at least one second vector tile.

[0127] In some embodiments, all vector tiles of the current map image are pre-existing tiles, that is, the terminal device has downloaded them from the server and saved them in the vector data cache before this style rendering. Based on this, the terminal device can obtain the vector data of at least one first vector tile in the current map image from the vector data cache. Then, based on the vector data of the at least one first vector tile, the vector data of the N vector tiles to be rendered in the current map image is determined. For example, the vector data of the at least one first vector tile is determined as the vector data of the N vector tiles to be rendered. For another example, the vector data of the at least one first vector tile is screened, and the vector data of the first vector tile with visibility is selected as the vector data of the N vector tiles to be rendered.

[0128] In some embodiments, all vector tiles of the current map image are newly added tiles, that is, the terminal device downloads them from the server in real time during this style rendering. Based on this, the terminal device loads the vector data of at least one second vector tile in the current map image from the server in real time. Then, based on the vector data of the at least one second vector tile, the vector data of the N vector tiles to be rendered in the current map image is determined. For example, the vector data of the at least one second vector tile is determined as the vector data of the N vector tiles to be rendered. For another example, the vector data of the at least one second vector tile is screened, and the vector data of the visible second vector tile is selected as the vector data of the N vector tiles to be rendered.

[0129] In some embodiments, some vector tiles of the current map image are pre-existing tiles and some vector tiles are newly added tiles. The terminal device obtains vector data of at least one first vector tile in the current map image from the vector data cache and loads vector data of at least one second vector tile in the current map image.

[0130] In this embodiment, if the vector data of some vector tiles of the current map image have been downloaded from the server and stored in the vector data cache by the terminal device before the current style rendering, the terminal device obtains the vector data of at least one first vector tile in the current map image from the vector data cache.

[0131] If the terminal device has not downloaded the vector data of some vector tiles of the current map image from the server before the current style rendering, the terminal device loads the vector data of at least one second vector tile in the current map image in real time.

[0132] The embodiment of the present application does not limit the specific manner in which the terminal device loads the vector data of the second vector tile.

[0133] In some embodiments, the terminal device loads vector data of at least one second vector tile through a data loading thread.

[0134] In some embodiments, after the terminal device loads the vector data of the second vector tile, it creates a geometric shape, such as a corner feature, based on the data type of the second vector tile and the style information of the tile itself.

[0135] In some embodiments, after loading the vector data of the second vector tile, the terminal device stores information such as the data type and tile level of the second vector tile for subsequent style updates.

[0136] Next, the terminal device determines the vector data of the N vector tiles to be rendered in the current map image based on the vector data of the at least one first vector tile and / or the vector data of the at least one second vector tile. For example, the terminal device selects at least one visible vector tile from the vector data of the at least one first vector tile and / or the vector data of the at least one second vector tile, and then determines the vector data of the at least one visible vector tile as the vector data of the N vector tiles to be rendered in the current map image.

[0137] In an embodiment of the present application, the terminal device obtains the first Unreal Engine style file corresponding to the target rendering style based on the above S101, determines the vector data of N vector tiles to be rendered in the current map image based on the above S102, and then executes the following step S103.

[0138] S103 . For an ith vector tile among the N vector tiles, based on vector data of the ith vector tile, determine Unreal Engine rendering information corresponding to the ith vector tile in a first Unreal Engine style file.

[0139] Wherein, i is a positive integer less than or equal to N.

[0140] As can be seen from the above, the first Unreal Engine style file of the embodiment of the present application includes Unreal Engine rendering information corresponding to the target rendering style. Therefore, for each of the N vector tiles to be rendered, the terminal device can determine the Unreal Engine rendering information corresponding to each vector tile in the first Unreal Engine style file.

[0141] In the embodiment of the present application, the terminal device determines the Unreal Engine rendering information corresponding to each of the N vector tiles in the first Unreal Engine style file in the same specific manner. For ease of description, the Unreal Engine rendering information corresponding to the i-th vector tile among the N vector tiles is determined as an example for explanation.

[0142] In the embodiment of the present application, based on the vector data of the ith vector tile, Unreal Engine rendering information corresponding to the ith vector tile is determined in a first Unreal Engine style file.

[0143] In some embodiments, the first Unreal Engine style file includes not only Unreal Engine rendering information, but also the correspondence between vector data and Unreal Engine rendering information. Based on this, for each of the N vector tiles, the terminal device determines the Unreal Engine rendering information corresponding to the vector data of the vector tile in the Unreal Engine rendering information included in the first Unreal Engine style file based on the vector data of the vector tile. That is to say, in this embodiment, the terminal device does not determine whether the rendering style of the i-th vector tile has changed, but uniformly determines the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file, and the method is simple.

[0144] In some embodiments, it can be known from the above that the i-th vector tile in the embodiment of the present application may be an existing vector tile, that is, the first vector tile mentioned above, or may be a newly added vector tile, that is, the second vector tile mentioned above. Based on this, the above S103 includes the following steps S103-A1 and S103-A2:

[0145] S103-A1: if the i-th vector tile is a first vector tile among at least one first vector tile, and the first rendering style number bound to the i-th vector tile is less than the new current rendering style number, based on the vector data of the i-th vector tile, determining the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file;

[0146] S103-A2: If the ith vector tile is a second vector tile among at least one second vector tile, then based on the vector data of the ith vector tile, determine the Unreal Engine rendering information corresponding to the ith vector tile in the first Unreal Engine style file.

[0147] From the above description, it can be seen that the first vector tile is an existing vector tile, and its vector data has been downloaded before this style rendering, that is, the first vector tile is the vector tile downloaded during the last or the last style rendering. Therefore, before this style rendering, the first vector tile has been bound to a rendering style number, recorded as the first rendering style number, and the first rendering style number can be understood as the number corresponding to the last rendering style. In some cases, the target rendering style this time may be the same as the last rendering style, and when the target rendering style is the same as the last rendering style, the rendering style of the first vector tile has not changed, and there is no need to render the first vector tile, so there is no need to obtain the Unreal Engine rendering information corresponding to the first vector tile.

[0148] Based on this, in an embodiment of the present application, in order to improve the efficiency of obtaining vector data, when the i-th vector tile is the first vector tile, the first rendering style number bound to the i-th vector tile is compared with the above-mentioned new current rendering style number. If the first rendering style number bound to the i-th vector tile is less than the above-mentioned new current rendering style number, it means that the rendering style of the i-th vector tile needs to be changed. At this time, the terminal device determines the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on the vector data of the i-th vector tile. If the first rendering style number bound to the i-th vector tile is equal to the above-mentioned new current rendering style number, it means that the rendering style of the i-th vector tile does not need to be changed. At this time, the terminal device does not need to determine the Unreal Engine rendering information corresponding to the i-th vector tile.

[0149] From the above description, it can be seen that the second vector tile is a new vector tile reloaded from the server when the rendering style of the current map image is changed by the terminal device, and does not participate in the last map style rendering. Therefore, in the embodiment of the present application, if the above-mentioned i-th vector tile is the second vector tile, the terminal device determines the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on the vector data of the i-th vector tile.

[0150] In some embodiments, after determining the Unreal Engine rendering information corresponding to the i-th vector tile, the terminal device uses the current new rendering style number as the new first rendering style number of the i-th vector tile and binds it to the i-th vector tile. This ensures that the rendering styles of the N vector tiles to be rendered collected by the current map image are unified and up-to-date, thereby improving the reliability of the current map image style switching.

[0151] The embodiment of the present application does not limit the specific content included in the Unreal Engine rendering information, for example, it may include color information, brightness information, transparency information, etc.

[0152] In some embodiments, the first Unreal Engine style file includes an Unreal Engine material list, and the Unreal Engine rendering information corresponding to the ith vector tile includes material information. Based on this, the above S103, S103-A1 and S103-A2 determine the Unreal Engine rendering information corresponding to the ith vector tile in the first Unreal Engine style file based on the vector data of the ith vector tile, including the following step S103-B:

[0153] S103-B, based on the vector data of the ith vector tile, determine the material information corresponding to the ith vector tile in the Unreal Engine material list.

[0154] In the embodiment of the present application, the first Unreal Engine style file includes an Unreal Engine material list, and the Unreal Engine material list includes material information of different materials. In this way, for each of the N vector tiles, the terminal device can determine the material information corresponding to each vector tile in the material list, and then use the material information corresponding to the vector tile to render the vector tile.

[0155] The embodiment of the present application does not limit the specific representation method of the Unreal Engine material list.

[0156] In some embodiments, the Unreal Engine material list includes a correspondence between different material information and vector information of a tile vector. Thus, for the i-th vector tile, the terminal device can query the Unreal Engine material list based on the vector information of the i-th vector tile to obtain the material information corresponding to the vector information of the i-th vector tile.

[0157] In some embodiments, the first Unreal Engine style file includes not only the Unreal Engine material list but also an Unreal Engine vector style mapping table, and the Unreal Engine vector style mapping table includes material identifiers corresponding to data types and level information of different vector tiles. At this time, the above S103-B includes the following steps:

[0158] S103-B1, based on the data type and level information included in the vector data of the i-th vector tile, determine the material identifier corresponding to the i-th tile vector in the Unreal Engine vector style mapping table;

[0159] S103-B2. Based on the material identifier corresponding to the ith tile vector, determine the material information corresponding to the ith vector tile in the Unreal Engine material list.

[0160] The vector data of the vector tile in the embodiment of the present application includes a data type ID and level information MinLevel and MaxLevel.

[0161] The Unreal Engine vector style mapping table of the embodiment of the present application includes material identifiers corresponding to data types and level information of different vector tiles. In this way, the terminal device can determine the material identifier corresponding to the i-th vector tile in the Unreal Engine vector style mapping table according to the data type ID and level information MinLevel and MaxLevel of the i-th vector tile.

[0162] In some embodiments, the level information MinLevel and MaxLevel can be understood as LOD (Levels of Detai) display interval.

[0163] In one example, the format of the Unreal Engine vector style map is shown in Table 2:

[0164] Table 2

[0165]

[0166]

[0167] Table 3 below is an example of a material identifier corresponding to a specific vector tile data type and level information in the Unreal Engine vector style map:

[0168] Table 3

[0169]

[0170] For example, as shown in Table 3, if the data type of the i-th vector tile is building, and the level information of the i-th vector tile is "minZoom":0,"maxZoom":20, it can be determined that the material identifier corresponding to the i-th vector tile is 1.

[0171] For another example, as shown in Table 3, if the data type of the i-th vector tile is sea, and the level information of the i-th vector tile is "minZoom":0,"maxZoom":20, it can be determined that the material identifier corresponding to the i-th vector tile is 3.

[0172] In some embodiments, the format of the Unreal Engine material list of the embodiment of the present application is shown in Table 4:

[0173] Table 4

[0174]

[0175] Among them, uasset is the suffix of the UE asset file. Based on the above Table 4, the UE material information finally used for vector tile rendering can be determined.

[0176] Table 5 is a specific Unreal Engine material list in the Unreal Engine material list format shown in Table 4:

[0177] Table 5

[0178]

[0179] Table 5 shows the UE material paths corresponding to different material identifiers. In this way, after the terminal device determines the material identifier corresponding to the i-th vector tile in the Unreal Engine vector style mapping table shown in Table 3 based on the data type and level information of the i-th vector tile, it determines the material information corresponding to the i-th vector tile in the Unreal Engine material list shown in Table 5 based on the material identifier corresponding to the i-th vector tile.

[0180] In some embodiments, the first Unreal Engine style file of the embodiment of the present application also includes the data format and style parameters of the vector base map itself. Exemplarily, the data format and style parameters of the vector base map itself are as follows:

[0181] Surface data related information: data type, such as ID and name; surface fill color; surface data height information, empty represents 0; surface edge color; surface edge width; surface edge connector style, such as rounded corners, beveled corners, etc.; surface edge endpoint line style, such as rounded head, flat head, etc. The above information corresponds to the LOD display interval [MinLevel, MaxLevel], and different style information can be configured in different intervals.

[0182] Line data related information: data type, such as ID and name; line color; line width; line connector style, such as rounded corners, beveled corners, etc.; line endpoint style, such as rounded head, flat head, etc.; line stroke color; line stroke width. The above information corresponds to the LOD display interval [MinLevel, MaxLevel], and different style information can be configured in different intervals.

[0183] In some embodiments, if the terminal device does not determine the material identifier corresponding to the i-th tile vector in the Unreal Engine vector style mapping table, or if the terminal device does not query the material information corresponding to the i-th vector tile in the Unreal Engine material list, the terminal device creates the material information corresponding to the i-th vector tile based on the preset basic material.

[0184] In an embodiment of the present application, the first Unreal Engine style file includes the data format and style parameters of the vector base map itself in addition to the Unreal Engine vector style mapping table and the Unreal Engine material list. In this way, the terminal device does not determine the material identifier corresponding to the i-th tile vector in the Unreal Engine vector style mapping table. Or when the terminal device does not query the material information corresponding to the i-th vector tile in the Unreal Engine material list, the terminal device can create the material information corresponding to the i-th vector tile for rendering based on the data format and style parameters of the vector base map itself, as well as the built-in basic material sample (i.e., the general PBR material), thereby providing rendering reliability.

[0185] In one example, the present application embodiment provides two sets of UE materials, namely Fig. 6A Bright materials shown and Figure 6B The dark material shown, where Fig. 6A and Figure 6B MI in the text represents material. These two sets of UE materials can realize the rendering and switching of light and dark background styles.

[0186] The above describes the specific process of determining the Unreal Engine rendering information corresponding to the i-th vector tile. For each of the N vector tiles in the current map image, based on the above steps, the Unreal Engine rendering information corresponding to each vector tile can be determined. Next, the following step S104 is performed.

[0187] S104 , based on the Unreal Engine rendering information corresponding to each of the N vector tiles, render the N vector tiles to obtain a map image corresponding to a target rendering style.

[0188] Based on the above steps, the terminal device determines the Unreal Engine rendering information corresponding to each of the N vector tiles to be rendered in the current map image, and renders the N vector tiles based on the Unreal Engine rendering information corresponding to each of the N vector tiles to obtain a map image corresponding to the target rendering style.

[0189] For example, based on the material information corresponding to each of the N vector tiles, material rendering is performed on each of the vector tiles to obtain a map image corresponding to a target rendering style.

[0190] For example, Fig. 7A It is a schematic diagram of the effect obtained by rendering map image 1 when the target rendering style is a vector base map bright color style. Figure 7B It is a schematic diagram of the effect obtained by rendering the map image 1 when the target rendering style is the vector base map dark style.

[0191] For example, Fig. 8A It is a schematic diagram of the effect obtained by rendering map image 2 when the target rendering style is a three-dimensional vector building bright color style. Figure 8B It is a schematic diagram of the effect obtained by rendering the map image 2 when the target rendering style is the three-dimensional vector building dark style.

[0192] Depend on 7A to 8B As shown, by adopting the method of the embodiment of the present application, the rendering style of the map image can be switched in real time on the terminal device side, and the rendering styles are rich, which improves the personalized rendering effect of the map.

[0193] In some embodiments, the first Unreal Engine style file further includes Unreal Engine environment parameters corresponding to the target rendering style.

[0194] Exemplarily, the Unreal Engine environment parameters corresponding to the target rendering style are shown in Table 6:

[0195] Table 6

[0196]

[0197]

[0198] It should be noted that the Unreal Engine environment parameters corresponding to the target rendering style in the embodiment of the present application include but are not limited to those shown in Table 6 above.

[0199] Based on the above Table 6, the terminal device can also perform global environment rendering on the current map image based on the Unreal Engine environment parameters.

[0200] Exemplarily, the material information and Unreal Engine environment parameters corresponding to different rendering modes may be used to render the global map image to obtain a rendering effect image. Fig. 9 and Fig.10 It is a rendering effect diagram obtained by rendering a map image of a certain city area using the material information and Unreal Engine environment parameters corresponding to the light rendering mode and the dark rendering mode respectively. Fig.11A and Fig. 11B It is a rendering effect diagram obtained by rendering a map image of a local urban area using the material information and Unreal Engine environment parameters corresponding to the light rendering mode and the dark rendering mode respectively.

[0201] As can be seen from the above, in the embodiment of the present application, a new UE rendering style file is designed in combination with the characteristics of the vector map and the UE material system to enrich the rendering style. At the same time, in order to achieve game-level rendering effects, not only the UE material corresponding to the vector data is created, but also different global environment parameters are set for different styles. In this way, based on the UE high-simulation game engine, the style of any number of vector map data can be dynamically switched, the rendering effect can be improved, and the needs of high-simulation and high-fidelity usage scenarios can be met.

[0202] In some embodiments, the first Unreal Engine style file further includes a version number. Exemplarily, the version number is shown in Table 7:

[0203] Table 7

[0204] name Parameter Type illustrate Version Int Version Number

[0205] Among them, the version number has future version upgrades.

[0206] It should be noted that the parameters of the geometric shape of the vector tile are processed when loading the tile data to construct the rendering vertex data, and do not involve PBR rendering materials. The display level configured in the first Unreal Engine style file has a higher priority than the display level in the tile data's own style. If the display level is not configured in the first Unreal Engine style file, the default is to use a unified material for rendering all levels. If the stroke information of the line and surface data is not configured, no drawing is performed.

[0207] In some embodiments, the terminal device may use multi-threading to execute the map rendering method of the embodiments of the present application to increase the map rendering speed.

[0208] For example, in one possible implementation, the terminal device performs major data processing functions through a game thread, such as obtaining a first Unreal Engine style file corresponding to a target rendering style, determining Unreal Engine rendering information corresponding to a vector tile, updating a rendering style update number, and related data judgments.

[0209] In a possible implementation, the terminal device may load the second vector tile from the server through a data loading thread.

[0210] In a possible implementation, the terminal device may render N vector tiles through a rendering thread to obtain a map image corresponding to a target rendering style.

[0211] In some embodiments, the Unreal Engine installed in the terminal device of the embodiment of the present application inherits the FPrimitiveSceneProxy (original scene proxy) of the traditional UE and implements FVectorSceneProxy (vector scene proxy). Among them, FPrimitiveSceneProxy has two key functions, EndFrame (end frame) and GetDynamicMeshElements (get dynamic mesh elements).

[0212] In one example, EndFrame is triggered in each frame of the game thread to collect the vector tiles and material information that need to be rendered. The vector data of each loaded vector tile will be added to the PendingAdd queue, and each vector tile that needs to be deleted will be added to the PendingKill queue, and unified addition and deletion will be performed in EndFrame. At the same time, FVectorSceneProxy stores the rendering style number used for the last rendering. If it is less than the current rendering style number stored in the StyleManager, EndFrame will be triggered to collect new vector tiles and material information. If there is no modification to the current frame, EndFrame returns directly without any processing to reduce consumption.

[0213] In the rendering thread, the GetDynamicMeshElements function creates rendering resources and performs rendering based on the vector tiles and material information collected by EndFrame (that is, the material information corresponding to N vector tiles).

[0214] The map rendering method provided by the embodiment of the present application sets different Unreal Engine style files for different styles, so that when the rendering style needs to be switched, the terminal device can obtain the first Unreal Engine style file corresponding to the target rendering style, and at the same time determine the N vector tiles to be rendered in the current map image, and then render the N vector tiles to be rendered based on the Unreal Engine rendering information included in the first Unreal Engine style file, and then obtain the map image corresponding to the target rendering style. In other words, the embodiment of the present application designs a new set of Unreal Engine style files, and the new Unreal Engine style files are fully compatible with the original data styles. The terminal device can realize the real-time switching of styles based on the new Unreal Engine style files, increase the rendering styles of the map, and realize the real-time switching of the map rendering style without triggering data scheduling. In addition, the embodiment of the present application can not only give full play to the data characteristics of the vector tiles, but also make full use of the PBR material system of the Unreal Engine to realize the high-fidelity rendering of the map and improve the map rendering effect.

[0215] The above is an overall introduction to the map rendering method provided in the embodiment of the present application. Fig.12 The entire process of the map rendering method provided in the embodiment of the present application is introduced.

[0216] Fig.12 A flowchart of a map rendering method provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, including:

[0217] S201 . In response to a request for switching a rendering style of a current map image, updating a rendering style update number to obtain an updated rendering style update number.

[0218] In the embodiment of the present application, the terminal device saves two style numbers, one is the current rendering style number StyleCurrentNumber, and the other is the rendering style update number StyleUpdateNumber.

[0219] After receiving the rendering style switching request input by the user, the terminal device updates the rendering style update number StyleUpdateNumber to obtain an updated rendering style update number.

[0220] S202: Determine whether the updated rendering style update number is greater than the current rendering style number.

[0221] If the updated rendering style update number is greater than the current rendering style number, the following step S203 is executed.

[0222] If the updated rendering style update number is not greater than the current rendering style number, the style update is stopped, that is, the style rendering is stopped.

[0223] S203: Determine whether the style cache includes the first Unreal Engine style file.

[0224] Specifically, the terminal device searches the style cache for the first Unreal Engine style file based on the identification information of the first Unreal Engine style file.

[0225] If the style cache includes the first Unreal Engine style file, the following step S204 is executed.

[0226] If the style cache does not include the first Unreal Engine style file, the following step S205 is executed.

[0227] S204: Obtain a first Unreal Engine style file from the style cache.

[0228] S205. Load a first Unreal Engine style file.

[0229] After loading the first Unreal Engine style file, the terminal device saves the first Unreal Engine style file in the style cache.

[0230] S206: After detecting that the first Unreal Engine style file is successfully obtained, the current rendering style number is updated to the updated rendering style update number to obtain a new current rendering style number.

[0231] In some embodiments, Fig.13 As shown, in order to further improve the speed of changing the rendering style, in the embodiment of the present application, the terminal device can start multiple threads to execute the method of the embodiment of the present application. For example, start the game thread, the data loading thread and the rendering thread. Exemplarily, the above steps S201 to S206 can all be completed by the game thread.

[0232] S207: Determine vector data of N vector tiles to be rendered in the current map image.

[0233] For example, vector data of at least one first vector tile in the current map image is obtained from the vector data cache.

[0234] For another example, vector data of at least one second vector tile in the current map image is loaded.

[0235] Next, based on the vector data of at least one first vector tile and / or the vector data of at least one second vector tile, vector data of N vector tiles to be rendered in the current map image are determined.

[0236] The specific implementation process of the above S207 is consistent with the implementation process of the above S102. Please refer to the specific description of the above S102 and will not be repeated here.

[0237] In some embodiments, Fig.13 As shown, the game thread obtains vector data of at least one first vector tile in the current map image from the vector data cache, and the data loading thread loads vector data of at least one second vector tile in the current map image from the server side.

[0238] S208 : Determine whether the i th vector tile is the first vector tile.

[0239] As can be seen from the above, the first vector tile is an existing vector tile, and the Unreal Engine rendering information of the existing vector tile has been loaded. Therefore, for each of the N vector tiles, it is determined whether the vector tile is the first vector tile.

[0240] If the i-th vector tile is the first vector tile, the following step S209 is executed.

[0241] If the i-th vector tile is not the first vector tile, the following step S212 is executed.

[0242] S209: Determine whether the first rendering style number bound to the i-th vector tile is less than the new current rendering style number.

[0243] If the first rendering style number bound to the i-th vector tile is smaller than the new current rendering style number, step S210 is executed.

[0244] If the first rendering style number bound to the i-th vector tile is smaller than the new current rendering style number, step S211 is executed.

[0245] S210 . Based on the vector data of the ith vector tile, determine, in a first Unreal Engine style file, Unreal Engine rendering information corresponding to the ith vector tile.

[0246] From the above description, it can be seen that if the i-th vector tile is the first vector tile, and the first rendering style number bound to the i-th vector tile is equal to the new current rendering style number, it means that the rendering style of the i-th vector tile does not need to be changed. If the first rendering style number bound to the i-th vector tile is less than the new current rendering style number, it means that the rendering style of the i-th vector tile needs to be changed, and then the Unreal Engine rendering information corresponding to the i-th vector tile is determined in the first Unreal Engine style file.

[0247] S211 . Skip obtaining Unreal Engine rendering information corresponding to the i-th vector tile.

[0248] S212: Based on the vector data of the ith vector tile, determine the Unreal Engine rendering information corresponding to the ith vector tile in the first Unreal Engine style file.

[0249] S213: Use the current new rendering style number as a new first rendering style number of the i-th vector tile, and bind it to the i-th vector tile.

[0250] In some embodiments, Fig.13 As shown, the above steps S208 to S213 are completed by the game thread.

[0251] S214 , based on the Unreal Engine rendering information corresponding to each of the N vector tiles, render the N vector tiles to obtain a map image corresponding to a target rendering style.

[0252] In some embodiments, Fig.13 As shown, the above step S214 is completed by the rendering thread.

[0253] In some embodiments, the first Unreal Engine style file includes an Unreal Engine material list, and the Unreal Engine rendering information corresponding to the i-th vector tile includes material information. Then, the Unreal Engine rendering information corresponding to each of the N vector tiles includes: based on the vector data of the i-th vector tile, determining the material information corresponding to the i-th vector tile in the Unreal Engine material list.

[0254] In some embodiments, the first Unreal Engine style file further includes an Unreal Engine vector style mapping table, and the Unreal Engine vector style mapping table includes material identifiers corresponding to data types and hierarchical information of different vector tiles. Then, based on the vector data of the i-th vector tile, determining the material information corresponding to the i-th vector tile in the Unreal Engine material list includes: determining the material identifier corresponding to the i-th tile vector in the Unreal Engine vector style mapping table based on the data type and hierarchical information included in the vector data of the i-th vector tile; and determining the material information corresponding to the i-th vector tile in the Unreal Engine material list based on the material identifier corresponding to the i-th tile vector.

[0255] In some embodiments, if the material identifier corresponding to the i-th tile vector is not determined in the Unreal Engine vector style mapping table, or the material information corresponding to the i-th vector tile is not found in the Unreal Engine material list, the material information corresponding to the i-th vector tile is created based on a preset basic material.

[0256] In some embodiments, the first Unreal Engine style file also includes Unreal Engine environment parameters corresponding to the target rendering style, and the terminal device also performs global environment rendering on the current map image based on the Unreal Engine environment parameters.

[0257] The specific implementation process of the above S214 is consistent with the implementation process of the above S104. Please refer to the specific description of the above S104 and will not be repeated here.

[0258] The map rendering method provided by the embodiment of the present application sets different Unreal Engine style files for different styles, so that when the rendering style needs to be switched, the terminal device can obtain the first Unreal Engine style file corresponding to the target rendering style, and at the same time determine the N vector tiles to be rendered in the current map image, and then render the N vector tiles to be rendered based on the Unreal Engine rendering information included in the first Unreal Engine style file, and then obtain the map image corresponding to the target rendering style. In other words, the embodiment of the present application designs a new set of Unreal Engine style files, and the new Unreal Engine style files are fully compatible with the original data styles. The terminal device can realize the real-time switching of styles based on the new Unreal Engine style files, increase the rendering styles of the map, and realize the real-time switching of the map rendering style without triggering data scheduling. In addition, the embodiment of the present application can not only give full play to the data characteristics of the vector tiles, but also make full use of the PBR material system of the Unreal Engine to realize the high-fidelity rendering of the map and improve the map rendering effect.

[0259] Combination of the above Figures 2 to 13 , describes in detail the method embodiment of the present application, and the following is combined with Figure 14 to Figure 15 , describe in detail the device embodiments of the present application.

[0260] Fig.14 It is a schematic block diagram of a map rendering device provided in an embodiment of the present application.

[0261] like Fig.14 As shown, the map rendering device 10 includes:

[0262] An acquisition unit 11 is used to acquire a first Unreal Engine style file corresponding to a target rendering style in response to a request for switching a rendering style of a current map image, wherein the first Unreal Engine style file includes Unreal Engine rendering information corresponding to the target rendering style;

[0263] A vector data determination unit 12, used to determine vector data of N vector tiles to be rendered in the current map image, where N is a positive integer;

[0264] A rendering information determining unit 13 is used to determine, for an i-th vector tile among the N vector tiles, Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on vector data of the i-th vector tile, where i is a positive integer less than or equal to N;

[0265] The rendering unit 14 is used to render the N vector tiles based on the Unreal Engine rendering information corresponding to each of the N vector tiles to obtain a map image corresponding to the target rendering style.

[0266] In some embodiments, the acquisition unit 11 is specifically used to obtain the first Unreal Engine style file from the style cache if the first Unreal Engine style file is found in the style cache based on the identification information of the target rendering style included in the rendering style switching request; if the first Unreal Engine style file is not found in the style cache, load the first Unreal Engine style file.

[0267] In some embodiments, the acquisition unit 11 is specifically used to update the rendering style update number in response to a rendering style switching request for the current map image to obtain an updated rendering style update number; if the updated rendering style update number is greater than the current rendering style number, then the first Unreal Engine style file is obtained.

[0268] In some embodiments, the acquisition unit 11 is further configured to update the current rendering style number to the updated rendering style update number to obtain a new current rendering style number after detecting that the first Unreal Engine style file is successfully acquired.

[0269] In some embodiments, the vector data determination unit 12 is used to obtain vector data of at least one first vector tile in the current map image from a vector data cache, and / or load vector data of at least one second vector tile in the current map image; based on the vector data of the at least one first vector tile and / or the vector data of the at least one second vector tile, determine the vector data of N vector tiles to be rendered in the current map image.

[0270] In some embodiments, the rendering information determination unit 13 is specifically used to determine the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on the vector data of the i-th vector tile if the i-th vector tile is a first vector tile among the at least one first vector tile and the first rendering style number bound to the i-th vector tile is less than the new current rendering style number; if the i-th vector tile is a second vector tile among the at least one second vector tile, then determine the Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on the vector data of the i-th vector tile.

[0271] In some embodiments, after determining the Unreal Engine rendering information corresponding to the i-th vector tile, the rendering information determination unit 13 is further used to bind the current new rendering style number to the i-th vector tile as the new first rendering style number of the i-th vector tile.

[0272] In some embodiments, the first Unreal Engine style file includes an Unreal Engine material list, the Unreal Engine rendering information corresponding to the i-th vector tile includes material information, and the rendering information determination unit 13 is specifically used to determine the material information corresponding to the i-th vector tile in the Unreal Engine material list based on the vector data of the i-th vector tile.

[0273] In some embodiments, the first Unreal Engine style file also includes an Unreal Engine vector style mapping table, and the Unreal Engine vector style mapping table includes material identifiers corresponding to data types and level information of different vector tiles. The rendering information determination unit 13 is specifically used to determine the material identifier corresponding to the i-th tile vector in the Unreal Engine vector style mapping table based on the data type and level information included in the vector data of the i-th vector tile; and determine the material information corresponding to the i-th vector tile in the Unreal Engine material list based on the material identifier corresponding to the i-th tile vector.

[0274] In some embodiments, the rendering information determination unit 13 is also used to create material information corresponding to the i-th vector tile based on a preset basic material if the material identifier corresponding to the i-th tile vector is not determined in the Unreal Engine vector style mapping table, or the material information corresponding to the i-th vector tile is not found in the Unreal Engine material list.

[0275] In some embodiments, the first Unreal Engine style file also includes Unreal Engine environment parameters corresponding to the target rendering style, and the rendering information determination unit 13 is further used to perform global environment rendering on the current map image based on the Unreal Engine environment parameters.

[0276] In some embodiments, the acquisition unit 11 is specifically configured to acquire the first Unreal Engine style file through a game thread in response to a request to switch the rendering style of the current map image.

[0277] In some embodiments, the acquiring unit 11 is further configured to, if multiple rendering style switching requests are received in the current map image, determine the last rendering style switching request among the multiple rendering style switching requests as the target rendering style switching request.

[0278] In some embodiments, the vector data determining unit 12 is specifically configured to load the vector data of the at least one second vector tile through a data loading thread.

[0279] In some embodiments, the rendering unit 14 is specifically configured to render the N vector tiles through a rendering thread based on Unreal Engine rendering information corresponding to each of the N vector tiles.

[0280] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Fig.14 The device shown can execute the embodiments of the above method, and the aforementioned and other operations and / or functions of each module in the device are respectively for realizing the embodiments of the above method, which will not be described in detail here for the sake of brevity.

[0281] The above describes the device of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.

[0282] Fig.15It is a schematic block diagram of an electronic device provided in an embodiment of the present application, and the electronic device may be the above-mentioned terminal device.

[0283] like Fig.15 As shown, the electronic device 40 may include: a memory 41 and a processor 42, wherein the memory 41 is used to store a computer program and transmit the program code to the processor 42. In other words, the processor 42 may call and run the computer program from the memory 41 to implement the method in the embodiment of the present application.

[0284] For example, the processor 42 may be used to execute the above method embodiments according to the instructions in the computer program.

[0285] In some embodiments of the present application, the processor 42 may include but is not limited to:

[0286] One or more processing units, for example: the processor may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, a display processing unit (display process unit, DPU), and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. In some embodiments, the electronic device 40 may also include one or more processors 42. Among them, the controller may be the nerve center and command center of the electronic device 40. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be set in the processor 42 for storing instructions and data. In some embodiments, the memory in the processor 42 is a high-speed cache memory. The memory may save instructions or data that the processor 110 has just used or circulated. If the processor 42 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 42, and thus improves the efficiency of the electronic device 40 system.

[0287] In some embodiments, the processor 42 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. Among them, the USB interface is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 40, and can also be used to transmit data between the electronic device 40 and a peripheral device. It can also be used to connect headphones and play audio through the headphones.

[0288] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 40. In other embodiments of the present application, the electronic device 40 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0289] In some embodiments, the electronic device 40 can realize the display function through a GPU, a display screen, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 42 may include one or more GPUs, which execute instructions to generate or change display information.

[0290] The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device 40 may include 1 or N display screens, where N is a positive integer greater than 1.

[0291] In some embodiments of the present application, the memory 41 includes but is not limited to:

[0292] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0293] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 41 and executed by the processor 42 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the video production device.

[0294] like Fig.15 As shown, the electronic device 40 may further include:

[0295] The transceiver 40 and the transceiver 43 may be connected to the processor 42 or the memory 41 .

[0296] The processor 42 may control the transceiver 43 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 43 may include a transmitter and a receiver. The transceiver 43 may further include an antenna, and the number of antennas may be one or more.

[0297] It should be understood that the various components in the video production device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0298] In some embodiments, the electronic device 40 can realize the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute instructions to generate or change display information.

[0299] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0300] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.

[0301] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.

[0302] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0303] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0304] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0305] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A map rendering method, characterized in that: include: In response to a request for switching the rendering style of the current map image, obtaining a first Unreal Engine style file corresponding to a target rendering style, wherein the first Unreal Engine style file includes Unreal Engine rendering information corresponding to the target rendering style; Determine vector data of N vector tiles to be rendered in the current map image, where N is a positive integer; For an i-th vector tile among the N vector tiles, based on the vector data of the i-th vector tile, determining Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file, where i is a positive integer less than or equal to N; Based on the Unreal Engine rendering information corresponding to each of the N vector tiles, the N vector tiles are rendered to obtain a map image corresponding to the target rendering style.

2. The method according to claim 1, characterized in that The obtaining of the first Unreal Engine style file includes: Based on the identification information of the target rendering style included in the rendering style switching request, if the first Unreal Engine style file is found in the style cache, obtaining the first Unreal Engine style file from the style cache; If the first Unreal Engine style file is not found in the style cache, the first Unreal Engine style file is loaded.

3. The method according to claim 1, characterized in that The step of obtaining, in response to a request to switch the rendering style of the current map image, a first Unreal Engine style file corresponding to a target rendering style comprises: In response to a rendering style switching request for the current map image, updating the rendering style update number to obtain an updated rendering style update number; If the updated rendering style update number is greater than the current rendering style number, the first Unreal Engine style file is obtained.

4. The method according to claim 3, characterized in that The method further comprises: After detecting that the first Unreal Engine style file is successfully acquired, the current rendering style number is updated to the updated rendering style update number to obtain a new current rendering style number.

5. The method according to claim 4, characterized in that The determining of vector data of N vector tiles to be rendered in the current map image includes: Obtaining, from a vector data cache, vector data of at least one first vector tile in the current map image, and / or loading vector data of at least one second vector tile in the current map image; Based on the vector data of the at least one first vector tile and / or the vector data of the at least one second vector tile, vector data of N vector tiles to be rendered in the current map image are determined.

6. The method according to claim 5, characterized in that The determining, based on the vector data of the i-th vector tile, in the first Unreal Engine style file, Unreal Engine rendering information corresponding to the i-th vector tile comprises: If the i-th vector tile is a first vector tile among the at least one first vector tile, and the first rendering style number bound to the i-th vector tile is less than the new current rendering style number, determining Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on the vector data of the i-th vector tile; If the i-th vector tile is a second vector tile among the at least one second vector tile, then based on the vector data of the i-th vector tile, in the first Unreal Engine style file, Unreal Engine rendering information corresponding to the i-th vector tile is determined.

7. The method according to claim 6, characterized in that After determining the Unreal Engine rendering information corresponding to the i-th vector tile, the method further includes: The current new rendering style number is used as a new first rendering style number of the i-th vector tile, and is bound to the i-th vector tile.

8. The method according to any one of claims 1 to 7, characterized in that: The first Unreal Engine style file includes an Unreal Engine material list, and the Unreal Engine rendering information corresponding to the i-th vector tile includes material information. The determining, based on the vector data of the i-th vector tile, in the first Unreal Engine style file, Unreal Engine rendering information corresponding to the i-th vector tile comprises: Based on the vector data of the i-th vector tile, material information corresponding to the i-th vector tile is determined in the Unreal Engine material list.

9. The method according to claim 8, characterized in that The first Unreal Engine style file further includes an Unreal Engine vector style mapping table, the Unreal Engine vector style mapping table includes material identifiers corresponding to data types and hierarchical information of different vector tiles, and the determining, based on the vector data of the i-th vector tile, material information corresponding to the i-th vector tile in the Unreal Engine material list, includes: Based on the data type and level information included in the vector data of the i-th vector tile, determining the material identifier corresponding to the i-th tile vector in the Unreal Engine vector style mapping table; Based on the material identifier corresponding to the i-th tile vector, material information corresponding to the i-th vector tile is determined in the Unreal Engine material list.

10. The method according to claim 9, characterized in that The method further comprises: If the material identifier corresponding to the i-th tile vector is not determined in the Unreal Engine vector style mapping table, or the material information corresponding to the i-th vector tile is not found in the Unreal Engine material list, the material information corresponding to the i-th vector tile is created based on a preset basic material.

11. The method according to claim 1, characterized in that: The first Unreal Engine style file also includes Unreal Engine environment parameters corresponding to the target rendering style, and the method further includes: Based on the Unreal Engine environment parameters, global environment rendering is performed on the current map image.

12. The method according to any one of claims 1 to 11, characterized in that: The step of obtaining, in response to a request to switch the rendering style of the current map image, a first Unreal Engine style file corresponding to a target rendering style comprises: In response to a request to switch the rendering style of the current map image, the first Unreal Engine style file is obtained through a game thread.

13. The method according to claim 11, characterized in that The method further comprises: If multiple rendering style switching requests are received in the current map image, the last rendering style switching request among the multiple rendering style switching requests is determined as the target rendering style switching request.

14. The method according to claim 5, characterized in that The loading of vector data of at least one second vector tile in the current map image comprises: The vector data of the at least one second vector tile is loaded through the data loading thread.

15. The method according to any one of claims 1 to 11, characterized in that: The rendering of the N vector tiles based on Unreal Engine rendering information corresponding to each of the N vector tiles includes: Based on the Unreal Engine rendering information corresponding to each of the N vector tiles, the N vector tiles are rendered by a rendering thread.

16. A map rendering device, characterized in that: include: An acquisition unit, configured to acquire, in response to a request for switching a rendering style of a current map image, a first Unreal Engine style file corresponding to a target rendering style, wherein the first Unreal Engine style file includes Unreal Engine rendering information corresponding to the target rendering style; A vector data determination unit, used to determine vector data of N vector tiles to be rendered in the current map image, where N is a positive integer; a rendering information determining unit, configured to determine, for an i-th vector tile among the N vector tiles, Unreal Engine rendering information corresponding to the i-th vector tile in the first Unreal Engine style file based on vector data of the i-th vector tile, where i is a positive integer less than or equal to N; The rendering unit is used to render the N vector tiles based on Unreal Engine rendering information corresponding to each of the N vector tiles to obtain a map image corresponding to the target rendering style.

17. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program to implement the method according to any one of claims 1 to 15.

18. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program enables a computer to execute the method according to any one of claims 1 to 15.

Citation Information

Cited By

  • Mass vector data rendering method based on shadow mapping

    CN119048707A

  • Information processing method, information processing system, and program

    WO2026110594A1