Game resource production method and device, storage medium and terminal

By creating local surfaces and baking rain and snow elements during game asset creation, the problem of insufficient realistic weather representation in existing technologies has been solved, enabling more flexible and realistic game asset creation and improving simulation accuracy and player experience.

CN115814414BActive Publication Date: 2026-01-23BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211508900.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-21
Publication Date
2026-01-23
Estimated Expiration
2040-08-21

AI Technical Summary

Technical Problem

In the current game resource production process, directly overlaying rain and snow textures cannot achieve the effect of displaying realistic weather environment. Furthermore, creating realistic effects on mobile devices will consume high system resources, reducing the accuracy of game resources in simulating real scenes.

Method used

By creating local surfaces that match the tilt angle and/or horizontal angle, a second target element is generated on the local surface, and then baked onto the first target element according to the normal direction of the local surface. For example, snow particles or rain maps can be generated on building models, enabling more flexible and realistic game asset production.

Benefits of technology

It improves the accuracy of game resource creation in simulating real-world scenarios, reduces system resource consumption, and enhances the player's interactive experience in the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115814414B_ABST
    Figure CN115814414B_ABST
Patent Text Reader

Abstract

The application discloses a game resource production method and device, a storage medium and a terminal, relates to the technical field of data processing, and mainly aims to solve the problem that the rain and snow game resource produced by direct covering cannot achieve the display effect of real rain and snow covering and the accuracy of simulating a real scene in game resource production 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 a 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, so as to obtain a game resource. The method is mainly used for game resource production.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to the Chinese Patent Application No. 202010846791.5, filed on August 21, 2020, and entitled "Game Resource Production Method and Device, Storage Medium, and Terminal". TECHNICAL FIELD

[0002] The present application relates to the technical field of data processing, and in particular, to a game resource production method and device, a storage medium, and a terminal. BACKGROUND

[0003] Online games have become an indispensable way of life and entertainment. Different types of online games are constructed based on the entertainment needs in real-life scenarios. Therefore, in order to provide users with a better game experience, the implementation of the scene in the game is expected to be closer to the real environment, especially in role-playing games, which require different characters to operate in the game scene. Therefore, the scene in the game needs to exhibit a scene close to reality in order to better increase the user experience.

[0004] Currently, the production of rain and snow game resources in the existing game weather scene is usually to directly produce a rain and snow map in the game scene and cover the target objects in the animation, such as three-dimensional buildings and three-dimensional trees, to obtain a rain and snow weather scene. However, directly covering the rain and snow map on the animation target objects only produces a stiff image covering effect, which cannot achieve the display effect of a real weather environment. Moreover, producing a rain and snow game effect with realistic effects on a mobile terminal will occupy a high system resource, which reduces the accuracy of simulating a real scene in game resource production. SUMMARY

[0005] Therefore, the present application provides a game resource production method and device, a storage medium, and a terminal, which mainly aims to solve the problem that the existing animation weather scene produced by direct covering cannot achieve the display effect of a real weather environment, which reduces the accuracy of simulating a real scene in game resource production.

[0006] According to an aspect of the present application, a game resource production method is provided, which includes:

[0007] creating a local surface matching at least one preset inclination angle and / or horizontal angle of a first target element;

[0008] generating a second target element on the local surface;

[0009] baking the second target element onto the first target element according to the normal direction of the local surface to obtain a game resource.

[0010] According to another aspect of the present application, a game resource production device is provided, comprising:

[0011] a creating module configured to create a local surface matching at least one preset inclined angle and / or horizontal angle of the first target element;

[0012] a generating module configured to generate a second target element on the local surface;

[0013] a processing module configured to bake the second target element onto the first target element according to a normal direction of the local surface, to obtain a game resource.

[0014] According to still another aspect of the present application, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform operations corresponding to the game resource production method.

[0015] According to still another aspect of the present application, a terminal is provided, comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete communication with each other through the communication bus.

[0016] The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the game resource production method.

[0017] By means of the above technical solutions, the technical solutions provided by the embodiments of the present application have at least the following advantages:

[0018] The present application provides a game resource production method and device, a storage medium and a terminal. Compared with the prior art, the embodiments of the present application create a local surface matching at least one preset inclined angle and / or horizontal angle of a first target element, generate a second target element on the local surface, and bake the second target element onto the first target element according to a normal direction of the local surface, to obtain a game resource. In this way, the second target element, which is rain or snow in a virtual scene, is baked onto the first target element in the form of creating a local surface, so that the produced game resource is more flexible and realistic, and the produced weather scene animation is closer to the display effect of a real weather environment, thereby reducing the system resources for producing a realistic and real rain and snow environment game resource, improving the accuracy of simulating a real scene in game resource production, and improving the interactive experience of players in the game.

[0019] The above description is only a summary of the technical solutions of the present application. In order to more clearly understand the technical means of the present application, the specific embodiments of the present application can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS

[0020] 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 accompanying drawings are included to provide a better understanding of the preferred embodiments, and are not intended to be a limitation on the scope of the application. Moreover, in the drawings, like reference numerals refer to similar components throughout the several views. In the drawings:

[0021] Figure 1 A flow chart of a method for creating a game resource is shown according to an embodiment of the present application;

[0022] Figure 2 A flow chart of another method for creating a game resource is shown according to an embodiment of the present application;

[0023] Figure 3 A schematic diagram of a three-dimensional building is shown according to an embodiment of the present application;

[0024] Figure 4 A schematic diagram of creating multiple local surfaces of a building is shown according to an embodiment of the present application;

[0025] Figure 5 A schematic diagram of distributing snow particles on a local surface is shown according to an embodiment of the present application;

[0026] Figure 6 A schematic diagram of a building covered by snow on an occlusion surface is shown according to an embodiment of the present application;

[0027] Figure 7 A schematic diagram of a building covered by snow erasing effect is shown according to an embodiment of the present application;

[0028] Figure 8 A schematic diagram of mesh unit simplification of internal information of a model with low model precision is shown according to an embodiment of the present application;

[0029] Figure 9 A schematic diagram of mesh unit simplification of internal information of a model with high model precision is shown according to an embodiment of the present application;

[0030] Figure 10 A schematic diagram of a skin water highlight effect is shown according to an embodiment of the present application;

[0031] Figure 11 A schematic diagram of a standing water surface highlight effect is shown according to an embodiment of the present application;

[0032] Figure 12 A block diagram of a device for creating a game resource is shown according to an embodiment of the present application;

[0033] Figure 13A block diagram of another game resource manufacturing device provided by an embodiment of the present application is shown;

[0034] Figure 14 A structural schematic diagram of a terminal provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0035] Exemplary embodiments of the present disclosure will be described in detail with reference to the drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be accurately conveyed to those skilled in the art.

[0036] An embodiment of the present application provides a game resource manufacturing method, as shown in the figure, the method comprises: Figure 1

[0037] 101, create a local area surface matching at least one preset tilt angle and / or horizontal angle of the first target element.

[0038] Wherein, the first target element is used to represent a three-dimensional model element or a map element in the game scene which is expected to be made with a rain and snow effect, and the matching element type is determined based on different effects, such as building model, ground model, tree model, etc., which is not limited in the present application. In the present application, since the first target element shows a three-dimensional effect of multiple spatial dimensions or a map covering effect of different display contents in the virtual scene, a local area surface matching the first target element can be created to represent a patch with direction and area size, for example, as shown in the figure, the eaves to be covered by snow particles in the building model correspond to multiple local area surfaces. Wherein, the preset tilt angle of the local area surface is determined according to the model top information of the first target element, and in the present application, a 30-degree tilt angle is preferred, or a horizontal angle, and the local area surface created has a certain distance from the model, so as to be more consistent with the effect of the real weather scene during baking, which is not limited. Figure 2

[0039] It should be noted that in the manufacturing of the game scene, the models of different virtual objects can be constructed by the game engine, and combined with the 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 containing the skeleton of the building, in order to realize the display of wall, roof, tile and other effects, the corresponding map elements are covered and baked on the model to obtain a complete virtual three-dimensional scene of the house building, which is not limited in the present application.

[0040] 102, generate a second target element on the local area surface. ​​

[0041] The second target element is a map element or a particle element used for baking a real scene effect onto the first target element, such as snow particles, rain map, etc., which is not limited in the embodiments of the present application. In the embodiments of the present application, in order to simulate the rain and snow effect in a real weather, the rain and snow is overlaid on a building in a real way, and when the game resource is produced, the second target element is generated on the created local surface, such as a plurality of snow particles on the local surface with a 30-degree inclination angle in different directions, and the snow particles on the local surface can be distributed in any number, for example, for a local surface, a plurality of parts can be divided, and the number of snow particles in any part can be the same or different, which is not limited in the embodiments of the present application.

[0042] 103. baking the second target element onto the first target element according to the normal direction of the local surface to obtain the game resource.

[0043] In the embodiments of the present application, the generated second target element is baked onto the first target element according to the normal direction of the plurality of local surfaces to obtain the game resource, that is, the baked game scene resource to be displayed. For the production of game resources for different weather scenes, the baking method is different, for example, for a building covering scene in a snowy weather, the first target element is a building model, and the second target element can be snow particles, so the snow particles on the local surface created by the building model are baked and overlaid on the top map of the building model. For example, for a ground covering scene in a rainy weather, the first target element is a ground map, and the second target element can be a skin rain map, so the skin rain map on the local surface created by the ground map is baked and overlaid on the ground map, which is not limited in the embodiments of the present application.

