Wave effect implementation method and device in virtual world, equipment and medium

By obtaining and mapping the maps of the wave body and waves to the mesh model and superimposing them, the problem of over-rendering caused by wave rendering in the prior art is solved, and a more efficient rendering effect is achieved.

CN119455378APending Publication Date: 2025-02-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310997221.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-08
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, the method of simulating waves by stacking particle special effects leads to over-rendering of pixels and increases the load on computer equipment during rendering.

Method used

By obtaining the corresponding maps of the wave main mesh model and the wave grid model, map the map to the grid model respectively, obtain the wave main body and wave, and then superimpose them to generate a wave effect.

Benefits of technology

By separately processing the wave body and waves, excessive rendering of pixels is avoided, the rendering load of computer devices is reduced, and the rendering efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119455378A_ABST
    Figure CN119455378A_ABST
Patent Text Reader

Abstract

The invention discloses a wave effect implementation method and device in a virtual world, equipment and a medium, and belongs to the technical field of graphic processing. The method comprises the following steps: acquiring a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, and acquiring a spindrift grid model and a spindrift sphere map corresponding to the spindrift grid model; in response to mapping a map in the main body sphere map to the wave main body grid model, obtaining a wave main body in the wave; in response to mapping a map in the spindrift sphere map to the spindrift grid model, obtaining spindrift in the waves; and in response to superposition of the wave main body and the wave, obtaining the wave. According to the method, the wave main body and the spindrift of the wave are processed separately in a mapping mode, excessive rendering of pixels is not needed, the load of computer equipment in the rendering process is reduced, and the rendering efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of graphics processing technology, and in particular to a method, device, equipment and medium for realizing wave effects in a virtual world. Background Art

[0002] With the development of rendering technology, the rendering effect of waves in the virtual world is becoming more and more realistic.

[0003] In the related art, in the process of rendering ocean waves, an ocean wave mesh model is established, and the mesh shape in the ocean wave mesh model is changed by fusion shapes to obtain an ocean wave mesh body, and particle effects are accumulated on the top of the ocean wave mesh body to simulate waves.

[0004] However, the method of simulating waves by stacking particle effects in the above-mentioned related technologies will cause excessive rendering of pixels and require a large amount of calculation, which greatly increases the load of computer equipment during the rendering process. Summary of the invention

[0005] The present application provides a method, device, equipment and medium for realizing wave effects in a virtual world. The technical solution is as follows:

[0006] According to one aspect of the present application, a method for realizing wave effects in a virtual world is provided, the method comprising:

[0007] Obtaining a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, and a wave spray grid model and a wave spray sphere map corresponding to the wave spray grid model;

[0008] In response to mapping the texture in the body sphere texture to the wave body mesh model, a wave body in the wave is obtained;

[0009] In response to mapping the texture in the spray sphere texture to the spray mesh model, spray in the wave is obtained, the spray is used to represent the wave displayed in a first style at the front end of the wave;

[0010] In response to superimposing the wave body and the spray, the wave is obtained.

[0011] According to one aspect of the present application, a device for realizing wave effects in a virtual world is provided, the device comprising:

[0012] An acquisition module, used for acquiring a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, and a wave spray grid model and a wave spray sphere map corresponding to the wave spray grid model;

[0013] A mapping module, for obtaining a wave body in the wave in response to mapping a map in the body sphere map to the wave body mesh model;

[0014] The mapping module is used to obtain the waves in the wave in response to mapping the map in the wave sphere map to the wave mesh model, wherein the waves are used to represent the waves displayed in a first style at the front end of the wave;

[0015] A superposition module is used for obtaining the wave in response to superimposing the wave body and the wave spray.

[0016] According to another aspect of the present application, a computer device is provided, comprising: a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method for realizing wave effects in a virtual world as described above.

[0017] According to another aspect of the present application, a computer storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the method for realizing wave effects in a virtual world as described above.

[0018] According to another aspect of the present application, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes the method for realizing wave effects in a virtual world as described above.

[0019] The beneficial effects of the technical solution provided by this application include at least:

[0020] By obtaining a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, as well as a spray grid model and a spray sphere map corresponding to the spray; in response to mapping the map in the main body sphere map to the wave main body grid model, the wave main body of the wave is obtained; in response to mapping the map in the spray sphere map to the spray grid model, the spray of the wave is obtained; in response to superimposing the wave main body and the spray, the wave is obtained. The present application processes the wave main body and the spray of the wave separately by mapping, without over-rendering pixels, reducing the load of the computer device during the rendering process and improving the rendering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 is a schematic diagram of a method for realizing wave effects in a virtual world provided by an exemplary embodiment of the present application;

[0023] Figure 2 is a schematic diagram of the architecture of a computer system provided by an exemplary embodiment of the present application;

[0024] Figure 3 is a flow chart of a method for realizing wave effects in a virtual world provided by an exemplary embodiment of the present application;

[0025] Figure 4 is a flow chart of a method for realizing wave effects in a virtual world provided by an exemplary embodiment of the present application;

[0026] Figure 5 is a schematic diagram of a wave main body grid model provided by an exemplary embodiment of the present application;

[0027] Figure 6 is a schematic diagram of a wave body with flow effects provided by an exemplary embodiment of the present application;

[0028] Figure 7 is a schematic diagram of a wave body provided by an exemplary embodiment of the present application;

[0029] Figure 8 is a schematic diagram of a wave body with flow special effects and water drop-like special effects provided by an exemplary embodiment of the present application;

[0030] Fig. 9 is a schematic diagram of a wave provided by an exemplary embodiment of the present application;

[0031] Fig.10 is a schematic diagram of a wave provided by an exemplary embodiment of the present application;

[0032] Fig.11 is a schematic diagram of a wave provided by an exemplary embodiment of the present application;

[0033] Fig.12 is a schematic diagram of waves provided by an exemplary embodiment of the present application;

[0034] Fig.13 is a schematic diagram of the rise and fall of waves provided by an exemplary embodiment of the present application;

[0035] Fig.14 is a block diagram of a device for realizing wave effects in a virtual world provided by an exemplary embodiment of the present application;

