Display method, device, medium and equipment for virtual scene

By establishing a fluid field in a virtual scene and performing force field injection processing, the problem of insufficient realism of model interaction in a virtual scene is solved, and a higher correlation of model pose change and realism of virtual scenes is achieved.

CN114299213BActive Publication Date: 2025-06-13NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111614030.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-06-13
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

The prior art has low authenticity of model interaction in virtual scenes, and insufficient correlation between pose changes between models, resulting in low authenticity of virtual scenes.

Method used

By establishing a fluid field in a virtual scene, detecting the wind power generated by the target model, the force field value of each unit space is obtained, the force field injection process is performed, and the speed and vertex material information of the unit space are updated, thereby improving the authenticity of model interaction.

Benefits of technology

The authenticity of model interaction in virtual scenes and the correlation between pose changes between models is improved, thereby improving the overall authenticity of virtual scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299213B_ABST
    Figure CN114299213B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a method for displaying a virtual scene, a device for displaying a virtual scene, a computer-readable medium, and an electronic device, which relate to the field of computer technology. The above method can, when it is detected that a target model generates wind force in a virtual scene, establish a fluid field in the virtual scene, where the fluid field includes multiple unit spaces; obtain the force field value obtained by each unit space under the action of the wind force; perform force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target velocity of each unit space; update the material information of the vertices in the corresponding unit space according to the target velocity of each unit space; and render the virtual scene according to the updated material information of the vertices. This can improve the authenticity of the interaction between models in the virtual scene, enhance the correlation of the pose changes between models, and further improve the authenticity of the virtual scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method for displaying a virtual scene, a device for displaying a virtual scene, a computer-readable medium, and an electronic device. Background Art

[0002] In the field of virtual scene rendering, in order to represent the interaction relationships between various models in a virtual scene, the postures of each model are usually adjusted by parameters such as the wind strength and direction in the virtual scene, so as to achieve the effect of model interaction. However, this method is usually implemented by presetting parameter values. When the posture of one model is updated, it will naturally trigger the posture update of another model. However, there is no correlation between the two, that is, the posture update of the other model does not depend on the change parameters of the model with the updated posture, which easily leads to the problem of low authenticity of model interaction in the virtual scene.

[0003] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0004] The purpose of the embodiments of the present disclosure is to provide a method for displaying a virtual scene, a device for displaying a virtual scene, a computer-readable medium, and an electronic device, which can improve the authenticity of model interaction in the virtual scene, enhance the correlation degree of posture changes between models, and further enhance the authenticity of the virtual scene.

[0005] The first aspect of the embodiments of the present disclosure provides a method for displaying a virtual scene. A graphical user interface is provided through a terminal device, the graphical user interface includes a virtual scene, and the virtual scene includes a target model. The method includes:

[0006] When it is detected that wind is generated by the target model in the virtual scene, a fluid field is established in the virtual scene, and the fluid field includes a plurality of unit spaces;

[0007] Obtain the force field value obtained by each unit space under the action of the wind;

[0008] Perform force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target velocity of each unit space;

[0009] Update the material information of the vertices in the corresponding unit space according to the target velocity of each unit space;

[0010] Render the virtual scene according to the updated material information of the vertices.

[0011] In an exemplary embodiment of the present disclosure, establishing a fluid field in a virtual scene includes:

[0012] Determine whether the wind force is generated according to the movement of the target model;

[0013] If so, establish a fluid field in the virtual scene according to the movement of the target model;

[0014] If not, establish a fluid field according to the type of wind force and preset force field parameters.

[0015] In an exemplary embodiment of the present disclosure, establishing a fluid field in the virtual scene according to the movement of the target model includes:

[0016] Obtain the first position of the target model in the first virtual scene graph and the second position in the second virtual scene graph, as well as the display time interval between the first virtual scene graph and the second virtual scene graph; wherein, the first virtual scene image and the second virtual scene image are two adjacent frames of images;

[0017] Determine the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, and the display time interval;

[0018] Determine the force field value of the fluid field to be established according to the instantaneous velocity;

[0019] Establish a fluid field according to the force field value.

[0020] In an exemplary embodiment of the present disclosure, determining the force field value of the fluid field to be established according to the instantaneous velocity includes:

[0021] Determine the force field value of the fluid field to be established according to the instantaneous velocity and a preset scaling factor.

[0022] In an exemplary embodiment of the present disclosure, determining the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, and the display time interval includes:

[0023] Determine the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, the display time interval, a preset smoothing factor, and the instantaneous velocity corresponding to the target model in the first virtual scene graph.

[0024] In an exemplary embodiment of the present disclosure, the types of wind force include linear wind force, vortex-shaped wind force, and radial wind force.

[0025] In an exemplary embodiment of the present disclosure, performing force field injection processing on the velocity of each unit space corresponding to the force field value of the corresponding unit space to obtain the updated target velocity of each unit space includes:

[0026] After performing the following processes on the velocity of each unit space in sequence, the updated target velocity of each unit space is obtained:

[0027] Perform force field injection processing, diffusion processing, incompressibility processing, and convection processing according to the force field value of each unit space.

[0028] The second aspect of the embodiments of the present disclosure provides a display device for a virtual scene. The above device provides a graphical user interface, the graphical user interface includes a virtual scene, and the virtual scene contains a target model. The above device includes: a fluid field establishment unit, a parameter acquisition unit, a force field injection unit, an information update unit, and a scene rendering unit.

[0029] The fluid field establishment unit is configured to establish a fluid field in the virtual scene when it detects that the target model generates wind force in the virtual scene. The fluid field contains multiple unit spaces;

[0030] The parameter acquisition unit is configured to acquire the force field value obtained by each unit space under the action of the wind force;

[0031] The force field injection unit is configured to perform force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space, and obtain the updated target velocity of each unit space;

[0032] The information update unit is configured to update the material information of the vertices in the corresponding unit space according to the target velocity of each unit space;

[0033] The scene rendering unit is configured to render the virtual scene according to the updated material information of the vertices.

[0034] In an exemplary embodiment of the present disclosure, the fluid field establishment unit establishing a fluid field in the virtual scene includes:

[0035] The fluid field establishment unit determines whether the wind force is generated according to the movement of the target model;

[0036] If so, the fluid field establishment unit establishes a fluid field in the virtual scene according to the movement of the target model;

[0037] If not, the fluid field establishment unit establishes a fluid field according to the type of the wind force and the preset force field parameters.

[0038] In an exemplary embodiment of the present disclosure, the fluid field establishment unit establishing a fluid field in the virtual scene according to the movement of the target model includes:

[0039] The fluid field establishment unit obtains the first position of the target model in the first virtual scene graph and the second position in the second virtual scene graph, as well as the display time interval between the first virtual scene graph and the second virtual scene graph; wherein, the first virtual scene image and the second virtual scene image are two adjacent frames of images.

[0040] The fluid field establishment unit determines the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, and the display time interval.

