Rendering method and device, electronic equipment and storage medium

By detecting performance parameters on mobile devices, reducing the accuracy of the LOD model, and switching the rendering style, the performance pressure problem of large-scale 3D map rendering on mobile devices is solved, and smooth map navigation is achieved on devices with different performance levels.

CN121962379APending Publication Date: 2026-05-01BEIJING BERLIN INTERACTIVE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING BERLIN INTERACTIVE TECH CO LTD
Filing Date
2025-12-19
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, mobile devices face enormous performance pressure when rendering large-scale 3D maps, making it impossible to implement map navigation functions.

Method used

By acquiring the device performance parameters of the terminal device, the model accuracy of the Level of Detail (LOD) model is reduced when the performance degrades. The rendering level and style of the LOD model are then adaptively adjusted according to the performance, including switching to a low-poly style on sharp curves to reduce rendering complexity.

Benefits of technology

The navigation function runs smoothly on terminal devices with different performance levels, ensuring the stability and efficiency of map navigation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962379A_ABST
    Figure CN121962379A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a rendering method and device, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: displaying a current picture frame in response to a triggering operation for a navigation function; obtaining equipment performance parameters of the terminal equipment, if it is detected that the equipment performance parameters of the terminal equipment are reduced, reducing the model precision of an LOD model, and taking the LOD model with the reduced model precision as a target LOD model; and rendering a next picture frame of the current picture frame based on the target LOD model. According to the embodiment of the invention, the model precision of the LOD model is adaptively adjusted according to the equipment performance of the terminal equipment, so that the navigation function can be realized on the terminal equipment with different performances.
Need to check novelty before this filing date? Find Prior Art

Description

Rendering methods, devices, electronic equipment and storage media Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a rendering method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of image processing and intelligent navigation technologies, 3D navigation systems are increasingly being used in games, AR (Augmented Reality) navigation, smart cities and other fields. However, large-scale 3D map rendering puts enormous pressure on mobile device performance, which may result in some mobile devices being unable to implement map navigation functions. Summary of the Invention

[0003] This disclosure provides a rendering method, apparatus, electronic device, and storage medium that can solve the problem that some mobile devices in the prior art cannot implement map navigation functions. The technical solution provided by this disclosure is as follows: According to one aspect of this disclosure, a rendering method is provided, the method comprising: displaying a current frame in response to a trigger operation for a navigation function; the current frame including a map image; acquiring device performance parameters of the terminal device; if a decrease in the device performance parameters of the terminal device is detected, reducing the model precision of the Level of Detail (LOD) model, and using the LOD model with reduced model precision as a target LOD model; and rendering the next frame of the current frame based on the target LOD model.

[0004] Optionally, if a decrease in the device performance parameters of the terminal device is detected, the model precision of the Level of Detail (LOD) model is reduced, and the LOD model with reduced precision is used as the target LOD model. This includes: determining a first level of the LOD model used to render the current frame; the level of the LOD model is negatively correlated with the model precision of the LOD model; each level of the LOD model corresponds to a range of device performance parameters; if a decrease in the device performance parameters of the terminal device is detected, and the model level corresponding to the decreased device performance parameters is higher than the first level, the model level corresponding to the decreased device performance parameters is used as a second level, and the LOD model of the second level is used as the target LOD model.

[0005] Optionally, for each level of LOD model, the model switching threshold of the LOD model at that level is positively correlated with the level; the method further includes: taking the next level after the first level as the third level, and taking the model switching threshold between the first level and the third level as the first switching threshold; if the observation distance is greater than the first switching threshold, then rendering the next frame based on the LOD model of the third level.

[0006] Optionally, the current frame contains a navigation path and a navigated object, and the method further includes: if it is determined that the navigated object enters a sharp bend in the navigation path, then the rendering style is switched from realistic style to low-poly style.

[0007] Optionally, the step of switching the rendering style from realistic to low-poly style if it is determined that the navigated object has entered a sharp bend in the navigation path includes: if it is determined that the navigated object has entered a sharp bend in the navigation path, and the current map style is path navigation, then the rendering style is switched from realistic to low-poly style, and the current map style is switched to terrain analysis; the current observation distance is reduced, and the target LOD model is re-determined based on the reduced observation distance; the next frame is rendered based on the rendering method corresponding to the low-poly style and the re-determined target LOD model.