[0036] Fig.15 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical scheme and advantages of the present application clearer, the implementation mode of the present application will be further described in detail below in conjunction with the accompanying drawings. The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation modes described in the following exemplary embodiments do not represent all implementation modes consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0038] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0039] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.

[0040] The present application embodiment provides a schematic diagram of a method for realizing wave effects in a virtual world. Figure 1 As shown, the method can be executed by a computer device, and the computer device can be a terminal or a server.

[0041] Exemplarily, the computer device obtains a wave body grid model and a body spherical map corresponding to the wave body grid model, as well as a spray grid model and a spray spherical map corresponding to the spray grid model; the computer device responds by mapping the map in the body spherical map to the wave body grid model to obtain the wave body of the wave; the computer device responds by mapping the map in the spray spherical map to the spray grid model to obtain the spray in the wave; the computer device responds by superimposing the wave body and the spray to obtain the wave.

[0042] The virtual world is a virtual environment displayed (or provided) when the application is running on the terminal. The virtual world can be a simulation of the real world, a semi-simulation and semi-fictitious environment, or a purely fictitious environment. The virtual world can be any one of a two-dimensional virtual world, a 2.5-dimensional virtual world, and a three-dimensional virtual world, and this application does not limit this. The following embodiments are illustrated by taking the virtual world as a three-dimensional virtual world.

[0043] Waves are used to represent waves that are displayed in the first style at the front of the wave.

[0044] Optionally, the waves include at least one of explosion fluid, smoke, water flow, sparks, clouds, fog, snow fog, dust, sea waves, and river tides, but are not limited to these. The embodiments of the present application do not make specific limitations on this.

[0045] For example, if the wave is an ocean wave, the wave body is an ocean wave body.

[0046] The computer device obtains the wave main grid model 40 and the main sphere sticker corresponding to the wave main grid model 40. Fig.10 , and the wave mesh model 90 and the wave sphere map 20 corresponding to the wave mesh model 90; the computer device responds to the main sphere map Fig.10 The computer device responds by mapping the texture in the spray sphere texture 20 to the spray grid model 90 to obtain the spray in the wave 110; the computer device responds by superimposing the wave body and the spray to obtain the wave 110.

[0047] Main ball sticker Fig.10 It refers to presenting different wave main body map contents at different angles of the sphere in the form of a sphere.

[0048] Stick to the main ball Fig.10 The center of the sphere is the origin, and any vector pointed out from the center of the sphere is the main sphere. Fig.10 The direction vector (also called texture coordinate) of the main sphere can be mapped based on the direction vector Fig.10 Get the wave main body map at the corresponding position.

[0049] The wave sphere texture 20 refers to a wave texture that presents different contents at different angles of a sphere in the form of a sphere.

[0050] Taking the center of the wave spherical map 20 as the origin, any vector pointed out from the center is the direction vector (also called texture coordinate) of the wave spherical map 20. Based on the direction vector, the wave map at the corresponding position can be obtained from the wave spherical map.

[0051] Exemplarily, the computer device maps the direction vector of the main wave grid model 40 to the main sphere. Fig.10 The computer device projects the main sampling map and the wave flow normal map 30 onto the surface of the wave main grid model 40 to obtain the wave body.

[0052] The wave flow normal map 30 is used to add flow effects to the wave body.

[0053] Optionally, the wave flow normal map 30 can be obtained from a material library for developing games, or can be pre-designed through design software.

[0054] The computer device maps the main sampling map to the wave main body mesh model 40 to obtain the first wave main body. The first wave main body refers to a wave main body with a smooth plane, that is, the surface of the first wave main body is smooth and has no flow effects; the computer device maps the wave flow normal map 30 to the first wave main body, so that the wave main body 50 has flow effects.

[0055] The computer device adds the normal vectors of the wave flow normal map 30 under different sampling directions to obtain the wave collision vector corresponding to the wave flow normal map 30; adds the vertex normal vector corresponding to the first wave body and the wave collision vector to obtain the wave body reflection vector corresponding to the wave body; based on the wave body reflection vector, the computer device makes the wave body 50 have a flow effect.

[0056] After obtaining the wave body 50 with flow special effects, the computer device samples the wave flow normal map 30 at different flow speeds to obtain the normal vectors corresponding to the wave flow normal map 30 at different flow speeds, calculates the highlight values ​​at different flow speeds, also called reflection values, through the microsurface normal direction distribution function, and then obtains the highlight normal intensity vectors corresponding to the wave flow normal map 30 at different flow speeds through the Fresnel formula; the computer device mixes the highlight normal intensity vectors corresponding to the wave flow normal map 30 at different flow speeds to obtain the light normal intensity resultant vector; the computer device obtains the wave body 60 with flow special effects and water drop-like special effects based on the sum of the reflection vector and the light normal intensity resultant vector.

[0057] In some embodiments, the computer device samples the wave sphere map 20 based on the direction vector of the wave mesh model 90 to obtain the wave sampling map corresponding to the wave mesh model 90; the computer device maps the wave sampling map, the wave flow normal map 70 and the wave flow noise map 80 to the wave mesh model 90 to obtain the waves.

[0058] The wave flow normal map 70 is used to add flow effects to the waves.

[0059] The wave flow noise map 80 is used to add a water splash-like special effect to the interface between the wave and the wave body.

[0060] The computer device maps the wave sampling map to the wave mesh model to obtain the first wave. The first wave refers to the wave with a smooth plane. The computer device maps the wave flow normal map 70 to the first wave so that the wave has a flow effect. The computer device maps the wave flow noise map 80 to the first wave to obtain the wave 100 with a water-like special effect.

[0061] When the wave body 60 with flow special effects and water drop-like special effects and the wave spray 100 with flow special effects are obtained, the wave body 60 with flow special effects and water drop-like special effects and the wave spray 100 with flow special effects are superimposed to obtain the wave 110; then the rising and falling of the wave 110 are achieved by stretching, thereby simulating the dynamic special effects of the wave.