[0041] The fluid field establishment unit determines the force field value of the fluid field to be established according to the instantaneous velocity.

[0042] The fluid field establishment unit establishes a fluid field according to the force field value.

[0043] In an exemplary embodiment of the present disclosure, the fluid field establishment unit determines the force field value of the fluid field to be established according to the instantaneous velocity, including:

[0044] The fluid field establishment unit determines the force field value of the fluid field to be established according to the instantaneous velocity and a preset scaling factor.

[0045] In an exemplary embodiment of the present disclosure, the fluid field establishment unit determines the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, and the display time interval, including:

[0046] The fluid field establishment unit determines the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, the display time interval, a preset smoothing factor, and the instantaneous velocity corresponding to the target model in the first virtual scene graph.

[0047] In an exemplary embodiment of the present disclosure, the types of wind force include linear wind force, vortex wind force, and radial wind force.

[0048] In an exemplary embodiment of the present disclosure, the force field injection unit performs force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target velocity of each unit space, including:

[0049] The force field injection unit sequentially performs the following processing on the velocity of each unit space to obtain the updated target velocity of each unit space:

[0050] The force field injection unit performs force field injection processing, diffusion processing, incompressible processing, and convection processing according to the force field value of each unit space.

[0051] According to a third aspect of the embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, it implements the method for displaying a virtual scene in the first aspect of the above embodiments.

[0052] According to a fourth aspect of the embodiments of the present disclosure, an electronic device is provided, including: one or more processors; a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for displaying a virtual scene in the first aspect of the above embodiments.

[0053] According to a fifth aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various alternative implementation manners.

[0054] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

[0055] In the technical solutions provided by some embodiments of the present disclosure, specifically including: when it is detected that a target model generates wind force in a virtual scene, a fluid field is established in the virtual scene, and the fluid field includes a plurality of unit spaces; obtaining the force field value obtained by each unit space under the action of the wind force; performing force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target velocity of each unit space; updating the material information of the vertices in the corresponding unit space according to the target velocity of each unit space; rendering the virtual scene according to the updated material information of the vertices. Implementing the embodiments of the present disclosure can improve the authenticity of model interaction in the virtual scene, improve the correlation of pose changes between models, and thus improve the authenticity of the virtual scene.

[0056] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings here are incorporated into the specification and form a part of this specification, showing the embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0058] Figure 1Schematically shows a schematic diagram of an exemplary system architecture of a method for displaying a virtual scene and a display device for a virtual scene to which embodiments of the present disclosure can be applied;

[0059] Figure 2 Schematically shows a schematic diagram of the structure of a computer system of an electronic device suitable for implementing embodiments of the present disclosure;

[0060] Figure 3 Schematically shows a flowchart of a method for displaying a virtual scene according to an embodiment of the present disclosure;

[0061] Figure 4 Schematically shows a force field diagram according to an embodiment of the present disclosure;

[0062] Figure 5 Schematically shows a force field diagram according to another embodiment of the present disclosure;

[0063] Figure 6 Schematically shows a schematic diagram of a current unit space and a unit space to be offset according to an embodiment of the present disclosure;

[0064] Figure 7 Schematically shows a schematic diagram of a current unit space and a unit space to be offset according to another embodiment of the present disclosure;

[0065] Figure 8 Schematically shows a radial force field diagram according to an embodiment of the present disclosure;

[0066] Figure 9 Schematically shows a schematic diagram of the central pressure vacuum of a radial force field according to an embodiment of the present disclosure;

[0067] Figure 10 Schematically shows a schematic diagram of the pressure zeroing processing result of a unit space according to an embodiment of the present disclosure;

[0068] Figure 11 Schematically shows a schematic diagram of a grass model according to an embodiment of the present disclosure;

[0069] Figure 12 Schematically shows a noise diagram according to an embodiment of the present disclosure;

[0070] Figure 13 Schematically shows a noise processing diagram according to an embodiment of the present disclosure;

[0071] Figure 14 Schematically shows a flowchart of a method for displaying a virtual scene according to an embodiment of the present disclosure;

[0072] Figure 15A block diagram of a display device for a virtual scene according to an embodiment of the present disclosure is schematically shown. Detailed implementation manners

[0073] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will recognize that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or may be implemented using other methods, components, devices, steps, etc. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.

[0074] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0075] Figure 1 A schematic diagram of an exemplary system architecture of a virtual scene display method and a virtual scene display device to which the embodiments of the present disclosure can be applied is schematically shown.

[0076] As Figure 1 shown, the system architecture 100 may include one or more of the terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smartphones, and tablet computers, etc. It should be understood that Figure 1The numbers of the terminal devices, network, and server in it are merely illustrative. According to implementation requirements, there can be any number of terminal devices, network, and server. For example, the server 105 can be a server cluster composed of multiple servers, etc. Among them, the server 105 is used to execute: when it is detected that the target model generates wind force in the virtual scene, a fluid field is established in the virtual scene, and the fluid field includes multiple unit spaces; obtain the force field value obtained by each unit space under the action of the wind force; perform force field injection processing on the speed of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target speed of each unit space; update the material information of the vertices in the corresponding unit space according to the target speed of each unit space; perform rendering of the virtual scene according to the updated material information of the vertices. Among them, the terminal devices 101, 102, and 103 are used to execute: when it is detected that the target model generates wind force in the virtual scene, a fluid field is established in the virtual scene, and the fluid field includes multiple unit spaces; obtain the force field value obtained by each unit space under the action of the wind force; perform force field injection processing on the speed of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target speed of each unit space; update the material information of the vertices in the corresponding unit space according to the target speed of each unit space; perform rendering of the virtual scene according to the updated material information of the vertices.

[0077] Figure 2 The structural schematic diagram of the computer system of the electronic device suitable for implementing the embodiments of the present disclosure is shown.

[0078] It should be noted that Figure 2 The computer system 200 of the electronic device shown is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present disclosure.

[0079] As Figure 2 shown, the computer system 200 includes a central processing unit (CPU) 201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 202 or the program loaded from the storage section 208 into the random access memory (RAM) 203. In the (RAM) 203, various programs and data required for system operation are also stored. The (CPU) 201, (ROM) 202, and (RAM) 203 are connected to each other through a bus 204. The input / output (I / O) interface 205 is also connected to the bus 204.

[0080] The following components are connected to the (I / O) interface 205: an input section 206 including a keyboard, a mouse, etc.; an output section 207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 208 including a hard disk, etc.; and a communication section 209 including a network interface card such as a LAN card, a modem, etc. The communication section 209 performs communication processing via a network such as the Internet. A drive 210 is also connected to the (I / O) interface 205 as required. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is installed on the drive 210 as required so that a computer program read therefrom is installed into the storage section 208 as required.

[0081] Specifically, according to an embodiment of the present disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product including a computer program carried on a computer-readable medium, the computer program including program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 209, and / or installed from the removable medium 211. When the computer program is executed by a central processing unit (CPU) 201, various functions defined in the methods and apparatuses of the present application are executed.