[0008] Optionally, the rendering method corresponding to the low-poly style includes rendering parameters; the rendering parameters include at least one of stylization degree and contour visualization parameters; the rendering parameters are determined based on the device performance parameters of the terminal device.

[0009] Optionally, the navigation path is provided with multiple preset points, which are used to represent sharp bends in the navigation path; determining that the navigated object has entered a sharp bend in the navigation path includes: determining the target point closest to the navigated object from the multiple preset points; if it is detected that the distance between the navigated object and the target point is less than a preset distance threshold, and the distance between the navigated object and the target point gradually decreases, then it is determined that the navigated object has entered a sharp bend in the navigation path.

[0010] According to another aspect of the present disclosure, a rendering apparatus is provided, the apparatus comprising: an initial display module, configured to display a current frame in response to a trigger operation for a navigation function; the current frame including a map image; a model adjustment module, configured to acquire device performance parameters of the terminal device, and if a decrease in device performance parameters of the terminal device is detected, reduce the model precision of the Level of Detail (LOD) model, and use the LOD model with reduced model precision as a target LOD model; and a rendering module, configured to render the next frame of the current frame based on the target LOD model.

[0011] According to another aspect of the present disclosure, an electronic device is provided, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described rendering methods.

[0012] According to another aspect of the present disclosure, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, implements the steps of any of the rendering methods described above.

[0013] According to one aspect of the present disclosure, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the steps of any of the rendering methods described above.

[0014] The beneficial effects of the technical solution provided in this disclosure are as follows: by acquiring the device performance parameters of the terminal device, and when the device performance parameters of the terminal device are detected to be decreasing, the model accuracy of the Level of Detail (LOD) model is reduced. The next frame is rendered using the LOD model with reduced model accuracy. By adaptively adjusting the model accuracy of the LOD model according to the device performance of the terminal device, the navigation function can be realized on terminal devices with different performance, thereby achieving smooth operation of the navigation function on terminal devices with different performance. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.

[0016] Figure 1 is a flowchart illustrating a rendering method provided in an embodiment of this disclosure; Figure 2 is a schematic diagram illustrating a realistic-style path navigation map provided in an embodiment of this disclosure; Figure 3 is a schematic diagram illustrating a low-poly style terrain analysis map provided in an embodiment of this disclosure; Figure 4 is a structural schematic diagram illustrating a rendering device provided in an embodiment of this disclosure; Figure 5 is a structural schematic diagram illustrating an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0017] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.

[0018] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term, for example, “A and / or B” or “A, B” indicates implementation as “A,” or implementation as “B,” or implementation as “A and B.”

[0019] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.

[0020] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0021] Figure 1 is a flowchart illustrating a rendering method provided in an embodiment of this disclosure. As shown in Figure 1, the method includes: step S110, displaying the current frame in response to a trigger operation for a navigation function; the current frame includes a map image; step S120, acquiring the device performance parameters of the terminal device; if a decrease in the device performance parameters of the terminal device is detected, reducing the model precision of the Level of Detail (LOD) model, and using the LOD model with reduced model precision as the target LOD model; step S130, rendering the next frame of the current frame based on the target LOD model.

[0022] Specifically, the rendering method provided in this disclosure can be used in terminal devices with navigation functions, wherein the terminal device can be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a laptop computer, a desktop computer, an in-vehicle terminal (such as an in-vehicle navigation terminal, an in-vehicle computer, etc.), a smartwatch, etc.

[0023] The navigation function can be used in smart travel scenarios or in gaming scenarios.

[0024] Upon receiving a user's trigger action for the navigation function, the current frame, including a map image, can be displayed. The map image can be a 3D map.

[0025] It is possible to obtain the device performance parameters of the terminal device. The device performance parameters can be used to evaluate the performance level of the terminal device. The value of the device performance parameter is positively correlated with the performance level of the device, that is, the larger the value of the device performance parameter, the higher the performance of the device.

[0026] Optionally, the frame rate of the current frame can be used as a device performance parameter. The frame rate of the current frame can be determined based on the device performance information of the terminal device, and then used as a device performance parameter. The device performance information can include information about various components of the terminal device, such as the CPU (Central Processing Unit), GPU (Graphics Processing Unit), memory, and video memory. When at least one of the CPU, GPU, memory, or video memory in the terminal device experiences a bottleneck, the frame rate of the current map image will decrease, ensuring that the frame rate of the current frame reflects the real-time performance of the terminal device.

