Game display control method and device

By adding a prefabricated mesh model to the game scene and performing spherical processing, combined with the rendering map, the problem of vertex offset depending on the number of faces in the existing technology is solved, an efficient presentation of spherical surface effects is achieved, and performance consumption is reduced.

CN113230659BActive Publication Date: 2024-10-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110626860.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-04
Publication Date
2024-10-18
Estimated Expiration
2041-06-04

AI Technical Summary

Technical Problem

In the prior art, when the vertex offset operation is performed on the in-game model on the shader to simulate the spherical surface effect, it depends on the number of vertices of the surface model, cannot be applied to any model, and can easily lead to excessive performance consumption.

Method used

By adding prefabricated mesh models to the game scene and spherical processing, combined with the use of rendering maps, the spherical surface effect is achieved, bypassing the need for high-polygon models and reducing the output of art resources. and performance consumption.

Benefits of technology

It achieves high-quality spherical surface effects without modifying the original model, reduces performance consumption, and optimizes the performance of spherical surfaces, saving time and effort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113230659B_ABST
    Figure CN113230659B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a display control method and device for a game, wherein the method comprises: sampling the background of a game scene to obtain a sampling scene, and adding a low-poly model corresponding to a standard model required by the game scene to the sampling scene; obtaining a rendering map according to the sampling scene and the low-poly model; adding a prefabricated mesh model to the game scene; sphericalizing the prefabricated mesh model to obtain a target mesh model; and rendering the target mesh model using the rendering map to present a game screen with a spherical surface effect on a graphical user interface. By adding the standard model required by the game scene to the sampling scene and outputting it in the form of a rendering map, the high-polygon requirement for the standard model required by the game scene is circumvented, and the effect of a spherical surface can be achieved without modifying any original model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graphics processing technology, and in particular to a game display control method and a game display control device. Background Art

[0002] In some games, in order to enhance the visual effects of the game, when the perspective is switched, the horizon of the game scene can be curled like a sphere to form a parallax effect, and all objects in the game scene are placed close to the surface of the sphere. When the horizon is curled, the objects in the game scene are also curled synchronously, which has a strong visual effect. For example, in the Animal Crossing game, when the perspective is switched, the horizon can be curled like a sphere to form a parallax effect. In the prior art, this solution usually performs vertex offset operations on all models in the game on the shader, with the world coordinates of the main camera or the protagonist in the game as the center point, and the distance between each vertex on the shader and the center point is calculated, and the square of the distance is used as the offset value of the vertex. In this way, the surface offset effect of the model vertex can be approximately simulated. The farther the model is from the center point, the greater its curvature.

[0003] However, the solution of the prior art has an obvious disadvantage, which is that it is more dependent on the number of vertices of the surface model, that is, the number of faces of the surface model. When the number of faces of the surface model is high, a sphere can be represented relatively smoothly. However, if the number of faces of a surface model is too low, for example, assuming a square composed of only 4 vertices, the curvature of the sphere cannot be represented by the solution of the prior art. Therefore, this solution cannot be applied to any model. It is usually necessary to increase the number of faces of the model to produce a better curved surface effect, which can easily cause the problem of excessive performance consumption of the game. Summary of the invention

[0004] In view of the fact that the above-mentioned method of achieving a spherical surface effect by performing vertex offset operations on all models in the game on the shader depends on the number of vertices of the surface model, cannot be applied to any model, and easily causes the problem of excessive performance consumption of the game, an embodiment of the present invention is proposed to provide a game display control method and a corresponding game display control device that overcome the above-mentioned problems or at least partially solve the above-mentioned problems.

[0005] The embodiment of the present invention discloses a game display control method, comprising:

[0006] Sampling the background of the game scene to obtain a sampled scene, and adding a low-poly model corresponding to the standard model required by the game scene to the sampled scene;

[0007] Obtaining a rendering map according to the sampling scene and the low-poly model;

[0008] Adding a prefabricated mesh model to the game scene, wherein the prefabricated mesh model includes a plurality of meshes of different densities;

[0009] Performing spherical processing on the prefabricated mesh model to obtain a target mesh model;

[0010] The target mesh model is rendered using the rendering map to present a game screen with a spherical surface effect on a graphical user interface.

[0011] Optionally, the density of the grid of the prefabricated grid model gradually decreases from the center to the edge of the prefabricated grid model.

[0012] Optionally, the prefabricated grid model is in the shape of a disk.