[0062] In summary, the method provided in this embodiment obtains a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, as well as a spray grid model and a spray sphere map corresponding to the spray; in response to mapping the map in the main body sphere map to the wave main body grid model, the wave main body of the wave is obtained; in response to mapping the map in the spray sphere map to the spray grid model, the spray of the wave is obtained; in response to superimposing the wave main body and the spray, the wave is obtained. The present application processes the wave main body and the spray of the wave separately by mapping, without over-rendering pixels, reducing the load of the computer device during the rendering process and improving the rendering efficiency.

[0063] Figure 2 The following is a block diagram of a computer system according to an exemplary embodiment of the present application. The computer system 100 includes: a first terminal 110 , a server 120 , and a second terminal 130 .

[0064] The first terminal 110 is installed and runs a client 111 that supports a virtual world, and the client 111 can be a multiplayer online battle program. When the first terminal runs the client 111, the user interface of the client 111 is displayed on the screen of the first terminal 110. The client 111 can be any one of a multiplayer online game, a battle royale shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooting game (FPS), a third-person shooting game (TPS), a multiplayer online tactical competitive game (MOBA), and a simulation game (SLG). In this embodiment, the client 111 is an MMOG game for example. The first terminal 110 is a terminal used by the first user 112. The first user 112 uses the first terminal 110 to control the first virtual character in the virtual world to perform activities, or to operate the virtual items owned by the second virtual character. The first virtual character can be referred to as the virtual character of the first user 112. The first user 112 can assemble, disassemble, and uninstall the virtual items owned by the first virtual character, and this application does not limit this. Illustratively, the first virtual character is a first virtual character, such as a simulated human character or an animated human character.

[0065] The second terminal 130 is installed and runs a client 131 that supports the virtual world, and the client 131 can be a multiplayer online battle program. When the second terminal 130 runs the client 131, the user interface of the client 131 is displayed on the screen of the second terminal 130. The client can be any one of MMOG, battle royale shooting game, VR application, AR program, three-dimensional map program, virtual reality game, augmented reality game, FPS, TPS, MOBA, SLG. In this embodiment, the client is an MMOG game for example. The second terminal 130 is a terminal used by the second user 113. The second user 113 uses the second terminal 130 to control the second virtual character in the virtual world to carry out activities and operate the virtual items owned by the second virtual character. The second virtual character can be called the virtual character of the second user 113. Schematically, the second virtual character is a second virtual character, such as a simulated character or an anime character.

[0066] Optionally, the first virtual character and the second virtual character are in the same virtual world. Optionally, the first virtual character and the second virtual character may belong to the same camp, the same team, the same organization, have a friendship relationship, or have temporary communication permissions. Optionally, the first virtual character and the second virtual character may belong to different camps, different teams, different organizations, or have a hostile relationship.

[0067] Optionally, the client installed on the first terminal 110 and the second terminal 130 is the same, or the client installed on the two terminals is the same type of client on different operating system platforms (Android or IOS). The first terminal 110 may refer to one of a plurality of terminals, and the second terminal 130 may refer to another of a plurality of terminals. This embodiment is only illustrated by taking the first terminal 110 and the second terminal 130 as examples. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device type includes at least one of: a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer.

[0068] Figure 2 Only two terminals are shown, but in different embodiments, there are multiple other terminals 140 that can access the server 120. Optionally, there are one or more terminals 140 corresponding to the developer, and a development and editing platform for the client supporting the virtual world is installed on the terminal 140. The developer can edit and update the client on the terminal 140, and transmit the updated client installation package to the server 120 through a wired or wireless network. The first terminal 110 and the second terminal 130 can download the client installation package from the server 120 to update the client.

[0069] The first terminal 110 , the second terminal 130 , and other terminals 140 are connected to the server 120 via a wireless network or a wired network.

[0070] The server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for clients supporting a three-dimensional virtual world. Optionally, the server 120 undertakes the main computing work, and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work, and the terminal undertakes the main computing work; or, a distributed computing architecture is used between the server 120 and the terminal for collaborative computing.

[0071] In an illustrative example, the server 120 includes a processor 122, a user account database 123, a battle service module 124, and a user-oriented input / output interface (I / O interface) 125. The processor 122 is used to load instructions stored in the server 120 and process data in the user account database 123 and the battle service module 124; the user account database 123 is used to store data of user accounts used by the first terminal 110, the second terminal 130, and other terminals 140, such as the user account's avatar, the user account's nickname, the user account's combat power index, and the service area where the user account is located; the battle service module 124 is used to provide multiple battle rooms for users to fight, such as 1V1 battle, 3V3 battle, 5V5 battle, etc.; the user-oriented I / O interface 125 is used to establish communication and exchange data with the first terminal 110 and / or the second terminal 130 through a wireless network or a wired network.

[0072] Figure 3 1 is a flow chart of a method for realizing wave effects in a virtual world provided by an exemplary embodiment of the present application. The method can be executed by a computer device, which can be a terminal or a server. The method includes:

[0073] Step 302: Obtain the wave main body grid model and the main body sphere map corresponding to the wave main body grid model, as well as the wave spray grid model and the wave spray sphere map corresponding to the wave spray grid model.

[0074] Waves are used to represent waves that are displayed in the first style at the front of the wave.

[0075] Optionally, the waves include at least one of explosion waves, smoke waves, water waves, spark waves, cloud waves, fog waves, snow waves, dust waves, sea waves, and river tides, but are not limited to these, and the embodiments of the present application do not specifically limit this.

[0076] For example, if the wave is an ocean wave, the wave body is an ocean wave body.

[0077] The main sphere map refers to presenting different wave main map contents at different angles of the sphere in the form of a sphere.

[0078] Taking the center of the main spherical map as the origin, any vector pointed out from the center is the direction vector of the main spherical map. Based on the direction vector, the wave main map at the corresponding position can be obtained from the main spherical map.

[0079] After being sampled, the texture in the main sphere texture can be pasted on the surface of the wave main body mesh model without changing the wave main body mesh model to achieve the rendering of the wave main body.

