Virtual model processing method, device, computer equipment and storage medium
By using the particle system to generate virtual particle models in the game engine and assigning material parameters, the problem of single atomization effect performance angle and low realistic degree in the existing technology is solved, and a more realistic and multi-angle atomization effect display is achieved.
Patent Information
- Application Number
- CN202111625953.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2041-12-28
AI Technical Summary
In the prior art, the atomization effect has a single expression angle in the game engine and is low in realism, making it difficult to achieve a real atomization effect.
By presetting the model material parameters, a three-dimensional virtual model is constructed, and a virtual particle model is generated using the particle system, and the material parameters are assigned to it to realize a virtual particle model with atomization effect that is viewed in three-dimensionally.
The atomization effect is increased in the game engine and the authenticity of the atomization effect is improved.
Smart Images

Figure CN114404953B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, in particular to the field of game technology, and specifically to a method, device, computer equipment and storage medium for processing a virtual model. Background Art
[0002] With the continuous development of computer communication technology, the widespread application of terminals such as smart phones, tablets and laptops, terminals are developing in a diversified and personalized direction, and are becoming an indispensable terminal in people's life and work. In order to meet people's pursuit of spiritual life, entertainment games that can be operated on terminals have emerged, and more and more terminal games have emerged. Terminal games have become an indispensable way of life and entertainment. In order to enable users to get better game experience, many terminal games are often built based on real scenes. Therefore, when designing games, the realization of game scenes will be closer to the real environment.
[0003] In actual game design projects, artists and planners often propose the production of game resources. For example, fog effects such as smoke, explosion flames, and white clouds can be achieved through the design of game resources. In the prior art, a sequence of frames drawn by art production personnel is usually used to synthesize a special effect map, and then the fog effect is expressed in the form of a single map of particle emission in the game engine, resulting in a single angle of the fog effect in the game engine and a low degree of realism. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, computer equipment and storage medium for processing a virtual model. After pre-setting model material parameters and constructing a three-dimensional virtual model, a virtual particle model is generated based on the three-dimensional virtual model through a particle system, and the model material parameters are assigned to the virtual particle model to obtain a virtual particle model with a fog effect that can be viewed in three dimensions, thereby increasing the performance angle of the fog effect in the game engine and improving the authenticity of the fog effect.
[0005] The present application provides a method for processing a virtual model, including:
[0006] Obtaining a virtual model monomer that realizes a preset atomization effect;
[0007] Generate a first virtual particle model monomer corresponding to the virtual model monomer through a particle system;
[0008] Setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is the first virtual particle model monomer having the preset atomization effect;
[0009] In response to a target atomization effect generation instruction, selecting at least one target virtual particle model monomer from a plurality of second virtual particle model monomers;
[0010] A target virtual model with a target atomization effect is generated based on the target virtual particle model monomer.
[0011] In some embodiments, setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain the second virtual particle model monomer includes:
[0012] Classify all particles in the first virtual particle model monomer based on a first preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to a first texture effect in the first preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to a second texture effect in the first preset texture map;
[0013] Material parameters corresponding to the first texture effect are set for all particles in the first particle set, and material parameters corresponding to the second texture effect are set for all particles in the second particle set, so as to obtain a second virtual particle model monomer.
[0014] In some embodiments, the preset atomization effect is an explosion effect;
[0015] The step of setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer includes:
[0016] Classify all particles in the first virtual particle model monomer based on the second preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to the flame effect in the second preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to the smoke effect in the preset texture map;
[0017] Material parameters corresponding to the flame effect are set for all particles in the first particle set, and material parameters corresponding to the smoke effect are set for all particles in the second particle set to obtain a second virtual particle model monomer.
[0018] In some embodiments, after setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain the second virtual particle model monomer, the method further includes:
[0019] All particles in the second virtual particle model monomer are adjusted based on the target particle dissolution value to set a particle dissolution period for all particles in the second virtual particle model monomer.
[0020] In some embodiments, after setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain the second virtual particle model monomer, the method further includes:
[0021] Based on the particle dissolution value of the designated texture effect, all particles with the designated texture effect in the second virtual particle model monomer are adjusted to set a particle dissolution period for the particles with the designated texture effect in the second virtual particle model monomer.
[0022] In some embodiments, after setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain the second virtual particle model monomer, the method further includes:
[0023] The vertices of the triangular mesh of the second virtual particle model monomer are adjusted based on the target vertex offset value to set a target offset value for all particles in the second virtual particle model monomer, wherein the target offset value is a numerical value of the vertices of the triangular mesh offset after a preset time period.
[0024] In some embodiments, after setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain the second virtual particle model monomer, the method further includes:
[0025] Determining whether the number of faces of the bounding box of the second virtual particle model monomer is a preset number of faces;
[0026] If not, the bounding box of the second virtual particle model monomer is adjusted based on the preset number of faces, so that the number of faces of the bounding box of the second virtual particle model monomer is the preset number of faces.
[0027] In some embodiments, after setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain the second virtual particle model monomer, the method further includes:
[0028] Obtain target particle size parameters;
[0029] The particle sizes of all particles in the second virtual particle model monomer are adjusted based on the target particle size parameter to obtain an adjusted second virtual particle model monomer.
[0030] In some embodiments, after setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain the second virtual particle model monomer, the method further includes:
[0031] Get the target particle display parameters;
[0032] The display duration of all particles in the second virtual particle model monomer is adjusted based on the target particle display parameter to obtain an adjusted second virtual particle model monomer.
[0033] Accordingly, the embodiment of the present application further provides a virtual model processing device, including:
[0034] An acquisition unit, configured to acquire preset model parameters, and create a virtual sample model based on the preset model parameters, wherein the preset model parameters include model shape parameters and model size parameters;
[0035] A first generating unit, configured to generate a virtual particle model through a particle system based on the virtual sample model, wherein a model parameter of the virtual particle model is consistent with a model parameter of the virtual sample model;
[0036] A setting unit, used for setting corresponding preset material parameters for all particles in the virtual particle model to obtain a candidate virtual particle model;
[0037] A screening unit, for screening out a plurality of target virtual particle model monomers from a plurality of candidate virtual particle models based on preset conditions in response to a model building instruction;
[0038] The second generating unit is used to generate a target virtual model based on a plurality of target virtual particle model monomers.
[0039] In some embodiments, the apparatus further comprises:
[0040] A first dividing unit is used to divide all particles in the first virtual particle model monomer into categories based on a first preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to a first texture effect in the first preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to a second texture effect in the first preset texture map;
[0041] The first setting subunit is used to set the material parameters corresponding to the first texture effect for all particles in the first particle set, and to set the material parameters corresponding to the second texture effect for all particles in the second particle set, so as to obtain a second virtual particle model monomer.
[0042] In some embodiments, the apparatus further comprises:
[0043] A second division unit is used to classify all particles in the first virtual particle model monomer according to a second preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to the flame effect in the second preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to the smoke effect in the preset texture map;
[0044] The second setting subunit is used to set material parameters corresponding to the flame effect for all particles in the first particle set, and to set material parameters corresponding to the smoke effect for all particles in the second particle set, so as to obtain a second virtual particle model monomer.
[0045] In some embodiments, the apparatus further comprises:
[0046] The first adjustment unit is used to adjust all particles in the second virtual particle model monomer based on the target particle dissolution value to set a particle dissolution period for all particles in the second virtual particle model monomer.
[0047] In some embodiments, the apparatus further comprises:
[0048] The second adjustment unit is used to adjust all particles with the specified texture effect in the second virtual particle model monomer based on the particle dissolution value of the specified texture effect, so as to set a particle dissolution period for the particles with the specified texture effect in the second virtual particle model monomer.
[0049] In some embodiments, the apparatus further comprises:
[0050] The third adjustment unit is used to adjust the vertices of the triangular mesh of the second virtual particle model monomer based on the target vertex offset value to set the target offset value for all particles in the second virtual particle model monomer, wherein the target offset value is the value of the vertices of the triangular mesh offset after a preset time period.
[0051] In some embodiments, the apparatus further comprises a determining unit configured to:
[0052] Determining whether the number of faces of the bounding box of the second virtual particle model monomer is a preset number of faces;
[0053] If not, the bounding box of the second virtual particle model monomer is adjusted based on the preset number of faces, so that the number of faces of the bounding box of the second virtual particle model monomer is the preset number of faces.
[0054] In some embodiments, the apparatus further comprises:
[0055] A first acquisition subunit is used to acquire target particle size parameters;
[0056] The fourth adjustment unit is used to adjust the particle size of all particles in the second virtual particle model monomer based on the target particle size parameter to obtain an adjusted second virtual particle model monomer.
[0057] In some embodiments, the apparatus further comprises:
[0058] The second acquisition subunit is used to acquire the display parameters of the target particles;
[0059] The fifth adjustment unit is used to adjust the display duration of all particles in the second virtual particle model monomer based on the target particle display parameter to obtain an adjusted second virtual particle model monomer.
[0060] Correspondingly, an embodiment of the present application also provides a computer device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, any step of the virtual model processing method is implemented.
[0061] Correspondingly, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the methods for processing a virtual model are implemented.
[0062] The embodiment of the present application provides a processing method, device, computer equipment and storage medium of a virtual model, which obtains a virtual model monomer that realizes a preset atomization effect; then, generates a first virtual particle model monomer corresponding to the virtual model monomer through a particle system; then, sets the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is a first virtual particle model monomer with the preset atomization effect; then, in response to a target atomization effect generation instruction, selects at least one target virtual particle model monomer from a plurality of second virtual particle model monomers; finally, generates a target virtual model with a target atomization effect based on the target virtual particle model monomer. The embodiment of the present application sets the model material parameters in advance, constructs a three-dimensional virtual model, generates a virtual particle model based on the three-dimensional virtual model through a particle system, and assigns the model material parameters to the virtual particle model to obtain a virtual particle model with atomization effect that can be viewed in three dimensions, increases the performance angle of the atomization effect in the game engine, and improves the authenticity of the atomization effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] 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 those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0064] Figure 1 A flowchart of a method for processing a virtual model provided in an embodiment of the present application.
[0065] Figure 2 A schematic diagram of an application scenario of the virtual model processing method provided in an embodiment of the present application.
[0066] Figure 3 A schematic diagram of the structure of a virtual model processing device provided in an embodiment of the present application.
[0067] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0069] The embodiments of the present application provide a method, device, computer equipment and storage medium for processing a virtual model. Specifically, the method for processing a virtual model in the embodiments of the present application can be executed by a computer equipment, wherein the computer equipment can be a terminal equipment. The terminal can be a terminal equipment such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc.
[0070] The virtual model processing method provided in the embodiment of the present application can produce a virtual model monomer through 3D MAX (3D Studio Max), and then import the virtual model monomer into the game engine, so that the game engine uses the particle system to generate a virtual particle model monomer based on the virtual model monomer, and then set the material parameters corresponding to the preset atomization effect for all particles in the virtual particle model monomer, so that the virtual particle model monomer has the preset atomization effect.
[0071] For example, when the processing method of the virtual model is run on a terminal, the terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal device, or the graphical user interface may be presented through holographic projection. For example, the terminal device may include a touch display screen and a processor, the touch display screen is used to present the graphical user interface and receive operation instructions generated by the user acting on the graphical user interface, the graphical user interface includes a display screen, and the processor is used to generate the graphical user interface, respond to the operation instructions, and control the display of the graphical user interface on the touch display screen.
[0072] The embodiments of the present application provide a method, device, computer equipment and storage medium for processing a virtual model, which are described in detail below. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0073] See also Figure 1 , Figure 1 A flowchart of a method for processing a virtual model provided in an embodiment of the present application is shown in FIG. 1 , wherein the specific process may be steps 101 to 105 as follows:
[0074] 101, obtaining a virtual model monomer for realizing a preset atomization effect.
[0075] In the embodiment of the present application, a virtual model unit can be produced by using a model production software, for example, 3DMAX (3D Studio Max) can be used to produce a virtual model unit. The designer can pre-set the size and shape of the model, and produce a virtual model unit in 3D MAX based on the preset model size and shape; or directly obtain a virtual model that has been generated as a virtual model unit.
[0076] The virtual model monomer may include skin data and a bounding box. The skin data may include multiple vertex data, each of which has corresponding attribute information such as weight, vertex position information, normal, triangle sequence, etc. Among them, according to the triangle sequence of each vertex, a triangular face can be formed based on the triangle sequence and the corresponding vertex data, and multiple triangular faces can form a graphic mesh, that is, a triangular mesh. The bounding box is a simple geometric space that contains objects of complex shapes. The purpose of adding a bounding volume to a virtual model monomer is to quickly perform collision detection or filter before performing accurate collision detection, that is, when the bounding volume collides, accurate collision detection and processing are performed.
[0077] 102 , generating a first virtual particle model monomer corresponding to the virtual model monomer through a particle system.
[0078] In the embodiment of the present application, the virtual model monomer produced in 3D MAX can be imported into the game engine, so that the game engine uses its own particle system to generate a first virtual particle model monomer corresponding to the virtual model monomer.
[0079] 103 , setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is the first virtual particle model monomer having the preset atomization effect.
[0080] In an embodiment of the present application, the material parameters corresponding to the preset atomization effect may include inner and outer flame color intensity, smoke color, dark point texture, dark point range, dark point intensity, smoke light receiving range, smoke light receiving intensity, model vertex offset intensity, mask range, smoke light and dark thickness, texture intensity, dissolution intensity and other parameters.
[0081] Optionally, designers can choose the pop-style cartoon explosion smoke material and set parameters such as inner and outer flame color intensity, smoke color, dark point texture, dark point range, dark point intensity, smoke light range, smoke light intensity, model vertex offset intensity, mask range, smoke light and dark thickness, texture intensity, dissolution intensity, etc. according to design requirements.
[0082] Among them, the coordinate information of all particles in the first virtual particle model monomer can be obtained. After obtaining the coordinate information of the target particle, the coordinate information of the particle can be mapped to a preset texture (UV) map, so as to determine the mapping coordinates of the particle in the preset texture map, that is, the coordinate information corresponding to all particles is determined in the preset texture map to have a mapping relationship with the map texture coordinates, and the material parameters corresponding to the corresponding texture map are set for the particles.
[0083] In one embodiment, the step of “setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer” may include:
[0084] Classify all particles in the first virtual particle model monomer based on a first preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to a first texture effect in the first preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to a second texture effect in the first preset texture map;
[0085] Material parameters corresponding to the first texture effect are set for all particles in the first particle set, and material parameters corresponding to the second texture effect are set for all particles in the second particle set, so as to obtain a second virtual particle model monomer.
[0086] In order to obtain a virtual particle model monomer with an explosion effect, the preset atomization effect may be an explosion effect. The step of "setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer" may include:
[0087] Classify all particles in the first virtual particle model monomer based on the second preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to the flame effect in the second preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to the smoke effect in the preset texture map;
[0088] Material parameters corresponding to the flame effect are set for all particles in the first particle set, and material parameters corresponding to the smoke effect are set for all particles in the second particle set to obtain a second virtual particle model monomer.
[0089] In order to achieve the hidden effect of the virtual particle model monomer, after the step of "setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer", the method may include:
[0090] All particles in the second virtual particle model monomer are adjusted based on the target particle dissolution value to set a particle dissolution period for all particles in the second virtual particle model monomer.
[0091] Optionally, after the step of “setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer”, the method may include:
[0092] Based on the particle dissolution value of the designated texture effect, all particles with the designated texture effect in the second virtual particle model monomer are adjusted to set a particle dissolution period for the particles with the designated texture effect in the second virtual particle model monomer.
[0093] In order to dynamically control the change of the size and shape of the smoke, after the step of "setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer", the method may include:
[0094] The vertices of the triangular mesh of the second virtual particle model monomer are adjusted based on the target vertex offset value to set a target offset value for all particles in the second virtual particle model monomer, wherein the target offset value is a numerical value of the vertices of the triangular mesh offset after a preset time period.
[0095] In order to improve the authenticity of the atomization effect, after the step of "setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer", the method may include:
[0096] Determining whether the number of faces of the bounding box of the second virtual particle model monomer is a preset number of faces;
[0097] If not, the bounding box of the second virtual particle model monomer is adjusted based on the preset number of faces, so that the number of faces of the bounding box of the second virtual particle model monomer is the preset number of faces.
[0098] Optionally, after the step of “setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer”, the method may include:
[0099] Obtain target particle size parameters;
[0100] The particle sizes of all particles in the second virtual particle model monomer are adjusted based on the target particle size parameter to obtain an adjusted second virtual particle model monomer.
[0101] In one embodiment, after the step of “setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer”, the method may include:
[0102] Get the target particle display parameters;
[0103] The display duration of all particles in the second virtual particle model monomer is adjusted based on the target particle display parameter to obtain an adjusted second virtual particle model monomer.
[0104] 104 , in response to the target atomization effect generation instruction, select at least one target virtual particle model monomer from the plurality of second virtual particle model monomers.
[0105] In the embodiment of the present application, multiple virtual model monomers can be created through 3D MAX, and then the multiple virtual model monomers can be imported into the game engine and emitted through the particle system to form multiple virtual particle model monomers, and each first virtual particle model monomer is assigned a material parameter corresponding to a preset atomization effect to obtain multiple second virtual particle model monomers. When a target atomization effect generation instruction triggered by a designer through a terminal is detected, at least one target virtual particle model monomer can be selected from the multiple second virtual particle model monomers in response to the target atomization effect generation instruction, that is, it can be one target virtual particle model monomer or multiple target virtual particle model monomers.
[0106] 105 , generating a target virtual model with a target atomization effect based on the target virtual particle model monomer.
[0107] In the embodiment of the present application, if only one target virtual particle model monomer is obtained, the target virtual particle model monomer is used as the target virtual model; when multiple target virtual particle models are detected, multiple target virtual particle model monomers can be used to construct a target virtual model.
[0108] The target virtual model generated by the embodiment of the present application can be applied in a game application and can be displayed in a virtual scene rendered by the game application. When the terminal runs the game application, the terminal can display a game interface, wherein the game interface is used to display at least part of the virtual scene, at least part of the virtual characters in the virtual scene, and multiple game controls, and the game controls can be used to trigger the game effect corresponding to the virtual character in the virtual scene, and the game effect can be the target virtual model.
[0109] Among them, a virtual scene is displayed on the game interface, and the virtual scene is a virtual environment displayed (or provided) when the application is running on the terminal. The virtual environment can be a simulation environment of the real world, or a semi-simulated and semi-fictitious three-dimensional environment, or a purely fictitious three-dimensional environment. The virtual environment is used for a virtual environment battle between at least two virtual characters, and there are virtual resources available for at least two virtual characters in the virtual environment. A virtual scene is displayed in the game interface, and one or more virtual characters are displayed in the virtual scene. The virtual character can be a main control virtual character, or a friendly virtual character in the same camp as the main control virtual character, or an enemy virtual character in the enemy camp with the main control virtual character. In the virtual scene, there can be a main control virtual character, a friendly virtual character, and a hostile virtual character at the same time, which is an example here and is not limited. The virtual character can display the target virtual model in the game scene by triggering the game control.
[0110] A virtual character (or hero) refers to an active object in a virtual environment. A virtual character refers to a virtual object in a game that is controlled by a user or player through a terminal. In the embodiment of the present application, the main virtual character refers to a virtual object in a game that is controlled by the current player through a terminal, that is, a virtual character controlled by the player on this end. Friendly virtual characters and hostile virtual characters refer to virtual objects in a game that are controlled by other players through terminals, that is, virtual characters controlled by players on other ends.
[0111] Furthermore, a plurality of game controls are also displayed on the game interface. Among them, the game controls and the virtual scene are at different levels. For example, the display level of the game controls is higher than the display level of the virtual scene. For example, taking a terminal with a touch screen as an example, a game interface can be rendered on the touch screen by executing a game application, and the virtual scene on the game interface includes at least one game control area, and the game control area includes at least one game control. The virtual scene on the game interface can also include at least one virtual object. The game control can be triggered by a touch operation, and after the game control is triggered, the target virtual model can be displayed in the virtual scene.
[0112] See also Figure 2 , Figure 2 It is a schematic diagram of an application scenario provided in an embodiment of the present application. The detailed description of the schematic diagram of the application scenario provided in an embodiment of the present application is as follows:
[0113] (1) After selecting the pop-style cartoon explosion smoke material, designers can set the inner and outer flame color intensity, smoke color, dark point texture, dark point range, dark point intensity, smoke light range, smoke light intensity, model vertex offset intensity, mask range, smoke light and dark thickness, texture intensity, dissolution intensity and other parameters according to design requirements.
[0114] (2) Designers can pre-set the size and shape of the model and create a virtual model unit in 3DMAX based on the preset model size and shape, or they can directly obtain the already generated virtual model as the virtual model unit.
[0115] (3) Importing the virtual model monomer produced in 3D MAX or obtaining the generated virtual model monomer into the game engine, so that the game engine uses its own particle system to generate a first virtual particle model monomer corresponding to the virtual model monomer.
[0116] (4) Setting material parameters corresponding to the preset explosion effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer.
[0117] (5) Designers can adjust material parameters by themselves to achieve personalized adjustments to the virtual particle model monomer. For example, they can set the target particle dissolution value by themselves to adjust all particles in the second virtual particle model monomer based on the target particle dissolution value, so as to set a particle dissolution period for all particles in the second virtual particle model monomer; or, they can set the particle dissolution value of the specified texture effect by themselves to adjust all particles with the specified texture effect in the second virtual particle model monomer based on the particle dissolution value of the specified texture effect, so as to set a particle dissolution period for the particles with the specified texture effect in the second virtual particle model monomer; or, they can set the target vertex offset value by themselves to adjust the vertices of the triangle mesh of the second virtual particle model monomer based on the target vertex offset value, so as to set a target offset value for all particles in the second virtual particle model monomer, wherein the target offset value is the value of the vertices of the triangle mesh offset after a preset time period.
[0118] In summary, the embodiment of the present application provides a method for processing a virtual model, by obtaining a virtual model monomer that realizes a preset atomization effect; then, a first virtual particle model monomer corresponding to the virtual model monomer is generated through a particle system; then, the material parameters corresponding to the preset atomization effect are set for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is a first virtual particle model monomer with the preset atomization effect; thereafter, in response to a target atomization effect generation instruction, at least one target virtual particle model monomer is selected from a plurality of second virtual particle model monomers; finally, a target virtual model with a target atomization effect is generated based on the target virtual particle model monomer. The embodiment of the present application sets the model material parameters in advance, constructs a three-dimensional virtual model, generates a virtual particle model based on the three-dimensional virtual model through a particle system, and then assigns the model material parameters to the virtual particle model to obtain a virtual particle model with atomization effect that can be viewed in three dimensions, increases the performance angle of the atomization effect in the game engine, and improves the authenticity of the atomization effect.
[0119] In order to better implement the processing method of the virtual model provided in the embodiment of the present application, the embodiment of the present application also provides a processing device based on the above virtual model. The meanings of the terms are the same as those in the processing method of the above virtual model, and the specific implementation details can refer to the description in the method embodiment.
[0120] See also Figure 3 , Figure 3 A schematic diagram of a virtual model processing device provided in an embodiment of the present application, the device comprising:
[0121] An acquisition unit 201 is used to acquire preset model parameters and create a virtual sample model based on the preset model parameters, wherein the preset model parameters include model shape parameters and model size parameters;
[0122] A first generating unit 202, configured to generate a virtual particle model through a particle system based on the virtual sample model, wherein a model parameter of the virtual particle model is consistent with a model parameter of the virtual sample model;
[0123] A setting unit 203, used for setting corresponding preset material parameters for all particles in the virtual particle model to obtain a candidate virtual particle model;
[0124] A screening unit 204 is used to screen out a plurality of target virtual particle model monomers from a plurality of candidate virtual particle models based on preset conditions in response to the model building instruction;
[0125] The second generating unit 205 is used to generate a target virtual model based on a plurality of target virtual particle model monomers.
[0126] In some embodiments, the apparatus further comprises:
[0127] A first dividing unit is used to divide all particles in the first virtual particle model monomer into categories based on a first preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to a first texture effect in the first preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to a second texture effect in the first preset texture map;
[0128] The first setting subunit is used to set the material parameters corresponding to the first texture effect for all particles in the first particle set, and to set the material parameters corresponding to the second texture effect for all particles in the second particle set, so as to obtain a second virtual particle model monomer.
[0129] In some embodiments, the apparatus further comprises:
[0130] A second division unit is used to classify all particles in the first virtual particle model monomer according to a second preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to the flame effect in the second preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to the smoke effect in the preset texture map;
[0131] The second setting subunit is used to set material parameters corresponding to the flame effect for all particles in the first particle set, and to set material parameters corresponding to the smoke effect for all particles in the second particle set, so as to obtain a second virtual particle model monomer.
[0132] In some embodiments, the apparatus further comprises:
[0133] The first adjustment unit is used to adjust all particles in the second virtual particle model monomer based on the target particle dissolution value to set a particle dissolution period for all particles in the second virtual particle model monomer.
[0134] In some embodiments, the apparatus further comprises:
[0135] The second adjustment unit is used to adjust all particles with the specified texture effect in the second virtual particle model monomer based on the particle dissolution value of the specified texture effect, so as to set a particle dissolution period for the particles with the specified texture effect in the second virtual particle model monomer.
[0136] In some embodiments, the apparatus further comprises:
[0137] The third adjustment unit is used to adjust the vertices of the triangular mesh of the second virtual particle model monomer based on the target vertex offset value to set the target offset value for all particles in the second virtual particle model monomer, wherein the target offset value is the value of the vertices of the triangular mesh offset after a preset time period.
[0138] In some embodiments, the apparatus further comprises a determining unit configured to:
[0139] Determining whether the number of faces of the bounding box of the second virtual particle model monomer is a preset number of faces;
[0140] If not, the bounding box of the second virtual particle model monomer is adjusted based on the preset number of faces, so that the number of faces of the bounding box of the second virtual particle model monomer is the preset number of faces.
[0141] In some embodiments, the apparatus further comprises:
[0142] A first acquisition subunit is used to acquire target particle size parameters;
[0143] The fourth adjustment unit is used to adjust the particle size of all particles in the second virtual particle model monomer based on the target particle size parameter to obtain an adjusted second virtual particle model monomer.
[0144] In some embodiments, the apparatus further comprises:
[0145] The second acquisition subunit is used to acquire the display parameters of the target particles;
[0146] The fifth adjustment unit is used to adjust the display duration of all particles in the second virtual particle model monomer based on the target particle display parameter to obtain an adjusted second virtual particle model monomer.
[0147] The embodiment of the present application provides a processing device for a virtual model, which is used to obtain preset model parameters through an acquisition unit 201, and create a virtual sample model based on the preset model parameters, wherein the preset model parameters include model shape parameters and model size parameters; a first generation unit 202, which is used to generate a virtual particle model through a particle system based on the virtual sample model, wherein the model parameters of the virtual particle model are consistent with the model parameters of the virtual sample model; a setting unit 203, which is used to set corresponding preset material parameters for all particles in the virtual particle model to obtain a candidate virtual particle model; a screening unit 204, which is used to screen out multiple target virtual particle model monomers from multiple candidate virtual particle models based on preset conditions in response to a model construction instruction; and a second generation unit 205, which is used to generate a target virtual model based on multiple target virtual particle model monomers. The embodiment of the present application sets the model material parameters in advance, constructs a three-dimensional virtual model, generates a virtual particle model based on the three-dimensional virtual model through a particle system, and then assigns the model material parameters to the virtual particle model to obtain a virtual particle model with a fogging effect that can be viewed in three dimensions, increases the performance angle of the fogging effect in the game engine, and improves the authenticity of the fogging effect.
[0148] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or other terminal devices. Figure 4 As shown, Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 300 includes a processor 301 having one or more processing cores, a memory 302 having one or more storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0149] The processor 301 is the control center of the computer device 300. It uses various interfaces and lines to connect the various parts of the entire computer device 300, executes various functions of the computer device 300 and processes data by running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, thereby monitoring the computer device 300 as a whole.
[0150] In the embodiment of the present application, the processor 301 in the computer device 300 will load instructions corresponding to the processes of one or more application programs into the memory 302 according to the following steps, and the processor 301 will run the application programs stored in the memory 302 to implement various functions:
[0151] Obtaining a virtual model monomer that realizes a preset atomization effect;
[0152] Generate a first virtual particle model monomer corresponding to the virtual model monomer through a particle system;
[0153] Setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is the first virtual particle model monomer having the preset atomization effect;
[0154] In response to a target atomization effect generation instruction, selecting at least one target virtual particle model monomer from a plurality of second virtual particle model monomers;
[0155] A target virtual model with a target atomization effect is generated based on the target virtual particle model monomer.
[0156] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0157] Optional, such as Figure 4 As shown, the computer device 300 further includes: a touch screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307, respectively. Those skilled in the art can understand that Figure 4 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0158] The touch display screen 303 can be used to display the graphical player interface and receive the operation instructions generated by the player acting on the graphical player interface. The touch display screen 303 may include a display panel and a touch panel. Among them, the display panel may be used to display the information input by the player or the information provided to the player and various graphical player interfaces of the computer device, and these graphical player interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the touch operation of the player on or near it (such as the operation of the player using any suitable object or attachment such as a finger, a stylus or the like on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the player's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 301, and can receive the command sent by the processor 301 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 301 to determine the type of touch event, and then the processor 301 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 303 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 303 can also be used as a part of the input unit 306 to realize the input function.
[0159] In the embodiment of the present application, the processor 301 executes the game application to generate a graphical player interface on the touch screen 303. The touch screen 303 is used to present the graphical player interface and receive operation instructions generated by the player acting on the graphical player interface.
[0160] The radio frequency circuit 304 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.
[0161] The audio circuit 305 can be used to provide an audio interface between the player and the computer device through a speaker and a microphone. The audio circuit 305 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 305 and converted into audio data. The audio data is then output to the processor 301 for processing, and then sent to another computer device through the radio frequency circuit 304, or the audio data is output to the memory 302 for further processing. The audio circuit 305 may also include an earphone jack to provide communication between an external headset and the computer device.
[0162] The input unit 306 may be used to receive input numbers, character information or player feature information (such as fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to player settings and function controls.
[0163] The power supply 307 is used to supply power to various components of the computer device 300. Optionally, the power supply 307 can be logically connected to the processor 301 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 307 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0164] although Figure 4 Not shown, the computer device 300 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0165] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0166] As can be seen from the above, the computer device provided in this embodiment obtains a virtual model monomer that realizes a preset atomization effect; then, a first virtual particle model monomer corresponding to the virtual model monomer is generated through a particle system; then, the material parameters corresponding to the preset atomization effect are set for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is a first virtual particle model monomer with the preset atomization effect; thereafter, in response to a target atomization effect generation instruction, at least one target virtual particle model monomer is selected from a plurality of second virtual particle model monomers; finally, a target virtual model with a target atomization effect is generated based on the target virtual particle model monomer. After the embodiment of the present application pre-sets the model material parameters and constructs a three-dimensional virtual model, after generating a virtual particle model based on the three-dimensional virtual model through a particle system, the model material parameters are assigned to the virtual particle model to obtain a virtual particle model with an atomization effect that can be viewed in three dimensions, thereby increasing the performance angle of the atomization effect in the game engine and improving the authenticity of the atomization effect.
[0167] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above-described embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a storage medium (e.g., a computer-readable storage medium) and loaded and executed by a processor.
[0168] To this end, an embodiment of the present application provides a storage medium in which multiple computer programs are stored. The computer program can be loaded by a processor to execute the steps in any virtual model processing method provided in the embodiment of the present application. For example, the computer program can execute the following steps:
[0169] Obtaining a virtual model monomer that realizes a preset atomization effect;
[0170] Generate a first virtual particle model monomer corresponding to the virtual model monomer through a particle system;
[0171] Setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is the first virtual particle model monomer having the preset atomization effect;
[0172] In response to a target atomization effect generation instruction, selecting at least one target virtual particle model monomer from a plurality of second virtual particle model monomers;
[0173] A target virtual model with a target atomization effect is generated based on the target virtual particle model monomer.
[0174] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0175] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0176] Since the computer program stored in the storage medium can execute the steps in any virtual model processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any virtual model processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0177] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0178] The above is a detailed introduction to a virtual model processing method, device, computer equipment and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application. Ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing a virtual model, characterized in that: include: Obtaining a virtual model monomer that realizes a preset atomization effect; Generate a first virtual particle model monomer corresponding to the virtual model monomer through a particle system; Setting material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is the first virtual particle model monomer having the preset atomization effect; the material parameters are parameters of a preset texture map, the preset texture map includes material parameters corresponding to at least one texture effect, and the preset texture map is used to process the first virtual particle model monomer to obtain a second virtual particle model monomer having at least one texture effect; Adjusting the vertices of the triangular mesh of the second virtual particle model monomer based on the target vertex offset value to set a target offset value for all particles in the second virtual particle model monomer, wherein the target offset value is a value at which the vertices of the triangular mesh are offset after a preset time period; Determining whether the number of faces of the bounding box of the second virtual particle model monomer is a preset number of faces; If not, adjusting the bounding box of the second virtual particle model monomer based on the preset number of faces so that the number of faces of the bounding box of the second virtual particle model monomer is the preset number of faces; In response to a target atomization effect generation instruction, selecting at least one target virtual particle model monomer from a plurality of second virtual particle model monomers; A target virtual model with a target atomization effect is generated based on the target virtual particle model monomer.
2. The method for processing a virtual model according to claim 1, characterized in that: The step of setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer includes: Classify all particles in the first virtual particle model monomer based on a first preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to a first texture effect in the first preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to a second texture effect in the first preset texture map; Material parameters corresponding to the first texture effect are set for all particles in the first particle set, and material parameters corresponding to the second texture effect are set for all particles in the second particle set, so as to obtain a second virtual particle model monomer.
3. The method for processing a virtual model according to claim 1, characterized in that: The preset atomization effect is an explosion effect; The step of setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer includes: Classify all particles in the first virtual particle model monomer based on the second preset texture map to obtain a first particle set and a second particle set, wherein the first particle set is composed of particles in the first virtual particle model monomer corresponding to the flame effect in the second preset texture map, and the second particle set is composed of particles in the first virtual particle model monomer corresponding to the smoke effect in the preset texture map; Material parameters corresponding to the flame effect are set for all particles in the first particle set, and material parameters corresponding to the smoke effect are set for all particles in the second particle set to obtain a second virtual particle model monomer.
4. The method for processing a virtual model according to claim 2, characterized in that: After setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, the method further includes: All particles in the second virtual particle model monomer are adjusted based on the target particle dissolution value to set a particle dissolution period for all particles in the second virtual particle model monomer.
5. The method for processing a virtual model according to claim 2, characterized in that: After setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, the method further includes: Based on the particle dissolution value of the designated texture effect, all particles with the designated texture effect in the second virtual particle model monomer are adjusted to set a particle dissolution period for the particles with the designated texture effect in the second virtual particle model monomer.
6. The method for processing a virtual model according to claim 1, characterized in that: After setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, the method further includes: Obtain target particle size parameters; The particle sizes of all particles in the second virtual particle model monomer are adjusted based on the target particle size parameter to obtain an adjusted second virtual particle model monomer.
7. The method for processing a virtual model according to claim 1, characterized in that: After setting the material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, the method further includes: Get the target particle display parameters; The display duration of all particles in the second virtual particle model monomer is adjusted based on the target particle display parameter to obtain an adjusted second virtual particle model monomer.
8. A virtual model processing device, characterized in that: include: An acquisition unit, used for acquiring a virtual model monomer for realizing a preset atomization effect; A first generating unit, used for generating a first virtual particle model monomer corresponding to the virtual model monomer through a particle system; A setting unit is used to set material parameters corresponding to the preset atomization effect for all particles in the first virtual particle model monomer to obtain a second virtual particle model monomer, wherein the second virtual particle model monomer is the first virtual particle model monomer with the preset atomization effect; the material parameters are parameters of a preset texture map, the preset texture map includes material parameters corresponding to at least one texture effect, and the preset texture map is used to process the first virtual particle model monomer to obtain a second virtual particle model monomer with at least one texture effect; a third adjustment unit, configured to adjust the vertices of the triangular mesh of the second virtual particle model monomer based on the target vertex offset value, so as to set a target offset value for all particles in the second virtual particle model monomer, wherein the target offset value is a value at which the vertices of the triangular mesh are offset after a preset time period; a determination unit, configured to determine whether the number of faces of the bounding box of the second virtual particle model monomer is a preset number of faces; if not, adjusting the bounding box of the second virtual particle model monomer based on the preset number of faces so that the number of faces of the bounding box of the second virtual particle model monomer is the preset number of faces; A screening unit, configured to screen out at least one target virtual particle model monomer from a plurality of second virtual particle model monomers in response to a target atomization effect generation instruction; The second generating unit is used to generate a target virtual model with a target atomization effect based on the target virtual particle model monomer.
9. A computer device, characterized in that: The computer device includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in the virtual model processing method according to any one of claims 1 to 7 by calling the computer program stored in the memory.
10. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the virtual model processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method and program
JP2006040057A