[0013] Optionally, the game scene is photographed by a first camera, and the sample scene is photographed by a second camera.

[0014] Optionally, the prefabricated mesh model and the first camera remain relatively still, and the displacement of the second camera is consistent with that of the first camera.

[0015] Optionally, the method further comprises:

[0016] When the first camera moves, the perspective of shooting the game scene by the first camera switches. When the perspective switches, the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere.

[0017] Optionally, when the first camera moves, the perspective of the game scene captured by the first camera switches, and when the perspective of the game scene switches, the horizon of the game scene included in the game screen presents a parallax effect of a spherical rotation, including:

[0018] When the first camera moves, the second camera is controlled to move along with the first camera, and a sampling scene corresponding to the background of each frame of the game scene is obtained by shooting with the second camera, a low-poly model of a standard model required by the game scene of the current frame is added to each frame of the sampling scene, and a rendering map corresponding to each frame of the sampling scene is generated;

[0019] Controlling the prefabricated mesh model to move along with the first camera to generate a target mesh model corresponding to each frame of the prefabricated mesh model;

[0020] The target grid model is rendered frame by frame using the rendering map, so that the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere.

[0021] Optionally, the step of performing spherical processing on the prefabricated mesh model to obtain a target mesh model includes:

[0022] Each vertex in the prefabricated mesh model is subjected to an offset process to obtain a target mesh model of the curved surface.

[0023] The embodiment of the present invention further discloses a game display control device, comprising:

[0024] A sampling scene sampling module is used to sample the background of the game scene to obtain a sampling scene, and add a low-poly model corresponding to the standard model required by the game scene to the sampling scene;

[0025] A rendering map generation module, used to obtain a rendering map according to the sampling scene and the low-poly model;

[0026] A mesh model adding module, used to add a prefabricated mesh model to a main scene corresponding to the game scene, wherein the prefabricated mesh model includes a plurality of meshes of different densities;

[0027] A spherical processing module, used for performing spherical processing on the prefabricated mesh model to obtain a target mesh model;

[0028] A rendering module is used to render the target mesh model using the rendering map to present a game screen with a spherical surface effect on a graphical user interface.

[0029] The embodiment of the present invention further discloses an electronic device, including:

[0030] A processor and a storage medium, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the method as described in any one of the embodiments of the present invention.

[0031] An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the embodiments of the present invention is executed.

[0032] The embodiments of the present invention include the following advantages:

[0033] In an embodiment of the present invention, by adding a low-poly model corresponding to the standard model required for the game scene to the sampling scene, and rendering each frame of the sampling scene and the low-poly model to obtain a corresponding rendering map, and by adding a prefabricated mesh model to the game scene, after sphericalizing the prefabricated mesh model, using the rendering map to render the obtained target mesh model, so as to present a game screen with a spherical surface effect on the graphical user interface. By adding the low-poly model of the standard model required for the game scene to the sampling scene and outputting it in the form of a rendering map, the requirement for a high number of faces of the standard model required for the game scene is circumvented, and a high-quality spherical surface effect can be achieved without modifying any original model, so that the original model on the game scene can be completely retained, and while reducing the output of art resources, an excellent spherical surface effect can be achieved, saving time and effort, and not prone to the problem of excessive performance consumption. Moreover, by using prefabricated mesh models, the mesh density of the prefabricated mesh models at different distance ranges can be finely adjusted according to the characteristic that the curved terrain is mainly visible at the center distance, thereby optimizing the performance of the spherical surface, and continuing to control the total number of meshes in the prefabricated mesh model to reduce the consumption of game performance by the rendering process. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0035] Figure 1 is a flowchart of a method for controlling the display of a game provided by an embodiment of the present invention;

[0036] Figure 2 is a schematic diagram of a prefabricated grid model provided by an embodiment of the present invention;

[0037] Figure 3 is a structural block diagram of a game display control device provided by an embodiment of the present invention;

[0038] Figure 4 is a structural block diagram of an electronic device provided by an embodiment of the present invention;

[0039] Figure 5 It is a structural block diagram of a storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] In order to solve the problem that the existing technology achieves a spherical surface effect by performing vertex offset operations on all models in the game on the shader, which depends on the number of vertices of the surface model, cannot be applied to any model, and easily causes excessive performance consumption, in an embodiment of the present invention, a mesh model is pre-made to make the game screen present a spherical surface effect through the pre-made mesh model.

