Method and apparatus for generating simulated sky image, method and apparatus for generating map

By generating a sky sphere model in a triangular mesh format and rotating star images, the problem of large data resource consumption of sky background images in augmented reality scenes is solved, and efficient and realistic sky effect simulation is achieved.

CN114693878BActive Publication Date: 2025-11-25ALIBABA GROUP HOLDING LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011627950.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-11-25
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

Existing technologies require a large number of images to be superimposed when simulating sky background images in augmented reality scenarios, resulting in high data resource consumption and difficulty in achieving realistic sky effects, especially when terminal device resources are limited.

Method used

By generating a sky sphere model in a triangular mesh format, determining celestial bodies by combining the current location point and date, acquiring resource data, and rotating celestial images, a simulated sky image is generated. A vectorized approach is used to reduce resource consumption.

Benefits of technology

It achieves efficient simulation of real sky effects on terminal devices, reduces data resource consumption, and can simulate the sky background during the day or night in real time, saving data resource space on terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693878B_ABST
    Figure CN114693878B_ABST
Patent Text Reader

Abstract

The application discloses a simulated sky image generation method and device, a map generation method and equipment. The simulated sky image generation method comprises the following steps: generating a sky sphere model comprising sky spherical surface data in a triangulated grid format according to the coordinates and radius of the earth center, and the distance between the sky and the earth surface; determining a star to be generated according to the position information of a current positioning point and a current date; acquiring resource data of the star to be generated and a reference direction at a preset reference time on the current date, and generating a star image located at the reference direction according to the resource data; determining a relative rotation angle of the star image and the earth according to the time interval between the current time on the current date and the preset reference time; and rotating the star image relative to the earth by the relative rotation angle with the earth center as the rotation center, to obtain a simulated sky image of the current time comprising the sky sphere model and the rotated star image. The effect of simulating a real daytime or night sky can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a simulated sky image generation method and device, a map generation method and equipment. BACKGROUND

[0002] In an augmented reality (AR) scene, a model containing 3D coordinate information (including geometric information, viewpoint information, texture information, and lighting information, etc.) can be rendered in a three-dimensional space (3D) to generate an image, and a simulated sky background image is obtained.

[0003] The sky effect of the sky background image in the AR scene is usually simulated by using a picture map. For example, when a skybox is used to simulate the sky background image, a cube is used to enclose the ground in the internal space of the cube, and pictures simulating the sky background are pasted on the six faces of the cube, texture sampling and texture mapping are performed, and a simulated sky background image is rendered. The sky background image generated by using the picture map needs to simulate a lot of background information of the real sky, such as the sun, the moon, the starry sky, etc., and therefore a large number of pictures need to be superimposed to simulate the real sky background effect. For example, the simulation of the motion track of the sun or the moon, and the change of the starry sky at night, will cause the sky background image to occupy a large amount of data resources, and even due to the limitation of the data resource space of the terminal device, it is difficult to realize the real effect of simulating the sky during the day or at night. SUMMARY

[0004] In view of the above problems, the present application is proposed to provide a simulated sky image generation method and device, a map generation method and equipment which overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect, an embodiment of the present application provides a simulated sky image generation method, comprising the following steps:

[0006] generating a sky sphere model including sky spherical data in a triangulated grid format according to the earth center coordinate and the radius, and the distance between the sky and the earth surface;

[0007] determining a star to be generated according to the position information of the current positioning point and the current date;

[0008] obtaining resource data of the star to be generated and a reference direction at a preset reference time on the current date, and generating a star image located at the reference direction according to the resource data;

[0009] determine a relative rotation angle of the star image and the earth according to a time interval between a current time of the current date and the preset reference time;

[0010] rotate the star image relative to the earth by the relative rotation angle with the center of the earth as a rotation center to obtain a simulated sky image of the current time including the sky sphere model and the rotated star image.

[0011] In a second aspect, the embodiments of the present application provide a map display method, including:

[0012] display the simulated sky image obtained according to the method in a map view.

[0013] In a third aspect, the embodiments of the present application provide a simulated sky image generation apparatus, including:

[0014] a sky sphere generation module configured to generate a sky sphere model including sky sphere data in a triangulated mesh format according to a center of the earth coordinate and a radius and a distance between the sky and the earth surface;

[0015] a planet image generation module configured to determine a star to be generated according to position information of a current positioning point and a current date, obtain resource data of the star to be generated and a reference direction at a preset reference time of the current date, and generate a star image located at the reference direction according to the resource data;