[0080] The wave sphere map refers to a wave map content that presents different wave contents at different angles of the sphere in the form of a sphere.

[0081] Taking the center of the wave spherical map as the origin, any vector pointed out from the center is the direction vector of the wave spherical map. Based on the direction vector, the wave map at the corresponding position can be obtained from the wave spherical map.

[0082] The texture in the wave sphere map can be pasted on the surface of the wave mesh model after being sampled, but the wave mesh model is not changed to achieve the rendering of the wave.

[0083] It should be noted that the main sphere map and the wave sphere map used in the embodiment of the present application are both sphere maps. In addition, the map can also use a cube map. When applied, the shape of the map can be selected according to actual needs. The embodiment of the present application does not make any specific limitations on this.

[0084] Step 304: In response to mapping the texture in the body sphere texture to the wave body mesh model, a wave body in the wave is obtained.

[0085] Mapping refers to projecting the texture obtained from the main sphere map onto the surface of the wave main mesh model.

[0086] Optionally, the texture in the main sphere map is obtained by transferring the textures at different positions in the main sphere map to a graphics processor (Graphics Processing Unit, abbreviated as GPU), and a computer device (e.g., a shader) samples based on a direction vector in the main sphere map to obtain the texture at the corresponding position.

[0087] For example, taking the case that the waves are ocean waves, the computer device obtains the texture corresponding to the ocean wave body from the main sphere texture, and maps the texture corresponding to the ocean wave body to the surface of the ocean wave body grid model without changing the structure of the main grid model, thereby obtaining the ocean wave body in the ocean wave.

[0088] Step 306: In response to mapping the texture in the wave spray sphere map to the wave spray mesh model, the wave spray in the wave is obtained.

[0089] The method for obtaining the textures in the wave sphere map is as follows: the textures at different positions in the wave sphere map are transferred to the GPU, and the computer device (for example, the shader) samples based on the direction vector in the wave sphere map to obtain the textures at the corresponding positions.

[0090] For example, taking the waves as ocean waves, the computer device obtains the map corresponding to the waves from the wave spherical map, and maps the map corresponding to the waves to the surface of the wave mesh model without changing the structure of the wave mesh model, thereby obtaining the waves in the ocean waves.

[0091] Step 308: In response to superimposing the wave body and the wave spray, a wave is obtained.

[0092] Superposition means stacking the mapped wave main body mesh model and the wave mesh model together.

[0093] Optionally, the superposition position of the mapped wave main body grid model and the mapped wave spray grid model includes at least one of the following methods, but is not limited thereto:

[0094] The main wave mesh model after mapping is superimposed on the spray mesh model after mapping;

[0095] The textured wave mesh model is superimposed on the textured wave main body mesh model;

[0096] The wave mesh model after mapping is cross-superimposed with the wave main body mesh model after mapping;

[0097] The mapped wave mesh model is superimposed on the specified position of the mapped wave main body mesh model.

[0098] When the wave body and the waves are obtained, the computer device superimposes the wave body and the waves to obtain the entire wave.

[0099] For example, taking the case where the wave is an ocean wave, the wave body is the ocean wave body. When the ocean wave body and the spray are obtained, the computer device superimposes the ocean wave body and the spray to obtain a complete ocean wave.

[0100] In summary, the method provided in this embodiment obtains a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, as well as a spray grid model and a spray sphere map corresponding to the spray; in response to mapping the map in the main body sphere map to the wave main body grid model, the wave main body of the wave is obtained; in response to mapping the map in the spray sphere map to the spray grid model, the spray of the wave is obtained; in response to superimposing the wave main body and the spray, the wave is obtained. The present application processes the wave main body and the spray of the wave separately by mapping, without over-rendering pixels, thereby reducing the rendering load of the computer device during the rendering process and improving the rendering efficiency.

[0101] Figure 4 1 is a flow chart of a method for realizing wave effects in a virtual world provided by an exemplary embodiment of the present application. The method can be executed by a computer device, which can be a terminal or a server. The method includes:

[0102] Step 402: Obtain the wave main body grid model and the main body sphere map corresponding to the wave main body grid model, as well as the wave spray grid model and the wave spray sphere map corresponding to the wave spray grid model.

[0103] Waves are used to represent waves that are displayed in the first style at the front of the wave.

[0104] Optionally, the waves include at least one of explosions, smoke, water flow, sparks, clouds, fog, snow, dust, sea waves, and river tides, but are not limited thereto and are not specifically limited to this in the embodiments of the present application.

[0105] For example, if the wave is an ocean wave, the wave body is an ocean wave body.

[0106] The main sphere map refers to presenting different wave main map contents at different angles of the sphere in the form of a sphere.

[0107] After being sampled, the texture in the main sphere texture can be pasted on the surface of the wave main body mesh model without changing the wave main body mesh model to achieve the rendering of the wave main body.

[0108] The wave sphere map refers to a wave map content that presents different wave contents at different angles of the sphere in the form of a sphere.

[0109] The texture in the wave sphere map can be pasted on the surface of the wave mesh model after being sampled, but the wave mesh model is not changed to achieve the rendering of the wave.

[0110] For example, Figure 5 The schematic diagram of the wave main body grid model shown is a three-dimensional structure diagram. The grid size in the wave main body grid model can be selected according to application needs. Relatively speaking, the smaller the grid, the higher the mapping accuracy of the wave main body grid model.

[0111] It should be noted that the grid sizes in the wave main body grid model and the wave spray grid model can be the same or different, and the embodiments of the present application do not make specific limitations on this.

[0112] Step 404: sampling the main sphere map based on the direction vector of the wave main body mesh model to obtain a main body sampling map corresponding to the wave main body mesh model.

[0113] The body sample map is a map selected from the body sphere map; or, the body sample map is a map selected from the body sphere map for mapping onto the surface of the wave body mesh model.

[0114] Exemplarily, the computer device samples the main spherical map based on the direction vector of the wave main mesh model. During the sampling process, only the normalized direction vector needs to be known to obtain the main sampling map corresponding to the wave main mesh model.

[0115] Step 406: Map the body sampling map and the wave flow normal map to the wave body mesh model to obtain the wave body.