[0042] Specifically, a sampling scene is obtained by sampling the background of a game scene, and a low-poly model corresponding to the standard model required by the game scene is added to the sampling scene; a corresponding rendering map is obtained according to the sampling scene and the low-poly model; a prefabricated mesh model is added to the game scene, wherein the prefabricated mesh model includes a plurality of meshes of different densities; the prefabricated mesh model is sphericalized to obtain a target mesh model; the target mesh model is rendered using the rendering map to present a game screen with a spherical surface effect on a graphical user interface. By adding the standard model required by the game scene to the sampling scene and outputting it in the form of a rendering map, the requirement for a high number of facets of the standard model required by the game scene is circumvented, and the effect of a spherical surface can be achieved without modifying any original model, thereby fully retaining the original standard model on the surface, reducing the output of art resources while achieving an excellent spherical surface effect, saving time and effort, and not prone to excessive performance consumption. Moreover, by using prefabricated mesh models, you can fine-tune the mesh density of the prefabricated mesh models in different distance ranges based on the characteristic that the spherical surface terrain is mainly curved and visible at the center distance, thereby optimizing the performance of the spherical surface and controlling the total number of meshes in the prefabricated mesh model, reducing the consumption of game performance by the rendering process.

[0043] In one embodiment of the present invention, the display control method of the game can be run on a terminal device or a server. The terminal device can be a local terminal device. When the display control method of the game is run on a server, the display control method of the game can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0044] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running body of the game program and the game screen presentation body are separated. The storage and operation of the display control method of the game are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a first terminal device, a TV, a computer, a handheld computer, etc.; but the terminal device for the display control method of the game is a cloud game server in the cloud. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0045] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.

[0046] Reference Figure 1 , shows a flowchart of a method for controlling the display of a game provided by an embodiment of the present invention, wherein the method may specifically include the following steps:

[0047] Step 101, sampling the background of the game scene to obtain a sampled scene, and adding a low-poly model corresponding to the standard model required by the game scene to the sampled scene;

[0048] The sampling scene is an invisible scene in the game, that is, a scene that does not need to be rendered in the actual game and displayed on the graphical user interface. The sampling scene is used to obtain the screen content in the game scene and draw these screen contents to obtain the corresponding rendering map. In a specific implementation, two cameras can be created, namely the first camera and the second camera, wherein the first camera is used to shoot the game scene, and the second camera is used to shoot the background of the game scene to obtain the sampling scene. It should be noted that after the second camera is created, the background of the game scene shot by the second camera is the scene space used to place models in the game, that is, the game scene does not have models designed independently by art designers according to the needs of the game screen, and no lighting information is added.

[0049] After sampling the background of the game scene to obtain the sampled scene, the standard model required by the game scene can be further added to the sampled scene, wherein the standard model is a standardized model pre-made according to the performance effect of the model, and the standard model contains the initial color, texture, material and normal information. Specifically, the standard model can be a Mesh mesh model, and the Mesh is composed of multiple meshes. The more meshes contained in the standard model, the better the performance effect of the texture details can be expressed. In a specific implementation, the number of meshes contained in the standard model can be set according to the performance effect of the model, that is, the number of meshes of the standard model is controlled by the art designer. For some games with high requirements for picture effects, the number of meshes of the standard model can be appropriately increased to enhance the performance effect of the model, and for some low-end games, the number of meshes of the standard model can be appropriately reduced to reduce the performance consumption of the game. As an example, the standard model can be an environmental model in the game, such as a building model, a wall model, a vegetation model, etc., and can also be a virtual character model in the game, such as a virtual unit controlled by a player in the game, or a non-player character (NPC) pre-set in the game, etc., and the embodiment of the present invention does not limit this.

[0050] In the specific implementation, in order to further reduce the performance consumption of the game, the low-poly model corresponding to the standard model required by the game scene can be added to the sampling scene. The number of meshes in this low-poly model is smaller than that of the standard model. The low-poly model corresponding to the standard model can be obtained by restoring the original 3D model corresponding to the standard model through 3D production. The number of meshes produced by the low-poly model is relatively low, and the final performance effect required by the model is mainly achieved by mapping.

[0051] In addition, due to the high number of faces of the high-poly model, it can express more model details. When making a low-poly model corresponding to the standard model, in order to further improve the performance of the low-poly model, you can also bake the normal map of the high-poly model corresponding to the standard model on the low-poly model, so that the low-poly model corresponding to the standard model has the convex and concave changes in the surface details of the high-poly model, thereby reflecting more details of the model and achieving better performance.