[0016] a sky image determination module configured to determine a relative rotation angle of the star image and the earth according to a time interval between a current time of the current date and the preset reference time, rotate the star image relative to the earth by the relative rotation angle with the center of the earth as a rotation center to obtain a simulated sky image of the current time including the sky sphere model and the rotated star image.

[0017] In a fourth aspect, the embodiments of the present application provide a map device, including a display apparatus and the simulated sky image generation apparatus described above;

[0018] the display apparatus is configured to display the simulated sky image generated by the simulated sky image generation apparatus in a map view.

[0019] In a fifth aspect, the embodiments of the present application provide a simulated sky image generation service, which executes the simulated sky image generation method described above when running.

[0020] In a sixth aspect, the embodiments of the present application provide a map service, which executes the map display method described above when running.

[0021] The above technical solutions provided by the embodiments of the present application have at least the following beneficial effects:

[0022] The simulation sky image generation method provided by the embodiment of the present application generates a sky sphere model and a star image respectively, and rotates the star image relative to the earth to obtain a simulation sky image of a current time point including the sky sphere model and the rotated star image. The generated sky sphere model is a vectorized graph including a triangulated grid format sky sphere data, compared with a method of using a picture as a dome sky simulation sky atmosphere, the vectorized sky sphere model is used to simulate the sky atmosphere, and the resource space occupied is smaller, and the model generation is more convenient; according to the position of the current positioning point and the current date, a star to be generated is determined, and then a star image is generated at a reference direction of the star according to the obtained resource data, and the resource space occupied by the obtained resource data is smaller, and the data resource space of the terminal device is saved; and finally, the simulation sky image of the current time point including the sky sphere model and the rotated star image is obtained, which can simulate the atmosphere and the sun, moon and stars in the real sky in real time, and realize the effect of simulating the real daytime or night sky.

[0023] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and achieved by the structure particularly pointed out in the written description, claims, and drawings.

[0024] The technical solutions of the present application will be further described in detail below with the help of the drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0025] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, and are used to explain the present application together with the embodiments of the present application, and do not constitute a limitation to the present application. In the drawings:

[0026] Figure 1 The simulation sky image generation method flowchart in the embodiment of the present application;

[0027] Figure 2 The schematic diagram of the vertex obtained by cutting the triangular strip during the sphere sectioning in the embodiment of the present application;

[0028] Figure 3 The flowchart of realizing the simulation sky image in the map navigation application in the embodiment of the present application;

[0029] Figure 4 The simulation sky image displayed in the map view in the embodiment of the present application Figure 1 ;

[0030] Figure 5A schematic diagram of a simulated sky image displayed in a map view in an embodiment of the present application Figure 2 ;

[0031] Figure 6 A schematic diagram of a simulated sky image displayed in a map view in an embodiment of the present application Figure 3 ;

[0032] Figure 7 A schematic diagram of a simulated sky image generation device in an embodiment of the present application

[0033] Figure 8 A schematic diagram of a structure of a map device in an embodiment of the present application DETAILED DESCRIPTION

[0034] Exemplary embodiments of the present application will be described herein below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the drawings, it is understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thoroughly and completely understood, and will fully convey the scope of the application to those skilled in the art.

[0035] Embodiment 1

[0036] Embodiments of the present application are directed to the problems of the prior art described above, and provide a simulated sky image generation method, the flow of which is shown in Figure 1 , and includes the following steps:

[0037] S11: generating a sky sphere model including sky spherical surface data in a triangulated mesh format according to the earth center coordinates and the radius, and the distance between the sky and the earth surface;

[0038] In step S11 above, since the coordinates of the Earth's center and radius are known, a sky sphere model can be generated at a fixed height above the Earth's surface by determining the distance between the sky and the Earth's surface. This sky sphere model is then used to simulate the effect of the atmosphere covering the Earth's surface. The sky sphere data used in generating this sky sphere model, including the triangular mesh format, can be obtained through a spherical meshing algorithm or a surface meshing algorithm. The specific implementation process of the spherical meshing algorithm or surface meshing algorithm can be found in existing technologies and is not limited here. To more realistically simulate the atmospheric effect when generating the sky sphere model, the current weather conditions can be determined in real time before generation. A suitable color can be selected based on the weather conditions. For example, if the current weather is clear and it is daytime, the sky sphere model can be rendered blue during generation, making it closer to the real atmosphere. In this embodiment, the distance between the sky and the Earth's surface can be selected based on actual conditions to obtain a sky sphere model with a suitable radius.

[0039] S12: Determine the celestial body to be generated based on the current location information and the current date;