[0116] The wave flow normal map is used to add flow effects to the wave body.

[0117] Optionally, the wave flow normal map can be obtained from a material library of a developed game, or can be pre-designed using design software.

[0118] In some embodiments, the computer device maps the body sampling map to the wave body mesh model to obtain a first wave body; the computer device maps the wave flow normal map to the first wave body to obtain a wave body with flow special effects.

[0119] The first wave body refers to a wave body with a smooth plane, that is, the surface of the first wave body is smooth without flow effects.

[0120] Exemplarily, the computer device adds the normal vectors of the wave flow normal map under different sampling directions to obtain a wave collision vector corresponding to the wave flow normal map; adds the vertex normal vector corresponding to the first wave body and the wave collision vector to obtain a wave body reflection vector corresponding to the wave body; and the computer device obtains a wave body with flow special effects based on the wave body reflection vector.

[0121] Exemplarily, when a wave body with a flow effect is obtained based on a wave body reflection vector, the computer device multiplies the wave body reflection vector by a color attribute value, so that the wave body with a flow effect displays a dark background texture. Figure 6 The schematic diagram of the wave body with flow effects shown, Figure 6 Figure (a) is the main body of the wave before multiplying the color attribute value. Figure 6 As can be seen from the circled position in Figure (a), the main body of the wave before multiplication by the color attribute value is brighter and has no background color; Figure 6 Figure (b) is the main body of the wave after multiplying the color attribute value. Figure 6 As can be seen from the circled position in Figure (b), the wave body after multiplying by the color attribute value is darker, showing a background color.

[0122] In some embodiments, after obtaining a wave body with flow effects, the computer device samples the wave flow normal maps at different flow speeds again to obtain the highlight normal intensity vectors corresponding to the wave flow normal maps at different flow speeds; the computer device mixes the highlight normal intensity vectors corresponding to the wave flow normal maps at different flow speeds to obtain a light normal intensity resultant vector; the computer device obtains a wave body with flow effects and water drop-like effects based on the sum of the reflection vector and the light normal intensity resultant vector.

[0123] Sampling the wave flow normal map at different flow speeds can add beading effects to the body of the wave.

[0124] Optionally, a wave flow normal map at a high flow speed may add a large water droplet-like special effect to the wave body, and a wave flow normal map at a low flow speed may add a small water droplet-like special effect to the wave body.

[0125] After the computer device obtains the normal vector corresponding to the wave flow normal map at different flow speeds through sampling, it calculates the highlight value at different flow speeds, also known as the reflection value, through the microsurface normal direction distribution function, and then obtains the highlight normal intensity vector corresponding to the wave flow normal map at different flow speeds through the Fresnel formula.

[0126] The calculation formula of the microsurface normal direction distribution function can be expressed as:

[0127]

[0128] Among them, D GGX (m) is used to represent the microsurface normal direction distribution function, n is used to represent the half-angle vector, which refers to the middle vector between the incident direction of light and the line of sight direction, m is the discovery vector, and α is the height.

[0129] The computer device calculates the highlight results at different flow speeds through the microsurface normal direction distribution function, for example, Figure 7 A schematic diagram of the wave body is shown, Figure 7 Figure (a) shows the main body of the wave before the highlight is calculated. Figure 7 As can be seen in Figure (a), there is no highlight position in the wave body, or there is no reflected light position; Figure 7 Figure (b) shows the main body of the wave after the highlight is calculated. Figure 7 As can be seen from the circled position in Figure (b), the wave body after the highlight is calculated has a reflective area.

[0130] The computer device calculates the highlight normal intensity vector corresponding to the wave flow normal map under different flow speeds based on the highlight value vector and the normal vector and the Fresnel formula.

[0131] The computer device mixes the highlight normal intensity vectors corresponding to the wave flow normal maps at different flow speeds to obtain a light normal intensity resultant vector; the computer device obtains a wave body with flow special effects and water drop-like special effects based on the sum of the reflection vector and the light normal intensity resultant vector.

[0132] For example, Figure 8 The schematic diagram of the wave body with flow effects and water drop-like effects shown in the figure, the computer device adds the reflection vector multiplied by the color attribute value and the light normal intensity vector to obtain Figure 8 The wave body shown in FIG. 8 includes a flow special effect 801 and a water drop-shaped special effect 802 .

[0133] Step 408: sampling the wave sphere map based on the direction vector of the wave mesh model to obtain a wave sampling map corresponding to the wave mesh model.

[0134] The wave sampling map refers to a map selected from the wave sphere map; or, the wave sampling map refers to a map selected from the wave sphere map for mapping to the surface of the wave mesh model.

[0135] Exemplarily, the computer device samples the wave spherical map based on the direction vector of the wave mesh model. During the sampling process, only the normalized direction vector needs to be known to obtain the wave sampling map corresponding to the wave mesh model.

[0136] For example, Fig. 9 Schematic diagram of the spray shown, when the computer device samples from the spray spherical map, the transparency of the black position in the spray spherical map is 0, based on the transparency of different positions in the map obtained in the spray spherical map, the spray area 901 is determined, as shown in FIG. Fig. 9 As shown in (a) of FIG. 1 ; during the sampling process, by inserting the clarity Mipmap level attribute of the plane texture, the computer device can adjust the wave shape of the wave area 901, and the obtained wave shape 902 is as shown in FIG. Fig. 9 As shown in Figure (b).

[0137] Step 410: Map the wave sampling map, the wave flow normal map and the wave flow noise map to the wave mesh model to obtain the waves.

[0138] The wave flow normal map is used to add flow effects to the waves.

[0139] The wave flow noise map is used to add a splash-like effect to the interface between the waves and the wave body.

[0140] The computer device maps the wave sampling map to the wave grid model to obtain the first wave.

[0141] The first wave refers to a wave with a smooth plane, that is, the surface of the first wave is smooth, without any bumps or flow effects.

[0142] Optionally, the computer device maps the wave flow normal map to the first wave to obtain the wave with flow special effects.