[0027] When a decline in the device performance parameters of a terminal device is detected, the model precision of the Level of Detail (LOD) model can be reduced. The LOD model with reduced precision is used as the target LOD model, and the next frame of the current frame is rendered using the target LOD model. By adaptively adjusting the model precision of the LOD model according to the device performance of the terminal device, navigation function can be achieved on terminal devices with different performance levels, thereby enabling the navigation system to run smoothly on terminal devices with different performance levels.

[0028] The method provided in this disclosure obtains the device performance parameters of the terminal device, and when the device performance parameters of the terminal device are detected to be decreasing, the model accuracy of the Level of Detail (LOD) model is reduced. The next frame is rendered using the LOD model with reduced model accuracy. By adaptively adjusting the model accuracy of the LOD model according to the device performance of the terminal device, the navigation function can be implemented on terminal devices with different performance levels, thereby achieving smooth operation of the navigation function on terminal devices with different performance levels.

[0029] As an optional embodiment, if a decrease in the device performance parameters of the terminal device is detected, the model precision of the Level of Detail (LOD) model is reduced, and the LOD model with reduced precision is used as the target LOD model. This includes: determining a first level of the LOD model used to render the current frame; the level of the LOD model is negatively correlated with the model precision of the LOD model; each level of the LOD model corresponds to a range of device performance parameters; if a decrease in the device performance parameters of the terminal device is detected, and the model level corresponding to the decreased device performance parameters is higher than the first level, the model level corresponding to the decreased device performance parameters is used as the second level, and the LOD model of the second level is used as the target LOD model.

[0030] Specifically, different levels of LOD models can be set. The level of the LOD model is negatively correlated with its accuracy; that is, the lower the LOD model level, the higher its accuracy. For example, if four levels of LOD models are set, namely LOD0, LOD1, LOD2, and LOD3, then the accuracy of these four LOD models from high to low is LOD0, LOD1, LOD2, and LOD3, respectively.

[0031] For each level of the LOD model, that level of LOD model can correspond to a device performance parameter. For example, if the device performance parameter is the frame rate, and three levels of LOD models are set, then when the frame rate is greater than fps1, it corresponds to LOD0; when the frame rate is between fps1 and fps2, it corresponds to LOD1; and when the frame rate is less than fps2, it corresponds to LOD2, where fps1 > fps2.

[0032] The level of the LOD model rendering the current frame can be used as the first level. When the device performance parameters of the terminal device are detected to have decreased, and the level corresponding to the decreased device performance parameters is higher than the first level, the level corresponding to the decreased device performance parameters can be used as the second level, and the LOD model of the second level can be used as the target LOD model.

[0033] For example, when the first level is LOD0, LOD0 can be used as the default model for the initial frame. If a decrease in device performance parameters is detected, and the level corresponding to the decreased device performance parameters is LOD1, then the LOD1 model is used as the target LOD model, and the next frame is rendered based on the LOD1 model.

[0034] As an optional embodiment, the method further includes: taking the next level after the first level as the third level, and taking the model switching threshold between the first level and the third level as the first switching threshold; if the observation distance is greater than the first switching threshold, then rendering the next frame based on the LOD model of the third level.

[0035] Specifically, there is a model switching threshold between adjacent LOD models. When the observation distance exceeds this threshold, the model switches from the original LOD model to the next lower level. For each LOD model level, the model switching threshold is positively correlated with the level.

[0036] Optionally, the growth rate of the model switching threshold increases with the increase of the model level. For example, setting up four levels of LOD models, namely LOD0, LOD1, LOD2, and LOD3, LOD0 is selected when the observation distance is less than 50 meters; when the observation distance is greater than 50 meters but not greater than 100 meters, it switches from LOD0 to LOD1; when the observation distance is greater than 100 meters but not greater than 200 meters, it switches from LOD1 to LOD2; and when the observation distance is greater than 200 meters, it switches from LOD2 to LOD3. In this case, the model switching threshold between LOD0 and LOD1 is 50 meters, the model switching threshold between LOD1 and LOD2 is 100 meters, and the model switching threshold between LOD2 and LOD3 is 200 meters.

[0037] In other words, the higher the model level being switched, the faster the model switching threshold increases. This causes the switching from a high-precision model to a low-precision model to occur when the objects in the image are smaller and less noticeable. This improves the visual coherence of switching between multi-level detail models and is beneficial for enhancing the user experience.