[0040] In step S12 above, since the presence and location of celestial bodies such as the sun, moon, and planets in the sky vary depending on the geographical location and time on Earth, the celestial bodies to be generated in simulating a realistic sky effect can be determined based on the current location information and the current date. In this embodiment, the location of the current location can be determined by first identifying the hemisphere of Earth where the current location is located, and the season of the current location on the current date; thus, the celestial bodies to be generated can be determined based on the hemisphere of Earth and the season. In this embodiment, since the simulation is of a sky effect, it can be assumed that the celestial bodies that the current location might observe on the current date are determined from the perspective of observing space from Earth, i.e., the celestial bodies to be generated are determined by observing space from the perspective of the human eye.

[0041] In one specific embodiment, the location information of the current location point can be the GPS information or latitude and longitude information of the current location obtained from the location server, and the current date can be obtained from the time information obtained from the time server. For example, the time information may include information such as year, month, day, hour, and minute, so that the current date can be determined according to the year, month, and day recorded in the time information.

[0042] S13: Obtain resource data of a star to be generated and a reference position of a preset reference time of a current date, and generate a star image located at the reference position according to the resource data;

[0043] In the step S13, the resource data of the star to be generated can be resource data in a format of a picture, an animation (for example, Lottie animation), a Scalable Vector Graphics (SVG), or the like, for generating a star. The reference position of the star to be generated at the preset reference time of the current date can be pre-stored in a position server. The positions of stars stored in the position server can be positions of each visible star relative to the earth at a preset reference time within one earth revolution period (i.e., 365 days) observed from the north hemisphere of the earth and the south hemisphere of the earth respectively, by assuming that the earth is located at the center of the solar system and observing the space from the angle of the earth. For example, the number and the position of the visible stars around the earth within 360 degrees at 0:00 on a certain day in a year can be obtained by observing the sky at 0:00 on the day in the north hemisphere.

[0044] In one specific embodiment, when obtaining the positions of the visible stars relative to the earth at the preset reference time on a certain day within 365 days, the observation data in an observation system in the prior art, such as the National Aeronautics and Space Administration eye (NASA EYE) system, can also be referred to for simulation to obtain the positions of the visible stars relative to the earth at the preset reference time on the day.

[0045] S14: Determine the relative rotation angle of the star image and the earth according to the time interval between the current time of the current date and the preset reference time;

[0046] In the step S14, in determining the relative rotation angle between the star image and the earth, only the rotation of the earth can be considered for convenience of calculation. Specifically, the time interval between the current time of the current date and the preset reference time can be determined first, and the ratio of the time interval in a day can be obtained, and then the relative rotation angle between the star image and the earth can be determined according to the ratio. For example, assuming that the current time of the current date is 6:00 and the preset reference time is 0:00, the time interval between the two is 6 hours, and the ratio of the time interval in a day is obtained by dividing the time interval (6h) by the length of a day (24h), i.e. 0.25. Knowing that the angle of one rotation of the earth is 360°, the relative rotation angle between the star image and the earth is obtained by multiplying the ratio 0.25 by the angle of one rotation of the earth, i.e. 90°. Alternatively, knowing the angle of one rotation of the earth and the length of a day, the rotation angle of the earth in one hour is obtained, i.e. 15°, and the relative rotation angle between the star image and the earth is obtained by multiplying the time interval 6h by 15°, i.e. 90°.

[0047] S15: rotating the star image relative to the earth by the relative rotation angle with the center of the earth as the rotation center to obtain a simulated sky image of the current time including the sky sphere model and the rotated star image.

[0048] In the step S15, in rotating the star image relative to the earth by the relative rotation angle with the center of the earth as the rotation center, the star image is rotated from the reference position as the starting point, and the rotated star image is obtained by rotating the star image relative to the earth by the relative rotation angle in the direction opposite to the rotation direction of the earth with the center of the earth as the rotation center, or by rotating the earth by the relative rotation angle in the rotation direction of the earth with the center of the earth as the rotation center, or by rotating the star image from the reference position as the starting point, rotating the star image relative to the earth by the relative rotation angle in the direction opposite to the rotation direction of the earth with the center of the earth as the rotation center, and rotating the earth by the relative rotation angle in the rotation direction of the earth at the same time, and the rotated star image is obtained when the sum of the rotation angles of the two is equal to the relative rotation angle. In this way, the sky sphere model of the simulated sky atmosphere and the rotated star image of the sun, the moon and the stars in the simulated sky are obtained at the current time, and thus the simulated sky image of the current time is obtained, and the real effect of simulating the daytime or nighttime sky is realized.