[0052] In a specific implementation, when it is necessary to add a standard model to a sampling scene, the low-poly models corresponding to each standard model can be obtained from the database, and the display positions of these standard models in the game scene can be obtained. According to the obtained display positions, the low-poly models corresponding to the standard models can be added to the sampling scene, so that the positional relationship between the standard models in the sampling scene is consistent with the positional relationship that the standard models need to be displayed in the game scene.

[0053] Step 102, obtaining a corresponding rendering map according to the sampling scene and the low-poly model;

[0054] In an embodiment of the present invention, the sampling scene and the low-poly model on the sampling scene can be drawn onto the Render Texture to obtain a corresponding rendering map. Specifically, a RenderTexture can be created first, and then the Render Texture can be assigned to a second camera used to shoot the sampling scene. Then, the sampling scene shot by the second camera and the low-poly model on the sampling scene will be drawn onto the Render Texture, and a corresponding rendering map will be generated.

[0055] It should be noted that Render Texture is a texture that can be drawn on in real time. It essentially connects a FBO (FrameBufferObjecrt) to a Server-Side Texture object. During the rendering process, the texture is initially stored in the memory of the CPU (Central Processing Unit). This texture is usually called the Client-Side Texture. The texture will eventually be transferred to the memory of the GPU (Graphics Processing Unit) so that the GPU can use it for rendering. The texture sent to the GPU is called the Server-Side Texture. The FrameBuffer is the destination of the rendering results in the GPU. All the results drawn during the rendering process (such as Color, Depth, Stencil / mask, etc.) are finally stored in the FrameBuffer. There is a default FBO directly connected to the window area of ​​the display of the terminal device, that is, the drawn object is drawn to the window area of ​​the display to be displayed on the display. However, in the prior art, the GPU can usually create many other FBOs, which may not be connected to the window area. The purpose of this FBO that is not connected to the window area is to allow the rendering results to be saved in a storage area of ​​the GPU for later use. When the rendering results are rendered to an FBO, there are many ways to obtain these rendering results for use. RenderTexture is one of the implementation methods for obtaining the rendering results on the FBO. In an embodiment of the present invention, by using Render Texture as the target of the second camera view, the second camera can draw the captured screen content to the Texture to obtain a rendering map, instead of directly rendering the screen content on the display.

[0056] In a specific implementation, Render Texture can be used to draw each frame of the sampling scene to obtain a rendering map corresponding to each frame of the sampling scene, so that in the subsequent rendering process, the rendering map corresponding to each frame of the sampling scene can be used for rendering and displayed on the graphical user interface to present the effect of dynamic switching of game scenes on the graphical user interface.

[0057] Step 103, adding a prefabricated grid model to the game scene, wherein the prefabricated grid model includes a plurality of grids of different densities;

[0058] The prefabricated mesh model may be a prefabricated Mesh mesh model with a high number of faces, which is used to simulate a spherical surface scene. The prefabricated mesh model contains multiple meshes of different densities, that is, the density of the meshes corresponding to the prefabricated mesh model is not evenly distributed, and the density of the meshes corresponding to the prefabricated mesh model is different within different distance ranges. Specifically, during rendering, locations with high mesh density can display more texture details, but consume high performance; locations with low mesh density can display fewer texture details, but consume low performance. When making a prefabricated mesh model, the distribution of the mesh density of the prefabricated mesh model can be flexibly set according to the needs of the performance effect of the prefabricated mesh model, taking into account both detail expression and performance consumption, and the embodiments of the present invention do not limit this.

[0059] As an example, since distant screen content in a game scene is usually invisible, the grid density of the prefabricated grid model can be set to gradually decrease from the center to the edge. For example, the prefabricated grid model is evenly divided into 10 areas with different distance ranges. These 10 areas are recorded from bottom to top as E, D, C, B, A, a, b, c, d, e, among which the number of grids in areas A and a is 9000, the number of grids in areas B and b is 8000, the number of grids in areas C and c is 7000, the number of grids in areas D and d is 6000, and the number of grids in areas E and e is 5000.

[0060] In an embodiment of the present invention, a prefabricated mesh model is obtained from a database, and then the prefabricated mesh model is added to a game scene. The game scene for adding the prefabricated mesh model is a visual scene in the game, that is, a scene that needs to be rendered in the actual game and displayed on a graphical user interface. The game scene does not contain the required standard models, which are added to the sampling scene for drawing to obtain rendering maps and used. For example, the game scene does not contain environmental models such as building models, wall models, and vegetation models, nor does it contain virtual units controlled by players in the game, or virtual character models such as non-player characters pre-set in the game.

