CN113786624B - Game resource manufacturing method, device and equipment - Google Patents

Game resource manufacturing method, device and equipment Download PDF

Info

Publication number
CN113786624B
CN113786624B CN202111094815.7A CN202111094815A CN113786624B CN 113786624 B CN113786624 B CN 113786624B CN 202111094815 A CN202111094815 A CN 202111094815A CN 113786624 B CN113786624 B CN 113786624B
Authority
CN
China
Prior art keywords
vertex
object model
preset effect
deformation
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111094815.7A
Other languages
Chinese (zh)
Other versions
CN113786624A (en
Inventor
陈子源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202111094815.7A priority Critical patent/CN113786624B/en
Publication of CN113786624A publication Critical patent/CN113786624A/en
Application granted granted Critical
Publication of CN113786624B publication Critical patent/CN113786624B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/6009Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a game resource manufacturing method, a game resource manufacturing device and game resource manufacturing equipment, which relate to the technical field of computers, so that under the condition that vertex deviation exists in an object model, the vertex position in the moving process of accurate particle sampling can still be guaranteed, deviation errors are reduced, and the expected display effect of game resources is improved. The method comprises the following steps: obtaining model deformation information output by an object model simulation game resource; generating vertex deformation of an object model according to the model deformation information, and baking the vertex deformation of the object model into a vertex animation chartlet; and reading the vertex offset data in the vertex animation map by using a particle system, and making a game resource of the object model according to the vertex offset data.

Description

Game resource manufacturing method, device and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for creating game resources.
Background
Network games have become an indispensable life entertainment mode, different types of network games are constructed based on entertainment requirements in real scenes, and therefore, in order to enable users to obtain better game embodiment, the realization of scenes in the games is expected to be closer to a real environment.
In the actual game engineering, the production of game resources can be provided by frequent art and plan, the dissolving and dispersing effects are used as one expression of the game resources, and special effects such as flame, dust or character extinction can be realized. Particle systems are commonly used in the prior art to achieve dissolution and dissipation effects, for example, the bullet has a continuous ablation effect in the trajectory when flying, the character is attacked by a large shell, and the bullet has a continuous ablation effect when flying. The particle system can simulate the real effects of water, fire, fog, gas and the like, and the principle is to combine countless single particles to present a fixed state, and the controller and the script are used for controlling the whole or single movement of the particles to simulate the real effect. However, in the process of using the particle system to make game resources, because the vertices of the object model cannot have a deviation, if the vertices of the object model have a deviation condition, the particle dissipation process and the positions of the particles generate a deviation, so that the particles cannot correctly sample the positions of the vertices in the moving process, thereby generating a deviation and a dislocation, and affecting the expected display effect of the game resources.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, and a device for making game resources, and mainly aims to solve the problem in the prior art that due to vertex offset of an object model, a particle cannot correctly sample a vertex position in a moving process, so that deviation and misalignment are generated, and an expected display effect of game resources is affected.
According to a first aspect of the present application, there is provided a method for producing a game resource, comprising:
obtaining model deformation information output by an object model simulation game resource;
generating vertex deformation of an object model according to the model deformation information, and baking the vertex deformation of the object model into a vertex animation chartlet;
and reading the vertex offset data in the vertex animation map by using a particle system, and making a game resource of the object model according to the vertex offset data.
Further, the obtaining of the model deformation information output by the object model simulation game resource specifically includes:
simulating a preset effect of the object model for displaying the game resources from the vertex by using a special effect tool, and acquiring an attribute parameter of the preset effect of the vertex display along with the change of time;
calculating the starting time of the vertex display preset effect according to the attribute parameters of the vertex display preset effect changing along with the time;
and recording the starting time of the vertex displaying the preset effect to each vertex, and outputting model deformation information.
Further, the calculating a time value of the vertex displaying the preset effect according to the attribute parameter of the vertex displaying the preset effect changing with time specifically includes:
acquiring the number of frames and the total number of frames when each vertex displays the preset effect according to the attribute parameters of the vertex display preset effect changing along with time;
and dividing the frame number of each vertex when the preset effect is displayed by the total frame number to obtain the starting time of the vertex display preset effect.
Further, the generating vertex deformation of the object model according to the model deformation information and baking the vertex deformation of the object model into a vertex animation map specifically includes:
reading the model deformation information in the material to obtain vertex offset data;
and superposing the vertex offset data on the world position offset of the vertex to generate vertex deformation of the object model, and baking the vertex deformation of the object model into a vertex animation chartlet.
Further, the method further comprises:
determining the transparency of different luminosity areas mapped by the preset effect by comparing the starting time of the vertex display preset effect with the current playing time;
and if the starting time for displaying the preset effect on the vertex is shorter than the current playing time, adjusting the transparency of different luminosity areas mapped by the preset effect.
Further, the using the particle system to read the vertex offset data in the vertex animation map and produce the game resource of the object model according to the vertex offset data specifically includes:
acquiring two pieces of texture coordinate information of the vertex animation map mapped to the surface of the object model according to the vertex offset data in the vertex animation map;
and reading two pieces of texture coordinate information mapped to the surface of the object model by using a particle system, and manufacturing a game resource of the object model by sampling the two pieces of texture coordinate information.
Further, the using the particle system to read two pieces of texture coordinate information mapped to the surface of the object model by the vertex animation map, and manufacturing the game resource of the object model by sampling the two pieces of texture coordinate information specifically includes:
reading two pieces of texture coordinate information mapped to the surface of the object model by using the particle system, and acquiring the starting time of the vertex for displaying the preset effect and the deformation position of the vertex;
controlling the execution speed of the model material for displaying the preset effect by utilizing the starting time of the vertex for displaying the preset effect;
and controlling the particle to display the running track with the preset effect by using the deformation position of the vertex.
Further, before the using a particle system to read two pieces of texture coordinate information mapped to the surface of the object model by the vertex animation map and to produce a game resource of the object model by sampling the two pieces of texture coordinate information, the method further includes:
two emission resources are arranged in the particle system and are respectively used for emitting particles for displaying the preset effect and controlling the model material to display the preset effect.
Further, after the setting of the two transmission resources in the particle system, the method further includes:
generating particles showing a preset effect at the top point of the object model;
and controlling the opacity of the particle by using the playing time of the particle system, so that when the playing time is consistent with the time recorded by the two texture coordinate information records, the transparency of the particle is updated, and the particle is controlled to switch the running state when a preset condition is met.
According to a second aspect of the present application, there is provided a game resource creation apparatus comprising:
the acquisition unit is used for acquiring model deformation information output by the object model simulation game resources;
the generating unit is used for generating the vertex deformation of the object model according to the model deformation information and baking the vertex deformation of the object model into a vertex animation chartlet;
and the production unit is used for reading the vertex offset data in the vertex animation map by using a particle system and producing the game resources of the object model according to the vertex offset data.
Further, the acquisition unit includes:
the simulation module is used for simulating the preset effect of the object model for displaying the game resources from the vertex by using the special effect tool and acquiring the attribute parameters of the preset effect of the vertex display along with the change of time;
the calculation module is used for calculating the starting time of the vertex for displaying the preset effect according to the attribute parameters of the vertex for displaying the preset effect along with the change of time;
and the recording module is used for recording the starting time of the vertex displaying the preset effect to each vertex and outputting model deformation information.
Further, the calculation module includes:
the obtaining submodule is used for obtaining the frame number and the total frame number when each vertex shows the preset effect according to the attribute parameters of the vertex showing the preset effect changing along with time;
and the division submodule is used for dividing the frame number of each vertex when the preset effect is displayed by the total frame number to obtain the starting time of the vertex display preset effect.
Further, the generation unit includes:
the reading module is used for reading the model deformation information in the material to obtain vertex offset data;
and the superposition module is used for superposing the vertex deviation data on the world position deviation of the vertex, generating the vertex deformation of the object model and baking the vertex deformation of the object model into the vertex animation chartlet.
Further, the apparatus further comprises:
the determining unit is used for determining the transparency of different luminosity areas mapped by the preset effect by comparing the starting time of the vertex display preset effect with the current playing time;
and the setting unit is used for adjusting the transparencies of different luminosity areas mapped by the preset effect if the starting time of the vertex display preset effect is shorter than the current playing time.
Further, the production unit includes:
the obtaining module is used for obtaining two pieces of texture coordinate information of the vertex animation mapping mapped to the surface of the object model according to the vertex offset data in the vertex animation mapping;
and the sampling module is used for reading the two pieces of texture coordinate information mapped to the surface of the object model by using the particle system and manufacturing the game resources of the object model by sampling the two pieces of texture coordinate information.
Further, the sampling module includes:
the reading sub-module is used for reading the two pieces of texture coordinate information mapped to the surface of the object model by using the particle system, and acquiring the starting time of the vertex for displaying the preset effect and the deformation position of the vertex;
the control submodule is used for controlling the execution speed of the model material for displaying the preset effect by utilizing the starting time of the vertex for displaying the preset effect;
and the control submodule is also used for controlling the particles to display the running track of the preset effect by utilizing the deformation position of the vertex.
Further, the manufacturing unit further includes:
the particle system is used for reading two pieces of texture coordinate information, mapped to the surface of the object model, of the vertex animation mapping, and two pieces of emission resources are set in the particle system before game resources of the object model are made through sampling the two pieces of texture coordinate information, and the two pieces of emission resources are respectively used for emitting particles for displaying preset effects and controlling model material to display the preset effects.
Further, the manufacturing unit further includes:
a generating module, configured to generate a particle exhibiting a preset effect at a vertex of the object model after setting two emission resources in the particle system;
and the control module is used for controlling the opacity of the particles by using the playing time of the particle system, so that when the playing time is consistent with the time recorded by the two texture coordinate information records, the transparency of the particles is updated, and the particles are controlled to switch the running state when a preset condition is met.
According to a third aspect of the present application, there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of the first aspect when the computer program is executed.
According to a fourth aspect of the present application, there is provided a readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of the first aspect described above.
By means of the technical scheme, compared with the mode that the vertexes of the object model cannot generate offset in the existing game resource manufacturing process, the method, the device and the equipment for manufacturing the game resource provided by the application have the advantages that the model deformation information output by the object model simulation game resource is obtained, the vertex deformation of the object model is generated according to the model deformation information, the vertex deformation of the object model is baked into the vertex animation model, the vertex offset data in the vertex animation mapping is read by using the particle system, the game resource of the object model is manufactured according to the vertex offset data, in the whole game resource manufacturing process, the simulated model deformation information and the vertex animation mapping are combined, when the object model has the vertex offset, the vertex offset data is obtained in the mode that the particle system samples the vertex animation mapping, the vertex position in the moving process can still be guaranteed to be accurately sampled by the particle, and the vertex position is applied to game resource production, so that deviation errors are reduced, and the expected display effect of the game resources is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart illustrating a method for creating game resources according to an embodiment of the present disclosure;
FIG. 2 is a flow chart illustrating another method for creating game resources according to an embodiment of the present disclosure;
FIG. 3 is a schematic structural diagram of an apparatus for creating game resources according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of another apparatus for creating game resources according to an embodiment of the present application;
fig. 5 is a schematic device structure diagram of a computer apparatus according to an embodiment of the present invention.
Detailed Description
The content of the invention will now be discussed with reference to a number of exemplary embodiments. It is to be understood that these examples are discussed only to enable those of ordinary skill in the art to better understand and thus implement the teachings of the present invention, and are not meant to imply any limitations on the scope of the invention.
As used herein, the term "include" and its variants are to be read as open-ended terms meaning "including, but not limited to. The term "based on" is to be read as "based, at least in part, on". The terms "one embodiment" and "an embodiment" are to be read as "at least one embodiment". The term "another embodiment" is to be read as "at least one other embodiment".
In the process of using the particle system to manufacture game resources in the related technology, because the vertex of the object model cannot have offset, if the vertex of the object model has offset, the position of the particle and the position of the particle in the process of particle dissipation generate offset, so that the particle cannot correctly sample the position of the vertex in the moving process, thereby generating offset dislocation and influencing the expected display effect of the game resources.
In order to solve the problem, this embodiment provides a method for making a game resource, as shown in fig. 1, where the method is applied to a client of a game resource making tool, and includes the following steps:
101. model deformation information output by the object model simulation game resources is obtained.
The making of game resources is an important link in the game generation process, the object model can be a model created for a game object according to the game scene requirements, the game object can be a game role, and can also be an element in a game scene, such as a tree, a mountain, a building and the like. In consideration of the situation that a game object often meets the application special effect in the middle of a game, a game scene has the production requirement of a large number of game resources, the game resources are equivalent to special effect expression, can be special effects of combustion and explosion, for example, the special effects of the game object after being attacked and the special effects of the game object after being exploded and the like. Here, the object model simulates the game resource, and the object model simulates the process of the resource special effect.
Specifically, in the process of simulating game resources by using the object model, a manufacturing tool with resource special effects may be used to simulate the resource special effects triggered from the vertices of the object model, and set attribute parameters of manufacturing the resource special effects, such as time parameters, position parameters, and region parameters of the resource special effects, which may include duration, trigger time, and the like of the resource special effects, and the position parameters may include the starting positions of the resource special effects on the object model, and the region parameters may include the trigger regions of the resource special effects in the game scene. Considering that simulation of a resource special effect triggered from an object vertex is accompanied by various vertex space transformations, so that model deformation is generated after the vertex of an object model is deviated, it is necessary to record attribute parameters related to the resource special effect to each vertex, summarize the attribute parameters recorded by the vertices of all object models, and output model deformation information.
102. And generating the vertex deformation of the object model according to the model deformation information, and baking the vertex deformation of the object model into a vertex animation chartlet.
The model deformation information is mainly position offset formed by spatial transformation of a vertex recorded after the object model is subjected to the resource special effect, the position offset can be expressed as a coordinate matrix of the vertex position, and the vertex deformation of the object model can be generated by using the position offset.
In particular, in baking vertex deformations into vertex animation maps for an object model, two modes can be used, one is a soft mode that does not change the topology of the object model, but records the position offset of the vertices with respect to the first frame position, and the other is a fluid mode that requires the introduction of a new object model. It can be understood that, in order to avoid introducing a new object model, a soft model is usually used, and the position offset amount is equivalent to the offset amount of the vertex in the coordinate space where the object model is located, i.e. the relative position offset of the vertex, at this time, the object model in the soft model cannot calculate the particle position by using the relative position offset amount, the position of the object model in the soft model can be placed at the origin in the first frame, so that the object model records the absolute position offset of the vertex in the soft model, derives the dynamic information map of the vertex according to the absolute position offset of the vertex, and forms the dynamic information of the vertex into a vertex animation map.
103. And reading the vertex offset data in the vertex animation map by using a particle system, and making a game resource of the object model according to the vertex offset data.
In a game scene, in order to realize a resource special effect which is separated from a real scope, for example, an instant movement, a magic effect, and the like, a particle system is needed to be used, particles are emitted through the particle system, and are controlled to move, zoom, rotate, and the like according to a specific mode, so as to realize different resource special effects, for example, a raindrop starts from a certain place in the air, then is continuously accelerated in a descending process under the influence of gravity, and finally falls on the ground to disappear. It will be appreciated that the use of only a single particle rarely satisfies the required resource special effects, and that most special effects resources, e.g. flames, smoke, require the production of hundreds or even thousands of particles, and that in order to control and maintain the production of a large number of particles, it is necessary to create emission resources in the particle system, which correspond to particle generators, which enable the production of particles from a certain location, and which control the number of particles produced, the initial velocity of the particles, the time of existence, and further attribute parameters.
Specifically, in the process of using the particle system, particles can be created based on vertex positions in the vertex animation maps, each vertex represents each particle in the particle system, and since the vertex offset data can represent the change condition of the object model generated in each frame in the process of simulating game resources, the vertex offset data in the vertex animation maps can be further read through the particle system, and the vertex offset data is used for controlling the particles to generate the resource effect of the game resources so as to realize the game resource production of the object model, wherein the trajectory curve, the running time, the running speed and the like of the particles in the running process can be controlled.
It can be understood that, since different game resources may produce different resource effects, different control manners need to be adopted for the particles formed by the vertices during the playing of the game resources by the particle system, to exemplify dissolving and dissipating game resources, dissolving and dissipating game resources need to control the particles during the playing of the particle system to realize different operating states, that is, from a flight state to a death state, the particles are alive when in the flight state and have opaque properties, and the particles disappear when in the death state and have transparent properties, and by controlling the transparency of the particles when in different operating states, dissolving and dissipating game resources can be realized for the game object.
Compared with the mode that the vertex of the object model can not generate offset in the current game resource manufacturing process, the method for manufacturing the game resource provided by the embodiment of the application simulates the game resource output by the game resource through the object model, generates the vertex deformation of the object model according to the model deformation information, cures the vertex deformation of the object model into the vertex animation model, reads vertex offset data in the vertex animation mapping by using a particle system, and manufactures the game resource of the object model according to the vertex offset data, and in the whole game resource manufacturing process, the simulated model deformation information and the vertex animation mapping are combined, when the object model has the vertex offset, the vertex offset data is acquired by using the particle system in the mode of sampling the vertex animation mapping, so that the accurate sampling and moving of the vertex position of the particle can still be ensured, and the vertex position is applied to game resource production, so that deviation errors are reduced, and the expected display effect of the game resources is improved.
Further, as a refinement and an extension of the specific implementation of the foregoing embodiment, in order to fully describe the specific implementation process of the embodiment, the embodiment provides another method for making game resources, as shown in fig. 2, the method includes:
201. and simulating the preset effect of the object model for displaying the game resources from the vertex by using the special effect tool, and acquiring the attribute parameters of the preset effect of the vertex display along with the change of time.
The special effect simulation tool can be a tool module embedded into game resource manufacturing software and has functions of simulating different game resource effects, such as a function of simulating a flame combustion effect, a function of simulating an explosion effect and the like. The preset effect is a simulated game resource effect, the attribute parameters of the vertex showing the change of the preset effect along with time at least comprise resource region parameters, resource position parameters, resource time parameters and resource change parameters which are set for the game resource effect, the resource region parameters at least comprise a triggering region of resources in a game scene, the resource position parameters at least comprise a resource starting position, a resource ending position and the like, and the resource time parameters at least comprise resource duration, resource triggering time and the like. Taking the simulated flame combustion effect as an example, a tool for manufacturing the combustion effect can be used for adding a fire source vertex to the object model, the dissipation effect of the object vertex is simulated after flame diffusion is manufactured through the fire source vertex, and the attribute parameters of the vertex dissipation effect changing along with time are set.
202. And calculating the starting time of the vertex display preset effect according to the attribute parameters of the vertex display preset effect changing along with the time.
It can be understood that, when the special effect simulation tool is used, because the time parameter for starting the game resource at each vertex is different, the number of starting frames of the game resource is recorded to the vertex, and by using the number of starting frames of the game resource and the total number of frames of the game resource, the starting time for showing the game resource at the vertex can be calculated, and the starting time can be used for controlling the playing speed of the game resource. Because the playing effect of the game resources is influenced by the model materials, particle materials generated by some model materials in the playing process of the game resources are not suitable for using slower speed parameters, and ion materials generated by some model materials in the playing process of the game resources need slower speed parameters, the model materials can be adjusted according to the preset effect of the game resources as required, and the starting time is controlled by setting the speed parameters of the model materials.
Specifically, the number of frames and the total number of frames when each vertex shows the preset effect can be obtained according to the attribute parameters of the vertex display preset effect changing along with time, the number of frames when each vertex shows the preset effect and the total number of frames are further divided, the starting time of the vertex display preset effect is obtained, the number of frames when the preset effect is shown can be obtained through calculation by a special effect simulation tool, the total number of frames can be defined by a user, the starting time is the time after normalization according to the total time of game resources, and the starting time can be used as the time for triggering the game resources by the object model.
203. And recording the starting time of the vertex displaying the preset effect to each vertex, and outputting model deformation information.
It can be understood that, in the process of the vertex displaying the preset effect, each vertex generates an animation, and each vertex corresponds to the start time, the vertex position change information generated by the vertex relative to the previous frame, and the like, where the start time is used as the start playing time for the object model to display the preset effect from the vertex, and the vertex position change information is triggered according to the start playing time to output the model deformation information.
Taking a display scene of a dissipation effect as an example, firstly inputting an object model needing to be manufactured with the dissipation effect, rearranging through a triangular surface and adding a combustion peak, simulating a flame diffusion effect through a combustion node, acquiring a total frame number of combustion and a frame number during dissipation of combustion, dividing the frame number during dissipation of combustion and the total frame number, calculating the percentage of the starting time of each peak to the total duration, normalizing the starting time, recording the normalized starting time to each peak, and outputting model deformation information.
204. And generating the vertex deformation of the object model according to the model deformation information, and baking the vertex deformation of the object model into a vertex animation chartlet.
The model deformation information records an offset value generated when the vertex shows the preset effect, and the offset value is not the absolute position offset of the vertex deformation but the position offset generated relative to the object model, and specifically, the model deformation information is read in the material to obtain vertex offset data, the vertex offset data is superposed on the world position offset of the vertex to generate the vertex deformation of the object model, and the vertex deformation of the object model is baked into the vertex animation chartlet.
In order to facilitate reading of the model deformation information, the model deformation information formed by the vertex animation can be recorded in the map, so that the vertex offset data can be obtained by reading the pixel values of the map in the material, and the vertex deformation of the object model can be generated by superposing the vertex offset on the world position offset of the vertex.
205. And determining the transparency of different luminosity areas mapped by the preset effect by comparing the starting time of the vertex display preset effect with the current playing time.
It should be noted that, considering the visibility of the vertex display preset effect, whether the vertex preset effect is triggered for display, and whether different luminosity changes are required after the triggering for display, the control is performed according to the playing time, the display of the preset effect is required to be triggered when the current playing time reaches the starting time, and after the current playing time is longer than the starting time, the preset effect also needs to use different luminosity changes in the display process, namely, a luminous area and an opaque mask area are used, different luminosity areas can be determined in the material, the different luminosity areas are controlled by using the transparency, and the object model can display the preset effect of the game resource by controlling the transparency of the different luminosity areas.
The different luminosity regions can be regions with different brightness generated around the vertex when the preset effect is displayed, for the preset effect in a circle shape, the luminosity region size can be controlled by using a width value, for example, a circle of special effect similar to flame is needed for a dissipation edge, and the luminosity regions with different flame effect mapping need to be determined. In general, the luminance of the light region is higher the closer the distance vertex is.
206. And if the starting time for displaying the preset effect on the vertex is shorter than the current playing time, adjusting the transparency of different luminosity areas mapped by the preset effect.
Specifically, in the material, since the starting time is the time when the preset effect starts to be displayed, if the starting time when the vertex displays the preset effect is shorter than the current playing time, it is indicated that the vertex is affected by the preset effect, and then the transparencies of different luminosity areas mapped by the preset effect are adjusted, so that the vertex can accurately display the preset effect for the game resources. For example, for a game resource of the dissipation special effect, different luminosity regions mapped by the preset effect can be set to be transparent, and the width of the bright edge region is controlled by using the preset width value, so that the vertex can show the dissipation special effect.
It should be noted that, when the vertex shows the preset effect, since the first frame of the vertex animation map is already pressed to the origin, the distance between the vertices of the object model may be too small, and at this time, the triangle surface is not generated, but the vertex needs to be played from the second frame when the preset effect is shown.
207. And acquiring two pieces of texture coordinate information of the vertex animation map mapped to the surface of the object model according to the vertex offset data in the vertex animation map.
In this embodiment, in order to implement model deformation by using the vertex animation map, before obtaining two texture coordinate information mapped to the object model surface by the vertex animation map, the particle system needs to use two emission resources, where two emission resources may be set in the particle system, and are respectively used for emitting particles showing a preset effect and controlling a model material to show the preset effect. For example, for dissolving and dissipating game resources, one emission resource is used for emitting spark particles to the air, and the other emission resource is used for controlling the dissolving effect of the model material. It can be understood that, while using two transmission resources, two pieces of texture coordinate information mapped to the surface of the object model by the vertex animation map need to be obtained, where one piece of texture coordinate information is used to control the object model to exhibit the preset effect, and the other piece of texture coordinate information is used to control the animation playback during the process of the vertex exhibiting the preset effect.
Because the vertex animation chartlet is the position for vertex deformation, each vertex has corresponding texture coordinate information, and one texture coordinate information is an array, the starting time for displaying the preset effect on the vertex and the sampling coordinate of the vertex animation chartlet can be obtained by using a node for reading the texture coordinate information, and then the vertex dynamic chartlet is sampled by using the sampling coordinate of the vertex animation chartlet, and two pieces of texture coordinate information mapped to the surface of the object model by the vertex animation chartlet are obtained.
Further, since each particle initially records its corresponding vertex position, and texture coordinate information of the vertex mapped to the surface of the object model is also determined, the vertex animation map can be sampled by scrolling the texture coordinate information in the particle system. To simplify the sampling process, the vertices can also be placed in a row when storing the vertex deformation, and the row number can be directly increased to read the vertex animation map.
208. And reading two pieces of texture coordinate information mapped to the surface of the object model by using a particle system, and manufacturing a game resource of the object model by sampling the two pieces of texture coordinate information.
Specifically, the particle system can be used for reading two texture coordinate information mapped to the surface of the object model by the vertex animation mapping, the starting time of the vertex display preset effect and the deformation position of the vertex are obtained, on one hand, the starting time of the vertex display preset effect is utilized, the execution speed of the control model material display preset effect is controlled, the execution speed of the current particle system playing time value control model material display preset effect can be transmitted into the material, on the other hand, the deformation position of the vertex is utilized, the particle display preset effect operation track is controlled, and the operation track of the preset effect can be controlled through sampling the coordinates of the deformation position of the vertex.
It should be noted that, because the GPU particles are used in the particle system, and the GPU particles cannot read the data of the previous frame, and cannot continuously track the particles of the same identifier, the identifier of the particle between two frames may be confused, thus, the problem that the particle information between two frames cannot be synchronized is generated, here, the particles showing the preset effect can be generated at the vertex of the object model, the opacity of the particles is controlled by using the playing time of the particle system, so that when the playing time is consistent with the time recorded by the two texture coordinate information, the transparency of the particles is updated, and controlling the continuous operation state of the particles to switch the operation state when a preset condition is satisfied, wherein the preset condition can be an attribute parameter set for the particles to show a preset effect, there may be a survival time, in which the flight state continues as long as the particle survival time is greater than the start-up time.
By way of example of game resources showing the dissolving and dissipating effect, all particles can be generated on the model vertex at the beginning of the particle system, the opacity of the particles is controlled through the playing time of the particle system, so that the particles which are not started are invisible, when the playing time is consistent with the time recorded by two pieces of texture coordinate information of the surface of the object model, the particles are set to be opaque, meanwhile, the particles are set to be in a flying state, and as long as the survival time of the particles is longer than the starting time, the flying state is continued until the particles die, and the dissolving and dissipating effect is completed.
Furthermore, in order to independently control the effect of the particles, the flight times of the particles are recorded small in addition to the life cycle of the particles, so that different game resources are created for the particles, for example, a game resource in which ash turns black, a game resource in which the particles revive, and the like are created.
Further, as a specific implementation of the method in fig. 1 and fig. 2, an embodiment of the present application provides an apparatus for creating a game resource, as shown in fig. 3, the apparatus includes: an acquisition unit 31, a generation unit 32, and a creation unit 33.
An obtaining unit 31, configured to obtain model deformation information output by the object model simulation game resource;
the generating unit 32 may be configured to generate vertex deformation of an object model according to the model deformation information, and bake the vertex deformation of the object model into a vertex animation map;
the creating unit 33 may be configured to read vertex offset data in the vertex animation map by using a particle system, and create a game resource of the object model according to the vertex offset data.
Compared with the mode that the vertex of the object model can not generate offset in the current game resource manufacturing process, the game resource manufacturing device provided by the embodiment of the invention has the advantages that the model deformation information output by the object model simulation game resource is obtained, the vertex deformation of the object model is generated according to the model deformation information, the vertex deformation of the object model is baked into the vertex animation model, the vertex offset data in the vertex animation mapping is read by using the particle system, the game resource of the object model is manufactured according to the vertex offset data, the simulated model deformation information and the vertex animation mapping are combined in the whole game resource manufacturing process, when the object model has vertex offset, the vertex offset data is obtained by using the particle system to sample the vertex animation mapping, and the accurate sampling and moving of the vertex position of the particle can still be ensured, and the vertex position is applied to game resource production, so that deviation errors are reduced, and the expected display effect of the game resources is improved.
In a specific application scenario, as shown in fig. 4, the obtaining unit 31 includes:
the simulation module 311 may be configured to simulate, by using a special effect tool, a preset effect of the object model for displaying the game resource from the vertex, and obtain an attribute parameter of the preset effect of the vertex display along with time change;
a calculating module 312, configured to calculate a starting time for the vertex to display the preset effect according to the attribute parameter of the vertex to display the preset effect changing with time;
the recording module 313 may be configured to record the start time of the vertex displaying the preset effect to each vertex, and output model deformation information.
In a specific application scenario, as shown in fig. 4, the calculating module 312 includes:
the obtaining submodule 3121 may be configured to obtain, according to the attribute parameter of the vertex display preset effect changing with time, a frame number and a total frame number when each vertex displays the preset effect;
the dividing submodule 3122 may be configured to divide the frame number when each vertex shows the preset effect by the total frame number, to obtain the start time for the vertex to show the preset effect.
In a specific application scenario, as shown in fig. 4, the generating unit 32 includes:
the reading module 321 may be configured to read the model deformation information in the material to obtain vertex offset data;
the superimposing module 322 may be configured to superimpose the vertex offset data on the world position offset of the vertex, generate vertex deformations of the object model, and bake the vertex deformations of the object model into the vertex animation map.
In a specific application scenario, as shown in fig. 4, the apparatus further includes:
the determining unit 34 may be configured to determine the transparency of different luminosity regions mapped by the preset effect by comparing the starting time of the vertex showing the preset effect with the current playing time;
the setting unit 35 may be configured to adjust the transparency of different luminosity regions mapped by the preset effect if the starting time of the vertex displaying the preset effect is less than the current playing time.
In a specific application scenario, the making unit 33 includes:
the obtaining module 331 may be configured to obtain, according to vertex offset data in the vertex animation map, two pieces of texture coordinate information that are mapped to a surface of an object model by the vertex animation map;
a sampling module 332, configured to read two pieces of texture coordinate information mapped to the surface of the object model by the vertex animation map using a particle system, and make a game resource of the object model by sampling the two pieces of texture coordinate information.
In a specific application scenario, as shown in fig. 5, the sampling module 332 includes:
the reading sub-module 3321 is configured to read two pieces of texture coordinate information mapped to the surface of the object model by using the particle system, and obtain starting time for displaying a preset effect on a vertex and a deformation position of the vertex;
the control sub-module 3322 is configured to control an execution speed of the model material for displaying the preset effect by using the starting time of the vertex for displaying the preset effect;
the control sub-module 3322 may be further configured to control the movement trajectory of the particle showing the preset effect by using the deformation position of the vertex.
In a specific application scenario, as shown in fig. 5, the making unit 33 further includes:
the setting module 333 may be configured to set two emission resources in the particle system before the particle system is used to read the two pieces of texture coordinate information mapped to the surface of the object model by the vertex animation map, and the two pieces of texture coordinate information are sampled to make the game resources of the object model, where the two emission resources are respectively used to emit the particles for displaying the preset effect and to display the preset effect on the material of the control model.
In a specific application scenario, as shown in fig. 5, the making unit 33 further includes:
a generating module 334, configured to generate a particle exhibiting a preset effect at a vertex of the object model after setting two emission resources in the particle system;
the control module 335 may be configured to control the opacity of the particle using the playing time of the particle system, so that when the playing time is consistent with the time recorded by the two texture coordinate information records, the transparency of the particle is updated, and the particle is controlled to switch the running state when a preset condition is met.
It should be noted that, other corresponding descriptions of the functional units related to the apparatus for creating game resources provided in this embodiment may refer to the corresponding descriptions in fig. 1 to fig. 2, and are not described herein again.
Based on the methods shown in fig. 1-2, correspondingly, 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 method for creating the game resource shown in fig. 1-2 is implemented.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the method shown in fig. 1-2 and the virtual device embodiment shown in fig. 3-4, to achieve the above object, an embodiment of the present application further provides an entity device for manufacturing game resources, which may be specifically a computer, a smart phone, a tablet computer, a smart watch, a server, or a network device, where the entity device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the above-described method for creating a game resource as shown in fig. 1-2.
Optionally, the entity device may further include a user interface, a network interface, a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, and the like. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), etc.
In an exemplary embodiment, referring to fig. 5, the entity device includes a communication bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device, where the functional units may communicate with each other through the bus. The memory stores computer programs, and the processor is used for executing the programs stored in the memory and executing the painting mounting method in the embodiment.
Those skilled in the art will appreciate that the physical device structure provided by the present embodiment for production of a game resource does not constitute a limitation of the physical device, and may include more or less components, or combine some components, or arrange different components.
The storage medium can also comprise an operating system and a network communication module. The operating system is a program for managing hardware and software resources of the actual device for store search information processing, and supports the operation of the information processing program and other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and communication with other hardware and software in the information processing entity device.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. Compared with the prior art, the technical scheme has the advantages that simulated model deformation information and vertex animation maps are combined in the whole game resource manufacturing process, when the object model has vertex deviation, vertex deviation data are obtained in a mode of sampling the vertex animation maps by the particle system, the vertex position in the moving process can be still guaranteed to be accurately sampled by the particles, and then the vertex position is applied to game resource manufacturing, so that deviation errors are reduced, and the expected display effect of the game resources is improved.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art can understand that the modules in the device in the implementation scenario may be distributed in the device in the implementation scenario according to the implementation scenario description, and may also be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (11)