[0143] The computer device adds the normal vectors of the wave flow normal map under different sampling directions to obtain the wave collision vector corresponding to the wave flow normal map; the computer device adds the vertex normal vector corresponding to the first wave and the wave collision vector to obtain the wave reflection vector corresponding to the wave; the computer device obtains waves with flow special effects based on the wave reflection vector.

[0144] Optionally, the computer device maps the wave flow noise map to the first wave to obtain the wave with water-splash-like special effects.

[0145] For example, Fig.10 A schematic diagram of the waves shown, Fig.10 Figure (a) shows a schematic diagram of the wave flow noise map. Fig.10 Figure (b) shows a schematic diagram of local waves. The computer device maps the wave flow noise map to the first wave to obtain waves with water-like special effects 1001.

[0146] It should be noted that the embodiment of the present application does not specifically limit the order of mapping the spray flow normal map and the spray flow noise map. The spray flow normal map may be mapped first, or the spray flow noise map may be mapped first, or the spray flow normal map and the spray flow noise map may be mapped at the same time.

[0147] For example, Fig.11 The schematic diagram of the waves shown in the figure shows that the waves 1101 include both flow special effects 1102 and water-splash-like special effects 1103 .

[0148] In some embodiments, in the x-axis direction of the vertex of the mapped wave, the y value of the control vertex fluctuates with the change of the trigonometric function, thereby increasing the ups and downs special effect.

[0149] Step 412: In response to superimposing the wave body and the wave spray, a wave is obtained.

[0150] Superposition means stacking the mapped wave main body mesh model and the wave mesh model together.

[0151] Optionally, the superposition position of the mapped wave main body grid model and the mapped wave spray grid model includes at least one of the following methods, but is not limited thereto:

[0152] The main wave mesh model after mapping is superimposed on the spray mesh model after mapping;

[0153] The textured wave mesh model is superimposed on the textured wave main body mesh model;

[0154] The wave mesh model after mapping is cross-superimposed with the wave main body mesh model after mapping;

[0155] The mapped wave mesh model is superimposed on the specified position of the mapped wave main body mesh model.

[0156] When the wave body and the waves are obtained, the computer device superimposes the wave body and the waves to obtain the entire wave.

[0157] For example, Fig.12 The schematic diagram of the wave shown is as follows Fig.12 As shown in Figure (a) in FIG. 1 , the computer device superimposes the wave body 1201 and the wave 1202 to obtain the entire wave; Fig.12 As shown in Figure (b), the figure shows the wave body drawing amount 1203 of the pixels corresponding to the wave body 1201 in a single frame and the wave drawing amount 1204 of the pixels corresponding to the wave 1202. It can be seen that the pixels in a single frame are drawn twice at most, which greatly reduces the rendering load of the computer device during the rendering process and improves the rendering efficiency.

[0158] In some embodiments, the computer device displays dynamically changing waves in response to dynamically stretching the waves.

[0159] For example, taking the sea waves as an example, after superimposing the main body of the sea waves and the spray, by stretching the sea waves, the dynamic change process of the sea waves from low to high can be presented to simulate the ebb and flow of tides in the real world.

[0160] For example, Fig.13 The schematic diagram of the rise and fall of the wave shown is as follows Fig.13 As shown in Figures (a)(b)(c)(d), the computer equipment dynamically stretches the waves. As the stretching deformation increases, the height of the waves increases, thus vividly displaying the dynamic changes of the waves.

[0161] In some embodiments, the computer device displays the wave with a changed color in response to adding a mask layer over the wave.

[0162] The mask layer is used to adjust the color of the waves.

[0163] Exemplarily, the computer device adjusts the color bias of the three RGB channels corresponding to each pixel in the map of the wave surface by adding a mask layer, thereby changing the color of the wave.

[0164] In summary, the method provided in this embodiment obtains a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, as well as a spray grid model and a spray sphere map corresponding to the spray; in response to mapping the map in the main body sphere map to the wave main body grid model, the wave main body of the wave is obtained; in response to mapping the map in the spray sphere map to the spray grid model, the spray of the wave is obtained; in response to superimposing the wave main body and the spray, the wave is obtained. The present application processes the wave main body and the spray of the wave separately by mapping, without over-rendering pixels, thereby reducing the rendering load of the computer device during the rendering process and improving the rendering efficiency.

[0165] An embodiment of the present application provides a schematic diagram of a method for realizing wave effects in a virtual world. The method can be executed by a computer device, and the computer device can be a terminal or a server.

[0166] Computer equipment adds flow effects to waves by means of normal maps. The texture coordinates UV of the wave flow normal map are constantly shifting over time, and the shift direction is the y-axis direction of UV. By setting the shift speed, the wave body and / or the wave body can have flow effects.

[0167] The computer device adds the normal vectors of the wave flow normal map under different sampling directions to obtain the wave collision vector corresponding to the wave flow normal map; the computer device adds the vertex normal vector corresponding to the first wave body and the wave collision vector to obtain the wave body reflection vector corresponding to the wave body. In addition, during the sampling process, the wave body reflection vector is added with a three-dimensional rotation matrix to expose the three-axis rotatable property for the user to rotate the sample. It should be noted that this step can be used for both the wave body and the spray. The difference is that the sampled spherical maps are different. The wave body corresponds to the main body spherical map, and the spray corresponds to the spray spherical map.

[0168] In some embodiments, during the sampling process of the computer device, the transparency of the black position in the wave sphere map is 0, and the wave area is obtained based on the transparency. At the same time, during sampling, the user is allowed to adjust the wave shape of the wave area based on the clarity Mipmap level attribute of the plane texture.

[0169] In addition, draw a mask to distinguish the normal disturbance shape of the upper part of the wave and the water-like shape of the lower part. Then, in the x-axis direction of the vertex of the wave after mapping, control the y value of the vertex to fluctuate with the change of the trigonometric function, thereby increasing the ups and downs special effect.