[0044] The embodiments of the present application provide a method for producing game resources. Compared with the prior art, the embodiments of the present application create a local surface with at least one preset inclination angle and / or horizontal angle matching the first target element, generate a second target element on the local surface, and bake the second target element onto the first target element according to the normal direction of the local surface to obtain the game resource, which realizes baking the second target element as virtual rain and snow onto the first target element in the form of creating a local surface, makes the produced game resource more flexible and real, and makes the produced weather scene animation more close to the display effect of a real weather environment, reduces the system resources for producing a realistic rain and snow environment game resource, thereby improving the accuracy of simulating a real scene in game resource production and improving the interactive experience of players in the game.

[0045] The embodiments of the present application provide another method for producing game resources, as shown in Figure 2 The method comprises:

[0046] 201, acquire model top information of the first target element.

[0047] In the embodiment of the present application, since the first target element is a virtual object in the virtual scene for implementing rain and snow covering, such as a building, ground, tree, etc., in order to make the rain and snow covering more realistic in the game, the model top information of the first target element is acquired in the process of creating the local area surface. The model top information can include vertex data of the top of a three-dimensional building model, such as Figure 3 The building shown in FIG. 8 includes vertex data of the top of the eaves in the building model to be covered by snow particles. Specifically, the vertex data can be three-dimensional coordinate information in a world coordinate system of an animation scene, and includes color space rgba values of each vertex, so that when baking to the first target element, the G channel of the rgba values is covered, and the embodiment of the present application is not limited in this regard.

[0048] 202, analyze area information and / or shape information of the model top information, and create a local area surface with at least one preset inclined angle and / or horizontal angle matching the area information and / or the shape information according to a preset proportion threshold.

[0049] For the embodiment of the present application, in order to make the created local area surface with at least one preset inclined angle and / or horizontal angle match the model top information, and obtain a local area surface suitable for baking processing of the second target element, the area information and / or the shape information of the model top information is analyzed, and a local area surface matching the area information and / or the shape information is created according to a preset proportion threshold. Specifically, the preset proportion threshold is used to represent a first positive proportion relationship between the size and shape of the local area surface and the area information and / or the shape information, and a second positive proportion relationship between the distance of the local area surface and the first target element. The first positive proportion relationship and the second positive proportion relationship can be the same or different, and the embodiment of the present application does not limit the specific value of the preset proportion threshold. For example, the preset proportion threshold can be 1:2, that is, the local area surface is created according to 2 times the area information and the shape information, and the distance between the created local area surface and the building is 2 times the area size of the local area surface, that is, the area of the local area surface is automatically adapted, the larger the area of the local area surface, the greater the distance between the local area surface and the building, such as Figure 4 The local area surface with an inclined angle of 30 degrees in multiple directions shown in FIG. 9, and the embodiment of the present application does not limit the specific value of the preset proportion threshold. In addition, in order to bake the second target element generated on the local area surface to the first target element, the threshold inclined angle is preferably 30 degrees, that is, the 30-degree local area surface in each direction can be included, and the specific direction is determined by the model top information, and preferably 8 local area surfaces with an inclined angle of 30 degrees, and the embodiment of the present application does not limit the specific value of the preset proportion threshold.

[0050] It should be noted that the vertex data in the model top information can be combined to obtain a plurality of triangular faces of the model top, and the direction of the triangular face is taken as the direction of creating the local area face, so that the local area face with the matching number, direction, 30 inclination angle or horizontal angle of the model top triangular face can be obtained when the local area face is created, as shown in the following formula (1). Figure 4

[0051] 203. Generating a second target element on the local area face in a random distribution manner.

[0052] In the embodiments of the present application, in order to make the game resources more in line with the real rain and snow covering the scene of the building, ground and tree, the second target element is generated on the local area face in a random distribution manner. Specifically, for the production of snow scene game resources, snow particles are randomly distributed on the local area face, and for the production of rain scene game resources, rain maps are randomly distributed on the local area face, so as to bake the snow particles and rain maps as the second target element to the building, ground and tree as the first target element. The embodiments of the present application are not limited specifically.

[0053] In addition, for another embodiment, for the generated second target element, the snow particles can be generated according to the distance between each vertex of the building and the snow particles, that is, the closer the distance, the more snow particles are baked and covered, so that the snow particles emitted to the building are also more. In addition, in the embodiments of the present application, the local area face can be composed of a plurality of local area grids, preferably 9, and when the second target element is generated, the distribution of the second target element in the local area grid is configured by using the local area grid Baki ng Mesh parameter, for example, the closer the distance to the vertex, the more snow particles are allocated, as shown in the following formula (2). Figure 5 The embodiments of the present application are not limited specifically.

[0054] 204. Determining the vertex data corresponding to the model top information of the first target element.