[0082] It should be noted that the computer-readable medium shown in this disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in this disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.

[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and the combination of blocks in a block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0084] The units involved in the embodiments described in the present disclosure may be implemented in software or in hardware, and the described units may also be provided in a processor. Among them, the names of these units do not, in some cases, constitute a limitation on the unit itself.

[0085] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist alone without being assembled into the electronic device. When the above one or more programs are executed by an electronic device, the electronic device is caused to implement the methods in the following embodiments. For example, Figure 2 the electronic device shown can implement as Figure 3 the respective steps shown, etc.

[0086] This exemplary embodiment provides a method for displaying a virtual scene. A graphical user interface is provided through a terminal device. The graphical user interface includes a virtual scene, and the virtual scene includes a target model. Referring Figure 3 as shown, the method for displaying the virtual scene may include the following steps S310 to S350. Specifically:

[0087] Step S310: When it is detected that a wind force is generated by the target model in the virtual scene, a fluid field is established in the virtual scene, and the fluid field includes a plurality of unit spaces.

[0088] Step S320: Obtain the force field value obtained by each unit space under the action of the wind force.

[0089] Step S330: Perform force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target velocity of each unit space.

[0090] Step S340: Update the material information of the vertices in the corresponding unit space according to the target velocity of each unit space.

[0091] Step S350: Render the virtual scene according to the updated material information of the vertices.

[0092] It can be seen that implementing Figure 3 the method shown can improve the authenticity of model interaction in the virtual scene, improve the correlation degree of pose changes between models, and further improve the authenticity of the virtual scene.

[0093] The following is a detailed description of the above steps.

[0094] For step S310, when it is detected that the target model generates wind force in the virtual scene, a fluid field is established in the virtual scene, and the fluid field includes multiple unit spaces.

[0095] Specifically, the target model can be used to represent a moving object. The target model can be a character model, a plant model, an animal model, etc., which is not limited in the embodiments of the present application. The display mode of the target model can be a three-dimensional model / two-dimensional model.

[0096] In addition, the virtual scene can be used to represent the environment where the target model is located. The virtual scene can include a virtual game scene, a VR scene, an AR scene, etc. The virtual game scene among them can be displayed as a game screen.

[0097] In addition, the wind force can be understood as a dynamic parameter generated based on the movement of the target model and used to affect other models in the virtual scene. The types of wind force include various types such as linear wind force, vortex-shaped wind force, and radial wind force.

[0098] In addition, the fluid field is an Eulerian field, which is constructed based on fluid mechanics. Fluid mechanics is a branch of mechanics that mainly studies the static state and motion state of the fluid itself under the action of various forces, as well as the interaction and flow law when there is relative motion between the fluid and the solid boundary wall. The fluid field can include one or more scene models. The virtual scene includes the target model and the scene model. For example, the scene model can be a grass model, a tree model, a car model, etc., which are models used to fill the virtual scene.

[0099] In addition, the unit space can be understood as a three-dimensional cube in a 3D virtual scene, or can also be understood as a two-dimensional rectangle (such as a square) in a 2D virtual scene in the virtual scene. The multiple unit spaces included in the fluid field can be unit spaces of equal size, and the stacking / arrangement of the multiple unit spaces can be of the same size as the space occupied by the virtual scene.

[0100] Optionally, before step S310, the above method may further include: when it is detected that the target model undergoes a dynamic change, determining the motion type corresponding to the dynamic change, and if the motion type belongs to a preset type, it is determined that the target model generates wind force in the virtual scene; where the preset type can include one or more, such as walking, running, sprinting, swinging a knife, throwing, stabbing, jumping and slashing, etc. In addition, the target model can be understood as a game character, and the dynamic change of the target model can be an action triggered by the player (such as the player triggering the target character to perform a knife-swinging action), or can also be a preset action in the game (such as if the target model is not manipulated by the player within a unit time, it performs an action of sitting down and resting in place).

[0101] As an alternative embodiment of step S310, establishing a fluid field in a virtual scene includes: determining whether the wind force is generated based on the movement of the target model; if so, establishing a fluid field in the virtual scene according to the movement of the target model; if not, establishing a fluid field according to the type of wind force and preset force field parameters.

[0102] Specifically, the type of wind force may include one or more types, such as linear wind force (e.g., fan wind force), swirling wind force (e.g., cyclone wind force), radial wind force (e.g., explosion wind force), etc., which are not limited in the embodiments of the present application.

[0103] Optionally, if the type of wind force is linear wind force, establishing a fluid field according to the type of wind force and preset force field parameters includes: obtaining the force field parameters corresponding to the linear wind force, where the force field parameters at least include force field intensity and force field direction, and the force field corresponding to the specific force field parameters may be Figure 4 the shown elliptical linear force field or spherical linear force field; establishing a fluid field according to the force field parameters.

[0104] Optionally, if the type of wind force is swirling wind force, establishing a fluid field according to the type of wind force and preset force field parameters includes: obtaining the force field parameters corresponding to the swirling wind force, where the force field parameters at least include rotation intensity f, axis direction D, and force field position P0, and the force field corresponding to the specific force field parameters may be Figure 5 the shown elliptical swirling force field or spherical swirling force field; substituting the position P to be processed and the force field position P0 into the expression V0 = P - P0 to determine the vector V0; normalizing the vector V0 to V1 and calculating the cross product D × V1 to determine the force field direction vector F; furthermore, determining the product of F and the intensity f as the force field value; establishing a fluid field according to the force field value. Furthermore, optionally, normalizing the vector V0 to V1 and calculating the cross product D × V1 to determine the force field direction vector F includes: adaptively adjusting the length of the vector V0 according to a preset scaling factor and normalizing the adaptive adjustment result to V1, and calculating the cross product D × V1 according to V1 and the preset scaling factor.

[0105] Optionally, if the type of wind force is radial wind force, establishing a fluid field according to the type of wind force and preset force field parameters includes: obtaining the force field parameters corresponding to the radial wind force, where the force field parameters at least include intensity f and force field center position P0; substituting the position P to be processed and the force field center position P0 into the expression (P - P0) * f to determine the force field value; establishing a fluid field according to the force field value. Furthermore, optionally, substituting the position P to be processed and the force field center position P0 into the expression (P - P0) * f to determine the force field value includes: determining the force field value based on the expression (P - P0) * f and the position P to be processed, the force field center position P0, and a preset scaling factor.

[0106] It can be seen that by implementing this alternative embodiment, the source of wind generation can be determined, and different fluid field establishment methods can be executed for different sources, thereby improving the rendering accuracy in the virtual scene, enhancing the quality of the rendered virtual scene, and making the movements of various models in the picture more vivid and realistic.