[0049] In an optional embodiment, in the step S11, the sky sphere model including the sky sphere data in the triangulation grid format is generated according to the coordinates of the center of the earth and the radius, and the distance between the sky and the earth surface, and specifically can include the following steps:

[0050] The radius of the sky sphere model is determined based on the Earth's radius and the distance between the sky and the Earth's surface.

[0051] Based on the radius of the sky sphere model and the coordinates of the Earth's center, a preset sphere subdivision algorithm is used to obtain the sky sphere data in a triangular mesh format corresponding to the sky sphere model; the sky sphere data in the triangular mesh format includes the vertex coordinates of each triangular mesh of the sky sphere model;

[0052] A sky sphere model is generated using an open graphics library based on sky sphere data in a triangular mesh format.

[0053] In this embodiment, after obtaining the radius of the sky sphere model and taking the Earth's center as the center of the sky sphere model, the geometric information of the sky sphere model can be determined. Then, using a preset sphere partitioning algorithm, the sky sphere data in triangular mesh format corresponding to the sky sphere model can be obtained. Depending on the different sphere partitioning methods used, the obtained sky sphere data in triangular mesh format can vary. For example, sky sphere data in triangular mesh format obtained using an index method includes the vertex coordinates and indices of each triangular mesh of the sky sphere model, while sky sphere data in triangular mesh format obtained using a triangular strip method only includes the vertex coordinates of each triangular mesh of the sky sphere model, without index information. In this embodiment, the method of obtaining sky sphere data in triangular mesh format can be implemented according to existing technology and is not limited here.

[0054] The following example illustrates how to use triangular strips to partition a sphere, demonstrating the resulting triangular mesh format of the sky sphere data:

[0055] First, the virtual sky sphere model is horizontally sliced ​​using a differential method. Then, any sliced ​​portion will serve as a reference. Figure 2 The diagram shows a parallelogram-shaped band. Next, each parallelogram-shaped band is divided by drawing triangular bands, and the division of the triangular bands is consistently done in either a clockwise or counterclockwise direction. For example, refer to... Figure 2 As shown, triangles are drawn in a counter-clockwise direction, following the sequence 0-->1-->2-->0, 2-->1-->3-->2... This ensures that all triangles are drawn in a counter-clockwise direction. For each parallelogram, a corresponding triangular band is obtained. Using the Earth's center as the origin, the coordinates of the vertices of each triangle on the triangular band can be obtained, thus obtaining the vertex coordinates of each triangular mesh in the sky sphere model. Furthermore, the order in which the vertices of each triangle are obtained when dividing the triangular band can be used as the drawing order of the vertices of each triangular mesh in the sky sphere model.

[0056] In the embodiments of the present application, the specific implementation manner of drawing the sky sphere model according to the sky sphere data in the triangular mesh format using the Open Graphic Library (Open GL) can refer to the description of the specific implementation process of data drawing in the Open GL in the prior art, and is not specifically limited here.

[0057] In an optional embodiment, the specific implementation process of generating the star image in the step S13 includes the following steps.

[0058] Obtaining resource data of each star to be generated from a resource data server;

[0059] Obtaining a reference direction of each star to be generated at a preset reference time on a current date from a direction data server;

[0060] Determining a three-dimensional coordinate of the star according to the reference direction of each star to be generated at the preset reference time on the current date, respectively;

[0061] Generating a virtual polygon using a preset quadrilateral subdivision algorithm with the three-dimensional coordinate of the star as the center;

[0062] Generating the star image on the virtual polygon using the Open Graphic Library according to the resource data of the star.

[0063] In the embodiments of the present application, before the step of generating the star image is executed, the data resource package corresponding to each star to be generated can be obtained from the data server, and then the resource data in a suitable format can be selected according to the hardware support capability of the terminal device executing the simulation sky image generation method, for example, if the performance of the graphic processing unit (GPU) in the graphics card of the terminal device is insufficient to support the rendering and display of resource data in the animation (such as Lottie animation) format, then the resource data in the picture or SVG format can be selected from the data resource package.