1. A method of creating game resources, comprising:
obtaining model deformation information output by an object model simulation game resource;
generating vertex deformation of an object model according to the model deformation information, and baking the vertex deformation of the object model into a vertex animation chartlet;
the method for reading the vertex offset data in the vertex animation map by using the particle system and manufacturing the game resource of the object model according to the vertex offset data comprises the following steps: the method comprises the steps of obtaining two pieces of texture coordinate information of a vertex animation map mapped to the surface of an object model according to vertex offset data in the vertex animation map, reading the two pieces of texture coordinate information of the vertex animation map mapped to the surface of the object model by using a particle system, and manufacturing game resources of the object model by sampling the two pieces of texture coordinate information, wherein two emission resources are arranged in the particle system and are respectively used for emitting particles for displaying a preset effect and controlling the material quality of the model to display the preset effect.
2. The method according to claim 1, wherein the obtaining model deformation information of the object model simulation game resource output specifically comprises:
simulating a preset effect of the object model for displaying the game resources from the vertex by using a special effect tool, and acquiring an attribute parameter of the preset effect of the vertex display along with the change of time;
calculating the starting time of the vertex display preset effect according to the attribute parameters of the vertex display preset effect changing along with the time;
and recording the starting time of the vertex displaying the preset effect to each vertex, and outputting model deformation information.
3. The method according to claim 2, wherein the calculating a time value of the vertex showing the preset effect according to the attribute parameter of the vertex showing the preset effect changing with time specifically comprises:
acquiring the number of frames and the total number of frames when each vertex displays the preset effect according to the attribute parameters of the vertex display preset effect changing along with time;
and dividing the frame number of each vertex when the preset effect is displayed by the total frame number to obtain the starting time of the vertex display preset effect.
4. The method according to claim 2, wherein the simulating a preset effect of the object model for displaying the game resource from the vertex by using the special effect tool and obtaining the attribute parameter of the preset effect of the vertex display, which changes with time, specifically comprises:
adding a fire source vertex to an object model by using a tool for manufacturing a combustion effect, simulating the vertex dissipation effect of the object model after flame diffusion is manufactured through the fire source vertex, and setting attribute parameters of the vertex dissipation effect changing along with time, wherein the attribute parameters at least comprise a combustion starting point, the quantity of fuel, a combustible region and combustion duration.
5. The method according to claim 1, wherein the generating vertex deformations of the object model according to the model deformation information and baking the vertex deformations of the object model into the vertex animation map specifically comprises:
reading the model deformation information in the material to obtain vertex offset data;
and superposing the vertex offset data on the world position offset of the vertex to generate vertex deformation of the object model, and baking the vertex deformation of the object model into a vertex animation chartlet.
6. The method according to any one of claims 1-5, further comprising:
determining the transparency of different luminosity areas mapped by the preset effect by comparing the starting time of the vertex display preset effect with the current playing time;
and if the starting time for displaying the preset effect on the vertex is shorter than the current playing time, adjusting the transparency of different luminosity areas mapped by the preset effect.
7. The method of claim 1, wherein the using the particle system to read two texture coordinate information mapped to the surface of the object model by the vertex animation map and to produce the game resource of the object model by sampling the two texture coordinate information comprises:
reading two pieces of texture coordinate information mapped to the surface of the object model by using the particle system, and acquiring the starting time of the vertex for displaying the preset effect and the deformation position of the vertex;
controlling the execution speed of the model material for displaying the preset effect by utilizing the starting time of the vertex for displaying the preset effect;
and controlling the running track of the particles to show the preset effect by using the deformation position of the vertex.
8. The method of claim 1, wherein after setting up two transmission resources in the particle system, the method further comprises:
generating particles showing a preset effect at the top point of the object model;
and controlling the opacity of the particle by using the playing time of the particle system, so that when the playing time is consistent with the time recorded by the two texture coordinate information records, the transparency of the particle is updated, and the particle is controlled to switch the running state when a preset condition is met.
9. An apparatus for creating game resources, comprising:
the acquisition unit is used for acquiring model deformation information output by the object model simulation game resource;
the generating unit is used for generating the vertex deformation of the object model according to the model deformation information and baking the vertex deformation of the object model into a vertex animation chartlet;
the production unit is used for reading the vertex offset data in the vertex animation map by using a particle system, and producing the game resource of the object model according to the vertex offset data comprises the following steps: the method comprises the steps of obtaining two pieces of texture coordinate information of a vertex animation map mapped to the surface of an object model according to vertex offset data in the vertex animation map, reading the two pieces of texture coordinate information of the vertex animation map mapped to the surface of the object model by using a particle system, and manufacturing game resources of the object model by sampling the two pieces of texture coordinate information, wherein two emission resources are arranged in the particle system and are respectively used for emitting particles for displaying a preset effect and controlling the material quality of the model to display the preset effect.
10. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of a method of making a game resource as claimed in any one of claims 1 to 8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for making a game resource according to any one of claims 1 to 8.
CN202111094815.7A 2021-09-17 2021-09-17 Game resource manufacturing method, device and equipment Active CN113786624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111094815.7A CN113786624B (en) 2021-09-17 2021-09-17 Game resource manufacturing method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111094815.7A CN113786624B (en) 2021-09-17 2021-09-17 Game resource manufacturing method, device and equipment