[0061] Step 104, sphering the prefabricated mesh model to obtain a target mesh model;

[0062] After the prefabricated mesh model is added to the game scene, the prefabricated mesh model can be further spherized to obtain a target mesh model. Specifically, the prefabricated mesh model can be spherized in a shader to obtain a target mesh model, wherein the target mesh model can be a mesh model in a spherical surface state.

[0063] In a specific implementation, sphericalization may refer to an operation for distorting a model so that the model exhibits a spherical surface effect. For example, the sphericalization may be a vertex offset process, in which the vertices in a prefabricated mesh model are offset by a certain amount so that the prefabricated mesh exhibits a desired spherical surface effect. The method for calculating the vertex offset may be set according to actual needs, and the embodiment of the present invention does not impose any limitation on this.

[0064] Step 105: Render the target mesh model using the rendering map to present a game scene with a spherical surface effect on a graphical user interface.

[0065] In an embodiment of the present invention, after the prefabricated mesh model is sphericalized, a rendering map can be further used to render the target mesh model, the rendering map is assigned to the target mesh model, and the target mesh model is rendered to the display screen of the terminal device to present a game screen with a spherical surface effect on the graphical user interface.

[0066] Since the low-poly model corresponding to the standard model required for the game scene is added to the sampling scene and output as a rendering map, the prefabricated mesh model is then added to the game scene, and the prefabricated mesh model is sphericalized to obtain the target mesh model. By using the rendering map to render the target mesh model, it is not necessary to process each standard model required for the game scene when performing the sphericalization process. It is only necessary to add the rendering map corresponding to the standard model on the sampling scene to the target mesh model generated by the sphericalization process, so that each standard model required for the game scene can be presented as a spherical surface distortion effect, thereby avoiding the need to perform vertex offset processing on all models in the game scene, greatly reducing the performance consumption of the game. Moreover, since it is only necessary to perform sphericalization on the prefabricated mesh model, the number of meshes of the prefabricated mesh model can be appropriately increased according to the needs of the picture effect to enhance the performance effect of the game picture.

[0067] In addition, since the standard model required for the game scene is added to the sampling scene and output as a rendering map for use, the need for a high number of facets of the standard model required for the game scene is circumvented, and the effect of a spherical surface can be achieved without modifying any of the original models, so that the original standard model on the surface can be completely retained, reducing the output of art resources while achieving excellent spherical surface effects, saving time and effort, and not prone to excessive performance consumption. Moreover, using a prefabricated mesh model, the mesh density of the prefabricated mesh model at different distance ranges can be finely adjusted according to the characteristic that the spherical surface terrain is mainly curved and visible at the center distance, thereby optimizing the performance of the spherical surface and controlling the total number of meshes in the prefabricated mesh model, reducing the consumption of game performance by the rendering process.

[0068] In a preferred embodiment of the present invention, the density of the grid of the prefabricated grid model gradually decreases from the center to the edge of the prefabricated grid model.

[0069] In an embodiment of the present invention, based on the characteristic that the spherical surface is curved and visible mainly at the center, the number of grids corresponding to different distance ranges of the prefabricated grid model can be finely adjusted, thereby optimizing the surface performance effect of the prefabricated grid model and controlling the total number of grids of the prefabricated grid model.

[0070] Specifically, in order to better simulate the effect of a spherical surface, the number of faces in the central area of ​​the prefabricated mesh model can be increased. However, due to the curvature of the spherical surface, the camera generally cannot capture the edge of the game scene. Therefore, the number of meshes in the edge area of ​​the prefabricated mesh model can be reduced to further reduce the performance consumed by sphericalizing the prefabricated mesh model, thereby optimizing the performance of the game. As an example, the prefabricated mesh model can be roughly divided into 4 different distance ranges, and for each distance range, the density of the meshes in the range can be adjusted separately.

[0071] In the embodiment of the present invention, the number of meshes in the prefabricated mesh model is relatively high, which can meet the condition that the surface of the model is presented as a smooth sphere after sphericalization, so as to enhance the performance of the spherical surface scene. As an example, the number of meshes in the prefabricated mesh model can be 60,000. In a specific implementation, the number of meshes in the prefabricated mesh model can be set according to the spherical surface effect to be presented, and the embodiment of the present invention does not limit this. Figure 2 As shown, the prefabricated mesh model has a high number of meshes, which can show a good spherical surface effect, and the density of the meshes at the center is relatively large, while the density of the meshes at the edge is relatively small.