[0064] Referring to the description in step S13, in the embodiment, the reference orientation of each star at the preset reference time on the current date can be obtained from the orientation server. The reference orientation can be expressed in the form of longitude and latitude position and height from the ground. The longitude and latitude position and height from the ground are converted into the earth coordinate system with the earth center as the coordinate origin, and the three-dimensional coordinates of the corresponding star are obtained. The three-dimensional coordinate point of the star is used as the center, and a preset quadrilateral subdivision algorithm is used to draw a virtual polygon at the position where the star image is to be generated. Finally, the star image is drawn on the virtual polygon according to the resource data of the star using Open GL (Open Graphic Library). The specific implementation of drawing the star image using Open GL can refer to the description of the specific implementation process of data rendering in Open GL in the prior art. For example, assuming that the resource data of the star is in the form of a picture, in the Open GL rendering process, the resource data of the star in the form of a picture needs to be sampled and mapped for texture, and the star image is rendered on the virtual quadrilateral.

[0065] In an optional embodiment, the method further comprises:

[0066] When the current location point is in the daytime at the current time, and the star image includes the sun, the orientation of the sun at the current time is obtained, and the resource data of the atmospheric scattering and / or the sun halo to be generated is obtained;

[0067] According to the orientation of the sun at the current time, the position of the atmospheric scattering and / or the sun halo to be generated in the sky sphere model is determined;

[0068] According to the resource data of the atmospheric scattering and / or the sun halo to be generated, the atmospheric scattering and / or the sun halo image is generated at the above position.

[0069] In the embodiment, in order to make the obtained simulated sky image more realistically present the daytime sky background, the simulated atmospheric scattering or sun halo effect can be added to the simulated sky image. Since the generation of atmospheric scattering and sun halo is associated with the orientation of the sun, before determining whether to perform the step of generating the atmospheric scattering and / or sun halo image, it is necessary to first determine whether the current time is daytime, and to determine the orientation of the sun at the current time according to the time interval between the current time and the preset reference time and the reference orientation of the sun at the preset reference time obtained from the orientation data server according to the time period in which the current time is located in a day.

[0070] Since the atmospheric scattering and the sun halo effect are related to the distance between the sun and the atmosphere (i.e. the aforementioned sky sphere model) and the location of the current positioning point (which can also be referred to as the camera position), when generating the atmospheric scattering or sun halo image, the position of the sun at the current time needs to be determined, and the position of the atmospheric scattering or sun halo to be generated in the sky sphere model is determined according to the position of the sun and the distance between the sky sphere model and the current positioning point. The process of specifically determining the position of the atmospheric scattering or sun halo in the sky sphere model can refer to the description of the specific implementation process in the prior art, and will not be specifically limited here.

[0071] Finally, the atmospheric scattering and / or sun halo image is drawn in the corresponding position in the sky sphere model using Open GL according to the resource data of the atmospheric scattering and / or sun halo to be generated. The specific implementation of drawing the atmospheric scattering and / or sun halo image using Open GL can refer to the description of the specific implementation process of data rendering in Open GL in the prior art, and will not be specifically limited here.

[0072] In an optional embodiment, the method further comprises:

[0073] When the current positioning point is in the night at the current time, obtaining resource data of a meteor to be generated;

[0074] Generating a meteor image in a preset position in the sky sphere model according to the resource data of the meteor to be generated.

[0075] In the embodiments of the present application, in order to make the obtained simulated sky image more realistically present the night sky background, a simulated meteor effect can be added in the simulated sky image. When it is determined that the current positioning point is in the night at the current time, resource data of a meteor to be generated is obtained; and a meteor image is drawn in a preset position in the sky sphere model using Open GL according to the resource data of the meteor to be generated. The specific implementation of drawing the meteor image using Open GL can refer to the description of the specific implementation process of data rendering in Open GL in the prior art, and will not be specifically limited here.

[0076] The simulated sky image generation method provided in the embodiments of the present application can be executed in a terminal device such as a vehicle-mounted device (an in-vehicle infotainment or a vehicle-mounted multimedia system or a vehicle box), a mobile phone or a tablet computer, and applied in a 3D scene that can be displayed, such as an AR (Augmented Reality) navigation scene in a map navigation application. Figure 3 As shown in FIG. 1, a terminal device runs a map navigation application, and the map navigation application can realize the acquisition of resource data from a data resource server through an IO resource loading module.