[0107] As a further implementation of the above embodiment, establishing a fluid field in the virtual scene according to the movement of the target model includes: obtaining the first position of the target model in the first virtual scene graph and the second position in the second virtual scene graph, as well as the display time interval between the first virtual scene graph and the second virtual scene graph; wherein, the first virtual scene image and the second virtual scene image are two adjacent frames of images; determining the instantaneous velocity of the target model corresponding to the second virtual scene graph according to the first position, the second position, and the display time interval; determining the force field value of the fluid field to be established according to the instantaneous velocity; and establishing the fluid field according to the force field value.

[0108] Specifically, when the wind force is generated according to the movement of the target model, the target model can be a character model / role model, and the movement of the target model can be controlled by the player. Based on this, the first position P of the target model in the first virtual scene graph and the second position P1 in the second virtual scene graph, as well as the display time interval Δt1 (e.g., 0.1 ms) between the first virtual scene graph and the second virtual scene graph can be obtained; wherein, the first virtual scene graph can be understood as the current frame of the game screen, the second virtual scene graph can be understood as the previous frame of the current frame, and both the first position P and the second position P1 can be represented by relative coordinates / absolute coordinates, which are not limited in the embodiments of the present application.

[0109] Based on this, determining the instantaneous velocity of the target model corresponding to the second virtual scene graph according to the first position, the second position, and the display time interval includes: substituting the first position P, the second position P1, and the display time interval Δt1 into the expression V = (P - P1) / Δt1 to determine the instantaneous velocity V of the target model corresponding to the second virtual scene graph. It should be noted that for any two adjacent virtual scene images (i.e., adjacent frames), the corresponding instantaneous velocity can be obtained by executing the steps of the above embodiment.

[0110] It can be seen that by implementing this alternative embodiment, the accuracy of the established fluid field can be improved by calculating the instantaneous velocity corresponding to the virtual scene graph, and a more vivid and natural virtual scene graph can be rendered based on the fluid field with higher accuracy.

[0111] As a further implementation of the above implementation, determining the force field value of the fluid field to be established according to the instantaneous velocity includes: determining the force field value of the fluid field to be established according to the instantaneous velocity and a preset scaling factor.

[0112] Specifically, a preset scaling factor can be used to characterize the ratio between the instantaneous velocity and the force field value.

[0113] It can be seen that by implementing this alternative embodiment, a more accurate force field value can be determined based on the instantaneous velocity and the scaling factor, thereby improving the accuracy of the force field value.

[0114] As a further implementation of the above implementation manner, determining the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, and the display time interval includes: determining the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, the display time interval, a preset smoothing factor, and the instantaneous velocity corresponding to the target model in the first virtual scene graph.

[0115] Specifically, determining the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, the display time interval, a preset smoothing factor, and the instantaneous velocity corresponding to the target model in the first virtual scene graph includes: substituting the first position P, the second position P1, and the display time interval Δt1 into the expression V0 = (P - P1) / Δt1 to calculate the instantaneous velocity V0; further, substituting the instantaneous velocity V0, the preset smoothing factor r, and the instantaneous velocity V1 corresponding to the target model in the first virtual scene graph into the expression V = V0*r + V1*(1 - r) to calculate the instantaneous velocity V corresponding to the target model in the second virtual scene graph. Among them, the smoothing factor r can be represented as a numerical value. For example, the value range of this numerical value can be (0, 1]. For any two adjacent virtual scene images (i.e., adjacent frames), the smoothed instantaneous velocity can be obtained by performing the steps of the above embodiment. It should be noted that the smoothed instantaneous velocity V and the instantaneous velocity V before smoothing can be represented by different numerical values.

[0116] Based on this, not only can the force field value of the fluid field to be established be determined according to the instantaneous velocity, but also the force field value of the fluid field to be established can be determined according to the smoothed instantaneous velocity; the force field value therein belongs to a kind of force field parameter.

[0117] It can be seen that by implementing this alternative embodiment, the change between the instantaneous velocities corresponding to each virtual scene graph can be made smoother, and the force field values determined accordingly can make the changes of each model in the rendered virtual scene more real and natural.

[0118] For step S320, obtain the force field value obtained by each unit space under the action of wind force.

[0119] Specifically, the force field values obtained by each unit space under the action of wind force can be the same or different, which is not limited in the embodiments of the present application. For example, for radial wind force / linear wind force, relative to the radiation center, the unit spaces at the same radius can correspond to the same force field value.

[0120] For step S330, perform force field injection processing on the speed of the corresponding unit space according to the force field value corresponding to each unit space, to obtain the updated target speed of each unit space.

[0121] Specifically, the updated target speed of each unit space is different from the target speed of each unit space before update, or the updated target speeds of some unit spaces are different from those before update, which is not limited in the embodiments of the present application.

[0122] As an optional embodiment of step S330, performing force field injection processing on the speed of the corresponding unit space according to the force field value corresponding to each unit space, to obtain the updated target speed of each unit space, includes: after sequentially performing the following processing on the speed of each unit space, obtain the updated target speed of each unit space: perform force field injection processing, diffusion processing, incompressible processing, and convection processing according to the force field value of each unit space.

[0123] Specifically, performing force field injection processing according to the force field value of each unit space includes: substituting the force field value F of each unit space, the force field action duration △t2 corresponding to each unit space, and the speed V0 of each unit space into the expression V = V0 + F * △t2, to obtain the updated target speed V of each unit space.

[0124] Specifically, when the virtual scene is a three-dimensional scene, performing diffusion processing according to the force field value of each unit space includes: determining the adjacent unit spaces of each unit space, where the adjacent unit spaces include at least one of the upper unit, lower unit, left unit, right unit, front unit, and rear unit of the current unit space; substituting the speeds V0 上 , V0 下 , V0 左 , V0 右 , V0 前 , V0 后 corresponding to the adjacent unit spaces into the expression V = (V0 + (V0 上 + V0 下 + V0 左 + V0_right + V0 前 + V0 后 )) * a) / (1 + a * 6), to determine the updated target speed V of each unit space; where a is a preset diffusion value, which can be expressed as a constant.

[0125] Specifically, when the virtual scene is a two-dimensional scene, diffusion processing is performed according to the force field value of each unit space, including: determining the adjacent unit spaces of each unit space, where the adjacent unit spaces include at least one of the upper unit, lower unit, left unit, and right unit of the current unit space; and substituting the velocities V0 上 , V0 下 , V0 左 , V0 右 into the expression V = (V0 + (V0 上 + V0 下 + V0 左 + V0 right) * a) / (1 + a * 4) to determine the target velocity V after updating for each unit space; where a is a preset diffusion value and can be represented as a constant.

[0126] Specifically, incompressible processing is performed according to the force field value of each unit space, including: determining the divergence of each unit space according to the velocity of each unit space; iterating the pressure value of each unit space according to the divergence of each unit space; and calculating the target velocity of each unit space according to the pressure value of each unit space and the velocity of each unit space.

[0127] Furthermore, if the virtual scene is a three-dimensional scene, the length, width, and height corresponding to the three-dimensional virtual scene can be represented as Nx units, Ny units, and Nz units respectively, where x represents the x-axis, y represents the y-axis, z represents the z-axis, Nx also represents the Nth unit space on the x-axis, Ny also represents the Nth unit space on the y-axis, Nz also represents the Nth unit space on the z-axis, and N is a positive integer.

[0128] Based on this, determining the divergence of each unit space according to the velocity of each unit space includes: determining the components V0.x, V0.y, V0.z of the velocity vector of each unit space; determining V0 上 corresponding V0 上 .y, V0 下 corresponding V0 下 .y, V0 左 corresponding V0 左 .x, V0 右 corresponding V0 右 .x, V0 前 corresponding V0 前 .z, V0 后 corresponding V0 后 .z; substituting Nx, Ny, Nz corresponding to the current unit space (i.e., any unit space in the virtual scene) and V0 上 .y, V0 下 .y, V0 左 .x, V0 右 .x, V0 前 .z, V0后 . Substitute z into the expression d = ((V0 左 .x - V0 右 .x) / Nx + (V0 上 .y - V0 下 .y) / Ny + V0 前 .z - V0 后 .z) / Nz)*0.5 to determine the divergence d of the current unit space. It should be noted that for each unit space in the virtual scene, the above steps can be executed to determine the corresponding divergence.

[0129] Further, if the virtual scene is a two - dimensional scene, the length and width of the two - dimensional virtual scene can be represented as Nx units and Ny units respectively. x represents the x - axis, y represents the y - axis. Nx also represents the Nth unit space on the x - axis, and Ny also represents the Nth unit space on the y - axis, where N is a positive integer.

[0130] Based on this, determining the divergence of each unit space according to the velocity of each unit space includes: determining the components V0.x, V0.y of the velocity vector of each unit space; determining V0 上 corresponding V0 上 .y, V0 下 corresponding V0 下 .y, V0 左 corresponding V0 左 .x, V0 右 corresponding V0 右 .x; substituting Nx, Ny and V0 上 .y, V0 下 .y, V0 左 .x, V0 右 .x corresponding to the current unit space (i.e., any unit space in the virtual scene) into the expression d = ((V0 左 .x - V0 右 .x) / Nx + (V0 上 .y - V0 下 .y) / Ny)*0.5 to determine the divergence d of the current unit space. It should be noted that for each unit space in the virtual scene, the above steps can be executed to determine the corresponding divergence.

[0131] Furthermore, optionally, if the virtual scene is a three-dimensional scene, calculating the target velocity of each unit space according to the pressure value of each unit space and the velocity of each unit space includes: when the pressure value of each unit space is the initial value 0, performing iteration for the iteration times (e.g., 100) on the pressure value of each unit space to obtain the final pressure value p0 of each unit space, and determining p0 up, p0 down, p0 left, p0 right, p0 front, and p0 rear corresponding to the upper unit, lower unit, left unit, right unit, front unit, and rear unit of the current unit space respectively; substituting p0 up, p0 down, p0 left, p0 right, p0 front, p0 rear, and d of the current unit space into the expression p = (d + p0 left + p0 right + p0 up + p0 down + p0 front + p0 rear) / 6 to determine the final pressure value of the current unit space; calculating the target velocity of each unit space according to the final pressure value of each unit space and the velocity of each unit space. It should be noted that for each unit space in the virtual scene, the above steps can be executed to determine the corresponding final pressure value.

[0132] Furthermore, optionally, if the virtual scene is a two-dimensional scene, calculating the target velocity of each unit space according to the pressure value of each unit space and the velocity of each unit space includes: when the pressure value of each unit space is the initial value 0, performing iteration for the iteration times (e.g., 100) on the pressure value of each unit space to obtain the final pressure value p0 of each unit space, and determining p0 up, p0 down, p0 left, and p0 right corresponding to the upper unit, lower unit, left unit, and right unit of the current unit space respectively; substituting p0 up, p0 down, p0 left, p0 right, and d of the current unit space into the expression p = (d + p0 left + p0 right + p0 up + p0 down) / 4 to determine the final pressure value of the current unit space; calculating the target velocity of each unit space according to the final pressure value of each unit space and the velocity of each unit space. It should be noted that for each unit space in the virtual scene, the above steps can be executed to determine the corresponding final pressure value p.

[0133] In addition, the above method may further include: determining the above iteration times according to the incompressibility I value corresponding to the fluid field. For example, if the model is a liquid, the greater the incompressibility I value corresponding to the fluid field, the higher the iteration times; if the model is a gas, the smaller the incompressibility I value corresponding to the fluid field, the lower the iteration times.

[0134] Further, if the virtual scene is a three-dimensional scene, calculating the target velocity of each unit space according to the final pressure value of each unit space and the velocity of each unit space includes: determining p_left, p_right, p_up, p_down, p_front, and p_back corresponding to the upper unit, lower unit, left unit, right unit, front unit, and rear unit corresponding to the current unit space respectively; substituting p_left, p_right, p_up, p_down, p_front, p_back, and the velocity V0 of the current unit space into the expression V = V0 + vector(p_left - p_right, p_up - p_down, p_front - p_back)*0.5 to determine the target velocity V of the current unit space. It should be noted that for each unit space in the virtual scene, the above steps can be executed to determine the corresponding target velocity.

[0135] Further, if the virtual scene is a two-dimensional scene, calculating the target velocity of each unit space according to the final pressure value of each unit space and the velocity of each unit space includes: determining p_left, p_right, p_up, and p_down corresponding to the upper unit, lower unit, left unit, and right unit corresponding to the current unit space respectively; substituting p_left, p_right, p_up, p_down, and the velocity V0 of the current unit space into the expression V = V0 + vector(p_left - p_right, p_up - p_down)*0.5 to determine the target velocity V of the current unit space. It should be noted that for each unit space in the virtual scene, the above steps can be executed to determine the corresponding target velocity.

[0136] As an optional implementation manner, performing convection processing according to the force field value of each unit space includes: initializing the velocity V0 of each unit space to 0; substituting the velocity V0 of each unit space and the force field action duration △t2 into the expression S = V0*△t respectively to determine the flow distance vector S of each unit space; further, determining the length interval △s of each unit space, and determining the offset unit value S of each unit space according to △s, where the flow distance vector S can be represented as a decimal vector.

[0137] Further, performing ceiling processing and floor processing on the offset unit value S to determine the unit space to be offset corresponding to the coordinates (such as, (x, y, z)) of the current unit space. For example, rounding up △S = (1.0, 2.1, 3.8) to △S = (1, 2, 3), rounding down △S = (1.0, 2.1, 3.8) to △S = (1, 3, 4), and the unit spaces to be offset include (x + 1, y + 2, z + 3) and (x + 1, y + 2, z + 4).

[0138] Further, determining the velocity value ratio corresponding to the unit space to be offset according to the velocity V0 of the current unit space through a linear interpolation algorithm, and determining the target velocity of each unit space according to the velocity value ratio and the velocity V0 of the current unit space; such as Figure 6As shown, the current unit space can be shown as the shaded part in the left figure among multiple unit spaces, and the unit space to be offset of the current unit space can be shown as the shaded part in the right figure among multiple unit spaces.

[0139] Among them, the sum of the velocity value ratios corresponding to the unit spaces to be offset is 1, so that the overall velocity of the entire fluid field is conserved with the target velocity. For example, the velocity value ratio corresponding to the unit space (x + 1, y + 2, z + 3) is (1 - (2.1 - 2)) * (1 - (3.8 - 3)), the velocity value ratio corresponding to the unit space (x + 1, y + 2, z + 4) is (1 - (2.1 - 2)) * (4 - 3.8), the velocity value ratio corresponding to the unit space (x + 1, y + 3, z + 4) is (3 - 2.1) * (4 - 3.8), and the velocity value ratio corresponding to the unit space (x + 1, y + 3, z + 3) is (3 - 2.1) * (1 - (3.8 - 3)).

[0140] As another alternative implementation, convection processing is performed according to the force field value of each unit space, including: substituting the velocity V0 and the force field action duration Δt2 of each unit space into the expression S = V0 * Δt to determine the flow distance vector S of each unit space; furthermore, determining the length interval Δs of each unit space, and determining the offset unit value S of each unit space according to Δs, where the flow distance vector S can be represented as a decimal vector; taking the negative of Δs to obtain -ΔS. Upward rounding processing and downward rounding processing are performed according to -ΔS to determine the unit space to be offset corresponding to the coordinates (such as, (x, y, z)) of the current unit space; the velocity value ratio corresponding to the unit space to be offset is determined by the linear interpolation algorithm according to the velocity V0 of the current unit space, and the target velocity of each unit space is determined according to the velocity value ratio and the velocity V0 of the current unit space. As Figure 7 As shown, the current unit space can be shown as the shaded part in the left figure among multiple unit spaces, and the unit space to be offset of the current unit space can be shown as the shaded part in the right figure among multiple unit spaces.

[0141] In addition, since incompressible iteration easily weakens the injection effect of the compressed force field. For example, a radial force field (as Figure 8 shown) generates velocities in all directions from a point. At this time, the pressure at this point is vacuum (such as, Figure 9 shown), and the iteration of pressure easily cancels the influence of this force field. Based on this, for the radial force field, the method may further include: after determining the target velocity of each unit space according to the velocity value ratio and the velocity V0 of the current unit space, clearing the pressure of the unit space whose change rate under the influence of the radial pressure is greater than the preset change rate, and the processing result can be as Figure 10 shown.

[0142] In addition, if the virtual scene is a three-dimensional scene of Nx * Ny * Nz, the three-dimensional scene can be represented as a 3D texture resource; if the virtual scene is a two-dimensional scene of Nx * Ny, the two-dimensional scene can be represented as a 2D texture resource.

[0143] It should be noted that in the actual application process, at least one of force field injection processing, diffusion processing, incompressible processing, and convection processing can be performed according to the force field value of each unit space. If the processing based on the force field value of each unit space includes more than one type, the processing can be sequentially performed according to the preset order corresponding to the force field injection processing, diffusion processing, incompressible processing, and convection processing. The target velocity V of the unit space obtained from the previous processing can be used as the velocity V0 of the unit space for the subsequent processing.

[0144] It can be seen that by implementing this alternative embodiment, the frame-by-frame update of the model form in the virtual scene graph can be achieved by updating the target velocity of each unit space, so as to achieve real-time, realistic, and vivid scene special effects.

[0145] For step S340, the material information of the vertices in the corresponding unit space is updated according to the target velocity of each unit space.

[0146] Specifically, the material information may include parameters for characterizing one or more dimensions of the vertex.

[0147] Optionally, updating the material information of the vertices in the corresponding unit space according to the target velocity of each unit space includes: obtaining the color parameter of each unit space; updating the material information of the vertices in the corresponding unit space according to the color parameter and the target velocity of each unit space.

[0148] For step S350, the virtual scene is rendered according to the updated material information of the vertices.

[0149] Optionally, rendering the virtual scene according to the updated material information of the vertices includes: obtaining the position of the unit space where the rigid body is located, determining the impulse of the unit space where the rigid body is located according to the position of the unit space where the rigid body is located, the update ratio relationship, and the update range, converting the impulse into a wind speed value, and rendering the virtual scene according to the wind speed value and the updated material information of the vertices.

[0150] Optionally, rendering the virtual scene according to the updated material information of the vertices includes: obtaining the position of the unit space where the cloth is located, determining the impulse of the unit space where the cloth is located according to the position of the unit space where the cloth is located, the update ratio relationship, and the update range, converting the impulse into a wind speed value, and rendering the virtual scene according to the wind speed value and the updated material information of the vertices.

[0151] Optionally, render the virtual scene according to the material information of the updated vertices, including: obtaining the listened position of the unit space where the sound effect is located, determining the wind speed value of the unit space where the sound effect is located according to the listened position of the unit space where the sound effect is located, and rendering the virtual scene according to the wind speed value and the material information of the updated vertices.

[0152] In addition, after rendering the virtual scene according to the material information of the updated vertices, it further includes: obtaining the update result for the current frame in the rendering response of the next frame, which can reduce the consumption of computing resources.

[0153] For example, if the models included in the virtual scene include grass models (such as Figure 11 shown), and the material information includes the vertex swing direction and swing period of the grass model, the method of rendering the virtual scene according to the material information of the updated vertices can be: determining the unit space position of the fluid wind field texture according to the grass model vertex position; determining the impulse of the unit space according to the position of the unit space where the fluid wind field texture is located, the update ratio relationship, and the update range, and converting the impulse into a wind speed value; selecting a target noise texture from a plurality of preset noise textures, and the number of target noise textures can be one or more; determining the swing frequency of the grass model according to the target noise texture; and rendering the virtual scene according to the grass model swing frequency, the grass model wind speed value, and the grass model swing direction.

[0154] It should be noted that the noise texture can include one or more. If there are multiple, it can be as Figure 12 shown, Figure 12 in which the frequencies of the noise textures 1210, 1220, 1230, 1240, 1250, 1260, and 1270 are in a multiple frequency ratio; the sizes of the noise textures 1210, 1220, 1230, 1240, 1250, 1260, and 1270 can be 1*1, 2*2, 4*4, 8*8, 16*16, 32*32, and 64*64 respectively; the noise textures 1210, 1220, 1230, 1240, 1250, 1260, and 1270 respectively correspond to 1, 2, 4, 8, 16, 32, and 64 times the swing frequency, and the swing frequency and the wind speed are in a corresponding relationship.