[0038] After determining the first level of LOD model for rendering the current frame, the next level after the first level can be designated as the third level. For example, if the first level is LOD0, then the third level is LOD1. The model switching threshold between the first and third levels is used as the first switching threshold. After determining the viewing distance in the current frame, if the viewing distance is greater than the first switching threshold (e.g., the user zooms in on a map image), the next frame is rendered based on the third level of LOD model.

[0039] In other words, changes in at least one of the device performance parameters of the terminal device and the observation distance can lead to changes in the level of the LOD model.

[0040] In this embodiment of the disclosure, a multi-level LOD model, from fine to coarse, is used to switch between different levels of detail models during rendering based on the viewing distance. When the viewing distance increases, a low level of detail model is used to reduce rendering complexity; when the viewing distance decreases, a high level of detail model is switched to, which can both ensure the rendering quality requirements and improve rendering efficiency.

[0041] As an optional embodiment, the current frame contains a navigation path and a navigated object; the method further includes: if it is determined that the navigated object has entered a sharp bend in the navigation path, then the rendering style is switched from realistic style to low-poly style.

[0042] Specifically, the current frame can also include a navigation path and the navigated object. The navigation path can be generated based on the starting point and the ending point. In the scenario of smart travel, the starting point and the ending point can be set by the user through a map navigation application. In the game scenario, the starting point and the ending point can be user-defined or pre-set according to the game requirements.

[0043] Optionally, the navigation path may include multiple navigation landmarks. Navigation landmarks can be understood as locations traversed along the navigation path; for example, in a scenic area tour, navigation landmarks could represent various attractions within the area. Navigation landmarks can be drawn based on high-precision models to ensure their recognizability at different viewing distances, meaning users can see them from various viewing distances.

[0044] Optionally, the navigation path can be rendered using Catmull-Rom spline curves (a type of interpolation spline curve) to interpolate discrete path points (which can be points along the navigation path) to construct a smooth path. The path thickness is calculated using normals, and the road width is adjusted based on the path thickness to construct a strip-shaped path mesh. UV mapping is then performed based on the path length to fit the path onto the 3D model. Furthermore, dynamic guidance effects such as flowing light effects and pulse animations can be added to the navigation path.

[0045] The object being navigated can be any object that needs to be navigated. In the context of smart mobility, the object being navigated can be a terminal device, such as the in-vehicle terminal of the vehicle driven or ridden by the user, or a terminal device held by the user. In the context of gaming, the object being navigated can be a game character or game item operated by the player.

[0046] Optionally, users can set an automatic follow mode and a manual interaction mode to adjust the viewing angle. Seamless switching between these modes avoids view jumps. In automatic follow mode, a smooth damping algorithm is used to achieve natural target tracking (the target can be the navigable object, such as a player character in a game), and spherical interpolation is used to achieve smooth view rotation. In manual interaction mode, users can adjust the viewing angle using various touch operations such as single-finger rotation and two-finger zoom.

[0047] The navigation route may include at least one sharp bend, which can be a section of road with a large turning angle, such as mountain roads, highway ramps, or tunnel entrances and exits.

[0048] When the navigation object is detected to have entered a sharp bend in the navigation path, the rendering style can be switched from realistic to low poly.

[0049] Optionally, multiple preset points are set on the navigation path, and the preset points are used to represent sharp bends on the navigation path; determining that the navigated object enters a sharp bend in the navigation path includes: determining the target point closest to the navigated object from the multiple preset points; if it is detected that the distance between the navigated object and the target point is less than a preset distance threshold, and the distance between the navigated object and the target point gradually decreases, then it is determined that the navigated object has entered a sharp bend in the navigation path.

[0050] Specifically, multiple preset points can be set on the navigation path. These preset points can be used to represent sharp bends. For example, for a sharp bend, any point on that bend can be used as a preset point.

[0051] Optionally, when there are multiple consecutive sharp bends on the navigation path, such as a serpentine road, the candidate points corresponding to each sharp bend can be determined first, and multiple preset points can be selected from the multiple candidate points, thereby avoiding the degradation of user experience caused by frequent switching of rendering styles.

[0052] For the navigated object, the real-time location information of the navigated object in the map image can be obtained. Based on the positional relationship between the real-time location information of the navigated object and each preset point in the navigation path, it can be determined whether the navigated object has entered a sharp bend.