[0077] Referring to FIG. 1, the terminal device runs a map navigation application, and the map navigation application can realize the acquisition of resource data from a data resource server through an IO resource loading module. Figure 3As shown, when the map navigation application enters the AR navigation scene after starting, the simulation sky generation method is executed, a sky sphere model is generated in the map, which is covered above the map plane, that is, the effect of displaying a static dome sky in the map is displayed, which brings a real sense and immersion effect to the user. At the same time, according to the position information of the current positioning point obtained by the map navigation application from the positioning server and the current date obtained from the time server, the star to be generated is determined according to the position information of the current positioning point and the current date. After determining the star to be generated, the IO resource loading module is used to request the orientation server to obtain the reference orientation of the star to be generated at the preset reference time of the current date, and to request the data resource server to obtain the resource data of the star to be generated. The resource data returned by the data resource server is parsed by the IO resource loading module, and the reference orientation at the preset reference time of the current date and the parsed resource data are returned to the rendering engine, respectively, to generate a star image in the map. Finally, a simulation sky image of the current time including the sky sphere model and the rotated star image is obtained, and the simulation sky image is displayed on the map to realize the effect of the simulation sky background. In the embodiment of the application, the position information of the current positioning point and the current date can be obtained by a synchronous communication (Synchronous Communication) mode, and the resource data and the reference orientation of the star to be generated at the preset reference time of the current date can be obtained by an asynchronous communication (Asynchronous Communication) mode.

[0078] In the embodiment of the application, in order to reduce the resource consumption of the rendering engine of the map navigation application in the drawing process when generating the simulation sky image, the data resource can be parsed by the IO resource loading module first, and then the parsed resource data is returned to the rendering engine, and the rendering engine calls the Open GL application program interface to draw the star image.

[0079] In the embodiment of the application, the resource data of the star to be generated stored in the data resource server can be a data resource package for generating stars obtained in advance by a user experience design (User Experience Design, UED) method. The data resource package can include pictures, Lottie animations, SVG and other resource data in different formats generated for the sun, the moon, or other planets and stars. After starting, the rendering engine of the map navigation application requests the resource data server to obtain the latest data resource package through the IO resource loading module, and selects the resource data in a suitable format.

[0080] In this embodiment of the invention, different terminal devices have different hardware conditions, such as different driving capabilities or different graphics card display capabilities. If the hardware conditions of the terminal device meet the requirements for displaying atmospheric scattering, solar halo, or meteor effects, then atmospheric scattering, solar halo, or meteor images can be generated, thus adding simulated atmospheric scattering, solar halo, or meteor effects to simulated sky images. It should be noted that because the calculation workload in the rendering process of atmospheric heat dissipation or solar halo is large, for example, when rendering atmospheric heat dissipation, it may be necessary to consider factors such as the external scattering, internal scattering, and surface scattering of sunlight by the atmosphere (i.e., the sky sphere model). Therefore, the process of rendering atmospheric scattering and / or solar halo images can be performed in the graphics processing unit (GPU) of the terminal device's graphics card, instead of selecting the central processing unit (CPU) for calculation. The GPU's shader completes the calculations during rendering, which ensures a higher frame rate for the display of the rendered atmospheric scattering and / or solar halo images, meeting the real-time requirements for displaying atmospheric scattering and / or solar halo images. The process of drawing meteor images can also be performed on the GPU of the terminal device's graphics card. The GPU's shader performs the calculations during drawing, which ensures a higher frame rate for the displayed meteor images and meets the real-time requirements of meteor image display.

[0081] Based on the same inventive concept, this application also provides a map display method to display the above-mentioned simulated sky image in a map view.

[0082] In one specific embodiment, by executing the steps of the simulated sky image generation method, a simulated sky image with a realistic effect is obtained and displayed in a map view. For example, assuming the current time is 9:01 AM, referring to... Figure 4 As shown, a simulated sky image for that day can be displayed in the map view; or, if atmospheric scattering occurs in the sky at 9:01 AM, just as the sun rises, then refer to... Figure 5 As shown, a simulated sky image of the weather change and atmospheric scattering can be displayed in the map view; for example, if the current time is 9:40 PM, refer to... Figure 6 As shown, a simulated sky image of that night can be displayed in the map view.

[0083] Based on the same inventive concept, this application also provides a simulated sky image generation device, related equipment and services. Since the principle of solving the problem by these devices, equipment and services is similar to that of the aforementioned simulated sky image generation method, the implementation of these devices, equipment and services can refer to the implementation of the aforementioned method, and repeated details will not be repeated.

[0084] The embodiment of the present application provides a simulated sky image generation device, referring to Figure 7 as shown, comprising:

[0085] The sky sphere generation module 101 is used for generating a sky sphere model including sky spherical surface data in a triangulation grid format according to the earth center coordinate and the radius, and the distance between the sky and the earth surface;

[0086] The planet image generation module 102 is used for determining a star to be generated according to the position information of the current positioning point and the current date, acquiring resource data of the star to be generated and a reference direction at a preset reference moment of the current date, and generating a star image located at the reference direction according to the resource data;