[0072] In a preferred embodiment of the present invention, the prefabricated grid model is in the shape of a disk.

[0073] In the embodiment of the present invention, the prefabricated grid model can be presented in the shape of a disk to enhance the presentation effect of the spherical surface scene, such as Figure 2 In addition, the prefabricated grid model can also be expressed in other shapes, such as a square, etc., which is not limited in the embodiment of the present invention.

[0074] In a preferred embodiment of the present invention, the game scene is photographed by a first camera, and the sampling scene is photographed by a second camera.

[0075] In the embodiment of the present invention, two cameras may be created, namely a first camera and a second camera. The first camera is used to shoot a game scene, which is a scene visible in the game, that is, a scene that needs to be rendered in the actual game and displayed on the graphical user interface. The second camera is used to shoot the background of the game scene to obtain a sample scene, which is a scene that is not visible in the game, that is, a scene that does not need to be rendered in the actual game and displayed on the graphical user interface.

[0076] In a preferred embodiment of the present invention, the prefabricated grid model and the first camera remain relatively still, and the displacement of the second camera is consistent with that of the first camera.

[0077] In an embodiment of the present invention, after adding the prefabricated mesh model to the game scene, the prefabricated mesh model and the first camera can be set to remain relatively still, and the second camera can be set to have the same displacement as the first camera. Specifically, since the standard model required for the game scene is placed in the sampling scene, in order to ensure that the standard model required on the game scene moves synchronously when the perspective of the game scene moves, the displacement of the second camera can be set to be consistent with that of the first camera, thereby enhancing the sensory effect of the game. In addition, by setting the prefabricated mesh model to remain relatively still with the first camera, it can be ensured that when the perspective of the game scene moves, the prefabricated mesh model moves synchronously to present a dynamic spherical surface effect.

[0078] In a preferred embodiment of the present invention, the method further comprises:

[0079] When the first camera moves, the perspective of shooting the game scene by the first camera switches. When the perspective switches, the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere.

[0080] Specifically, the first camera can be set to follow the virtual character in the game scene to shoot, and when the virtual character moves in the game scene (for example, running or walking, etc.), the first camera is controlled to move. The first camera can also be set to shoot according to the perspective lens in the game, and when the perspective lens in the game moves, the first camera is controlled to move. When the first camera moves, the perspective of the game scene captured by the first camera switches. When the perspective switches, since each frame of the game screen rendered has the effect of a spherical surface, after rendering the game screen frame by frame, the horizon of the game scene can present a parallax effect of a rotating sphere.

[0081] In a preferred embodiment of the present invention, when the first camera moves, the perspective of shooting the game scene by the first camera switches, and when the perspective switches, the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere, including:

[0082] When the first camera moves, the second camera is controlled to move with the first camera, and a sampling scene corresponding to the background of each frame of the game scene is obtained by shooting with the second camera, a low-poly model corresponding to the standard model required by the current frame of the game scene is added to each frame of the sampling scene, and a rendering map corresponding to each frame of the sampling scene is generated; the prefabricated mesh model is controlled to move with the first camera, and a target mesh model corresponding to each frame of the prefabricated mesh model is generated; the target mesh model is rendered frame by frame using the rendering map, so that the horizon of the game scene contained in the game screen presents a parallax effect of a rotating sphere.

[0083] Specifically, when the first camera moves, the second camera is controlled to move synchronously with the first camera, and the background of each frame of the game scene is photographed by the second camera to obtain a sampling scene, the standard model required for the game scene of the current frame is determined, and the low-poly model corresponding to each standard model is obtained, and the low-poly model corresponding to the standard model required for the game scene of the current frame is added to each frame of the sampling scene, and the low-poly model corresponding to the standard model on each frame of the sampling scene and the sampling scene is drawn to generate a rendering map corresponding to each frame of the sampling scene. Furthermore, by controlling the prefabricated mesh model to move synchronously with the first camera, and spherizing each frame of the prefabricated mesh model, a target mesh model corresponding to each frame of the prefabricated mesh model is generated. For the rendering map and target mesh model corresponding to each frame of the game scene generated, the target mesh model can be rendered by using the rendering map frame by frame, so that the horizon of the game scene contained in the game screen presents a parallax effect of a rotating sphere.