[0155] Among them, the generation methods for the noise texture maps 1210, 1220, 1230, 1240, 1250, 1260, and 1270 can be as follows: Generate (n + 2)×(n + 2) random numbers based on the preset noise texture map 1210, and generate the noise texture map 1220 through smooth interpolation; Generate (n + 2)×(n + 2) random numbers based on the noise texture map 1220, and generate the noise texture map 1230 through smooth interpolation; Generate (n + 2)×(n + 2) random numbers based on the noise texture map 1230, and generate the noise texture map 1240 through smooth interpolation; Generate (n + 2)×(n + 2) random numbers based on the noise texture map 1240, and generate the noise texture map 1250 through smooth interpolation; Generate (n + 2)×(n + 2) random numbers based on the noise texture map 1250, and generate the noise texture map 1260 through smooth interpolation; Generate (n + 2)×(n + 2) random numbers based on the noise texture map 1260, and generate the noise texture map 1270 through smooth interpolation.

[0156] In addition, for the above embodiments, when the wind speed value is between any two or more of the noise texture maps 1210, 1220, 1230, 1240, 1250, 1260, and 1270, the swing frequency and the wind speed value can be calculated through an interpolation algorithm.

[0157] As Figure 13 shown, when the wind speed value is between the noise texture maps 1311, 1312, and 1313 in Figure 13 Determine an isosceles triangle with the unilateral side length of the horizontally arranged noise texture maps 1311, 1312, and 1313 as the base; The height of the isosceles triangle can represent the wind speed value, and the noise texture maps 1311, 1312, and 1313 can be the frequency noise ranges. Among them, the slope of the isosceles triangle can be adjusted to a preset slope, and then the noise texture maps covered by the adjusted isosceles triangle are superimposed to obtain the target noise texture map. Furthermore, the swing frequency of the grass model can be determined according to the target noise texture map.

[0158] When the wind speed value is between Figure 13When between the noise texture maps 1321, 1322, 1323, and 1324, an isosceles triangle is determined with the unilateral side length of the horizontally arranged noise texture maps 1321, 1322, 1323, and 1324 as the base; the height of the isosceles triangle can represent the wind speed value, and the noise texture maps 1321, 1322, 1323, and 1324 can be the frequency noise range. Among them, the slope of the isosceles triangle can be adjusted to a preset slope, and then the noise texture maps covered by the adjusted isosceles triangle are superimposed to obtain a target noise texture map. Furthermore, the swing frequency of the grass model can be determined according to the target noise texture map.

[0159] Based on Figure 3 , please refer to Figure 14 , Figure 14 which schematically shows a flowchart of a method for displaying a virtual scene according to an embodiment of the present disclosure. Figure 14 is an embodiment corresponding to the steps and embodiments of Figure 3 for defining Figure 3 an optional execution relationship between the steps and embodiments of Figure 14 The method for displaying a virtual scene as shown, provides a graphical user interface through a terminal device. The graphical user interface includes a virtual scene, and the virtual scene includes a target model. The method for displaying the virtual scene may include: steps S1400 to step S1490.

[0160] Step S1400: When it is detected that wind force is generated by the target model in the virtual scene, determine whether the wind force is generated according to the movement of the target model. If so, execute step S1420. If not, execute step S1410.

[0161] Step S1410: Establish a fluid field according to the type of wind force and preset force field parameters. The fluid field includes multiple unit spaces. Then execute step S1450.

[0162] Step S1420: Obtain the first position of the target model in the first virtual scene graph and the second position in the second virtual scene graph, and the display time interval between the first virtual scene graph and the second virtual scene graph; wherein, the first virtual scene image and the second virtual scene image are two adjacent frames of images.

[0163] Step S1430: Determine the instantaneous velocity of the target model corresponding to the second virtual scene graph according to the first position, the second position, the display time interval, a preset smoothing factor, and the instantaneous velocity corresponding to the target model in the first virtual scene graph.

[0164] Step S1440: Determine the force field value of the fluid field to be established according to the instantaneous velocity and a preset scaling factor, and establish a fluid field based on the force field value. The fluid field includes multiple unit spaces. Then, execute step S1450.

[0165] Step S1450: Obtain the force field value obtained by each unit space under the action of wind force.

[0166] Step S1460: After performing the following processing on the velocity of each unit space in sequence, obtain the updated target velocity of each unit space.

[0167] Step S1470: Perform force field injection processing, diffusion processing, incompressible processing, and convection processing according to the force field value of each unit space.

[0168] Step S1480: Update the material information of the vertices in the corresponding unit space according to the target velocity of each unit space.

[0169] Step S1490: Render the virtual scene according to the updated material information of the vertices.

[0170] It should be noted that steps S1400 to S1490 correspond to Figure 3 the respective steps and their embodiments shown. For the specific implementation manners of steps S1400 to S1490, please refer to Figure 3 the respective steps and their embodiments shown, which will not be elaborated here.

[0171] It can be seen that implementing Figure 14 the method shown can improve the authenticity of model interaction in the virtual scene, enhance the correlation of pose changes between models, and thus improve the authenticity of the virtual scene.

[0172] Furthermore, on the basis of Figure 3 , in this exemplary embodiment, a display device for a virtual scene is further provided. The above device provides a graphical user interface, and the graphical user interface includes a virtual scene. The virtual scene includes a target model. Referring to Figure 15 shown, the display device 1500 for the virtual scene may include: a fluid field establishment unit 1501, a parameter acquisition unit 1502, a force field injection unit 1503, an information update unit 1504, and a scene rendering unit 1505.

[0173] The fluid field establishment unit 1501 is configured to establish a fluid field in the virtual scene when it detects that a wind force is generated by the target model in the virtual scene. The fluid field includes multiple unit spaces;

[0174] The parameter acquisition unit 1502 is configured to obtain the force field value obtained by each unit space under the action of wind force;

[0175] A force field injection unit 1503 is configured to perform a force field injection process on the velocity of a corresponding unit space according to the force field value corresponding to each unit space, so as to obtain the updated target velocity of each unit space;

[0176] An information update unit 1504 is configured to update the material information of the vertices in the corresponding unit space according to the target velocity of each unit space;

[0177] A scene rendering unit 1505 is configured to render a virtual scene according to the updated material information of the vertices.

[0178] Among them, the types of wind force include linear wind force, vortex wind force, and radial wind force.

[0179] It can be seen that implementing Figure 15 the device shown can improve the authenticity of model interaction in the virtual scene, improve the correlation of pose changes between models, and further improve the authenticity of the virtual scene.

[0180] In an exemplary embodiment of the present disclosure, the fluid field establishment unit 1501 establishes a fluid field in the virtual scene, including:

[0181] The fluid field establishment unit 1501 determines whether the wind force is generated according to the movement of the target model;

[0182] If so, the fluid field establishment unit 1501 establishes a fluid field in the virtual scene according to the movement of the target model;

[0183] If not, the fluid field establishment unit 1501 establishes a fluid field according to the type of wind force and the preset force field parameters.