Publications (2)

Publication Number Publication Date
CN113786624A CN113786624A (en) 2021-12-14
CN113786624B true CN113786624B (en) 2022-09-30

Family

ID=78878818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111094815.7A Active CN113786624B (en) 2021-09-17 2021-09-17 Game resource manufacturing method, device and equipment

Country Status (1)

Country Link
CN (1) CN113786624B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114722447B (en) * 2022-06-09 2022-11-01 广东时谛智能科技有限公司 Method, device, equipment and storage medium for displaying shoe model through multi-finger touch

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101527051B (en) * 2009-03-26 2011-11-16 北京像素软件科技股份有限公司 Method for rendering sky based on atmospheric scattering theory and device thereof
CN103578128A (en) * 2013-11-05 2014-02-12 大连创达技术交易市场有限公司 Method for particle effect optimization based on materials
CN104700446B (en) * 2015-03-31 2017-10-03 境界游戏股份有限公司 The update method of particle vertex data in a kind of particIe system
US20180357826A1 (en) * 2017-06-10 2018-12-13 Tsunami VR, Inc. Systems and methods for using hierarchical relationships of different virtual content to determine sets of virtual content to generate and display
CN112037311B (en) * 2020-09-08 2024-02-20 腾讯科技(深圳)有限公司 Animation generation method, animation playing method and related devices
CN112241993B (en) * 2020-11-30 2021-03-02 成都完美时空网络技术有限公司 Game image processing method and device and electronic equipment
CN112652044A (en) * 2021-01-05 2021-04-13 网易(杭州)网络有限公司 Particle special effect rendering method, device and equipment and storage medium