[0087] The sky image determination module 103 is used for determining a relative rotation angle of the star image and the earth according to a time interval between the current moment of the current date and the preset reference moment, and obtaining a simulated sky image of the current moment including the sky sphere model and the rotated star image by rotating the star image relative to the earth by the relative rotation angle with the earth center as a rotation center.

[0088] In one embodiment, the sky sphere generation module 101 is specifically used for determining the radius of the sky sphere model according to the earth radius and the distance between the sky and the earth surface;

[0089] According to the radius of the sky sphere model and the earth center coordinate, the sky spherical surface data in the triangulation grid format corresponding to the sky sphere model is obtained by using a preset sphere subdivision algorithm; the sky spherical surface data in the triangulation grid format includes vertex coordinates of each triangulation grid of the sky sphere model;

[0090] According to the sky spherical surface data in the triangulation grid format, the sky sphere model is generated by using an open graphics library.

[0091] In one embodiment, the planet image generation module 102 is specifically used for determining an earth hemisphere where the current positioning point is located according to the position information of the current positioning point;

[0092] According to the current date, a season where the current positioning point is located in the current date is determined;

[0093] According to the earth hemisphere where the current positioning point is located and the season, the star to be generated is determined.

[0094] In one embodiment, the planet image generation module 102 is specifically used for acquiring the resource data of each star to be generated from a resource data server;

[0095] obtain a reference azimuth of each star to be generated at a preset reference time on the current date from the azimuth data server;

[0096] determine a three-dimensional coordinate of each star to be generated according to the reference azimuth of the star to be generated at the preset reference time on the current date;

[0097] generate a virtual polygon using a preset quadrilateral partitioning algorithm with the three-dimensional coordinate of the star as the center;

[0098] generate a star image on the virtual polygon using an open graphics library according to resource data of the star.

[0099] In one embodiment, the sky image determination module 103 is specifically configured to determine a time interval between the current time on the current date and the preset reference time, and obtain a ratio of the time interval in a day;

[0100] determine a relative rotation angle of the star image and the earth according to the ratio.

[0101] In one embodiment, the device further comprises:

[0102] The newly-added effect image generation module is configured to, when the current positioning point is in daytime at the current time and the star image includes the sun, obtain an azimuth of the sun at the current time, and obtain resource data of atmospheric scattering and / or sun halo to be generated;

[0103] determine a position of the atmospheric scattering and / or sun halo to be generated in the sky sphere model according to the azimuth of the sun at the current time;

[0104] generate an atmospheric scattering and / or sun halo image at the position according to the resource data of the atmospheric scattering and / or sun halo to be generated.

[0105] In one embodiment, the newly-added effect image generation module is further configured to, when the current positioning point is in night at the current time, obtain resource data of a meteor to be generated;

[0106] generate a meteor image at a preset position in the sky sphere model according to the resource data of the meteor to be generated.

[0107] generate at least one of atmospheric scattering, sun halo and meteor in a space near a ground side of the sky sphere model.

[0108] Embodiments of the present application provide a map device, referring to Figure 8 as shown, comprising a display device 2 and the simulated sky image generation device 1 described above;

[0109] The display device 2 is configured to display the simulated sky image generated by the simulated sky image generation device 1 in a map view.

[0110] The embodiment of the present application provides a simulated sky image generation service, which executes the simulated sky image generation method.

[0111] The embodiment of the present application provides a map service, which executes the map display method.

[0112] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory and optical memory, etc.) containing computer-usable program code.

[0113] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device implemented in the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks. Figure 1 The device that implements the function specified in one or more flows and / or blocks.

[0114] These computer program instructions can also be stored in a computer-readable memory capable of guiding a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction devices, which implement the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks. Figure 1 The device that implements the function specified in one or more flows and / or blocks.

[0115] These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide a process for implementing the flowcharts and / or block diagrams. Figure 1 The function specified in one or more flows and / or blocks. Figure 1 The device that implements the function specified in one or more flows and / or blocks.

[0116] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the application can be practiced otherwise than as specifically described herein.

Claims