[0084] In a preferred embodiment of the present invention, the sphericalization of the prefabricated mesh model to obtain the target mesh model includes:

[0085] Each vertex in the prefabricated mesh model is subjected to an offset process to obtain a target mesh model of the curved surface.

[0086] In the embodiment of the present invention, each vertex in the prefabricated mesh model can be offset to obtain a target mesh model with a spherical surface effect. For example, the positions of the vertices of the prefabricated mesh model can be offset by some parabolic algorithms to obtain a target mesh model with a spherical surface effect. In a specific implementation, the algorithm for offsetting the vertices can be set according to the actual effect requirements, and the embodiment of the present invention does not limit this.

[0087] In order to solve the problem that the traditional solution for realizing a spherical surface depends on the number of faces of the model on the surface and cannot be applied to any model, in an embodiment of the present invention, a low-poly model corresponding to the standard model required by the game scene is added to the sampling scene, and each frame of the sampling scene and the low-poly model is rendered to obtain a corresponding rendering map, and a prefabricated mesh model is added to the game scene, and after the prefabricated mesh model is sphericalized, the obtained target mesh model is rendered using the rendering map to present a game screen with a spherical surface effect on the graphical user interface. By adding the standard model required by the game scene to the sampling scene and outputting it in the form of a rendering map, the requirement for a high number of faces of the standard model required by the game scene is circumvented, and a high-quality spherical surface effect can be achieved without modifying any original model, so that the original model on the game scene can be completely retained, and while reducing the output of art resources, an excellent spherical surface effect can be achieved, saving time and effort, and not prone to the problem of excessive performance consumption.

[0088] Moreover, by using the prefabricated mesh model, the mesh density of the prefabricated mesh model at different distance ranges can be finely adjusted according to the characteristic that the curved terrain is mainly visible at the center distance, thereby optimizing the performance of the spherical surface, and controlling the total number of meshes of the prefabricated mesh model, thereby reducing the consumption of the rendering process on the game performance. In addition, in the embodiment of the present invention, the rendering efficiency can be optimized by performing a plurality of rendering effect processing on the prefabricated mesh model without having to process each model on the original game scene separately.

[0089] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0090] Reference Figure 3 , shows a structural block diagram of a game display control device provided by an embodiment of the present invention, and the device may specifically include the following modules:

[0091] The sampling scene sampling module 301 is used to sample the background of the game scene to obtain a sampling scene, and add a low-poly model corresponding to the standard model required by the game scene to the sampling scene;

[0092] A rendering map generation module 302, used to obtain a corresponding rendering map according to the sampling scene and the low-poly model;

[0093] A mesh model adding module 303, used to add a prefabricated mesh model to the game scene, wherein the prefabricated mesh model includes a plurality of meshes of different densities;

[0094] The spherical processing module 304 is used to perform spherical processing on the prefabricated mesh model to obtain a target mesh model;

[0095] The rendering module 305 is used to render the target mesh model using the rendering map to present a game screen with a spherical surface effect on a graphical user interface.

[0096] In a preferred embodiment of the present invention, the density of the grid of the prefabricated grid model gradually decreases from the center to the edge of the prefabricated grid model.

[0097] In a preferred embodiment of the present invention, the prefabricated grid model is in the shape of a disk.

[0098] In a preferred embodiment of the present invention, the game scene is photographed by a first camera, and the sampling scene is photographed by a second camera.

[0099] In a preferred embodiment of the present invention, the prefabricated grid model and the first camera remain relatively still, and the displacement of the second camera is consistent with that of the first camera.

[0100] In a preferred embodiment of the present invention, the device further comprises:

[0101] The perspective switching module is used to switch the perspective of the game scene captured by the first camera when the first camera moves. When the perspective is switched, the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere.

[0102] In a preferred embodiment of the present invention, the perspective switching module includes:

[0103] A rendering map generation submodule, used for controlling the second camera to move with the first camera when the first camera moves, obtaining a sampling scene corresponding to the background of each frame of the game scene through the second camera, adding a low-poly model corresponding to the standard model required by the game scene of the current frame to each frame of the sampling scene, and generating a rendering map corresponding to each frame of the sampling scene;

[0104] A target mesh model generation submodule, used to control the prefabricated mesh model to move with the first camera, and generate a target mesh model corresponding to each frame of the prefabricated mesh model;

[0105] The rendering submodule is used to render the target grid model frame by frame using the rendering map so that the horizon of the game scene contained in the game screen presents a parallax effect of a rotating sphere.