[0053] Based on the real-time location information of the navigable object, the distance between the navigable object and each preset point on the navigation path can be calculated, and the preset point with the smallest distance can be used as the target point. In other words, the target point is the preset point closest to the navigable object.

[0054] Calculate the distance between the navigated object and the target point. If the distance is less than the preset distance threshold, it means that the navigated object is near a sharp bend. At the same time, if the distance between the navigated object and the target point gradually decreases, it means that the navigated object is getting closer to the target point. Then it is determined that the navigated object has entered a sharp bend in the navigation path.

[0055] If the distance is not less than the preset distance threshold, it means that the navigated object is not located on any sharp bend, and the rendering style will not be switched.

[0056] In this embodiment, when the navigated object enters a sharp bend, the rendering style is switched from realistic to low-poly style, providing the user with a visual change. Low-poly style refers to a visual style created using low-poly modeling technology, characterized by distinct geometric shapes and a simple, abstract aesthetic. Compared to realistic style, low-poly style models have a lower polygon count and require less computation for textures and lighting, allowing for smooth rendering even on low-performance devices. Furthermore, for sharp bends, low-poly style simplifies buildings, actively eliminating a large amount of navigation-irrelevant visual noise (such as details of trees and mountains) found in realistic style, allowing key navigation information such as road paths to be highlighted, thus helping to convey navigation information more effectively to the user. In addition, low-poly style requires less computation and has higher rendering efficiency, enabling faster display of sharp bend conditions to the user. In scenarios where the user is driving, it can provide timely references for driving strategies, improving driving safety.

[0057] Optionally, the method further includes: when it is detected that the navigated object leaves a sharp bend in the navigation path, the rendering style is switched from a low-poly style to a realistic style. That is, when the navigated object is on a non-sharp bend in the navigation path, a realistic style is used for rendering, and when the navigated object is on a sharp bend in the navigation path, a low-poly style is used for rendering.

[0058] Optionally, determining that the navigated object leaves the sharp bend in the navigation path includes: determining that the navigated object enters the sharp bend in the navigation path, including: determining the target point closest to the navigated object from multiple preset points; if it is detected that the distance between the navigated object and the target point is less than a preset distance threshold, and the distance between the navigated object and the target point gradually increases, then it is determined that the navigated object leaves the sharp bend in the navigation path.

[0059] Specifically, based on the real-time location information of the navigable object, the distance between the navigable object and each preset point on the navigation path can be calculated, and the preset point with the smallest distance can be taken as the target point. In other words, the target point is the preset point closest to the navigable object.

[0060] Calculate the distance between the navigated object and the target point. If the distance is less than the preset distance threshold, it means that the navigated object is near a sharp bend. At the same time, if the distance between the navigated object and the target point gradually increases, it means that the navigated object is moving away from the target point. Then it is determined that the navigated object has left the sharp bend in the navigation path.

[0061] If it is detected that the distance between the navigated object and any preset point is less than the preset distance threshold within a certain period of time, and the distance between the navigated object and the preset point gradually increases within that period of time, then it is determined that the navigated object has left any sharp bend in the navigation path.

[0062] As an optional embodiment, the method further includes: in response to a map style switching operation for the current frame, rendering the next frame as a map image corresponding to the map style determined by the switching operation; the map style includes path navigation or terrain analysis.

[0063] Specifically, the current frame may also include a map style switching control. Users can trigger the map style switching operation by clicking the map style switching control. The map style may include path navigation and terrain analysis. The map style for path navigation focuses on displaying the lines and shapes of roads, while the map style for terrain analysis focuses on displaying contour lines.

[0064] For example, in a vehicle navigation scenario, when the vehicle is driving in a mountainous area, the user can click the map style switching control to switch the route navigation map style to the terrain analysis map style, and obtain information such as the height and slope of the mountain through the displayed contour map.

[0065] If the map style of the current frame is a path navigation, in response to the map style switching operation, the next frame will be rendered as a terrain analysis map (i.e., a contour map); if the map style of the current frame is a terrain analysis, in response to the map style switching operation, the next frame will be rendered as a path navigation map.

[0066] In this embodiment of the disclosure, by setting a map style switching control, users can switch between different map styles according to their actual needs, thereby better meeting user requirements.