[0055] For the production of game resources, in order to accurately determine the model top information for baking processing of the first target element, the vertex data of the model top information is determined. Generally, the vertex data of the determined model vertex information is the vertex data of all vertices including the model top information, such as all vertex data in the triangular face, so as to complete the production process of game resources by baking processing the vertex data.

[0056] 205. Striking the second target element in a shooting manner according to the normal direction of the local area face to match the vertex data.

[0057] ​In the embodiments of the present application, in order to make the game resource produced more consistent with the display content of the real weather scene, before the baking process, the second target element is hit in a shooting manner according to the normal direction of the local area surface, that is, the vertex data on the first target element is hit by shooting the second target element, for example, the snow particles are shot to the building on the local area surface, and hit the vertex of the triangular surface of the building model, and then the hit vertex data is obtained, which is not limited in the embodiments of the present application.

[0058] For example, the snow particles generated in the local area surface hit the top of the building in a shooting manner according to the normal direction of the inclination angle of the local area surface, that is, hit the vertex data of the matching top of the building. For another example, the rain map generated in the local area surface hits the ground in a shooting manner according to the normal direction of the horizontal angle of the local area surface, that is, hits the vertex data of the matching ground.

[0059] In order to further illustrate and refine, step 205 specifically includes: when it is detected that the first target element has a shielding element, then the local area surface with the at least one preset inclination angle and / or horizontal angle is screened in combination with the shielding element, and the vertex data hit by the second target element in a shooting manner is matched according to the normal direction of the screened local area surface in combination with the vertical direction of the shielding element.

[0060] In the embodiments of the present application, there may be a shielding element near the first target element in the virtual scene, in order to meet the scene requirements and make the game resource production effect of rain and snow coverage more accurate, when there is a shielding element, the local area surface is screened in combination with the shielding element, and the vertex data is hit according to the direction of the screened local area surface in combination with the shielding element. Specifically, the shielding element is a model or a map existing around the first target element and affecting the shooting and hitting of the vertex data by the second target element to the first target element, which is not limited in the embodiments of the present application. For example, as shown in the figure, there is a shielding element model near the building, when the snow particles are covered, corresponding to the real scene, the snow cannot cover the building below the shielding element, therefore, the local area surface is screened in combination with the shielding surface of the shielding element, the snow particles are shot to the building according to the screened local area surface and in combination with the vertical direction of the shielding surface, and the vertex data of the hit building is obtained, so as to realize the effect that there is no snow under the tree. Figure 6

[0061] 206, bake the color resource of the second target element in the G channel of the color space rgba in the hit vertex data to obtain the game resource in which the three-dimensional grid mesh unit of the model top information displays the color resource.

[0062] ​In the embodiments of the present application, in order to perform baking processing on the vertex data to obtain game resources conforming to a real snow scene, a predetermined channel in a color space rgba in the hit vertex data is baked to cover and match the color resource of the second target element. Specifically, the color space rgba is used to represent the color values of multiple color space channels. In the embodiments of the present application, the G channel in the rgba is baked to cover the color resource of the second target element, that is, the color value of the second target element, to complete the production of the game resources. For example, the G channel of the rgba in the vertex data of the building hit by the snow particle is baked to cover the white value of the snow particle, where the white value can be the same as or different from the white value of the snow particle. If different, the adjusted white value of the baking coverage is further adjusted according to the number of times of the vertex data hit by the snow particle, so as to reflect the scene requirement that the more snow, the more white coverage.

[0063] It should be noted that the model top information represents a plane containing all vertex data, and the plane is composed of at least one three-dimensional mesh unit. Generally, one mesh can contain one vertex data or multiple vertex data. In the embodiments of the present application, one mesh unit corresponds to one vertex data, so that when the G channel of the color space rgba in one vertex data is covered by color, the corresponding mesh unit displays the covered color. For example, the three-dimensional mesh of the model top information includes mesh units 1-100, which respectively correspond to one vertex data. When the hit vertex data is 5, the G channel of the rgba value of the vertex data 5 is covered by the white color of the snow particle, and the mesh unit 5 corresponding to the vertex data 5 displays the white color.

[0064] Further, in order to meet the display requirements of different scenes that are more consistent with real effects, the embodiments of the present application further include: when it is detected that the first target element is bound with a covering event, adjusting the game resources in combination with the erasing information in the covering event.

[0065] For the display of different first target elements in a scene, the special effects generated by characters, props, characters or props in the game can affect the produced game resources. For example, the snow covering the area and the terrain will appear an erasing effect due to the appearance of characters, props and the like. Therefore, the adjustment is performed by detecting whether the first target element is bound with a covering event to realize the erasing effect.

[0066] Specifically, the overlay event is used to characterize whether the first target element needs adjustment based on erase information, including erase range and erase depth, thereby adjusting the animation in conjunction with the erase information. For example, after snow particles based on pre-configured material parameters are applied to a building, an overlay event is determined to be bound to the building based on the frequency of character appearances. Therefore, the snow particles applied to the building are adjusted based on the erase information, such as... Figure 7 As shown, this simulates a more realistic scene display effect.

