Ar rendering method and device based on nine-square grid
By using a nine-grid-based AR rendering method, the terminal grid is determined and virtual data is loaded using location information. This solves the problems of long rendering time and unsmooth switching in existing technologies, achieving efficient and smooth AR rendering effects and reducing device requirements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE GROUP DESIGN INST
- Filing Date
- 2022-03-10
- Publication Date
- 2026-04-28
AI Technical Summary
In existing AR rendering technologies, overall rendering is time-consuming and requires high device performance, while local fixed-point rendering switching is not smooth enough, affecting the user experience.
A nine-grid-based rendering method is adopted. By obtaining the rendering terminal position information, the terminal grid is determined, the virtual data of the surrounding nine grids is loaded, and when the position changes, the overlapping grid data is retained, and only the non-overlapping grid data is loaded, thereby reducing the consumption of computing resources.
It improves the smoothness of AR rendering and reduces device performance requirements, reduces device load, ensures zero latency when switching scenes, and enhances the user experience.
Smart Images

Figure CN116777756B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of AR rendering technology, specifically to an AR rendering method and apparatus based on a nine-grid layout. Background Technology
[0002] AR (Augmented Reality) is a new technology that seamlessly integrates the real world with virtual data. It uses computer technology to simulate and overlay virtual information (such as visual information, sound, smell, and touch) that is difficult to experience in a specific time and space in the real world. This virtual data is applied to the real world and perceived by human senses, achieving a sensory experience that transcends reality. The real environment and virtual objects are superimposed in real time onto the same screen or space, existing simultaneously. AR rendering is the process of overlaying virtual data onto the real world and displaying it in a perceptible way. In AR rendering, most existing technologies use two methods: overall rendering and partial point-to-point rendering. Each has its advantages and disadvantages. Overall rendering offers smooth transitions but is time-consuming and requires high-performance equipment. Partial point-to-point rendering renders only a local area of the device, taking less time and having relatively lower performance requirements, but in practical use, the transitions are not smooth enough, affecting the user experience. Summary of the Invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide an AR rendering method and apparatus based on a nine-grid layout that overcomes or at least partially solves the above problems.
[0004] According to one aspect of the present invention, an AR rendering method based on a nine-grid layout is provided, the method comprising:
[0005] Obtain the real-time location information of the rendering terminal in the real world, and determine the first terminal grid where the rendering terminal is located based on the location information and preset grid rules;
[0006] The virtual data of the corresponding positions of the first peripheral nine-grid is calculated, obtained, and loaded, and then rendered, with the first terminal grid as the center.
[0007] After detecting a change in the real-time position information of the rendering terminal, the second terminal grid corresponding to the changed position information is determined.
[0008] Determine the corresponding positions of the second surrounding nine-square grid cells centered on the second terminal grid;
[0009] Based on the corresponding positions of the loaded first perimeter nine-grid grid, determine the overlapping grids with the corresponding positions of the second perimeter nine-grid grid; retain the virtual data corresponding to the overlapping grids, calculate, obtain, and load the virtual data corresponding to the non-overlapping grids in the second perimeter nine-grid grid for rendering.
[0010] According to another aspect of the present invention, a nine-grid-based AR rendering device is provided, comprising:
[0011] The first terminal grid module is adapted to obtain the real-time location information of the rendering terminal in the real world, and determine the first terminal grid where the rendering terminal is located based on the location information and preset grid rules.
[0012] The first loading module is adapted to determine the virtual data of the corresponding position of the first peripheral nine-square grid grid as the center and to render it.
[0013] The second terminal grid module is adapted to detect changes in the real-time position information of the rendering terminal and determine the second terminal grid corresponding to the changed position information.
[0014] The second loading module is adapted to determine the corresponding position of the second peripheral nine-grid grid centered on the second terminal grid; determine the overlapping grid with the corresponding position of the second peripheral nine-grid grid based on the already loaded first peripheral nine-grid grid; retain the virtual data corresponding to the overlapping grid; calculate, obtain and load the virtual data corresponding to the non-overlapping grid in the second peripheral nine-grid grid for rendering.
[0015] According to another aspect of the present invention, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus;
[0016] The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the above-described 3x3 grid-based AR rendering method.
[0017] According to another aspect of the present invention, a computer storage medium is provided, the storage medium storing at least one executable instruction, the executable instruction causing a processor to perform operations corresponding to the above-described 3x3 grid-based AR rendering method.
[0018] The AR rendering method and apparatus based on a nine-grid structure provided by embodiments of the present invention, for scenes using AR rendering on a large scale, first calculates the virtual data corresponding to the positions of the first surrounding nine-grid structure and loads and renders it. Compared to rendering all virtual data at once, this method requires less time and places lower demands on the equipment. Furthermore, using a nine-grid structure as the shape for loading and rendering, the entire nine-grid is loaded during the first loading. When the position information changes and the corresponding rendering virtual data changes, the virtual data of the already loaded overlapping grids can be retained and reused. Only the virtual data of the newly added grids needs to be loaded, saving computing resources and accelerating the AR rendering speed. During the rendering process of AR scene transitions, the rendering is smooth and without delay, reducing the requirements for the rendering terminal and not affecting the user experience.
[0019] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific implementation methods of the embodiments of the present invention are described below. Attached Figure Description
[0020] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0021] Figure 1 A flowchart of a nine-grid-based AR rendering method according to an embodiment of the present invention is shown;
[0022] Figure 2a This diagram illustrates a horizontally loaded virtual data rendering process.
[0023] Figure 2b This diagram illustrates a vertical bidirectional loading and rendering of virtual data.
[0024] Figure 2c This diagram illustrates a process of loading virtual data vertically upwards for rendering.
[0025] Figure 2d This diagram illustrates a loading and rendering process involving switching center points.
[0026] Figure 3 A schematic diagram of the structure of a nine-grid-based AR rendering device according to an embodiment of the present invention is shown;
[0027] Figure 4A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown. Detailed Implementation
[0028] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0029] Figure 1 A flowchart of a nine-grid-based AR rendering method according to an embodiment of the present invention is shown, as follows: Figure 1 As shown, the method includes the following steps:
[0030] Step S101: Obtain the real-time location information of the rendering terminal in the real world, and determine the first terminal grid where the rendering terminal is located based on the location information and preset grid rules.
[0031] In this embodiment, the rendering terminal can be a portable mobile terminal such as a mobile phone or watch that supports AR function. The device requirements for the rendering terminal are low, and a smooth rendering effect can be achieved.
[0032] With user authorization, the real-time location information of the rendering terminal in the real world can be obtained. This location information includes latitude and longitude, horizontal and vertical coordinates, and the rendering terminal's orientation. Based on the latitude and longitude information, the first terminal grid where the rendering terminal is located can be determined. Specifically, preset grid rules can be set in advance, dividing the grid according to latitude and longitude information, such as grouping the same latitude and longitude information into the same grid. Preset grid rules can divide the grid into different sizes based on different precision requirements, such as dividing to four decimal places of the latitude and longitude information. The preset grid rules affect the grid size and can be set according to the implementation situation; no limitation is made here.
[0033] Step S102: Determine the first terminal grid as the center, calculate, obtain, and load the virtual data of the corresponding positions of the first surrounding nine-grid grid for rendering.
[0034] After determining the first terminal grid, the location information is sent to the server. The server, in the background, can determine the virtual data corresponding to the real world based on the location information. The virtual data can be pre-built, such as based on geographical areas like cities, and then rasterized and sliced according to preset grid specifications. Rasterization involves creating a correspondence between the virtual data and latitude / longitude information, establishing a relationship between each grid and the virtual data, facilitating subsequent loading of virtual data according to the grid. Slicing takes into account that the objects corresponding to the virtual data have height; during subsequent loading, the corresponding height can be loaded in slices, avoiding excessive demands on the rendering terminal's equipment from loading all virtual data at once. Furthermore, the server first determines the corresponding virtual data to be loaded based on the location information, reducing the workload of the rendering terminal in fetching and loading all virtual data at once.
[0035] After receiving the virtual data returned by the server, the rendering terminal determines the virtual data corresponding to the first terminal raster based on the rasterized and sliced virtual data. Since the virtual data itself is already rasterized, the server can determine the virtual data corresponding to the position of the first perimeter nine-grid grid centered on the first terminal raster in the first direction by comparing it with the first terminal raster in the background. The rendering terminal can then horizontally load the virtual data corresponding to the position of the first perimeter nine-grid grid according to the shape of the nine-grid grid. Here, the first direction is parallel to the ground. The loading and rendering effect is as follows... Figure 2a As shown, the central triangular grid is the first terminal grid. Centered on the first terminal grid, it, along with the surrounding grids, forms the first peripheral nine-grid grid. Virtual data is loaded and rendered according to each grid. Centered on the first terminal grid, the first peripheral nine-grid grid is loaded horizontally in a 360-degree radius. When only the orientation information of the rendering terminal changes (e.g., according to the orientation information obtained by the rendering terminal's sensors), such as changing from facing east to facing west, the virtual data can be seamlessly viewed in 360 degrees without reloading and rendering.
[0036] Furthermore, during horizontal loading, in addition to loading the first peripheral nine-grid grid centered on the first terminal grid, the loading can be extended for higher-performance rendering devices based on their performance. For example, if the virtual data corresponding to multiple grid layers surrounding the first terminal grid in a 360-degree radius along the first direction is determined, the virtual data corresponding to each surrounding grid layer is loaded horizontally outward from the first terminal grid in the first direction. During loading, the virtual data corresponding to the first terminal grid is loaded first, and then the virtual data corresponding to each grid layer is loaded sequentially from the inside out, according to the following formula: f(n)=(2n+1) 2 -(2n-1) 2Where n is the number of layers, according to the above formula, virtual data corresponding to 8 grids, 16 grids, 24 grids, etc., are loaded sequentially from the inside out, such as... Figure 2a As shown, after loading and rendering the first terminal grid containing the triangle, the virtual data corresponding to the first and second layer grids surrounding the first terminal grid are rendered sequentially from the inside out. The specific number of layers loaded depends on the device performance of the rendering terminal.
[0037] While horizontally loading and rendering virtual data, the height of the corresponding object is determined based on the rasterized and sliced virtual data. Virtual data corresponding to the horizontal height information and position information is then loaded vertically in a second direction until all object heights corresponding to the virtual data in that second direction have been loaded. The second direction is perpendicular to the ground.
[0038] Specifically, for example, the rendering terminal's sensors can be used to obtain the horizontal height information of the rendering terminal in the real world, and the height of the corresponding ground can be calculated based on the horizontal height information of the location information, such as the rendering terminal being 20 meters above the ground.
[0039] Determine if the rendering terminal's height is higher than a preset ground level. If it's 3 meters higher, considering the user's hand height, 3 meters above the ground is approximately the height of the second floor. If so, load virtual data in both upward and downward directions, starting from the rendering terminal's height. Figure 2b As shown, the grid containing the triangle is the first terminal grid, and the horizontal row represents the height of the rendering terminal. Starting from this horizontal row, virtual data is loaded simultaneously in both upward and downward directions, and virtual data of the first preset height threshold is loaded vertically in sequence. Figure 2b The first preset height threshold is 2 rows. Figure 2b The leftmost image loads two rows of virtual data in both the upward and downward directions for the first time; Figure 2b The middle image loads two rows of virtual data in both the upward and downward directions for the second time; Figure 2b In the rightmost image, it's determined that the downward loading has reached the ground. The third loading only loads two rows of virtual data upwards, continuing until the height of the object corresponding to the virtual data in the second direction is fully loaded. Here, the first preset height threshold can be determined based on the implementation and the performance of the rendering device; it is not limited here. After each upward and downward loading of virtual data, it can be further determined whether it has reached the ground. If it has, and only upward loading is needed, the loading can be adjusted to load virtual data at a second preset height threshold, which is greater than the first preset height threshold.
[0040] If the height of the rendering terminal is determined to be no higher than a preset ground value, and if the user is using the rendering terminal on the ground, then virtual data of the second preset height threshold is loaded vertically upwards in the second direction, starting from the height. Figure 2c As shown, the grid containing the triangle is the first terminal grid, and the horizontal row represents the height of the rendering terminal. Starting from this horizontal row, virtual data is loaded upwards, and virtual data of the second preset height threshold is loaded vertically in sequence. Figure 2c The second preset height threshold is 5 rows. Figure 2c The leftmost image loads 5 rows of virtual data upwards for the first time; Figure 2c In the rightmost image, four rows of virtual data are loaded upwards for the second time. At this point, the height of the object corresponding to the virtual data in the second direction has been fully loaded.
[0041] In this embodiment, rendering is real-time. Users can freely switch directions and change positions while using the rendering terminal. Rendering is performed in real-time based on the latitude and longitude information of the rendering terminal, as well as horizontal and directional information obtained from sensors such as gyroscopes. This allows users to understand AR information within a certain range of their location in real time, without needing to pre-bind their movement route—what you see is what you get. Simultaneously, it supports the overlapping display of large-scale virtual data with the real world, such as recognizing typical buildings and tall buildings, loading virtual data in both horizontal and vertical directions, and comprehensively displaying the distribution of virtual data in the real world.
[0042] Step S103: After detecting a change in the real-time position information of the rendering terminal, determine the second terminal grid corresponding to the changed position information.
[0043] After the user initially loads and renders the virtual data, the rendering terminal can monitor its position information in real time. If a change in the rendering terminal's real-time position information is detected, the corresponding second terminal grid can be determined based on the changed position information. Here, the rendering terminal can determine whether the second terminal grid and the first terminal grid are the same grid. If they are, and the user's movement speed is low, such as walking, and the user remains within the same grid after moving, no grid change is caused, so there is no need to reload new virtual data. If the user has moved to another grid, causing a grid change, then step 104 is executed.
[0044] Step S104: Determine the corresponding positions of the second peripheral nine-grid cells centered on the second terminal grid.
[0045] Based on the transformed second terminal grid, the corresponding positions of the second surrounding nine-grid cells centered on the second terminal grid can be redefined, such as... Figure 2d As shown, Figure 2d In the image on the left, the grid containing the triangle is the first terminal grid. After the rendering terminal position information changes, the second terminal grid becomes... Figure 2d In the image on the right, the center point of the grid cell containing the triangle changes, resulting in... Figure 2dThe corresponding positions of the second perimeter nine-grid grid centered on the second terminal grid in the image on the right.
[0046] Step S105: Based on the corresponding positions of the loaded first peripheral nine-grid grid, determine the overlapping grids with the corresponding positions of the second peripheral nine-grid grid; retain the virtual data corresponding to the overlapping grids, and obtain the virtual data corresponding to the non-overlapping grids in the loaded second peripheral nine-grid grid for rendering.
[0047] Based on the positions of the loaded first perimeter nine-square grid, the overlapping grid cells with the corresponding positions of the second perimeter nine-square grid can be determined. For example... Figure 2d As shown, the overlapping grid cells are the 3rd and 4th cells in the 2nd row, the 3rd and 4th cells in the 3rd row, and the 3rd and 4th cells in the 4th row. The virtual data corresponding to the overlapping grid cells is retained. Only the virtual data corresponding to the non-overlapping grid cells in the second surrounding nine-grid area needs to be obtained. Figure 2d The virtual data corresponding to the 5th grid in the 2nd row, the 5th grid in the 3rd row, and the 5th grid in the 4th row can be loaded and rendered, greatly reducing the amount of virtual data that needs to be loaded and rendered, thus saving loading time. By retaining the already loaded virtual data, only the virtual data corresponding to the non-overlapping grids needs to be requested from the server, reducing the amount of virtual data calculation in the server's background and also reducing the amount of virtual data loaded at one time, thus lowering the requirements for the rendering terminal's device. Furthermore, since the virtual data corresponding to the first perimeter nine-grid grid has already loaded the virtual data of the second terminal grid, a smooth display of virtual data switching can be ensured.
[0048] Optionally, this embodiment may further include the following steps:
[0049] Step S106: Monitor whether the real-time position information of the rendering terminal has not changed for more than a preset time.
[0050] Considering the possibility of issues such as rendering terminal crashing or slow response within a certain period of time, if the real-time position information of the rendering terminal has not changed for more than a preset time, such as 3 minutes, step S107 can be executed to re-acquire the real-time position information of the rendering terminal to determine the corresponding third terminal grid. This ensures that the AR rendering effect matches the position information of the rendering terminal and avoids the virtual data remaining in the previous position information due to changes in position information, which would affect the user's viewing of AR rendering.
[0051] Step S107: Reacquire the real-time position information of the rendering terminal to determine the corresponding third terminal grid, and determine whether the third terminal grid and the first terminal grid are the same grid.
[0052] Based on the real-time location information of the re-acquired rendering terminal, determine the corresponding third terminal grid, and determine whether the third terminal grid and the first terminal grid are the same grid. If they are, there is no need to reload new virtual data; otherwise, proceed to step S108.
[0053] Step S108: Determine the corresponding position of the third peripheral nine-grid centered on the third terminal grid; determine the overlapping grid with the corresponding position of the third peripheral nine-grid centered on the already loaded first peripheral nine-grid centered grid; retain the virtual data corresponding to the overlapping grid, and obtain the virtual data corresponding to the non-overlapping grid in the loaded third peripheral nine-grid centered grid.
[0054] Based on the newly determined third terminal grid, the corresponding positions of the third surrounding nine-square grid cells centered on the third terminal grid can be determined. Refer to the description of step S104; it will not be repeated here.
[0055] Based on the positions of the loaded first perimeter nine-grid grid, the overlapping grids with the corresponding positions of the third perimeter nine-grid grid can be determined. The virtual data corresponding to the overlapping grids is retained. Only the virtual data corresponding to the non-overlapping grids in the third perimeter nine-grid grid needs to be obtained. This can be achieved by requesting the virtual data corresponding to the non-overlapping grids from the server for loading and rendering. Refer to the description of step S105; it will not be repeated here.
[0056] The execution order of steps S106-S108 and steps S103-S105 is not limited; each step is executed according to the monitoring results.
[0057] This embodiment retains the virtual data of the overlapping grids already loaded in the previous area, which can be applied to AR rendering and display in a larger area, improving the user experience and making switching smoother.
[0058] According to the nine-grid-based AR rendering method provided in this embodiment of the invention, for scenes using AR rendering on a large scale, the virtual data corresponding to the positions of the first surrounding nine-grid is calculated and loaded for rendering. Compared to rendering all virtual data at once, this method requires less time and has lower requirements on the device. Furthermore, using a nine-grid as the shape for loading and rendering, the entire nine-grid is loaded during the first loading. When the position information changes and the corresponding rendering virtual data changes, the virtual data of the already loaded overlapping grids can be retained and reused. Only the virtual data of the newly added grids needs to be loaded, saving computing resources and accelerating the AR rendering speed. During the rendering process of AR scene transitions, the rendering is smooth and without delay, reducing the requirements for the rendering terminal and not affecting the user experience.
[0059] Figure 3 A schematic diagram of the structure of an AR rendering device based on a nine-grid layout provided in an embodiment of the present invention is shown. Figure 3 As shown, the device includes:
[0060] The first terminal grid module 310 is adapted to acquire the real-time location information of the rendering terminal in the real world, and determine the first terminal grid where the rendering terminal is located based on the location information and preset grid rules.
[0061] The first loading module 320 is adapted to determine the virtual data of the corresponding position of the first peripheral nine-square grid grid with the first terminal grid as the center for rendering;
[0062] The second terminal grid module 330 is adapted to detect changes in the real-time position information of the rendering terminal and determine the second terminal grid corresponding to the changed position information.
[0063] The second loading module 340 is adapted to determine the corresponding position of the second peripheral nine-grid grid centered on the second terminal grid; determine the overlapping grid with the corresponding position of the second peripheral nine-grid grid based on the already loaded first peripheral nine-grid grid; retain the virtual data corresponding to the overlapping grid; calculate, obtain and load the virtual data corresponding to the non-overlapping grid in the second peripheral nine-grid grid for rendering.
[0064] Optionally, the location information includes latitude and longitude information, horizontal and vertical information, and / or direction information.
[0065] Optionally, the device further includes: a judgment module 350, adapted to determine whether the second terminal grid and the first terminal grid are the same grid; if not, to execute the second loading module 340.
[0066] Optionally, the device further includes: a third terminal grid module 360, adapted to monitor whether the real-time position information of the rendering terminal has not changed for more than a preset time; if so, to re-acquire the real-time position information of the rendering terminal to determine the corresponding third terminal grid, and to determine whether the third terminal grid and the first terminal grid are the same grid; if not, to determine the corresponding position of the third peripheral nine-square grid centered on the third terminal grid; to determine the overlapping grid with the corresponding position of the third peripheral nine-square grid based on the already loaded first peripheral nine-square grid; to retain the virtual data corresponding to the overlapping grid, and to calculate, acquire and load the virtual data corresponding to the non-overlapping grid in the third peripheral nine-square grid for rendering.
[0067] Optionally, the first loading module 320 is further adapted to: send location information to the server so that the server can determine the corresponding virtual data based on the location information; pre-construct the virtual data and perform rasterization and slicing processing according to a preset grid specification; receive the virtual data returned by the server, determine the virtual data corresponding to the first terminal grid based on the rasterized and sliced virtual data, and determine the virtual data corresponding to the position of the first peripheral nine-square grid centered on the first terminal grid in the first direction, and horizontally load the virtual data corresponding to the position of the first peripheral nine-square grid for rendering; the first direction is a direction parallel to the ground; determine the height of the object corresponding to the virtual data based on the rasterized and sliced virtual data; vertically load the virtual data corresponding to the horizontal height information of the location information in the second direction for rendering, until the height of the object corresponding to the virtual data in the second direction is fully loaded; the second direction is a direction perpendicular to the ground.
[0068] Optionally, the first loading module 320 is further adapted to: determine the virtual data corresponding to the first terminal grid based on the virtual data after rasterization and slicing, and determine the virtual data corresponding to the multi-layer grids surrounding the first terminal grid in a 360-degree radius in a first direction; and load and render the virtual data corresponding to each layer of grids in a horizontally outward manner in a first direction centered on the first terminal grid.
[0069] Optionally, the first loading module 320 is further adapted to: calculate the height of the corresponding ground according to the horizontal height information of the position information; determine whether the height of the rendering terminal is higher than the ground preset value; if so, then render virtual data of the first preset height threshold sequentially in both the upward and downward directions according to the second direction, starting from the height of the rendering terminal, until the height of the object corresponding to the virtual data in the second direction is fully loaded; if not, then render virtual data of the second preset height threshold sequentially in the upward direction, starting from the height of the rendering terminal, until the height of the object corresponding to the virtual data in the second direction is fully loaded.
[0070] The descriptions of the above modules refer to the corresponding descriptions in the method embodiments, and will not be repeated here.
[0071] This invention also provides a non-volatile computer storage medium storing at least one executable instruction that can execute the 3x3 grid-based AR rendering method in any of the above method embodiments.
[0072] Figure 4 The diagram illustrates the structure of a computing device according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computing device.
[0073] like Figure 4 As shown, the computing device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0074] Its features are:
[0075] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408.
[0076] Communication interface 404 is used to communicate with other network elements such as clients or other servers.
[0077] The processor 402 is used to execute program 410, which can specifically execute the relevant steps in the above-described embodiment of the AR rendering method based on the nine-grid.
[0078] Specifically, program 410 may include program code that includes computer operation instructions.
[0079] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computing device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0080] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0081] Specifically, program 410 can be used to cause processor 402 to execute the nine-grid-based AR rendering method in any of the above method embodiments. The specific implementation of each step in program 410 can be found in the corresponding descriptions of the steps and units in the above nine-grid-based AR rendering embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0082] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the embodiments of the present invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing preferred embodiments of the present invention.
[0083] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0084] Similarly, it should be understood that, in order to streamline the embodiments of the invention and aid in understanding one or more of the various inventive aspects, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, characterized in that each claim itself is a separate embodiment of the invention.
[0085] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0086] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0087] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The embodiments of the present invention can also be implemented as device or apparatus programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such programs implementing the embodiments of the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0088] It should be noted that the above embodiments are illustrative of the present invention and not restrictive of the invention, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the present invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. An AR rendering method based on a nine-grid layout, characterized in that, The methods include: Obtain the real-time location information of the rendering terminal in the real world, and determine the first terminal grid where the rendering terminal is located based on the location information and preset grid rules; The process involves determining virtual data centered on the first terminal grid, calculating and loading virtual data corresponding to the positions of the first surrounding nine-square grid for rendering; wherein, the position information is sent to the server so that the server can determine the corresponding virtual data based on the position information; the virtual data is pre-constructed and rasterized and sliced according to a preset grid specification; receiving virtual data returned by the server, determining virtual data corresponding to the first terminal grid based on the rasterized and sliced virtual data, and determining virtual data corresponding to the positions of the first surrounding nine-square grid at 360 degrees centered on the first terminal grid in a first direction, and horizontally loading the virtual data corresponding to the positions of the first surrounding nine-square grid for rendering; the first direction is parallel to the ground; determining the height of the object corresponding to the virtual data based on the rasterized and sliced virtual data; and vertically loading virtual data corresponding to the horizontal height information of the position information in a second direction for rendering until the height of the object corresponding to the virtual data in the second direction is fully loaded; the second direction is perpendicular to the ground; the position information includes latitude and longitude information, horizontal height information, and / or direction information. After detecting a change in the real-time position information of the rendering terminal, the second terminal grid corresponding to the changed position information is determined. Determine the corresponding positions of the second peripheral nine-square grid cells centered on the second terminal grid; Based on the corresponding positions of the loaded first peripheral nine-square grid, determine the overlapping grids with the corresponding positions of the second peripheral nine-square grid; retain the virtual data corresponding to the overlapping grids, calculate, obtain, and load the virtual data corresponding to the non-overlapping grids in the second peripheral nine-square grid for rendering.
2. The method according to claim 1, characterized in that, After detecting a change in the real-time position information of the rendering terminal and determining the second terminal grid corresponding to the changed position information, the method further includes: Determine whether the second terminal grid and the first terminal grid are the same grid; If not, proceed with the step of determining the corresponding position of the second peripheral nine-square grid centered on the second terminal grid.
3. The method according to claim 1, characterized in that, The method further includes: Whether the real-time position information of the rendering terminal has not changed for more than a preset time; If so, reacquire the real-time position information of the rendering terminal to determine the corresponding third terminal grid, and determine whether the third terminal grid and the first terminal grid are the same grid; If not, determine the corresponding position of the third peripheral nine-square grid centered on the third terminal grid; Based on the corresponding positions of the loaded first peripheral nine-square grid, determine the overlapping grids with the corresponding positions of the third peripheral nine-square grid; retain the virtual data corresponding to the overlapping grids, calculate, obtain, and load the virtual data corresponding to the non-overlapping grids in the third peripheral nine-square grid for rendering.
4. The method according to claim 1, characterized in that, The rendering of the virtual data corresponding to the positions of the first peripheral nine-square grid grid by horizontal loading further includes: Based on the virtual data after rasterization and slicing, determine the virtual data corresponding to the first terminal raster, and determine the virtual data corresponding to the multi-layer raster 360 degrees around the first terminal raster in the first direction. Rendering is performed by loading virtual data corresponding to each surrounding raster layer in a horizontal, outward-expanding manner centered on the first terminal raster in the first direction.
5. The method according to claim 1, characterized in that, The step of rendering virtual data corresponding to the horizontal height information of the position information by vertically loading it in the second direction until the height of the object corresponding to the virtual data in the second direction is fully loaded further includes: Calculate the corresponding ground height based on the horizontal height information of the location information; Determine whether the height of the rendering terminal is higher than a preset value on the ground; If so, then according to the second direction, starting from the height of the rendering terminal, virtual data of the first preset height threshold is loaded vertically in both the upward and downward directions for rendering, until the height of the object corresponding to the virtual data in the second direction is fully loaded; If not, then according to the second direction, starting from the height of the rendering terminal, virtual data of the second preset height threshold is loaded vertically upwards sequentially for rendering until the height of the object corresponding to the virtual data in the second direction is fully loaded.
6. An AR rendering device based on a nine-grid layout, characterized in that the device comprises: The first terminal grid module is adapted to acquire the real-time location information of the rendering terminal in the real world, and determine the first terminal grid where the rendering terminal is located based on the location information and preset grid rules. The first loading module is adapted to determine, with the first terminal grid as the center, calculate, acquire, and load virtual data corresponding to the position of the first peripheral nine-square grid for rendering; wherein, the position information is sent to the server so that the server can determine the corresponding virtual data based on the position information; the virtual data is pre-constructed and rasterized and sliced according to a preset grid specification; the module receives virtual data returned by the server, determines the virtual data corresponding to the first terminal grid based on the rasterized and sliced virtual data, and determines the virtual data corresponding to the position of the first peripheral nine-square grid at a 360-degree angle centered on the first terminal grid in a first direction, and horizontally loads the virtual data corresponding to the position of the first peripheral nine-square grid for rendering; the first direction is a direction parallel to the ground; the module determines the height of the object corresponding to the virtual data based on the rasterized and sliced virtual data; and vertically loads the virtual data corresponding to the horizontal height information of the position information in a second direction for rendering until the height of the object corresponding to the virtual data in the second direction is fully loaded; the second direction is a direction perpendicular to the ground; the position information includes latitude and longitude information, horizontal height information, and / or direction information. The second terminal grid module is adapted to detect changes in the real-time position information of the rendering terminal and determine the second terminal grid corresponding to the changed position information. The second loading module is adapted to determine the corresponding position of the second peripheral nine-grid grid centered on the second terminal grid; determine the overlapping grid with the corresponding position of the second peripheral nine-grid grid based on the already loaded first peripheral nine-grid grid; retain the virtual data corresponding to the overlapping grid; calculate, obtain and load the virtual data corresponding to the non-overlapping grid in the second peripheral nine-grid grid for rendering.
7. A computing device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the 3x3 grid-based AR rendering method as described in any one of claims 1-5.
8. A computer storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the 3x3 grid-based AR rendering method as described in any one of claims 1-5.
Citation Information
Patent Citations
Apparatus and method of image rendering
CN106997612A
Method and device for rendering virtual object in virtual environment, equipment and medium
CN112884873A