[0170] In some embodiments, after sampling the reflection vector of the wave body obtained from the main sphere map, the computer device multiplies it by a color attribute value to obtain a dark background texture corresponding to the wave body. In addition, the wave flow normal map at different flow speeds is sampled to obtain the highlight normal intensity vector corresponding to the wave flow normal map at different flow speeds; the highlight normal intensity vector corresponding to the wave flow normal map at different flow speeds is mixed to obtain the light normal intensity vector; based on the sum of the reflection vector and the light normal intensity vector, a wave body with flow special effects and water drop-like special effects is obtained.

[0171] In some embodiments, the computer device then uses a mask layer to adjust the color bias of the three RGB channels corresponding to each pixel in the map of the wave surface, thereby changing the color of the wave.

[0172] The last step is to create the animation. The rise and fall of the waves can be done directly. If necessary, you can add bones to make a more vivid deformation.

[0173] Fig.14 A schematic diagram of the structure of a device for realizing wave effects in a virtual world provided by an exemplary embodiment of the present application is shown. The device can be realized as all or part of a computer device through software, hardware, or a combination of both. The device includes:

[0174] An acquisition module 1401 is used to acquire a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, and a wave spray grid model and a wave spray sphere map corresponding to the wave spray grid model;

[0175] A mapping module 1402 is used to obtain a wave body in the wave in response to mapping the map in the body sphere map to the wave body mesh model;

[0176] A mapping module 1402, configured to obtain the spray in the wave in response to mapping the texture in the spray sphere texture to the spray mesh model, wherein the spray is used to represent the wave displayed in a first style at the front end of the wave;

[0177] The superposition module 1403 is used for obtaining the wave in response to superimposing the wave body and the wave spray.

[0178] In some embodiments, the mapping module 1402 is used to sample the main sphere map based on the direction vector of the wave main body mesh model to obtain the main sampling map corresponding to the wave main body mesh model; map the main sampling map and the wave flow normal map to the wave main body mesh model to obtain the wave body.

[0179] Wherein, the wave flow normal map is used to add flow effects to the wave body.

[0180] In some embodiments, the mapping module 1402 is used to map the main body sampling map to the wave body mesh model to obtain a first wave body, where the first wave body refers to a wave body with a smooth plane; and map the wave flow normal map to the first wave body to obtain the wave body with the flow special effects.

[0181] In some embodiments, the mapping module 1402 is used to add the normal vectors of the wave flow normal map under different sampling directions to obtain a wave collision vector corresponding to the wave flow normal map; add the vertex normal vector corresponding to the first wave body and the wave collision vector to obtain a wave body reflection vector corresponding to the wave body; based on the wave body reflection vector, obtain the wave body with the flow special effect.

[0182] In some embodiments, the mapping module 1402 is used to sample the wave flow normal map under different flow speeds to obtain the highlight normal intensity vectors corresponding to the wave flow normal map under the different flow speeds; and mix the highlight normal intensity vectors corresponding to the wave flow normal map under the different flow speeds to obtain the light normal intensity resultant vector.

[0183] In some embodiments, the mapping module 1402 is used to obtain the wave body with the flow effect and the water drop-like effect based on the sum of the reflection vector and the light normal intensity vector.

[0184] In some embodiments, the mapping module 1402 is used to sample the wave spherical map based on the direction vector of the wave mesh model to obtain the wave sampling map corresponding to the wave mesh model; map the wave sampling map, the wave flow normal map and the wave flow noise map to the wave mesh model to obtain the wave.

[0185] Among them, the wave flow normal map is used to add flow effects to the waves, and the wave flow noise map is used to add water-splash-like effects to the interface between the waves and the wave body.

[0186] In some embodiments, the mapping module 1402 is used to map the wave sampling map to the wave mesh model to obtain the first wave, where the first wave refers to the wave with a smooth plane; map the wave flow normal map to the first wave to obtain the wave with the flow special effect; map the wave flow noise map to the first wave to obtain the wave with a water-like special effect.

[0187] In some embodiments, the mapping module 1402 is used to add the normal vectors of the wave flow normal map under different sampling directions to obtain the wave collision vector corresponding to the wave flow normal map; add the vertex normal vector corresponding to the first wave and the wave collision vector to obtain the wave reflection vector corresponding to the wave; based on the wave reflection vector, obtain the wave with flow special effects.

[0188] In some embodiments, the device further comprises a display module 1404, and the display module 1404 is used to obtain dynamically changing waves in response to dynamically stretching the waves.

[0189] In some embodiments, the display module 1404 is used to obtain the wave with changed color in response to adding a mask layer on the wave.

[0190] Wherein, the mask layer is used to adjust the color of the wave.

[0191] Fig.15 The structural block diagram of a computer device 1500 shown in an exemplary embodiment of the present application is shown. The computer device can be implemented as the server in the above-mentioned solution of the present application. The image computer device 1500 includes a central processing unit (CPU) 1501, a system memory 1504 including a random access memory (RAM) 1502 and a read-only memory (ROM) 1503, and a system bus 1505 connecting the system memory 1504 and the central processing unit 1501. The image computer device 1500 also includes a large-capacity storage device 1506 for storing an operating system 1509, an application program 1510 and other program modules 1511.

[0192] The mass storage device 1506 is connected to the central processing unit 1501 through a mass storage controller (not shown) connected to the system bus 1505. The mass storage device 1506 and its associated computer readable medium provide non-volatile storage for the image computer device 1500. That is, the mass storage device 1506 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0193] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage medium is not limited to the above. The above-mentioned system memory 1504 and mass storage device 1506 can be collectively referred to as memory.

[0194] According to various embodiments of the present disclosure, the image computer device 1500 can also be connected to a remote computer on a network through a network such as the Internet. That is, the image computer device 1500 can be connected to a network 1508 through a network interface unit 1507 connected to the system bus 1505, or the network interface unit 1507 can be used to connect to other types of networks or remote computer systems (not shown).

[0195] The memory also includes at least one computer program, which is stored in the memory. The central processing unit 1501 implements all or part of the steps in the method for realizing the wave effect in the virtual world shown in the above-mentioned embodiments by executing the at least one program.

[0196] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the wave effect realization method in the virtual world provided by the above-mentioned method embodiments.