[0067] Furthermore, in this embodiment of the application, the building requiring a snow-covered effect can be, for example, Figure 6 The 3D thatched pavilion shown in the example, in order to create a realistic snow-covered effect, may be covered not only by snow on the top of the model but also inside the model. Therefore, to make the snow-covered effect closer to reality, this embodiment of the application further includes: obtaining the model interior information of the first target element; during the process of the second target element extracting vertex data from the top information of the model, if vertex data of the model interior information is detected to be extracted, then the model interior information whose model precision value meets the extraction condition is extracted, and the extracted vertex data in the extracted model interior information is re-determined to perform a baking overlay step, wherein the model precision value is calculated based on the number of 3D mesh units of the model interior information; and / or; during the process of the second target element extracting vertex data from the top information of the model, if vertex data of the model interior information is detected to be extracted, then the baked overlay step is performed on the extracted vertex data of the model interior information to obtain game resources, and the game resources are adjusted in conjunction with erasure information.

[0068] Specifically, the internal information of the model can include vertex data such as that inside a 3D architectural model, represented as a plane containing all vertex data. The plane is composed of at least one 3D mesh unit. Generally, a mesh can store one vertex data point so that when color overlay is applied to the G channel of the RGBA color space in a vertex data point, the corresponding mesh unit displays the overlaid color. In this embodiment, when the second target element captures vertex data from the top information of the model, the vertex data in the internal information of the model will be captured due to the influence of the coverage area of ​​the local surface and the normal direction. It should be noted that since the model precision value of the internal information is calculated based on the number of mesh units, for example, the more mesh unit data, the greater the model precision, and the fewer mesh units, the smaller the model precision, no specific limitation is made. Therefore, in this embodiment, different virtual models are pre-configured with different model precision values ​​of internal model information during the baking process to meet the display requirements of different scenarios. Thus, to make the display effect inside the model more closely resemble the real snow cover effect during snow particle coverage, internal model information whose precision meets the snapping conditions is extracted. These snapping conditions can be the maximum value of the model precision, etc. The model precision value of the top model information follows the same principle, and this embodiment does not impose specific limitations. After extracting the internal model information that meets the snapping conditions, changes in the number of mesh units may cause changes in vertex data. Therefore, the snapped vertex data in the extracted internal model information is re-determined, such as... Figure 8 , 9 The simplified diagrams showing the number of mesh elements within the model are for models with low precision and models with high precision, respectively. It should be noted that since the actual 3D mesh elements are three-dimensional, these simplified diagrams are for ease of understanding and illustration. Figure 8 , Figure 9The diagram is simplified, showing only a simplified representation of the number of mesh units. Then, using mesh units with high-precision extracted model internal information, the captured vertex data of the model's internal information is re-determined for a baking overlay step. This involves covering the G-channel of the captured vertex data with the white of snow particles. This results in fewer white-covered mesh units after the mesh units are refined and the vertex data is baked overlayed, more closely approximating the effect of realistic snowfall. Alternatively, large areas of mesh units can be directly covered with white G-channels of the captured vertex information, displaying the corresponding large white mesh units. Then, the eraser information is used to adjust the obtained game resources, such as using the mouse movement area as the eraser position to restore the color in the G-channel. This embodiment does not impose specific limitations. It should be noted that since the game resources in this embodiment are from the game production stage, the increased precision due to the increased number of mesh units will not affect the client's performance consumption during game operation. Therefore, improving the precision of the mesh units can be used to make the snow cover effect more realistic.

[0069] In another embodiment provided, applicable to rain-induced water accumulation scenarios, the method further includes: when a depth event is detected to be bound to the first target element, the method configures the height parameters and material parameters of the second target element to be baked based on the depth event and the local surface; and bakes the second target element configured based on the height parameters and the material parameters onto the first target element to obtain game resources.

[0070] In this embodiment, to make the display effect of the first target element in the animation scene more accurate, the depth event is used to characterize the thickness of the baking coverage of the second target element, so as to configure the height parameter of the second target element based on the depth event. Furthermore, since the second target element is configured with a height parameter, it indicates that for a more accurate display effect, the second target element, such as rainwater accumulation, is a height bitmap, so that the display effect when covering the first target element is consistent with the actual display effect. For example, after rainwater falls on the ground, it forms puddles in the potholes. In this embodiment, the puddles are displayed through a surface water map and a puddle map, which are height bitmaps. Therefore, since the first target element, which is a ground surface map and a pothole map, is bound to a depth event, i.e., the required thickness of the puddles or surface water coverage, can be obtained by configuring the height parameter, this embodiment does not impose specific limitations. Furthermore, to ensure more accurate animation display, when the first target element is bound to a depth event, the local surfaces constructed from the vertex data of the first target element based on the depth event are filtered to obtain the optimal display local surface, preferably one, so that when the second target element overlaps, it forms a display effect that matches the first target element. Correspondingly, the material parameters are parameters characterizing the display effect of the second target element, such as the specular highlight and transparency of the water accumulation texture, etc., which are not specifically limited in this embodiment.

[0071] Specifically, in the process of creating game resources for surface water or puddles by covering the ground or potholes with rainwater textures, the display of surface water animation is achieved by combining the height parameter configured in the depth parameter with the material parameters configured in the height parameter to generate a surface water height map of the vertex colors. For example, the height map can use a 0.5 unit number to represent the height, directly covering the surface water on the ground or buildings. The material parameters characterize the specular or wetness effects of the water, such as... Figure 10 The surface water highlights are shown. For the display of the water accumulation animation, a mask map suitable for the uneven terrain texture is generated by combining the height parameter configured by the depth parameter and the material parameters configured by the height parameter. For example, the mask map directly covers the water accumulation on the uneven areas. The material parameters characterize the water's highlight effect or wetness effect; this embodiment does not specify a particular effect. The wetness effect refers to the effect of rain wetting the ground, i.e., the effect of deepening the surface color. This is configured through material parameters, which can include configuring parameters such as BaseColor (the object's most basic texture color), Roughness (roughness, lower for smoother objects), and Metalness (metallicity) to achieve different display effects, such as... Figure 11 The highlights on the water surface are shown.

[0072] Furthermore, in order to be applicable to rainy and waterlogged scenarios and meet the display requirements in different animation scenarios, so that the displayed animation effects are more accurate and conform to the real effect, the embodiments of this application also include: when the height parameter and / or the material parameter meet the preset scene conditions, obtaining effect elements that match the preset scene conditions; and adjusting the game resources based on the effect elements.

[0073] The preset scene conditions are effect content 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 stripe effects, etc., and this application embodiment does not specifically limit them. Specifically, for different preset scene conditions, the numerical ranges corresponding to the height parameters and / or material parameters that meet the corresponding preset scene conditions are pre-assigned, so that when generating animation, if the height parameters and material parameters obtained based on the second target element and the first target element meet the preset scene conditions, the matching effect animation element is obtained. That is, the effect animation element is used to represent the animation element that meets the effect corresponding to the preset scene conditions, so that the animation with a more accurate display effect is obtained by combining the effect animation elements.

[0074] Specifically, when the preset scene condition is a ripple effect, that is, the surface of the water texture is covered by a ripple effect texture over the surface of the water accumulation texture to achieve the ripple effect. For example, when the height parameter reaches the preset height parameter threshold of the ripple effect, the ripple effect texture is obtained and covered according to the normal direction. Since the display of a realistic ripple effect is based on the depth of the water accumulation—the deeper the water, the more pronounced the ripple effect—the size of the ripple normal map is configured according to the preset tilt angle of the object's surface normal when obtaining the ripple effect animation element.

[0075] Additionally, for scenarios where the preset scene condition is a water flow effect, a water flow effect texture is applied to the surface of the water map and then overlaid on the surface of the water accumulation texture to achieve the effect of water flowing from the object's surface. Specifically, the water flow effect is related to the preset tilt angle of the object's surface and the depth of the water accumulation. The greater the tilt and the deeper the water, the more obvious the water flow effect. Therefore, when acquiring the water flow effect animation elements, the size of the water flow normal map is configured according to the preset tilt angle of the object's surface normal and the height parameters of the water accumulation.

[0076] This application provides another method for creating game resources. Compared with the prior art, this application creates a local surface that matches at least one preset tilt angle and / or horizontal angle of a first target element; generates a second target element on the local surface; and bakes the second target element onto the first target element according to the normal direction of the local surface to obtain the game resource. This method utilizes the creation of local surfaces to bake the second target element, which serves as rain and snow in a virtual scene, onto the first target element, making the created game resources more flexible and realistic. It also makes the created weather scene animations more closely resemble the display effect of real weather environments, reduces the system resources required to create realistic rain and snow environment game resources, thereby improving the accuracy of game resource creation in simulating real scenes and enhancing the player's interactive experience in the game.

[0077] Furthermore, as a response to the above Figure 1 To implement the method shown, this application provides a device for creating game resources, such as... Figure 12 As shown, the device includes:

[0078] Create module 31 to create a local surface that matches at least one preset tilt angle and / or horizontal angle of the first target element;

[0079] Generation module 32 is used to generate a second target element on the local surface;

[0080] Processing module 33 is used to bake the second target element onto the first target element according to the normal direction of the local surface to obtain game resources.

[0081] This application provides a device for creating game resources. Compared with the prior art, this application creates a local surface that matches at least one preset tilt angle and / or horizontal angle of a first target element; generates a second target element on the local surface; and bakes the second target element onto the first target element according to the normal direction of the local surface to obtain game resources. This achieves the creation of a local surface to bake the second target element, which is a rain or snow element in a virtual scene, onto the first target element, making the created game resources more flexible and realistic. It also makes the created weather scene animations closer to the display effect of real weather environment, reduces the system resources for creating realistic rain and snow environment game resources, thereby improving the accuracy of game resource creation in simulating real scene, and improving the interactive experience of players in the game.

[0082] Furthermore, as a response to the above Figure 2 To implement the method shown, this application embodiment provides another game resource creation apparatus, such as... Figure 13 As shown, the device includes:

[0083] Create module 41 to create a local surface that matches at least one preset tilt angle and / or horizontal angle of the first target element;

[0084] Generation module 42 is used to generate a second target element on the local surface;

[0085] Processing module 43 is used to bake the second target element onto the first target element according to the normal direction of the local surface to obtain game resources.

[0086] Furthermore, the processing module 43 includes:

[0087] The determining unit 4301 is used to determine the vertex data corresponding to the model top information of the first target element;

[0088] The capturing unit 4302 is used to capture the vertex data of the second target element in the emission mode according to the normal direction of the local surface;

[0089] The first baking unit 4303 is used to bake the color resource of the second target element in the G channel of the color space RGBA in the captured vertex data to obtain the game resource of the color resource displayed by the three-dimensional mesh unit of the model top information.

[0090] Furthermore, the creation module 41 includes:

[0091] The acquisition unit 4101 is used to acquire the model top information of the first target element;

[0092] The creation unit 4102 is used to parse the area information and / or shape information of the top information of the model, and create at least one local surface with a preset tilt angle and / or horizontal angle that matches the area information and / or the shape information according to a preset ratio threshold.

[0093] The generation module 42 is specifically used to generate a second target element on the local surface in a random distribution manner.

[0094] Furthermore, the capturing unit 4302 is specifically used to, when the first target element is detected to have an occluding element, filter at least one local surface with a preset tilt angle and / or horizontal angle in combination with the occluding element, and capture the vertex data of the second target element in the emission mode according to the normal direction of the filtered local surface combined with the vertical direction of the occluding element.

[0095] Furthermore, the device also includes:

[0096] The first adjustment module 44 is used to adjust the game resource by combining the erase information in the overlay event when it is detected that the first target element is bound to an overlay event.

[0097] Furthermore, the processing module 43 includes:

[0098] Configuration unit 4304 is used to configure the height parameters and material parameters of the second target element to be baked according to the depth event and the local surface when the first target element is detected to be bound to a depth event;

[0099] The second baking unit 4305 is used to bake the second target element, configured based on the height parameter and the material parameter, onto the first target element to obtain game resources.

[0100] Furthermore, the device also includes:

[0101] The first acquisition module 45 is further configured to acquire effect elements that match the preset scene conditions when the height parameter and / or the material parameter meet the preset scene conditions.

[0102] The second adjustment module 46 is used to adjust the game resources based on the effect elements.

[0103] Furthermore, the device also includes:

[0104] The second acquisition module 47 is used to acquire the model internal information of the first target element;

[0105] Extraction module 48 is used to extract vertex data from the model's internal information during the process of the second target element extracting vertex data from the top information of the model. If vertex data from the model's internal information is detected to be extracted, the module extracts the model's internal information whose model accuracy value meets the extraction condition and redetermines the extracted vertex data from the model's internal information to perform a baking and covering step. The model accuracy value is calculated based on the number of 3D mesh units in the model's internal information.

[0106] The third adjustment module 49 is used to perform a baking and overlay step on the captured vertex data of the model internal information during the process of the second target element capturing vertex data from the top information of the model to obtain game resources, and to adjust the game resources in combination with the erasure information.

[0107] This application provides another device for creating game resources. Compared with the prior art, this application creates a local surface that matches at least one preset tilt angle and / or horizontal angle of a first target element; generates a second target element on the local surface; and bakes the second target element onto the first target element according to the normal direction of the local surface to obtain game resources. This realizes the use of creating local surfaces to bake the second target element, which is a rain or snow in a virtual scene, onto the first target element, making the created game resources more flexible and realistic. It also makes the created weather scene animations closer to the display effect of real weather environment, reduces the system resources for creating realistic rain and snow environment game resources, thereby improving the accuracy of game resource creation in simulating real scene, and improving the interactive experience of players in the game.

[0108] According to one embodiment of this application, a storage medium is provided, the storage medium storing at least one executable instruction, which can execute the method for creating game resources in any of the above method embodiments.

[0109] Figure 14 The diagram shows a structural schematic of a terminal according to one embodiment of the present application. The specific embodiments of the present application do not limit the specific implementation of the terminal.

[0110] like Figure 14 As shown, the terminal may include: a processor 502, a communication interface 504, a memory 506, and a communication bus 508.

[0111] The processor 502, communication interface 504, and memory 506 communicate with each other via communication bus 508.

[0112] Communication interface 504 is used to communicate with other network elements such as clients or other servers.

[0113] The processor 502 is used to execute program 510, specifically to execute the relevant steps in the above-described embodiment of the method for creating game resources.

[0114] Specifically, program 510 may include program code that includes computer operation instructions.

[0115] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The terminal may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.

[0116] Memory 506 is used to store program 510. Memory 506 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0117] Specifically, program 510 can be used to cause processor 502 to perform the following operations:

[0118] Create a local surface that matches at least one preset tilt angle and / or horizontal angle of the first target element;

[0119] A second target element is generated on the local surface;

[0120] The second target element is baked onto the first target element according to the normal direction of the local surface to obtain the game resource.

[0121] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0122] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for creating game resources, characterized in that, include: Create a local surface that matches at least one preset tilt angle and / or horizontal angle of the first target element; A second target element is generated on the local surface; The second target element is baked onto the first target element according to the normal direction of the local surface to obtain the game resource; The step of baking the second target element onto the first target element according to the normal direction of the local surface to obtain game resources includes: When a depth event is detected to be bound to the first target element, the height parameters and material parameters of the second target element to be baked are configured according to the depth event and the local surface. The second target element, configured based on the height parameter and the material parameter, is baked onto the first target element to obtain the game resource.

2. The method according to claim 1, characterized in that, The process of baking the second target element onto the first target element according to the normal direction of the local surface to obtain game resources includes: Determine the vertex data corresponding to the top information of the model of the first target element; The vertex data of the second target element is captured in an emission manner according to the normal direction of the local surface; The color resource of the second target element is baked and overlaid on the G channel in the RGBA color space of the captured vertex data to obtain the game resource of the three-dimensional mesh unit of the top information of the model, which displays the color resource.

3. The method according to claim 2, characterized in that, The creation of a local surface matching at least one preset tilt angle and / or horizontal angle of the first target element includes: Obtain the top information of the model of the first target element; The area information and / or shape information of the top information of the model are parsed, and at least one local surface with a preset tilt angle and / or horizontal angle that matches the area information and / or the shape information is created according to a preset ratio threshold. The step of generating the second target element on the local surface includes: The second target element is generated on the local surface in a random distribution manner.

4. The method according to claim 2 or 3, characterized in that, The vertex data that is captured in the emission mode to match the second target element according to the normal direction of the local surface includes: When an occluding element is detected in the first target element, the local surface with the at least one preset tilt angle and / or horizontal angle is selected in combination with the occluding element, and the vertex data of the second target element is captured in the firing mode according to the normal direction of the selected local surface combined with the vertical direction of the occluding element.

5. The method according to claim 4, characterized in that, The method further includes: When an overwrite event is detected that the first target element is bound to an overwrite event, the game resource is adjusted based on the erase information in the overwrite event.

6. The method according to claim 1, characterized in that, The method further includes: When the height parameter and / or the material parameter meet the preset scene conditions, obtain the effect element that matches the preset scene conditions; Adjust the game resources based on the aforementioned effect elements.

7. The method according to claim 2, characterized in that, The method further includes: Obtain the model internal information of the first target element; During the process of the second target element capturing vertex data from the top information of the model, if it is detected that vertex data from the internal information of the model has been captured, then the internal information of the model whose model accuracy value meets the capture condition is extracted, and the captured vertex data in the extracted internal information of the model is re-determined to perform the baking and covering step. The model accuracy value is calculated based on the number of 3D mesh units in the internal information of the model; and / or; During the process of the second target element capturing vertex data from the top information of the model, if it is detected that vertex data from the internal information of the model has been captured, a baking and overlay step is performed on the captured vertex data from the internal information of the model to obtain game resources, and the game resources are adjusted in conjunction with the erasure information.

8. A device for creating game resources, characterized in that, include: Create a module to create a local surface that matches at least one preset tilt angle and / or horizontal angle of the first target element; A generation module is used to generate a second target element on the local surface; The processing module is used to bake the second target element onto the first target element according to the normal direction of the local surface to obtain game resources; The processing module includes: The configuration unit is used to configure the height parameters and material parameters of the second target element to be baked according to the depth event and the local surface when the first target element is detected to be bound to a depth event; The baking unit is used to bake the second target element, configured based on the height parameter and the material parameter, onto the first target element to obtain game resources.

9. A storage medium storing at least one executable instruction that causes a processor to perform an operation corresponding to the method for creating game resources as described in any one of claims 1-7.

10. A terminal, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the method for creating game resources as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Parallelization type progressive photon mapping method and device based on OpenCL

    CN104090742A

  • Demonstration method for interactive sand table system

    CN105045389A