[0106] In a preferred embodiment of the present invention, the spherical processing module 304 includes:

[0107] The vertex offset submodule is used to perform offset processing on each vertex in the prefabricated mesh model to obtain a target mesh model of the surface.

[0108] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0109] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, including:

[0110] Processor 401 and storage medium 402, the storage medium 402 stores machine-readable instructions executable by the processor 401, when the electronic device is running, the processor 401 executes the machine-readable instructions to perform the method as described in any one of the embodiments of the present invention. The specific implementation method and technical effect are similar to those of the method embodiment, and will not be repeated here.

[0111] The embodiment of the present invention also provides a computer readable storage medium, such as Figure 5 As shown, the storage medium stores a computer program 501, and the computer program 501 is executed by a processor to execute the method as described in any one of the embodiments of the present invention. The specific implementation method and technical effect are similar to those of the method embodiment, and will not be repeated here.

[0112] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0113] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0114] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0117] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0118] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0119] The above is a detailed introduction to a game display control method and a game display control device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A game display control method, characterized in that: include: Sampling the background of the game scene to obtain a sampled scene, and adding a low-poly model corresponding to the standard model required by the game scene to the sampled scene; Obtaining a corresponding rendering map according to the sampling scene and the low-poly model; Adding a prefabricated mesh model to the game scene, wherein the prefabricated mesh model includes a plurality of meshes of different densities; Sphering the prefabricated mesh model to obtain a target mesh model of a curved surface; Rendering the target mesh model using the rendering map to present a game screen with a spherical surface effect on a graphical user interface; The game scene is photographed by a first camera, and the sample scene is photographed by a second camera; the prefabricated grid model and the first camera remain relatively still, and the displacement of the second camera is consistent with that of the first camera; the density of the grid of the prefabricated grid model gradually decreases from the center to the edge of the prefabricated grid model; When the first camera moves, the perspective of shooting the game scene by the first camera switches. When the perspective switches, the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere.

2. The method according to claim 1, characterized in that The prefabricated grid model is in the shape of a disk.

3. The method according to claim 1, characterized in that: When the first camera moves, the perspective of shooting the game scene by the first camera switches, and when the perspective switches, the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere, including: When the first camera moves, the second camera is controlled to move along with the first camera, and a sampling scene corresponding to the background of each frame of the game scene is obtained by shooting with the second camera, a low-poly model corresponding to the standard model required by the current frame of the game scene is added to each frame of the sampling scene, and a rendering map corresponding to each frame of the sampling scene is generated; Controlling the prefabricated mesh model to move along with the first camera to generate a target mesh model corresponding to each frame of the prefabricated mesh model; The target grid model is rendered frame by frame using the rendering map so that the horizon of the game scene contained in the game screen presents a parallax effect of a rotating sphere.

4. The method according to claim 1, characterized in that The sphericalization of the prefabricated mesh model to obtain a target mesh model of a curved surface includes: Each vertex in the prefabricated mesh model is subjected to an offset process to obtain a target mesh model of the curved surface.

5. A game display control device, characterized in that: include: A sampling scene sampling module is used to sample the background of the game scene to obtain a sampling scene, and add a low-poly model corresponding to the standard model required by the game scene to the sampling scene; A rendering map generation module, used to obtain a corresponding rendering map according to the sampling scene and the low-poly model; A mesh model adding module, used to add a prefabricated mesh model to the game scene, wherein the prefabricated mesh model includes a plurality of meshes of different densities; A spherical processing module, used for performing spherical processing on the prefabricated mesh model to obtain a target mesh model of a curved surface; A rendering module, used to render the target mesh model using the rendering map, so as to present a game screen with a spherical surface effect on a graphical user interface; The game scene is photographed by a first camera, and the sample scene is photographed by a second camera; the prefabricated grid model and the first camera remain relatively still, and the displacement of the second camera is consistent with that of the first camera; the density of the grid of the prefabricated grid model gradually decreases from the center to the edge of the prefabricated grid model; The perspective switching module is used to switch the perspective of the game scene captured by the first camera when the first camera moves. When the perspective is switched, the horizon of the game scene included in the game screen presents a parallax effect of a rotating sphere.

6. An electronic device, characterized in that: include: A processor and a storage medium, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is executed.

Citation Information

Patent Citations

  • Method and system for providing image of virtual game scene

    CN103500462A

  • Game picture rendering method and device, terminal and storage medium

    CN110152291A