Also Published As

Publication number Publication date
CN113786624A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN112037311B (en) Animation generation method, animation playing method and related devices
EP3882870B1 (en) Method and device for image display, storage medium and electronic device
US10380803B1 (en) Methods and systems for virtualizing a target object within a mixed reality presentation
US6778948B1 (en) Method of creating a dynamic image, storage medium and program executing apparatus
CN112241993B (en) Game image processing method and device and electronic equipment
US9588651B1 (en) Multiple virtual environments
JP2001273517A (en) Game system and computer-readable recording medium with recording program for game recorded thereon
CN113559504B (en) Information processing method, information processing device, storage medium and electronic equipment
CN113786624B (en) Game resource manufacturing method, device and equipment
CN114119818A (en) Rendering method, device and equipment of scene model
CN110415326A (en) A kind of implementation method and device of particle effect
US6646642B1 (en) Method of creating image frames, storage medium and apparatus for executing program
CN110930484B (en) Animation configuration method and device, storage medium and electronic device
CN110310348A (en) A kind of three-dimensional flame Dynamic Simulation Method based on particIe system
WO2024082897A1 (en) Illumination control method and apparatus, and computer device and storage medium
US6686919B1 (en) Method of creating image frames, storage medium and program executing apparatus
JP4026091B2 (en) Image display device, game device, and recording medium
CN113313798B (en) Cloud picture manufacturing method and device, storage medium and computer equipment
CN112473135B (en) Real-time illumination simulation method, device and equipment for mobile game and storage medium
CN112150592B (en) Animation file generation method and device, storage medium and electronic equipment
JP2022535502A (en) Method for selecting virtual objects and its device, terminal and storage medium
CN113706674A (en) Method and device for manufacturing model map, storage medium and computer equipment
Okun et al. Interactive Games
WO2023216771A1 (en) Virtual weather interaction method and apparatus, and electronic device, computer-readable storage medium and computer program product
CN114047998B (en) Object updating method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant