CN112102492A - Game resource manufacturing method and device, storage medium and terminal - Google Patents

Game resource manufacturing method and device, storage medium and terminal Download PDF

Info

Publication number
CN112102492A
CN112102492A CN202010846791.5A CN202010846791A CN112102492A CN 112102492 A CN112102492 A CN 112102492A CN 202010846791 A CN202010846791 A CN 202010846791A CN 112102492 A CN112102492 A CN 112102492A
Authority
CN
China
Prior art keywords
target element
local area
information
area surface
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.)
Granted
Application number
CN202010846791.5A
Other languages
Chinese (zh)
Other versions
CN112102492B (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 CN202211508900.8A priority Critical patent/CN115814414A/en
Priority to CN202010846791.5A priority patent/CN112102492B/en
Publication of CN112102492A publication Critical patent/CN112102492A/en
Application granted granted Critical
Publication of CN112102492B publication Critical patent/CN112102492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • 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/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/603D [Three Dimensional] animation of natural phenomena, e.g. rain, snow, water or plants

Landscapes

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

Abstract

The invention discloses a method and a device for manufacturing game resources, a storage medium and a terminal, relates to the technical field of data processing, and mainly aims to solve the problems that the existing rain and snow game resources manufactured by direct coverage cannot achieve the display effect of real rain and snow coverage, and the accuracy of manufacturing simulation real scenes by the game resources is reduced. The method comprises the following steps: creating a local area surface matching at least one preset inclination angle and/or horizontal angle of the first target element; generating a second target element on the local area surface; and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources. The method is mainly used for making game resources.

Description

Game resource manufacturing method and device, storage medium and terminal
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for creating game resources, a storage medium, and a terminal.
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 the real environment, especially role-playing games, different roles need to be controlled to operate in game scenes, and therefore, the scenes in the games need to show the scenes close to the reality so as to better increase the user experience.
At present, in the existing game weather scene, rain and snow game resources are usually produced by directly producing a rain and snow map in the game scene to cover on a target object in animation, such as a three-dimensional building, a three-dimensional tree and the like, so as to obtain the scene of the rain and snow weather. However, the rain and snow map is directly used for covering the animation target object, the manufactured animation effect is only a rigid image covering effect, the display effect of the real weather environment cannot be achieved, the rain and snow game effect with the vivid effect manufactured on the mobile terminal occupies higher system resources, and the accuracy of the game resource for manufacturing the simulated real scene is reduced.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for creating game resources, a storage medium, and a terminal, and mainly aims to solve the problem that the current animation weather scene created by direct overlay cannot achieve the display effect of the real weather environment, and the accuracy of creating and simulating the real scene by using the game resources is reduced.
According to an aspect of the present invention, there is provided a method for producing game resources, comprising:
creating a local area surface matching at least one preset inclination angle and/or horizontal angle of the first target element;
generating a second target element on the local area surface;
and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources.
According to another aspect of the present invention, there is provided a game resource creating apparatus, comprising:
the creating module is used for creating a local area surface which is matched with at least one preset inclination angle and/or horizontal angle of the first target element;
a generating module, configured to generate a second target element on the local area surface;
and the processing module is used for baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources.
According to another aspect of the present invention, there is provided a storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the method for producing a game resource as described above.
According to still another aspect of the present invention, there is provided a terminal including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the manufacturing method of the game resource.
By the technical scheme, the technical scheme provided by the embodiment of the invention at least has the following advantages:
compared with the prior art, the game resource manufacturing method and device, the storage medium and the terminal are provided by the embodiment of the invention, the local area surface matched with at least one preset inclination angle and/or horizontal angle of the first target element is created; generating a second target element on the local area surface; and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources, so that the second target element which is used as rain and snow in the virtual scene is baked to the first target element by utilizing the form of creating the local area surface, the manufactured game resources are more flexible and real, the manufactured weather scene animation is closer to the display effect of the real weather environment, the system resources for manufacturing the game resources of the vivid real rain and snow environment are reduced, the accuracy of manufacturing the simulated real scene by the game resources is improved, and the interactive experience of players in the game is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of a method for creating game resources according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for creating game resources according to an embodiment of the present invention;
FIG. 3 illustrates a schematic diagram of a three-dimensional building provided by an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating the creation of multiple local areas of a building according to an embodiment of the present invention;
FIG. 5 is a schematic illustration of a localized area distribution of snow particles provided by an embodiment of the present invention;
FIG. 6 is a schematic view showing the effect of a snow covered building provided by an embodiment of the present invention;
FIG. 7 is a schematic illustration of the wiping effect of a snow-covered building provided by an embodiment of the present invention;
fig. 8 is a simplified schematic diagram of a mesh unit of internal information of a model with low model precision according to an embodiment of the present invention;
fig. 9 is a simplified diagram illustrating the number of mesh units of the internal information of the model with high model accuracy according to the embodiment of the present invention;
FIG. 10 is a schematic diagram illustrating the high light effect of skin water provided by the embodiment of the invention;
FIG. 11 is a schematic diagram illustrating a water surface highlight effect provided by an embodiment of the present invention;
FIG. 12 is a block diagram of an apparatus for creating game resources according to an embodiment of the present invention;
FIG. 13 is a block diagram of an apparatus for creating a game asset according to another embodiment of the present invention;
fig. 14 shows a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method for making game resources, which comprises the following steps of:
101. a local area surface is created that matches at least one preset tilt angle and/or horizontal angle of the first target element.
The first target element is used for representing a three-dimensional model element or a mapping element expected to be subjected to manufacturing of a rain and snow effect in a game scene, and determining a matched element type based on different effects, such as a building model, a ground model, a tree model and the like, and the embodiment of the invention is not particularly limited. In the embodiment of the present invention, because the first target element displays a stereoscopic effect of multiple spatial dimensions in the virtual scene or a mapping coverage effect of different display contents, a local area surface matching the first target element may be created to represent a patch with directions and areas, for example, a plurality of local area surfaces corresponding to eaves to be covered by snow particles in the building model shown in fig. 2. In the embodiment of the present invention, the preset inclination angle of the local area surface is determined according to the model top information of the first target element, and is preferably an inclination angle of 30 degrees or a horizontal angle, and a certain distance is provided between the created local area surface and the model, so as to better conform to the effect of a real weather scene during baking, and no specific limitation is made.
It should be noted that, in the production of a game scene, models of different virtual objects may be constructed by a game engine, and the models are combined with maps of various colors and effects to obtain a game scene with different contents, for example, the constructed building model is a three-dimensional model including a building skeleton, and in order to display effects such as a wall, a roof, and a tile, the mapping elements are baked on the model in a covering manner to obtain a virtual three-dimensional scene of a complete building, which is not specifically limited in the embodiment of the present invention.
102. Generating a second target element on the local surface.
The second target element is a mapping element or a particle element, such as a snow particle, a rain map, and the like, for baking the first target element to show a real scene effect. In the embodiment of the present invention, in order to simulate the effect of rain and snow in real weather, the building is covered with real rain and snow, and when game resources are created, a second target element is generated on a created local area, for example, a plurality of snow particles are generated on a plurality of local areas with 30-degree inclination angles in different directions, and the snow particles on the local area may be distributed in any number, for example, for one local area, a plurality of parts may be divided, and the number of the snow particles in any one part may be the same or different, which is not limited in the embodiment of the present invention.
103. And baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources.
In the embodiment of the invention, the generated second target elements are baked to the first target elements according to the normal directions of the plurality of local surfaces to obtain game resources, namely baked game scene resources to be displayed. For the production of game resources in different weather scenes, the baking processing method is different, for example, for a building covering scene of snow weather, the first target element is a building model, and the second target element may be snow particles, so that the snow particles on the local surface created by the building model are baked and covered on the top map of the building model. For example, in a ground coverage scenario of rainy weather, the first target element is a ground map, and the second target element may be a skin rain map, so that the skin rain map on the local area created by the ground map is baked to cover the ground map, which is not specifically limited in the embodiment of the present invention.
Compared with the prior art, the embodiment of the invention provides a method for manufacturing game resources, wherein a local area surface matched with at least one preset inclination angle and/or horizontal angle of a first target element is created; generating a second target element on the local area surface; and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources, so that the second target element which is used as rain and snow in the virtual scene is baked to the first target element by utilizing the form of creating the local area surface, the manufactured game resources are more flexible and real, the manufactured weather scene animation is closer to the display effect of the real weather environment, the system resources for manufacturing the game resources of the vivid real rain and snow environment are reduced, the accuracy of manufacturing the simulated real scene by the game resources is improved, and the interactive experience of players in the game is improved.
An embodiment of the present invention provides another method for producing game resources, as shown in fig. 2, the method includes:
201. and acquiring the model top information of the first target element.
In the embodiment of the aspect of the present invention, since the first target element is a virtual object, such as a building, a ground, a tree, and the like, which is used for realizing the coverage of rain and snow in the virtual scene, in order to make the coverage of rain and snow displayed more truly in the game, the model top information of the first target element is acquired in the process of creating the local area. The model top information may include, for example, vertex data of the top of a three-dimensional building model, such as the building shown in fig. 3, including vertex data of the roof of an eave to be covered by snow particles in the building model, specifically, the vertex data may be three-dimensional coordinate information in a world coordinate system of an animation scene, and include a color space rgba value of each vertex, so that when baking is performed on the first target element, the G channel in the rgba value is covered based on, which is not specifically limited in the embodiment of the present invention.
202. Analyzing the area information and/or the shape information of the model top information, and creating at least one local area surface with preset inclination angle and/or horizontal angle matched with the area information and/or the shape information according to a preset proportion threshold.
For the embodiment of the invention, in order to enable the created local surface with at least one preset inclination angle and/or horizontal angle to be matched with the top information of the model, the local surface suitable for the second target element to be baked is obtained, the area information and/or the shape information of the top information of the model is analyzed, and the local surface matched with the area information and/or the shape information is created according to the preset proportion threshold value. Specifically, the preset proportional threshold is used to represent a first proportional relationship between the size and the shape of the local area and the area information and/or the shape information, and a second proportional relationship between the distance between the local area and the first target element, where the first proportional relationship and the second proportional relationship may be the same or different, and the specific numerical value of the preset proportional threshold is not limited in the embodiment of the present invention. For example, the preset proportion threshold may be 1 to 2, that is, a local area is created according to 2 times of the area information and the shape west, and the distance between the created local area and the building is 2 times of the area size of the local area, and the like, that is, the area of the local area is automatically adapted, the larger the area of the local area is, the larger the distance between the local area and the building is, and the local area is inclined by 30 degrees in multiple directions as shown in fig. 4, which is not particularly limited in the embodiment of the present invention. In addition, in order to bake the second target element generated on the local area onto the first target element, the threshold inclination angle is preferably 30 degrees, that is, 30 local areas including each direction are used, and a specific direction is determined as the model top information, and is preferably 8 local areas of 30 degrees, which is not specifically limited in the embodiment of the present invention.
It should be noted that, since the vertex data in the model vertex information may be combined to obtain a plurality of triangular surfaces of the model vertex, and the direction of the triangular surface is taken as the direction of creating the local surface, when creating the local surface, a local surface matching the number and the direction of the triangular surfaces at the model vertex by 30 tilt angles or horizontal angles may be obtained, as shown in fig. 4.
203. Generating second target elements on the local area surface in a randomly distributed manner.
In the embodiment of the invention, in order to enable the manufactured game resources to better accord with the coverage scenes of real rain and snow on buildings, the ground and trees, the second target elements are generated on the local surface in a random distribution mode. Specifically, for the production of the snow scene game resource, the snow particles are randomly distributed and generated on the local area surface, and for the production of the rain scene game resource, the rain map is randomly distributed and generated on the local area surface, so that the snow particles and the rain map as the second target element are baked to the building, the ground and the tree as the first target element.
In addition, for another embodiment, for the generated second target element, the generated snow particles may be adapted according to the distance of each vertex of the building from the snow particles, such as the closer the distance, the more the baking covers the snow particles, and thus the more the snow particles are emitted onto the building. In addition, in the embodiment of the present invention, the local area may be composed of a plurality of local area grids, preferably 9 local area grids, and when generating the second target element, the distribution of the second target element in the local area grid is configured by using the local area grid bakking Mesh parameter, for example, the closer the local area grid is to the vertex, the more snow particles are distributed, as shown in fig. 5, the snow particles on the local area are generated, which is not specifically limited in the embodiment of the present invention.
204. And determining vertex data corresponding to the model top information of the first target element.
For the embodiment of the invention, for the production of game resources, in order to accurately determine the model top information of the baking process during the baking process of the first target element, the vertex data of the model top information is determined. In general, the vertex data of the determined model vertex information is vertex data of all vertices including the model vertex information, such as all vertex data in a triangular plane, so that the process of creating the game resource is completed by baking the vertex data.
205. And clicking the vertex data matched with the second target element in a transmitting mode according to the normal direction of the local area surface.
In the embodiment of the present invention, in order to make the manufactured game resources more conform to the display content of the real weather scene, before the baking process, the second target element is shot into the second target element in a shot manner according to the normal direction of the local surface, that is, the vertex data on the first target element is shot by shooting the second target element, for example, the snow particles are shot onto the building on the local surface and shot into the vertex of the triangular surface of the building model, and then the shot vertex data is obtained.
For example, the snow particles generated in the local surface hit the building top in a shot manner in the normal direction of the local surface inclination angle, i.e., hit the vertex data of the matched building top. For another example, a rainmap is generated in the local area surface, and the local area surface hits the ground in a launching manner according to the normal direction of the horizontal angle of the local area surface, that is, hits the vertex data of the matched ground.
For further explanation and refinement, step 205 in the embodiment of the present invention specifically includes: and when the first target element is detected to have the shielding element, screening the local area surface with at least one preset inclination angle and/or horizontal angle by combining the shielding element, and clicking the vertex data matched with the second target element in a transmitting mode according to the normal direction of the screened local area surface and the vertical direction of the shielding element.
In the embodiment of the invention, the first target element in the virtual scene may have shielding elements, so as to meet the scene requirements and make the manufacturing effect of the game resources covered by rain and snow more accurate, when the shielding elements exist, the shielding elements are combined to screen the local area, and the screened local area is combined with the direction of the shielding elements to hit the vertex data. Specifically, the occlusion element is a model or a map that exists around the first target element and affects the sending of the second target element to the first target element to obtain vertex data. For example, as shown in fig. 6, a shielding element model exists beside a building, and when snow particles are covered, snow cannot be covered under the shielded building in a real scene, so that a local area is screened by combining a shielding surface of a shielding element, the snow particles are emitted to the building according to the screened local area and the vertical direction of the combined shielding surface, vertex data of the hit building is obtained, and snow does not have an effect of snow accumulation under a tree.
206. And baking and covering the G channel in the color space rgba in the clicked vertex data with color resources matched with the second target element to obtain the game resources of which the color resources are displayed by the three-dimensional grid mesh unit of the model top information.
In the embodiment of the present invention, in order to perform baking processing on vertex data to obtain game resources conforming to a real rain and snow scene, color resources matching the second target element are covered by baking predetermined channels in the color space rgba in the clicked vertex data. Specifically, the color space rgba is used for representing color values of a plurality of color space channels, in the embodiment of the present invention, the G channel in the rgba is baked and covered according to the color resource of the second target element, that is, the color value of the second target element, so as to complete the production of the game resource. For example, the G channel baking of rgba in the vertex data of the building where the snow particles are hit covers the white value of the snow particles, wherein the white value may be the same as or different from the white value of the snow particles, and if different, the white value of the baking cover is further adjusted according to the number of times of the vertex data hit by the snow particles, thereby reflecting the scene requirement that the more snow is covered with the white.
It should be noted that the model top information is characterized as a plane containing all vertex data, the plane is composed of at least one three-dimensional mesh unit, generally, one mesh may be in one vertex data, or there may be a plurality of vertex data, in the embodiment of the present invention, it is preferable that one mesh unit corresponds to one vertex data, so that when color coverage is performed on a G channel of a color space rgba in one vertex data, the corresponding mesh unit is displayed as a covered color, for example, the three-dimensional mesh of the model top information includes mesh units 1 to 100, which respectively correspond to one vertex data, and when the hit vertex data is 5, the G channel in the rgba value of the vertex data 5 is covered with a white color of snow particles, and the mesh unit 5 corresponding to the vertex data 5 is displayed as a white color.
Further, in order to meet the display requirements more meeting the real effect in different scenes, the embodiment of the present invention further includes: and when the first target element is detected to be bound with the coverage event, adjusting the game resource by combining the erasing information in the coverage event.
Aiming at the display of different first target elements in a scene, the special effect generated by the role, the prop, the role or the prop in the game may affect the manufactured game resources, for example, snow covered in an area and a terrain has an erasing effect due to the appearance of the role, the prop and the like, so that the erasing effect is realized by detecting whether the first target elements are bound with a covering event or not for adjustment.
Specifically, the coverage event is used for representing whether the first target element needs to be adjusted based on the erasure information, and the erasure information includes an erasure range and an erasure depth, so that the animation is adjusted in combination with the erasure information. For example, after snow particles based on the preconfigured material parameters are covered on a building, it is determined that a covering event is bound on the building based on the occurrence frequency of the character, and therefore, the snow particles covered on the building are adjusted based on the erasure information, as shown in fig. 7, so as to simulate a more realistic scene display effect.
Further, in the embodiment of the present invention, since the building requiring the snow covering effect may be a three-dimensional thatch pavilion as shown in fig. 6, in order to achieve a realistic snow covering effect, in addition to the top of the model may be covered by snow, the interior of the model may also be covered by snow, and therefore, in order to make the snow covering effect closer to the realistic effect, the embodiment of the present invention further includes: obtaining model internal information of the first target element; in the process that the second target element clicks the top point data of the model top information, when the top point data of the model internal information is clicked, extracting the model internal information of which the model precision value is in accordance with the clicking condition, and re-determining the clicked top point data in the extracted model internal information so as to execute the baking covering step, wherein the model precision value is calculated based on the number of three-dimensional mesh units of the model internal information; and/or; and in the process that the second target element clicks the top point data of the model top information, if the top point data of the model internal information is clicked, performing a baking covering step on the clicked top point data of the model internal information to obtain game resources, and adjusting the game resources by combining with erasing information.
Specifically, the internal information of the model may include, for example, each vertex data inside the three-dimensional building model, and is characterized as a plane containing all the vertex data, the plane is composed of at least one three-dimensional mesh unit, and generally, one mesh may store one vertex data, so that when a G channel of a color space rgba in one vertex data is color-covered, the corresponding mesh unit is displayed as a covered color. In the embodiment of the invention, when the second target element clicks the vertex data to the model top information, the vertex data in the model internal information is clicked due to the influence of the coverage range and the normal direction of the local surface. It should be noted that, since the model precision value of the internal information of the model is calculated for the number of the mesh units, for example, the more the data amount of the mesh units, the greater the model precision, the less the number of the mesh units, and the smaller the model precision, which is not specifically limited. Therefore, in the embodiment of the present invention, model internal information with different model precision values is pre-configured in different virtual models during the baking process to meet display requirements in different scenes, so that, in order to make the display effect inside the model more approximate to the real snow coverage effect during the snow particle coverage process, model internal information with model precision meeting hit conditions is extracted, where the hit conditions may be the maximum value of the model precision, and the model precision values of the model top information are the same principle, and the embodiment of the present invention is not particularly limited. After the model internal information meeting the click condition is extracted, the number of mesh units may change, so that the clicked vertex data in the extracted model internal information is re-determined, as shown in simplified diagrams of the number of mesh units of the model internal information in fig. 8 and 9, a simplified diagram of the mesh units of the model internal information with low model precision and a simplified diagram of the mesh units of the model internal information with high model precision are respectively determined. And then, re-determining the clicked vertex data of the model internal information by using the mesh unit of the extracted model internal information with high model precision to execute a baking covering step, namely covering the G channel of the clicked vertex data of the model internal information as the white color of the snow particles, so that after the mesh unit is refined and the vertex data is baked and covered, the fewer mesh units which are baked and covered as the white color are, the more the true snowfall covering effect is approached. In addition, the hit vertex information can be directly determined for the large-area mesh unit to perform white coverage of the G channel, the corresponding large-area white mesh unit is displayed, and then the obtained game resource is adjusted by using the erasure information, for example, the color in the G channel is restored by using the area where the mouse moves as the erasure position. It should be noted that, because the game resource in the embodiment of the present invention is the game production stage, the accuracy improved by increasing the number of the mesh units does not affect the consumption of the performance of the client during the game operation, and therefore, the snow coverage effect can be more real by improving the accuracy of the mesh units.
In another embodiment, the method is suitable for a rain ponding scene, and further comprises the following steps: when the depth event is detected to be bound to the first target element, configuring a height parameter and a material parameter of a second target element to be baked according to the depth event and the local area; and baking and covering the second target element configured based on the height parameter and the material parameter on the first target element to obtain game resources.
For the embodiment of the invention, in order to make the display effect of the covered first target element in the animation scene more accurate, the depth event is used for representing the thickness of the baking covering of the second target element, so that the height parameter of the second target element is configured based on the depth event. In addition, since the second target element is configured with the height parameter, it is described that in order to make the display effect more accurate, the second target element, such as ponding of rain, is a height bitmap, so that the effect displayed when overlaid on the first target element is consistent with the real display effect. For example, after rainwater falls on the ground, accumulated water is formed at the hollow on the ground, in the embodiment of the present invention, the accumulated water is displayed through the surface water map and the accumulated water map which are height maps, and therefore, a depth event, that is, a thickness that needs to cover the accumulated water or the surface water, is bound according to the first target element which is the surface water map and the hollow map, and may be obtained by configuring a height parameter, which is not specifically limited in the embodiment of the present invention. In addition, in order to make the effect of animation display more accurate, when the first target element is bound with the depth event, the local surfaces constructed by the vertex data of the first target element are screened based on the depth event, so that the optimally displayed local surfaces can be obtained, preferably one local surface, and the second target element forms the display effect matched with the first target element when covering. Correspondingly, the material parameter is a parameter representing the display effect of the second target element, such as high luminosity and transparency of the water map, and the embodiment of the invention is not particularly limited.
Specifically, in the process of covering the rainwater map on the ground or the hollow to make the game resource of surface water or accumulated water, the height parameter configured by the depth parameter is displayed by the surface water animation, and the material parameter configured by the height parameter is combined to generate the surface water height map with the vertex color, for example, the height map can express the height by using one 0.5 unit number, the surface water is directly covered on the ground or the building, and the material parameter represents the highlight effect or the wetness effect of the water, such as the highlight of the surface water shown in fig. 10. For the display of the water accumulation animation, a mask map suitable for the hollow topographic map is generated by combining the height parameters configured by the depth parameters and the material parameters configured by the height parameters, for example, the mask map directly covers water accumulation at the hollow part, and the material parameters represent the highlight effect or the humidity effect of water, and the embodiment of the scheme is not particularly limited. The wettability effect, that is, the effect of wetting the ground with rainwater, that is, the effect of deepening the surface Color, is configured by the material parameters, and may include configuring the material parameters such as a Base Color parameter (the most basic chartlet Color of an object), a roughnesss parameter (the Roughness, the smoother and smaller the object is), a Metalness parameter (the metal degree), and the like, so as to realize different display effects, such as the water accumulation surface highlight shown in fig. 11.
Further, in order to be suitable for a scene of rain water accumulation and meet display requirements in different animation scenes, so that the displayed animation effect is more accurate and meets the real effect, the embodiment of the invention further comprises the following steps: when the height parameter and/or the material parameter accord with a preset scene condition, acquiring an effect element matched with the preset scene condition; adjusting the game resource based on the effect element.
The preset scene conditions are effect contents configured according to natural phenomena in a real environment, for example, for a water accumulation scene, the preset scene conditions may include ripple effects, water flow stripe effects, and the like, and embodiments of the present invention are not limited specifically. Specifically, for different preset scene conditions, the height parameters and/or the material parameters corresponding to the corresponding preset scene conditions are pre-allocated in a corresponding numerical range, so that when an animation is generated, if the height parameters and the material parameters obtained based on the second target element and the first target element meet the preset scene conditions, the matched effect animation elements are obtained, that is, the effect animation elements are used for representing animation elements meeting the corresponding effect of the preset scene conditions, so that a more accurate animation with a display effect is obtained by combining the effect animation elements.
Specifically, when the preset scene condition is a ripple effect, the surface of the water map is covered on the surface of the water map again by using the ripple effect map, so as to achieve the ripple effect. The actual ripple effect is displayed based on the accumulated water depth correlation, and the deeper the water is, the more obvious the ripple effect is, so that when the ripple effect animation elements are obtained, the size of the ripple normal map is configured according to the preset inclination angle of the object surface normal.
In addition, when the preset scene condition is the water flow effect, namely the surface of the water map is covered on the surface of the accumulated water map again by the water flow effect map, the effect that the water flow flows from the surface of the object is achieved. Specifically, the water flow effect is associated with the accumulated water depth based on the preset inclination angle of the object surface, the larger the inclination is, the deeper the accumulated water is, and the more obvious the water flow effect is, so that when the water flow effect animation element is obtained, the size of the water flow normal map is configured according to the preset inclination angle of the object surface normal and the height parameter of the accumulated water.
Compared with the prior art, the embodiment of the invention provides another game resource manufacturing method, and the embodiment of the invention creates the local area surface matched with at least one preset inclination angle and/or horizontal angle of the first target element; generating a second target element on the local area surface; and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources, so that the second target element which is used as rain and snow in the virtual scene is baked to the first target element by utilizing the form of creating the local area surface, the manufactured game resources are more flexible and real, the manufactured weather scene animation is closer to the display effect of the real weather environment, the system resources for manufacturing the game resources of the vivid real rain and snow environment are reduced, the accuracy of manufacturing the simulated real scene by the game resources is improved, and the interactive experience of players in the game is improved.
Further, as an implementation of the method shown in fig. 1, an embodiment of the present invention provides an apparatus for creating a game resource, as shown in fig. 12, the apparatus includes:
a creation module 31 for creating a local area surface matching at least one preset inclination angle and/or horizontal angle of the first target element;
a generating module 32, configured to generate a second target element on the local area surface;
and the processing module 33 is configured to bake the second target element onto the first target element according to the normal direction of the local area surface, so as to obtain a game resource.
Compared with the prior art, the embodiment of the invention provides a game resource manufacturing device, and the game resource manufacturing device is characterized in that a local area surface matched with at least one preset inclination angle and/or horizontal angle of a first target element is created; generating a second target element on the local area surface; and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources, so that the second target element which is used as rain and snow in the virtual scene is baked to the first target element by utilizing the form of creating the local area surface, the manufactured game resources are more flexible and real, the manufactured weather scene animation is closer to the display effect of the real weather environment, the system resources for manufacturing the game resources of the vivid real rain and snow environment are reduced, the accuracy of manufacturing the simulated real scene by the game resources is improved, and the interactive experience of players in the game is improved.
Further, as an implementation of the method shown in fig. 2, an embodiment of the present invention provides another apparatus for creating a game resource, as shown in fig. 13, the apparatus includes:
a creation module 41 for creating a local area surface matching at least one preset inclination angle and/or horizontal angle of the first target element;
a generating module 42, configured to generate a second target element on the local area surface;
and the processing module 43 is configured to bake the second target element onto the first target element according to the normal direction of the local area surface, so as to obtain a game resource.
Further, the processing module 43 includes:
a determining unit 4301, configured to determine vertex data corresponding to the model top information of the first target element;
the capturing unit 4302 is configured to capture the vertex data matched with the second target element in a transmission manner according to a normal direction of the local area surface;
and the first baking unit 4303 is configured to bake a G channel in the color space rgba in the clicked vertex data to cover a color resource matching the second target element, so as to obtain a game resource of which the color resource is displayed by a three-dimensional grid mesh unit of the model top information.
Further, the creating module 41 includes:
an obtaining unit 4101, configured to obtain model top information of the first target element;
a creating unit 4102, configured to analyze area information and/or shape information of the model top information, and create at least one local surface of a preset inclination angle and/or a horizontal angle, which is matched with the area information and/or the shape information, according to a preset proportional threshold;
the generating module 42 is specifically configured to generate the second target elements on the local area surface in a randomly distributed manner.
Further, the capturing unit 4302 is specifically configured to, when it is detected that the first target element has a blocking element, screen a local area surface with the at least one preset inclination angle and/or horizontal angle in combination with the blocking element, and capture the vertex data matched with the second target element in an emission manner in combination with a vertical direction of the blocking element according to a normal direction of the screened local area surface.
Further, the apparatus further comprises:
and the first adjusting module 44 is configured to, when it is detected that the first target element is bound with an overlay event, adjust the game resource in combination with erasure information in the overlay event.
Further, the processing module 43 includes:
a configuration unit 4304, configured to, when it is detected that a depth event is bound to the first target element, configure a height parameter and a material parameter of a second target element to be baked according to the depth event and the local area;
a second baking unit 4305, configured to bake the second target element configured based on the height parameter and the material parameter to cover the first target element, so as to obtain a game resource.
Further, the apparatus further comprises:
the first obtaining module 45 is further configured to obtain an effect element matched with a preset scene condition when the height parameter and/or the material parameter meet the preset scene condition;
a second adjusting module 46 for adjusting the game resource based on the effect element.
Further, the apparatus further comprises:
a second obtaining module 47, configured to obtain model internal information of the first target element;
an extracting module 48, configured to, when it is detected that the vertex data of the model internal information is clicked in the process of clicking the vertex data on the model top information by the second target element, extract model internal information whose model precision value meets a click condition, and re-determine clicked vertex data in the extracted model internal information to perform a baking covering step, where the model precision value is calculated based on the number of three-dimensional mesh units of the model internal information; and/or;
and a third adjusting module 49, configured to, when it is detected that the vertex data of the model internal information is clicked during the process of clicking the vertex data of the model top information by the second target element, perform a baking and covering step on the clicked vertex data of the model internal information to obtain a game resource, and adjust the game resource in combination with the erasing information.
Compared with the prior art, the embodiment of the invention provides another game resource manufacturing device, and the game resource manufacturing device is characterized in that a local area surface matched with at least one preset inclination angle and/or horizontal angle of a first target element is created; generating a second target element on the local area surface; and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources, so that the second target element which is used as rain and snow in the virtual scene is baked to the first target element by utilizing the form of creating the local area surface, the manufactured game resources are more flexible and real, the manufactured weather scene animation is closer to the display effect of the real weather environment, the system resources for manufacturing the game resources of the vivid real rain and snow environment are reduced, the accuracy of manufacturing the simulated real scene by the game resources is improved, and the interactive experience of players in the game is improved.
According to an embodiment of the present invention, there is provided a storage medium storing at least one executable instruction, where the computer executable instruction is capable of executing the method for producing a game resource in any of the above-mentioned method embodiments.
Fig. 14 is a schematic structural diagram of a terminal according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the terminal.
As shown in fig. 14, the terminal may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically execute relevant steps in the above embodiment of the method for manufacturing the game resource.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The terminal comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations:
creating a local area surface matching at least one preset inclination angle and/or horizontal angle of the first target element;
generating a second target element on the local area surface;
and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method of creating game resources, comprising:
creating a local area surface matching at least one preset inclination angle and/or horizontal angle of the first target element;
generating a second target element on the local area surface;
and baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources.
2. The method of claim 1, wherein the baking the second target element onto the first target element according to the normal direction of the local area surface to obtain the game resource comprises:
determining vertex data corresponding to the model top information of the first target element;
clicking the vertex data matched with the second target element in a transmitting mode according to the normal direction of the local area surface;
and baking and covering the G channel in the color space rgba in the clicked vertex data with color resources matched with the second target element to obtain the game resources of which the color resources are displayed by the three-dimensional grid mesh unit of the model top information.
3. The method of claim 2, wherein creating a local area surface that matches at least one preset tilt angle and/or horizontal angle of the first target element comprises:
acquiring model top information of the first target element;
analyzing the area information and/or the shape information of the top information of the model, and creating at least one local area of a preset inclination angle and/or a horizontal angle matched with the area information and/or the shape information according to a preset proportion threshold;
the generating a second target element on the local area surface comprises:
generating second target elements on the local area surface in a randomly distributed manner.
4. The method according to claim 2 or 3, wherein the capturing the vertex data of the second target element matching in the emitting manner in the normal direction of the local area surface comprises:
and when the first target element is detected to have the shielding element, screening the local area surface with at least one preset inclination angle and/or horizontal angle by combining the shielding element, and clicking the vertex data matched with the second target element in a transmitting mode according to the normal direction of the screened local area surface and the vertical direction of the shielding element.
5. The method of claim 4, further comprising:
and when the first target element is detected to be bound with the coverage event, adjusting the game resource by combining the erasing information in the coverage event.
6. The method of claim 1, wherein the baking the second target element onto the first target element according to the normal direction of the local area surface to obtain the game resource comprises:
when the depth event is detected to be bound to the first target element, configuring a height parameter and a material parameter of a second target element to be baked according to the depth event and the local area;
and baking and covering the second target element configured based on the height parameter and the material parameter on the first target element to obtain game resources.
7. The method of claim 6, further comprising:
when the height parameter and/or the material parameter accord with a preset scene condition, acquiring an effect element matched with the preset scene condition;
adjusting the game resource based on the effect element.
8. The method of claim 2, further comprising:
obtaining model internal information of the first target element;
in the process that the second target element clicks the top point data of the model top information, when the top point data of the model internal information is clicked, extracting the model internal information of which the model precision value is in accordance with the clicking condition, and re-determining the clicked top point data in the extracted model internal information so as to execute the baking covering step, wherein the model precision value is calculated based on the number of three-dimensional mesh units of the model internal information; and/or;
and in the process that the second target element clicks the top point data of the model top information, if the top point data of the model internal information is clicked, performing a baking covering step on the clicked top point data of the model internal information to obtain game resources, and adjusting the game resources by combining with erasing information.
9. An apparatus for creating game resources, comprising:
the creating module is used for creating a local area surface which is matched with at least one preset inclination angle and/or horizontal angle of the first target element;
a generating module, configured to generate a second target element on the local area surface;
and the processing module is used for baking the second target element to the first target element according to the normal direction of the local area surface to obtain game resources.
10. A storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the method of making a game resource as claimed in any one of claims 1 to 8.
11. A terminal, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the manufacturing method of the game resource according to any one of claims 1-8.
CN202010846791.5A 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal Active CN112102492B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211508900.8A CN115814414A (en) 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal
CN202010846791.5A CN112102492B (en) 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010846791.5A CN112102492B (en) 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202211508900.8A Division CN115814414A (en) 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN112102492A true CN112102492A (en) 2020-12-18
CN112102492B CN112102492B (en) 2022-12-30

Family

ID=73753324

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202211508900.8A Pending CN115814414A (en) 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal
CN202010846791.5A Active CN112102492B (en) 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202211508900.8A Pending CN115814414A (en) 2020-08-21 2020-08-21 Game resource manufacturing method and device, storage medium and terminal

Country Status (1)

Country Link
CN (2) CN115814414A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113262480A (en) * 2021-05-13 2021-08-17 网易(杭州)网络有限公司 Baking method and device for three-dimensional scene
CN113470169A (en) * 2021-06-30 2021-10-01 完美世界(北京)软件科技发展有限公司 Game scene generation method and device, computer equipment and readable storage medium
CN115225588A (en) * 2022-02-22 2022-10-21 珠海金山数字网络科技有限公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090742A (en) * 2014-07-17 2014-10-08 北京邮电大学 Parallelization type progressive photon mapping method and device based on OpenCL
CN107886574A (en) * 2017-09-19 2018-04-06 浙江科澜信息技术有限公司 A kind of global rain effect emulation mode based on particIe system
CN108132712A (en) * 2018-01-12 2018-06-08 网易(杭州)网络有限公司 The rendering method of state of weather, device and storage medium and terminal in virtual scene
CN110310359A (en) * 2019-06-28 2019-10-08 网易(杭州)网络有限公司 The transform method and device of object state in a kind of game

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104090742A (en) * 2014-07-17 2014-10-08 北京邮电大学 Parallelization type progressive photon mapping method and device based on OpenCL
CN107886574A (en) * 2017-09-19 2018-04-06 浙江科澜信息技术有限公司 A kind of global rain effect emulation mode based on particIe system
CN108132712A (en) * 2018-01-12 2018-06-08 网易(杭州)网络有限公司 The rendering method of state of weather, device and storage medium and terminal in virtual scene
CN110310359A (en) * 2019-06-28 2019-10-08 网易(杭州)网络有限公司 The transform method and device of object state in a kind of game

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113262480A (en) * 2021-05-13 2021-08-17 网易(杭州)网络有限公司 Baking method and device for three-dimensional scene
CN113470169A (en) * 2021-06-30 2021-10-01 完美世界(北京)软件科技发展有限公司 Game scene generation method and device, computer equipment and readable storage medium
CN113470169B (en) * 2021-06-30 2022-04-29 完美世界(北京)软件科技发展有限公司 Game scene generation method and device, computer equipment and readable storage medium
CN115225588A (en) * 2022-02-22 2022-10-21 珠海金山数字网络科技有限公司 Data processing method and device
CN115225588B (en) * 2022-02-22 2024-02-23 珠海金山数字网络科技有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN115814414A (en) 2023-03-21
CN112102492B (en) 2022-12-30

Similar Documents

Publication Publication Date Title
CN112102492B (en) Game resource manufacturing method and device, storage medium and terminal
CN109685909B (en) Image display method, image display device, storage medium and electronic device
US7269539B2 (en) Dynamic weather simulation
CN106548516B (en) Three-dimensional roaming method and device
CN109271893A (en) A kind of generation method, device, equipment and storage medium emulating point cloud data
CN106157354B (en) A kind of three-dimensional scenic switching method and system
CN111968215A (en) Volume light rendering method and device, electronic equipment and storage medium
US7349830B2 (en) Weather profiles
CN112132936B (en) Picture rendering method and device, computer equipment and storage medium
WO2008111993A2 (en) Geospatial modeling system providing geospatial model data target point filtering based upon radial line segments and related methods
KR20080018404A (en) Computer readable recording medium having background making program for making game
CN113470169B (en) Game scene generation method and device, computer equipment and readable storage medium
US20230334781A1 (en) Simulation system based on virtual environment
CN112132938A (en) Model element deformation processing method, model element deformation processing device, model element image rendering method, model element image rendering device and model element image rendering medium
CN108280887B (en) Shadow map determination method and device
CN112037292B (en) Weather system generation method, device and equipment
CN112473135B (en) Real-time illumination simulation method, device and equipment for mobile game and storage medium
CN110211221A (en) Electronic three-dimensional map data creation method
CN113313796B (en) Scene generation method, device, computer equipment and storage medium
CN114255312A (en) Processing method and device of vegetation image and electronic equipment
CN111462343B (en) Data processing method and device, electronic equipment and storage medium
CN115222910A (en) Method and device for acquiring lighting information, electronic equipment and storage medium
CN114832375A (en) Ambient light shielding processing method, device and equipment
CN116958457A (en) OSGEarth-based war misting effect drawing method
CN112132934A (en) Model element deformation processing method, model element deformation processing device, model element image rendering method, model element image rendering device and model element image rendering medium

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