[0067] As an optional embodiment, if it is determined that the navigated object has entered a sharp bend in the navigation path, the rendering style is switched from realistic style to low-poly style, including: if it is determined that the navigated object has entered a sharp bend in the navigation path, and the current map style is path navigation, the rendering style is switched from realistic style to low-poly style, and the current map style is switched to terrain analysis; the current observation distance is reduced, and the target LOD model is re-determined based on the reduced observation distance; the next frame is rendered based on the rendering method corresponding to the low-poly style and the re-determined target LOD model.

[0068] Specifically, in certain scenarios, such as on mountain roads, there is a high probability of sharp bends. Therefore, when it is determined that the navigable object enters a sharp bend section of the navigation path, the map style of the current frame can be obtained. If the map style of the current frame is path navigation, the map style can be automatically switched to terrain analysis to display a contour map.

[0069] It can also automatically reduce the observation distance, zoom in on the road conditions of sharp bends in the image, and redetermine the level of the LOD model based on the reduced observation distance.

[0070] Based on the rendering method corresponding to the low-poly style and the redefined LOD model, the next frame is rendered as a map image (i.e., a contour map) corresponding to the terrain analysis.

[0071] Figure 2 is a schematic diagram of a realistic-style route navigation map provided in an embodiment of the present disclosure, and Figure 3 is a schematic diagram of a low-poly style terrain analysis map provided in an embodiment of the present disclosure. As shown in Figures 2 and 3, in a vehicle navigation scenario, when a vehicle enters a sharp bend, the screen can switch from a realistic-style route navigation map to a low-poly style terrain analysis map. Moreover, in the low-poly style terrain analysis map, the viewing distance will be smaller, thereby enabling a clearer display of road details.

[0072] Optionally, low-poly rendering and contour generation can be implemented simultaneously in the fragment shader. Optionally, all stylization calculations can be completed on a single pass, which greatly reduces the workload of the GPU and memory bandwidth usage, making it suitable for devices with different performance levels.

[0073] The `dFNormal` function (a normal calculation function) can be used to calculate normals based on the screen space derivative to achieve hard-edge lighting effects. Then, the calculated normals are multiplied by the direction of the main light source to generate a typical low-poly shading. The lighting contrast can be controlled by setting the stylization level. The stylization level (`lowPolyIntensity`) controls the color contrast intensity between triangles; the greater the color contrast intensity between triangles, the stronger the low-poly stylization.

[0074] Optionally, contour line positions can be calculated based on world spatial height, and anti-aliased lines can be generated using the smoothstep function. The slope factor can be calculated based on the surface normal, automatically increasing the line width in steep areas to maintain visual balance. Furthermore, a contour color parameter (contourColor) can be set to control the color of the contour lines, a contour Spacing parameter (contourSpacing) can control the distance between contour lines, and a contourWidth parameter (contourWidth) can control the width of the contour lines.

[0075] Optionally, the rendering method corresponding to the low-poly style may include rendering parameters, which may include at least one of stylization intensity and contour visualization parameters. The contour visualization parameters may include at least one of contour color parameters, contour density parameters, and contour width parameters.

[0076] Alternatively, the rendering parameters can be customized by the user according to actual needs. For example, a visual interface can be used to allow users to customize the various rendering parameters.

[0077] Alternatively, rendering parameters can be adaptively determined based on the device performance parameters of the terminal device. For example, when the device performance parameters indicate lower device performance, the stylization level can be set to a larger value. A larger stylization level value results in a stronger low-poly style, reducing the number of faces, vertices, and shading complexity of the model, thus requiring less computation for rendering. This allows for smooth navigation even on low-performance devices. Conversely, when the device performance parameters indicate lower device performance, the contour density parameter can be set to a smaller value. Reducing the contour density parameter effectively decreases the computational load of rendering, better adapting to terminal devices with different performance levels.

[0078] By adaptively adjusting rendering parameters based on the device performance parameters of the terminal device, the rendering quality can be automatically adjusted according to the device performance, ensuring smooth operation of the navigation function on different hardware configurations and achieving a balance between visual effects and rendering efficiency.

[0079] Optionally, the rendering parameters may also include blending weights, which can be used to characterize the ratio of realistic style to low-poly style. For example, the blending weight can be a parameter between 0.0 and 1.0. The larger the blending weight, the greater the proportion of low-poly style. When the blending weight is 0, it corresponds to realistic style; when the blending weight is 1, it corresponds to low-poly style.