1. A sky image rendering method, comprising: generating a sky sphere model including sky spherical data in a triangulated mesh format according to a coordinate and a radius of a center of the earth, and a distance between the sky and the earth surface; wherein the sky sphere model is a vectorized graph including the sky spherical data in the triangulated mesh format; determining a star to be generated according to position information of a current positioning point and a current date; obtaining resource data of the star to be generated and a reference position at a reference time of a preset reference time on the current date, and generating a star image located at the reference position according to the resource data; determining a relative rotation angle of the star image and the earth according to a current time of the current date and a time interval between the reference time; rotating the star image relative to the earth by the relative rotation angle with the center of the earth as a rotation center to obtain a simulated sky image of the current time including the sky sphere model and the rotated star image. 2.The method of claim 1, wherein the generating a sky sphere model including sky spherical data in a triangulated mesh format according to a coordinate and a radius of a center of the earth, and a distance between the sky and the earth surface comprises: determining a radius of the sky sphere model according to a radius of the earth and the distance between the sky and the earth surface; obtaining sky spherical data in a triangulated mesh format corresponding to the sky sphere model using a preset sphere subdivision algorithm according to the radius of the sky sphere model and the coordinate of the center of the earth; the sky spherical data in the triangulated mesh format includes vertex coordinates of each triangulated mesh of the sky sphere model; generating the sky sphere model using an open graphics library according to the sky spherical data in the triangulated mesh format. 3.The method of claim 1, wherein the determining a star to be generated according to position information of a current positioning point and a current date comprises: determining a hemisphere of the earth where the current positioning point is located according to the position information of the current positioning point; determining a season where the current positioning point is located on the current date according to the current date; determining the star to be generated according to the hemisphere of the earth and the season. 4.The method of claim 3, wherein the obtaining resource data of the star to be generated and a reference position at a reference time of a preset reference time on the current date, and generating a star image located at the reference position according to the resource data comprises: obtaining resource data of each star to be generated from a resource data server; obtaining a reference position of each star to be generated at the reference time of the preset reference time on the current date from a position data server; determining a three-dimensional coordinate of the star according to the reference position of each star to be generated at the reference time of the preset reference time on the current date; generating a virtual polygon using a preset quadrilateral subdivision algorithm with the three-dimensional coordinate of the star as a center; generating a star image on the virtual polygon using an open graphics library according to the resource data of the star. 5.The method of any one of claims 1-4, wherein the determining a relative rotation angle of the star image and the earth according to a current time of the current date and a time interval between the reference time comprises: determining a time interval between the current time of the current date and the preset reference time, and obtaining a ratio of the time interval in a day; determining a relative rotation angle between the star image and the earth according to the ratio.

6. The method of claim 1, further comprising: when the current location point is in daytime at the current time and the star image comprises the sun, obtaining a position of the sun at the current time, and obtaining resource data of an atmospheric scattering and / or a sun halo to be generated; determining a position of the atmospheric scattering and / or the sun halo to be generated in the sky sphere model according to the position of the sun at the current time; generating an atmospheric scattering and / or a sun halo image at the position according to the resource data of the atmospheric scattering and / or the sun halo to be generated.

7. The method of claim 1, further comprising: obtaining resource data of a meteor to be generated when the current location point is in nighttime at the current time; generating a meteor image at a preset position in the sky sphere model according to the resource data of the meteor to be generated; generating at least one of the atmospheric scattering, the sun halo and the meteor in a space near a ground side of the sky sphere model.

8. A map display method, comprising: displaying the simulated sky image obtained by the method of any one of claims 1-7 in a map view.

9. A simulated sky image generation device, comprising: a sky sphere generation module configured to generate a sky sphere model comprising sky sphere data in a triangulated mesh format according to a center of the earth and a radius, and a distance between the sky and the earth surface, wherein the sky sphere model is a vectorized graph comprising the sky sphere data in the triangulated mesh format; a planet image generation module configured to determine a star to be generated according to position information of a current location point and a current date, obtain resource data of the star to be generated and a reference position at a preset reference time of the current date, and generate a star image at the reference position according to the resource data; a sky image determination module configured to determine a relative rotation angle between a star image and the earth according to a time interval between a current time of the current date and the preset reference time, and obtain a simulated sky image at the current time comprising the sky sphere model and the rotated star image by rotating the star image relative to the earth by the relative rotation angle with the center of the earth as a rotation center.

10. A mapping device comprising: a display device and the simulated sky image generation device of claim 9; the display device is configured to display the simulated sky image generated by the simulated sky image generation device in a map view.

11. A computer program product, wherein the program runs to execute the simulated sky image generation method of any one of claims 1-7.

12. A computer program product, wherein the program runs to execute the map display method of claim 8.

Citation Information

Patent Citations

  • Large-scale scene virtual sky modeling method under condition of multi-viewpoint multi-view-angle view field displaying

    CN103456039A

  • Method and device for displaying sky sphere in game scene

    CN106355635A