[0184] It can be seen that implementing this optional embodiment can determine the generation source of the wind force and execute different fluid field establishment methods for different generation sources, which can improve the rendering accuracy in the virtual scene, improve the quality of the rendered virtual scene, and make the movement of each model in the picture more vivid and realistic.

[0185] In an exemplary embodiment of the present disclosure, the fluid field establishment unit 1501 establishes a fluid field in the virtual scene according to the movement of the target model, including:

[0186] The fluid field establishment unit 1501 obtains the first position of the target model in the first virtual scene graph and the second position in the second virtual scene graph, as well as the display time interval between the first virtual scene graph and the second virtual scene graph; wherein, the first virtual scene image and the second virtual scene image are two adjacent frames of images;

[0187] The fluid field establishment unit 1501 determines the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, and the display time interval;

[0188] The fluid field establishment unit 1501 determines the force field value of the fluid field to be established according to the instantaneous velocity;

[0189] The fluid field establishment unit 1501 establishes a fluid field according to the force field value.

[0190] It can be seen that by implementing this optional embodiment, the accuracy of the established fluid field can be improved by calculating the instantaneous velocity corresponding to the virtual scene graph, and a more vivid and natural virtual scene graph can be rendered based on the fluid field with higher accuracy.

[0191] In an exemplary embodiment of the present disclosure, the fluid field establishment unit 1501 determines the force field value of the fluid field to be established according to the instantaneous velocity, including:

[0192] The fluid field establishment unit 1501 determines the force field value of the fluid field to be established according to the instantaneous velocity and a preset scaling factor.

[0193] It can be seen that by implementing this optional embodiment, a more accurate force field value can be determined through the instantaneous velocity and the scaling factor, thereby improving the accuracy of the force field value.

[0194] In an exemplary embodiment of the present disclosure, the fluid field establishment unit 1501 determines the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, and the display time interval, including:

[0195] The fluid field establishment unit 1501 determines the instantaneous velocity corresponding to the target model in the second virtual scene graph according to the first position, the second position, the display time interval, a preset smoothing factor, and the instantaneous velocity corresponding to the target model in the first virtual scene graph.

[0196] It can be seen that by implementing this optional embodiment, the change between the instantaneous velocities corresponding to each virtual scene graph can be made smoother, and the force field value determined accordingly can make the changes of each model in the rendered virtual scene more real and natural.

[0197] In an exemplary embodiment of the present disclosure, the force field injection unit 1503 performs force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target velocity of each unit space, including:

[0198] The force field injection unit 1503 obtains the updated target velocity of each unit space after sequentially performing the following processing on the velocity of each unit space:

[0199] The force field injection unit 1503 performs force field injection processing, diffusion processing, incompressible processing, and convection processing according to the force field values of each unit space.

[0200] It can be seen that by implementing this alternative embodiment, the model form in the virtual scene graph can be updated frame by frame by updating the target speed for each unit space, so as to achieve real-time, realistic, and vivid scene special effects.

[0201] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0202] Since each functional module of the display device of the virtual scene in the exemplary embodiments of the present disclosure corresponds to the steps of the exemplary embodiments of the above-described virtual scene display method, for the details not disclosed in the device embodiments of the present disclosure, please refer to the embodiments of the above-described virtual scene display method of the present disclosure.

[0203] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only to be regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0204] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A method for displaying a virtual scene, which provides a graphical user interface through a terminal device. The graphical user interface includes a virtual scene, and the virtual scene contains a target model. Characterized in that, The method includes: When it is detected that the target model generates wind force in the virtual scene, determine whether the wind force is generated according to the movement of the target model; if so, establish a fluid field in the virtual scene according to the movement of the target model; if not, establish a fluid field according to the type of the wind force and preset force field parameters; wherein, the fluid field contains multiple unit spaces; Obtain the force field value obtained by each unit space under the action of the wind force; Perform force field injection processing on the speed of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target speed of each unit space; Update the material information of the vertices in the corresponding unit space according to the target speed of each unit space; Render the virtual scene according to the updated material information of the vertices.

2. The display method according to claim 1, Characterized in that, The establishing a fluid field in the virtual scene according to the movement of the target model includes: Obtain the first position of the target model in the first virtual scene graph and the second position in the second virtual scene graph, and the display time interval between the first virtual scene graph and the second virtual scene graph; wherein, the first virtual scene image and the second virtual scene image are two adjacent frames of images; Determine the instantaneous speed corresponding to the target model in the second virtual scene graph according to the first position, the second position and the display time interval; Determine the force field value of the fluid field to be established according to the instantaneous speed; Establish a fluid field according to the force field value.

3. The display method according to claim 2, Characterized in that, The determining the force field value of the fluid field to be established according to the instantaneous speed includes: Determine the force field value of the fluid field to be established according to the instantaneous speed and a preset scaling factor.

4. The display method according to claim 2, Characterized in that, According to the first position, the second position and the display time interval, determining the instantaneous speed corresponding to the target model in the second virtual scene graph includes: Determine the instantaneous speed corresponding to the target model in the second virtual scene graph according to the first position, the second position, the display time interval, a preset smoothing factor, and the instantaneous speed corresponding to the target model in the first virtual scene graph.

5. The display method according to claim 1, Characterized in that, The types of the wind force include linear wind force, vortex wind force, and radial wind force.

6. The display method according to claim 1, Characterized in that, The performing force field injection processing on the speed of the corresponding unit space according to the force field value corresponding to each unit space to obtain the updated target speed of each unit space includes: After sequentially performing the following processing on the speed of each unit space, obtain the updated target speed of each unit space: Perform force field injection processing, diffusion processing, incompressible processing, and convection processing according to the force field values of each unit space.

7. A display device for a virtual scene, the device provides a graphical user interface, the graphical user interface includes a virtual scene, and the virtual scene contains a target model. Characterized in that The device includes: A fluid field establishment unit, configured to determine whether the wind force is generated according to the movement of the target model when it is detected that the target model generates wind force in the virtual scene; if so, establish a fluid field in the virtual scene according to the movement of the target model; if not, establish a fluid field according to the type of the wind force and preset force field parameters; wherein, the fluid field includes a plurality of unit spaces. A parameter acquisition unit, configured to acquire the force field value obtained by each unit space under the action of the wind force. A force field injection unit, configured to perform force field injection processing on the velocity of the corresponding unit space according to the force field value corresponding to each unit space, to obtain the updated target velocity of each unit space. An information update unit, configured to update the material information of the vertices in the corresponding unit space according to the target velocity of each unit space. A scene rendering unit, configured to render the virtual scene according to the updated material information of the vertices.

8. A computer-readable medium, on which a computer program is stored. Characterized in that When the program is executed by a processor, it implements the method described in any one of claims 1 to 6.

9. An electronic device. Characterized in that It includes: One or more processors; A storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement the method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Virtual object wind animation generation method and device, storage medium and terminal

    CN112562050A