[0080] The blending weight can be dynamically adjusted based on the distance between the navigated object and the target point. For example, as the distance between the navigated object and the target point decreases, the blending weight increases accordingly, achieving a smooth transition from a realistic style to a low-polygon style. Conversely, as the distance between the navigated object and the target point increases, the blending weight decreases accordingly, achieving a smooth transition from a low-polygon style to a realistic style. This not only deeply integrates practical navigation functions with artistic visual expression, making it both practical and aesthetically pleasing, but also supports a smooth visual transition from realistic to stylized styles, meeting the diverse needs of different application scenarios and user groups.

[0081] Figure 4 is a schematic diagram of a rendering device provided in an embodiment of this disclosure. As shown in Figure 4, the device in this embodiment may include: an initial display module 210, used to display the current frame in response to a trigger operation for the navigation function; the current frame includes a map image; a model adjustment module 220, used to obtain the device performance parameters of the terminal device, and if the device performance parameters of the terminal device are detected to have decreased, the model accuracy of the Level of Detail (LOD) model is reduced, and the LOD model with reduced model accuracy is used as the target LOD model; and a rendering module 230, used to render the next frame of the current frame based on the target LOD model.

[0082] As an optional embodiment, when the model adjustment module detects a decrease in the device performance parameters of the terminal device and reduces the model precision of the Level of Detail (LOD) model, and uses the LOD model with reduced precision as the target LOD model, it is configured to: determine a first level of the LOD model used to render the current frame; the level of the LOD model is negatively correlated with the model precision of the LOD model; each level of the LOD model corresponds to a range of device performance parameters; if the device performance parameters of the terminal device are detected to have decreased, and the model level corresponding to the decreased device performance parameters is higher than the first level, then the model level corresponding to the decreased device performance parameters is used as the second level, and the LOD model of the second level is used as the target LOD model.

[0083] As an optional embodiment, for each level of LOD model, the model switching threshold of the LOD model at that level is positively correlated with the level; the device also includes an observation distance adjustment module, used to: take the next level after the first level as the third level, and take the model switching threshold between the first level and the third level as the first switching threshold; if the observation distance is greater than the first switching threshold, then render the next frame based on the LOD model of the third level.

[0084] As an optional embodiment, the current frame includes a navigation path and a navigated object. The device also includes a rendering style switching module, used to: if it is determined that the navigated object enters a sharp bend in the navigation path, switch the rendering style from realistic style to low-poly style.

[0085] As an optional embodiment, when the rendering style switching module determines that the navigated object has entered a sharp bend in the navigation path, and switches the rendering style from realistic style to low-poly style, it is configured to: if the navigated object has entered a sharp bend in the navigation path, and the current map style is path navigation, switch the rendering style from realistic style to low-poly style, and switch the current map style to terrain analysis; reduce the current observation distance, and redetermine the target LOD model based on the reduced observation distance; and render the next frame based on the rendering method corresponding to the low-poly style and the redetermined target LOD model.

[0086] As an optional embodiment, the rendering method corresponding to the low-poly style includes rendering parameters; the rendering parameters include at least one of stylization degree and contour visualization parameters; the rendering parameters are determined based on the device performance parameters of the terminal device.

[0087] As an optional embodiment, the navigation path is provided with multiple preset points, which are used to represent sharp bends in the navigation path; when the rendering style switching module determines that the navigated object has entered a sharp bend in the navigation path, it is used to: determine the target point closest to the navigated object from the multiple preset points; if it is detected that the distance between the navigated object and the target point is less than a preset distance threshold, and the distance between the navigated object and the target point gradually decreases, then it is determined that the navigated object has entered a sharp bend in the navigation path.

[0088] The apparatus of this disclosure embodiment can execute the method provided in this disclosure embodiment, and its implementation principle is similar, and it has corresponding technical effects. The actions performed by each module in the apparatus of each embodiment of this disclosure correspond to the steps in the method of each embodiment of this disclosure. For a detailed functional description of each module of the apparatus, please refer to the description in the corresponding method shown above, and it will not be repeated here.