[0197] An embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the method for realizing wave effects in a virtual world provided by the above-mentioned method embodiments.

[0198] An embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes to implement the wave effect implementation method in the virtual world provided by the above-mentioned method embodiments.

[0199] It will be understood that in the specific implementation of the present application, the data involved, historical data, and data related to user data processing such as portraits related to user identity or characteristics, when the above embodiments of the present application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0200] It should be noted that, unless otherwise clearly defined herein, all terms used in the claims are interpreted according to their ordinary meanings in the technical field. Unless otherwise clearly stated, all references to "an element, device, component, equipment, step, etc." will be openly interpreted as referring to at least one instance of an element, device, component, equipment, step, etc. Unless explicitly stated, the steps of any method disclosed herein do not have to be performed in the exact order disclosed.

[0201] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0202] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0203] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent switching, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for realizing wave effects in a virtual world, characterized in that: The method comprises: Obtaining a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, and a wave spray grid model and a wave spray sphere map corresponding to the wave spray grid model; In response to mapping the texture in the body sphere texture to the wave body mesh model, a wave body in the wave is obtained; In response to mapping the texture in the spray sphere texture to the spray mesh model, spray in the wave is obtained, the spray is used to represent the wave displayed in a first style at the front end of the wave; In response to superimposing the wave body and the spray, the wave is obtained.

2. The method according to claim 1, characterized in that The step of obtaining a wave body in the wave in response to mapping the texture in the body sphere texture to the wave body mesh model comprises: Sampling the main sphere map based on the direction vector of the wave main grid model to obtain a main sampling map corresponding to the wave main grid model; Mapping the main body sampling map and the wave flow normal map to the wave main body mesh model to obtain the wave main body; Wherein, the wave flow normal map is used to add flow effects to the wave body.

3. The method according to claim 2, characterized in that Mapping the main body sampling map and the wave flow normal map to the wave main body mesh model to obtain the wave main body of the wave includes: Mapping the main body sampling map to the wave main body mesh model to obtain a first wave main body, wherein the first wave main body refers to a wave main body with a smooth plane; The wave flow normal map is mapped to the first wave body to obtain the wave body with the flow special effect.

4. The method according to claim 3, characterized in that Mapping the wave flow normal map to the first wave body to obtain the wave body with the flow special effect includes: Adding the normal vectors of the wave flow normal map under different sampling directions to obtain a wave collision vector corresponding to the wave flow normal map; Adding the vertex normal vector corresponding to the first wave body and the wave collision vector to obtain a wave body reflection vector corresponding to the wave body; Based on the reflection vector of the wave body, the wave body with the flow effect is obtained.

5. The method according to claim 4, characterized in that The method further comprises: Sampling the wave flow normal map at different flow speeds to obtain the highlight normal intensity vector corresponding to the wave flow normal map at the different flow speeds; Mixing the highlight normal intensity vectors corresponding to the wave flow normal maps at different flow speeds to obtain a light normal intensity resultant vector; The step of obtaining the wave body having the flow effect based on the reflection vector comprises: Based on the sum of the reflection vector and the light normal intensity vector, the wave body with the flow effect and the water drop-like effect is obtained.

6. The method according to any one of claims 1 to 5, characterized in that: The step of obtaining the spray in the wave in response to mapping the texture in the spray sphere texture to the spray mesh model comprises: Sampling the wave sphere map based on the direction vector of the wave grid model to obtain a wave sampling map corresponding to the wave grid model; Mapping the wave sampling map, the wave flow normal map and the wave flow noise map to the wave mesh model to obtain the wave; Among them, the wave flow normal map is used to add flow effects to the waves, and the wave flow noise map is used to add water-splash-like effects to the interface between the waves and the wave body.

7. The method according to claim 6, characterized in that The step of mapping the wave sampling map, the wave flow normal map and the wave flow noise map to the wave mesh model to obtain the wave comprises: Mapping the spray sampling map to the spray mesh model to obtain first waves, wherein the first waves refer to waves with a smooth plane; Mapping the wave flow normal map to the first wave to obtain the wave with the flow special effect; The wave flow noise map is mapped to the first wave to obtain the wave with water-splash-like special effects.

8. The method according to claim 7, characterized in that Mapping the wave flow normal map to the first wave to obtain the wave with flow special effects includes: Adding the normal vectors of the wave flow normal map under different sampling directions to obtain the wave collision vector corresponding to the wave flow normal map; Adding the vertex normal vector corresponding to the first wave to the wave collision vector to obtain a wave reflection vector corresponding to the wave; Based on the wave reflection vector, the wave with flow effects is obtained.

9. The method according to claim 1, characterized in that: The method further comprises: In response to dynamically stretching the wave, a dynamically changing wave is displayed.

10. The method according to claim 1, characterized in that The method further comprises: In response to adding a mask layer on the wave, displaying the wave with a changed color; Wherein, the mask layer is used to adjust the color of the wave.

11. A device for realizing wave effects in a virtual world, characterized in that: The device comprises: An acquisition module, used for acquiring a wave main body grid model and a main body sphere map corresponding to the wave main body grid model, and a wave spray grid model and a wave spray sphere map corresponding to the wave spray grid model; A mapping module, for obtaining a wave body in the wave in response to mapping a map in the body sphere map to the wave body mesh model; The mapping module is used to obtain the waves in the wave in response to mapping the map in the wave sphere map to the wave mesh model, wherein the waves are used to represent the waves displayed in a first style at the front end of the wave; A superposition module is used for obtaining the wave in response to superimposing the wave body and the wave spray.

12. A computer device, characterized in that: The computer device comprises: a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the method for realizing wave effects in a virtual world according to any one of claims 1 to 10.

13. A computer storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the method for realizing wave effects in a virtual world according to any one of claims 1 to 10.

14. A computer program product, characterized in that The computer program product comprises a computer program, which is stored in a computer-readable storage medium; the computer program is read and executed from the computer-readable storage medium by a processor of a computer device, so that the computer device executes the method for realizing wave effects in a virtual world as described in any one of claims 1 to 10.