[0089] In this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0090] This disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this disclosure. Compared with the prior art, the method provided in this disclosure can achieve the following: by acquiring the device performance parameters of a terminal device, and when a decrease in the device performance parameters of the terminal device is detected, the model precision of the Level of Detail (LOD) model is reduced. The next frame is rendered using the LOD model with reduced model precision. By adaptively adjusting the model precision of the LOD model according to the device performance of the terminal device, navigation functionality can be achieved on terminal devices with different performance levels, thereby enabling smooth operation of the navigation function on terminal devices with different performance levels.

[0091] In one optional embodiment, an electronic device is provided, as shown in FIG5. The electronic device 4000 shown in FIG5 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this disclosure.

[0092] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0093] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in Figure 5, but this does not indicate that there is only one bus or one type of bus.

[0094] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.

[0095] The memory 4003 is used to store computer programs that execute embodiments of the present disclosure, and is controlled by the processor 4001 to execute them. The processor 4001 is used to execute the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0096] Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), wearable devices, etc., as well as fixed terminals such as digital TVs, desktop computers, etc.

[0097] This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0098] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.

[0099] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.

[0100] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure without departing from the technical concept of this disclosure also fall within the protection scope of the embodiments of this disclosure.

Claims

1. A rendering method, characterized in that, Applied to a terminal device, the method includes: in response to a trigger operation for a navigation function, displaying a current frame; the current frame includes a map image; acquiring device performance parameters of the terminal device; if a decrease in device performance parameters of the terminal device is detected, reducing the model precision of the Level of Detail (LOD) model, and using the LOD model with reduced precision as the target LOD model; and rendering the next frame of the current frame based on the target LOD model.

2. The method according to claim 1, characterized in that, If a decrease in the device performance parameters of the terminal device is detected, the model precision of the Level of Detail (LOD) model is reduced, and the LOD model with reduced precision is used as the target LOD model. This includes: determining a first level of the LOD model used to render the current frame; the level of the LOD model is negatively correlated with the model precision of the LOD model; each level of the LOD model corresponds to a range of device performance parameters; if a decrease in the device performance parameters of the terminal device is detected, and the model level corresponding to the decreased device performance parameters is higher than the first level, the model level corresponding to the decreased device performance parameters is used as a second level, and the LOD model of the second level is used as the target LOD model.

3. The method according to claim 1, characterized in that, For each level of LOD model, the model switching threshold of the LOD model at that level is positively correlated with the level; the method further includes: taking the next level after the first level as the third level, and taking the model switching threshold between the first level and the third level as the first switching threshold; if the observation distance is greater than the first switching threshold, then rendering the next frame based on the LOD model of the third level.

4. The method according to claim 1, characterized in that, The current frame contains the navigation path and the navigated object. The method further includes: if it is determined that the navigated object enters a sharp bend in the navigation path, then the rendering style is switched from realistic style to low-poly style.

5. The method according to claim 4, characterized in that, The step of switching the rendering style from realistic to low-poly style if it is determined that the navigated object has entered a sharp bend in the navigation path includes: if it is determined that the navigated object has entered a sharp bend in the navigation path, and the current map style is path navigation, then the rendering style is switched from realistic to low-poly style, and the current map style is switched to terrain analysis; the current observation distance is reduced, and the target LOD model is re-determined based on the reduced observation distance; the next frame is rendered based on the rendering method corresponding to the low-poly style and the re-determined target LOD model.

6. The method according to claim 5, characterized in that, The rendering method corresponding to the low-poly style includes rendering parameters; the rendering parameters include at least one of stylization degree and contour visualization parameters; the rendering parameters are determined based on the device performance parameters of the terminal device.

7. The method according to claim 4, characterized in that, The navigation path is equipped with multiple preset points, which are used to indicate sharp bends on the navigation path. Determining that the navigated object enters a sharp bend in the navigation path includes: determining the target point closest to the navigated object from the plurality of preset points; If the distance between the navigated object and the target point is less than a preset distance threshold, and the distance between the navigated object and the target point gradually decreases, then it is determined that the navigated object has entered a sharp bend in the navigation path.

8. A rendering apparatus, characterized in that, include: The initial display module is used to display the current frame in response to a trigger operation for the navigation function; The current frame includes a map image; The model adjustment module is used to obtain the device performance parameters of the terminal device. If the device performance parameters of the terminal device are detected to have decreased, the model accuracy of the LOD model at the level of detail is reduced, and the LOD model with reduced model accuracy is used as the target LOD model. The rendering module is used to render the next frame of the current frame based on the target LOD model.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 7.