Decoration processing method, decoration processing device, program product and electronic equipment

Through automated decal processing methods, terrain information and decal asset data are used to solve the problem of lack of logic and high labor costs in decal processing, and efficient and reasonable decal effect is achieved.

CN119399436APending Publication Date: 2025-02-07GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411497140.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The processing of decals in the prior art lacks logic and rationality, and the labor cost is high.

Method used

By obtaining the terrain information in the virtual scene, determining the environmental attributes, and automatically determining the area to be decal based on these attributes, obtaining the decal data matching the environmental attributes from the pre-configured decal asset data, and finally adding the decal effect to the area to be decal.

Benefits of technology

Automatic decal treatment is realized, which reduces labor costs and improves the logic and rationality of decal treatment, so that the decal effect matches the characteristics of the area to be decal, and surface decal dispersion that conforms to the natural effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399436A_ABST
    Figure CN119399436A_ABST
Patent Text Reader

Abstract

The invention provides an applique processing method, an applique processing device, a program product and electronic equipment, and relates to the technical field of computer graphics. The method comprises the following steps: acquiring topographic information of a first area, and determining environmental attributes of the first area according to the topographic information of the first area; according to the environment attribute of the first area, determining a to-be-decaled area in the first area; acquiring first decal data matched with the environment attribute of the to-be-decal area from pre-configured decal asset data; and adding a decal effect to the to-be-decal area based on the first decal data. According to the decal processing method and device, automatic decal processing is achieved, the labor cost is reduced, the decal processing process has high logicality and reasonability, and the decal effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer graphics technology, and in particular to a decal processing method, a decal processing device, a computer program product, and an electronic device. Background Art

[0002] In the development of games, animations, movies, etc., decals are often needed to enrich the surface effects. In related technologies, the realization of decal effects relies on the manual control of artists, such as artists adding decals to some areas in the virtual scene based on their subjective feelings. The processing of decals lacks logic and rationality, and the labor cost is high. Summary of the invention

[0003] The present disclosure provides a decal processing method, a decal processing device, a computer program product and an electronic device, so as to at least to some extent solve the problems of lack of logic and rationality in decal processing and high labor cost.

[0004] According to a first aspect of the present disclosure, a decal processing method is provided, the method comprising: acquiring terrain information of a first area, determining environmental attributes of the first area based on the terrain information of the first area; determining an area to be decaled in the first area based on the environmental attributes of the first area; acquiring first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data; and adding a decal effect to the area to be decaled based on the first decal data.

[0005] According to a second aspect of the present disclosure, there is provided a decal processing device, the device comprising: an environmental attribute determination module, configured to obtain terrain information of a first area, and determine the environmental attributes of the first area based on the terrain information of the first area; a to-be-decaled area determination module, configured to determine the to-be-decaled area in the first area based on the environmental attributes of the first area; a first decal data acquisition module, configured to acquire first decal data matching the environmental attributes of the to-be-decaled area from pre-configured decal asset data; and a decal effect adding module, configured to add a decal effect to the to-be-decaled area based on the first decal data.

[0006] According to a third aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method of the first aspect and possible implementations thereof are implemented.

[0007] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method of the above-mentioned first aspect and its possible implementation methods by executing the executable instructions.

[0008] The technical solution disclosed in this disclosure has the following beneficial effects:

[0009] On the one hand, an automated decal processing solution is provided, which eliminates the need for artists to manually control the decal effects, reduces labor costs, and makes decal assets easier to manage. On the other hand, based on the environmental attributes of the first area, the decal area to be decaled is determined to be suitable for decals, and the first decal data for decals is obtained by matching the environmental attributes, and then the corresponding decal effects are added. The decal processing process has strong logic and rationality, which can ensure that the decal effect matches the characteristics of the decal area to be decaled, and achieve surface decal distribution that conforms to natural effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A flow chart showing a decal processing method according to the exemplary embodiment;

[0011] Figure 2 A schematic diagram showing a terrain file in this exemplary embodiment;

[0012] Figure 3 A flow chart for determining a region to be decaled in this exemplary embodiment is shown;

[0013] Figure 4 A schematic diagram showing a non-decalable area in this exemplary embodiment;

[0014] Figure 5 A schematic diagram showing a decal in this exemplary embodiment;

[0015] Figure 6 A flowchart for determining first decal data in this exemplary embodiment is shown;

[0016] Figure 7 A schematic diagram showing a point to be decaled in this exemplary embodiment;

[0017] Figure 8 A schematic diagram showing a decal effect in this exemplary embodiment;

[0018] Fig. 9 A schematic structural diagram of a decal processing device in this exemplary embodiment is shown;

[0019] Fig.10 A schematic structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0020] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings.

[0021] The accompanying drawings are schematic diagrams of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure may be combined in one or more embodiments in any suitable manner. In the description below, many specific details are provided to provide a full description of the embodiments of the present disclosure. However, those skilled in the art should appreciate that one or more specific details may be omitted when implementing the technical solution of the present disclosure, or one or more specific details may be replaced by other methods, components, devices, steps, etc.

[0022] In the development of games, animations, movies, etc., decals are often needed to enrich the surface effects. In related technologies, the realization of decal effects relies on the manual control of artists, such as artists adding decals to some areas in the virtual scene based on their subjective feelings. The processing of decals lacks logic and rationality, and the labor cost is high.

[0023] In view of one or more of the above problems, an exemplary embodiment of the present disclosure provides a decal processing method, which can realize automated decal processing, reduce labor costs, and make the decal processing process more logical and reasonable, which is conducive to improving the decal effect.

[0024] Figure 1 The schematic flow of the decal processing method is shown, which may include the following steps:

[0025] Step S110, acquiring terrain information of the first area, and determining environmental attributes of the first area according to the terrain information of the first area;

[0026] Step S120, determining a region to be decaled in the first region according to the environmental attributes of the first region;

[0027] Step S130, obtaining first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data;

[0028] Step S140: adding a decal effect to the decal area based on the first decal data.

[0029] exist Figure 1In the method shown, on the one hand, an automated decal processing solution is provided, which does not require artists to manually control the decal effect, reduces labor costs, and makes decal assets easier to manage. On the other hand, based on the environmental attributes of the first area, the area to be decaled whose environment is suitable for decals is determined, and the first decal data for decals is obtained by matching the environmental attributes, and then the corresponding decal effect is added. The decal processing process has strong logic and rationality, which can ensure that the decal effect matches the characteristics of the area to be decaled, and achieve surface decal distribution that conforms to natural effects.

[0030] Below Figure 1 Provide detailed instructions for each step.

[0031] refer to Figure 1 In step S110, terrain information of the first area is obtained, and environmental attributes of the first area are determined according to the terrain information of the first area.

[0032] The first area is a virtual scene area to which a decal effect needs to be added. The terrain information of the first area can be recorded in a terrain file, and the terrain information can be obtained by inputting the terrain file into a DCC (Digital Content Creation) software or a game engine. In one embodiment, when the terrain file of the first area is obtained, the terrain file can be resampled to reduce the accuracy of the terrain information and speed up the processing.

[0033] In one implementation, a digital model of the first area may be obtained, such as a three-dimensional model, wherein the model includes terrain information.

[0034] The terrain information of the first area may include terrain height information, such as the height value of each point in the first area in the vertical direction (such as the z-axis). Figure 2 As shown, the terrain information of the first area can be displayed as a visualized terrain image.

[0035] In addition, the terrain information of the first area may also include but is not limited to the following information: area type information, such as which area type each point in the first area belongs to, and the area type may include mountains, rivers, grasslands, canyons, roads, plateaus, etc.; environmental information, such as lighting information, wind information, etc.

[0036] The environmental attributes of the first area are used to represent the environmental state of the first area. In one embodiment, the environmental attributes of the first area may be environmental information included in the terrain information, such as the above-mentioned illumination information and wind information. Therefore, the environmental attributes can be directly obtained from the terrain information. In one embodiment, the environmental attributes of the first area can be calculated based on the terrain information of the first area. For example, the environmental attributes include humidity, and the terrain slope at different locations in the first area is calculated based on the terrain height value, and then the humidity at different locations is calculated based on the terrain slope. The humidity may be negatively correlated with the terrain slope. For example, the smaller the terrain slope, the flatter the terrain, the easier it is to accumulate water, and the greater the humidity. For another example, the environmental attributes include a weathering coefficient, and the weathering coefficient can be calculated based on the wind information in the terrain information and the area type information at different locations in the first area.

[0037] Taking Houdini (a three-dimensional computer graphics software) as an example, after inputting the terrain file of the first area into Houdini, the environmental attributes of different areas in the first area can be calculated through attribute calculation nodes of different area types, such as the environmental attributes of grasslands, plateaus and other areas in the first area.

[0038] Continue to refer Figure 1 In step S120, a region to be decaled is determined in the first region according to the environmental attributes of the first region.

[0039] Generally, only some areas in the first area are suitable for adding decal effects, or different areas are suitable for different decal effects. Therefore, it is not necessary to add decal effects to the entire first area. The area to be decaled can be determined in the first area according to the environmental attributes of the first area, and the environmental attributes of the area to be decaled are suitable for adding decal effects. For example, according to the specific scene characteristics or requirements of the first area, some area types are suitable for adding decal effects, and areas of these area types can be used as the area to be decaled.

[0040] In one embodiment, reference Figure 3 As shown, the above-mentioned determining the area to be decaled in the first area according to the environmental attributes of the first area may include the following steps S310 and S320:

[0041] Step S310, determining a second area satisfying a first attribute condition in the first area according to an environmental attribute of the first area;

[0042] Step S320, filtering out the non-decalable area from the second area to obtain the area to be decaled; the first area includes one or more preset type areas, and the preset type area is an area corresponding to a predefined area type to which decals cannot be added; the non-decalable area is a preset type area, or an area determined in the first area based on the preset type area.

[0043] The first attribute condition refers to an environmental attribute condition suitable for adding a decal effect, which can be determined by an artist in combination with the specific scene characteristics and experience of the first area, or automatically determined by a program. For example, if a decal effect with a sense of dampness (such as a texture decal resembling moss or corrosion) is added to the first area, the first attribute condition may be that the humidity reaches a certain threshold, thereby screening out a second area with a higher humidity from the first area, which is suitable for adding a decal effect with a sense of dampness, while an area with a lower humidity is not suitable for adding the decal effect.

[0044] Non-decal areas are areas that are determined to be unsuitable for adding decal effects based on factors such as area type. For example, if a vegetation decal effect is added to the first area, vegetation generally does not appear on roads, mountains, or rivers. Therefore, it is possible to predefine (can be manually defined by artists, can be automatically defined by the program based on the type of decal) area types where decals cannot be added to include roads, mountains, and rivers, and then use the areas in the first area that belong to these area types as preset type areas, namely, road areas, mountain areas, and river areas. Non-decal areas in the first area can be these preset type areas, or can be areas determined based on preset type areas, such as areas formed by appropriately scaling preset type areas, or areas further determined based on terrain height values ​​in preset type areas, such as areas where non-decal areas can be areas where terrain height values ​​in preset type areas are within a specific range.

[0045] In one embodiment, the decal processing method may further include the following steps:

[0046] The non-decalable area is determined by extending a preset type area in the first area.

[0047] For example, the boundary of the preset type area can be appropriately extended outward to form a non-decal area. It should be understood that the non-decal area includes the preset type area and a small area outside the boundary of the preset type area. This avoids adding decal effects to areas outside the preset type area, where the decals extend into the preset type area, causing visual disharmony.

[0048] In one embodiment, the above-mentioned method of extending the preset type area in the first area to determine the non-applique area may include the following steps:

[0049] The first mask corresponding to the first area is smoothed to obtain a second mask; the first mask indicates the position of the preset type area in the first area; the second mask indicates the position of the non-appliable area in the first area.

[0050] Exemplarily, the preset type areas include road areas, mountain areas, and river areas. Three first masks corresponding to the first area can be set, namely, a road area mask, a mountain area mask, and a river area mask. In the road area mask, the road area has a specific mask value (such as 1), and the non-road area has a different mask value (such as 0). By smoothing the road area mask, an area with a mask value between 0 and 1 can be formed at the boundary between the road area and the non-road area. The mask value of this part of the area is not 0, so it is regarded as a road area, thereby achieving the expansion of the road area. The smoothed mask is called the second mask, and the area whose mask value is not 0 is a non-decal area. The same processing can be performed on the mountain area mask and the river area mask, and finally 3 second masks are formed by 3 first masks.

[0051] In Houdini, the heightfield_blur node can be used to implement the above smoothing process. Relevant parameters of the smoothing process (or blurring process) are set in the heightfield_blur node, the first mask is input into the node, and the second mask after the smoothing process is output.

[0052] based on Figure 2 The terrain file of the first area shown in the figure is smoothed by the first mask, and the non-decalable area is determined as follows Figure 4 As shown, the dark area is the area that cannot be decaled.

[0053] The above describes how to determine the non-applied area in the first area. When determining the second area, the second area can be subtracted from the non-applied area, which is equivalent to filtering out the non-applied area from the second area, and the remaining part of the second area is the area to be applied.

[0054] based on Figure 3 The method shown combines environmental attributes and area types to determine the area to be decaled in the first area, fully excluding areas that are not suitable for decals, which is conducive to improving the decal effect.

[0055] Continue to refer Figure 1 In step S130, first decal data matching the environmental attributes of the area to be decaled is obtained from pre-configured decal asset data.

[0056] The decal asset data may include the art assets of the decal, and may also include related data such as the properties of the decal. The following describes how to configure the decal asset data.

[0057] Figure 5A schematic diagram of a decal is shown. Multiple decals can be obtained, and their environmental properties (such as humidity, weathering coefficient, illumination coefficient) and other related data can be defined according to the artistic expression of each decal. In addition, the application properties of the decal can also be set, indicating the relevant parameters when the decal is added to a specific terrain or area, such as the scaling value range (indicating the maximum and minimum values ​​allowed for decal scaling), the rotation range (indicating the angle range allowed for decal rotation), reference assets, etc. The above decal data can be formed into a data table, such as each row in the data table represents a decal, recording the environmental properties, application properties, etc. of the decal. The data table is the decal asset data.

[0058] In one embodiment, the data table of the decal can be input into the DCC software, such as inputting the data table as point data into Houdini Engine, and each row in the data table can form a corresponding point. Exemplarily, the process of inputting the data packet into Houdini Engine includes: using python to import the data table; since Houdini automatically sets the Z axis of the point when generating point data, the Z axis value of the point can be reset, such as resetting to 0 or null value; eliminating the problem of the position of the point gradually shifting upward when importing the data table; renaming the attributes of the point data, such as the same as the attribute name of the first area, for subsequent processing; setting the expected maximum and minimum scaling values; and giving a debug color for observing the distribution.

[0059] As can be seen from the above, the decal asset data may include environmental attributes of different decals, which represent environmental conditions suitable for the decals, so the environmental attributes of different decals in the decal asset data may be matched with the environmental attributes of the area to be decaled. Alternatively, the environmental attributes of the area to be decaled may be matched based on the type and other characteristics of different decals in the decal asset data. By matching the environmental attributes, the first decal data matching the area to be decaled may be screened out, which represents the relevant data (such as asset data) of the decals suitable for the area to be decaled.

[0060] In one embodiment, the environmental attributes may include a plurality of preset environmental attributes. The preset environmental attributes are environmental attributes used to screen the area to be decaled. It should be understood that a large variety of environmental attributes may be set in the first area, and only some of the environmental attributes are related to decals, and these environmental attributes are preset environmental attributes. For example, the three preset environmental attributes of humidity, weathering coefficient, and illumination coefficient may be set.

[0061] In one embodiment, the above-mentioned determining the area to be decaled in the first area according to the environmental attributes of the first area may include the following steps:

[0062] According to each preset environmental attribute of the first area, determining, in the first area, an area to be decaled corresponding to each preset environmental attribute;

[0063] Accordingly, the above-mentioned obtaining the first decal data matching the environmental attributes of the area to be decaled from the pre-configured decal asset data may include the following steps:

[0064] For a region to be decaled corresponding to any preset environmental attribute, first decal data matching the preset environmental attribute of the region to be decaled is obtained from pre-configured decal asset data.

[0065] For example, for each preset environmental attribute of humidity, weathering coefficient, and illumination coefficient, a corresponding first attribute condition can be set, such as being customized by an artist, and the first attribute conditions corresponding to different preset environmental attributes can be different. For example, the first attribute condition corresponding to humidity is that the humidity is in the range of 1 to 3, and the first attribute condition corresponding to the weathering coefficient is that the weathering coefficient is greater than 0.4. According to each preset environmental attribute of the first area, a second area that meets the first attribute condition is screened out in the first area, and the non-decal area is subtracted to obtain the area to be decaled corresponding to each preset environmental attribute. For example, a second area with a humidity in the range of 1 to 3 is screened out from the first area, and the non-decal area is subtracted to obtain the area to be decaled corresponding to the humidity. A second area with a weathering coefficient greater than 0.4 is screened out from the first area, and the non-decal area is subtracted to obtain the area to be decaled corresponding to the weathering coefficient. For the area to be decaled corresponding to the humidity, the first decal data matching the humidity of the area to be decaled is obtained from the decal asset data, such as the relevant data of decals with a humidity of 1 to 3, and the first decal data is used to decal the area to be decaled corresponding to the humidity. For the area to be decaled corresponding to the weathering coefficient, the first decal data matching the weathering coefficient of the area to be decaled is obtained from the decal asset data, such as relevant data of decals with a weathering coefficient greater than 0.4. The first decal data is used to decal the area to be decaled corresponding to the weathering coefficient.

[0066] In this way, based on each preset environment attribute, the appropriate decal area and the first decal data matching it can be determined, further improving the decal effect. In addition, batch processing of multiple decals can be achieved, improving efficiency and reducing performance overhead.

[0067] In one embodiment, reference Figure 6 As shown, the above-mentioned acquisition of first decal data matching the environmental attributes of the area to be decaled from the pre-configured decal asset data may include the following steps S610 and S620:

[0068] Step S610, determining second decal data satisfying a second attribute condition from pre-configured decal asset data; the second attribute condition is a condition determined according to an environmental attribute of the area to be decaled.

[0069] For example, if the humidity of the area to be decaled is 1 to 3, the second attribute condition can be: the humidity is within the range of 1 to 3. The second decal data is all the data in the decal asset data that meets the second attribute condition. For example, for the decal asset data input into HoudiniEngine above, all point data that meets the second attribute condition are filtered out, that is, the second decal data.

[0070] Step S620: for a point to be decaled in the area to be decaled, first decal data corresponding to the point to be decaled is randomly determined from the second decal data.

[0071] It should be understood that it is not necessary to cover the entire area to be decaled with decal effects, but only to add decal effects to some locations. Therefore, some decal points to be decaled can be set in the area to be decaled, indicating the locations where decal effects will be added. Exemplarily, the decal points to be decaled can be determined in the following manner:

[0072] Randomly determine the points to be decaled in the area to be decaled;

[0073] If the distance between the multiple points to be decaled is less than the preset distance, the multiple points to be decaled are merged into one point to be decaled.

[0074] Among them, if the distance between multiple points to be decaled is too small, after the decal effect is added, the decal effects may overlap, which is not conducive to fully presenting the decal effect. The preset distance can be determined based on experience or the size of the first area and the area to be decaled, and is used to place the situation where the distance between multiple points to be decaled is too small. When merging multiple points to be decaled, they can be merged into the center point of multiple points to be decaled, or they can be merged into an area, such as a circular area surrounding the original multiple points to be decaled. By merging multiple points to be decaled with a distance less than the preset distance into one point to be decaled, the above-mentioned problems such as the overlap of decal effects can be improved.

[0075] Taking Houdini as an example, the heightfield_scatter node in Houdini can be used to generate random points to be decaled, and the fuse node can be used to fuse multiple points to be decaled that are too close to each other to output the final points to be decaled. Figure 7 A schematic diagram of the points to be decaled is shown, which are all points randomly generated and fused in the area to be decaled.

[0076] The second decal data includes a plurality of point data, from which point data can be randomly selected as the first decal data corresponding to the point to be decaled, for adding a decal effect to the point to be decaled.

[0077] The process of determining the first decal data through the Houdini node is as follows:

[0078] First, refer to the following VEX (an expression language for Houdini) code to filter out the point data with humidity (wet) between 1 and 3, which is the second decal data:

[0079] int id = atof(s@wet); / / Convert the string type humidity (wet) to the floating point type parameter "id";

[0080] if(id<1)removepoint(0,i@ptnum); / / indicates to filter out the point data with humidity less than 1;

[0081] if(id>3)removepoint(0,i@ptnum); / / indicates to filter out the point data with humidity greater than 3;

[0082] The above filtered point data can be divided into independent information. By checking the connectivity between the points, the unconnected points can be separated into separate attributes and assigned independent numbers, such as varian values.

[0083] The position information of the points to be decaled in the first area is input, and for each point to be decaled, a variant value is randomly generated for it, and the point data identical to the variant value is used as the first decal data corresponding to the point to be decaled.

[0084] Continue to refer Figure 1 In step S140, a decal effect is added to the decal area based on the first decal data.

[0085] Wherein, the corresponding decal may be added to the surface of the area to be decaled based on the first decal data, thereby achieving a decal effect.

[0086] In one embodiment, adding a decal effect to the decal area based on the first decal data may include the following steps:

[0087] Add the first decal data to the data of the point to be decaled. For example, in the above Houdini example, when the point data with the same variant value (i.e., the first decal data) is determined, the copytopoint node can be used to copy and merge the point data into the data of the point to be decaled. In the copying process, only the attributes required for the decal can be copied, and useless attributes (such as the environment attributes of the decal) can be deleted. Output the data of the point to be decaled with the first decal data.

[0088] The decal area to be decaled with the decal effect is rendered based on the data of the decal point to be decaled. For example, the decal effect can be rendered at the position of the decal point to be decaled.

[0089] In one embodiment, the decal processing method may further include the following steps:

[0090] When the decal point to be decaled is determined, the decal scaling parameter of the decal point to be decaled is set;

[0091] Accordingly, the above-mentioned rendering of the area to be decaled with the decal effect based on the data of the point to be decaled includes:

[0092] The decal corresponding to the first decal data in the data of the point to be decaled is scaled according to the decal scaling parameter of the point to be decaled, and the scaled decal is added to the point to be decaled to form a decal effect.

[0093] Among them, the decal scaling parameter is used to scale the original size of the decal when adding a decal effect to the area or point to be decaled, so as to achieve a variety of decal effects. For example, when the point to be decaled is determined, a new attribute, a decal scaling parameter, can be added to the point to be decaled, and the value of the decal scaling parameter can be determined according to the scaling value interval in the first decal data, such as the value of the decal scaling parameter can be randomly determined within the scaling value interval. When applying decals, the decal corresponding to the first decal data is scaled according to the decal scaling parameter and added to the position of the point to be decaled. Generally, the decal scaling parameters of the points to be decaled are not exactly the same. By forming different decal scaling results at different points to be decaled, random and diverse decal effects can be achieved.

[0094] In one embodiment, adding a decal effect to the decal area based on the first decal data may include the following steps:

[0095] In the digital content creation software, the first decal data is added to the area to be decaled, and the art asset data of the first area with the first decal data is obtained;

[0096] The art asset data of the first area is imported into the game engine, and the first area with the decal effect is rendered by the game engine.

[0097] Among them, DCC software includes but is not limited to: Houdini, MAYA, Blender, etc. Game engines include but are not limited to: Neox, Messiah, UE (Unreal Engine, Unreal Engine, which can include different versions of Unreal Engine such as UE4 and UE5), Unity, Godot Engine, CryEngine, Cocos, etc.

[0098] In the DCC software, by performing decal-related processing, art asset data of the first region with the first decal data is obtained, which may include instance point information of the points to be decaled (i.e., data of the points to be decaled with the first decal data). The instance point information is imported into the game engine, and the game engine performs rendering to obtain the first region with the decal effect. In this way, the decal processing process is connected between the DCC software and the game engine.

[0099] The following will further take Houdini as an example to illustrate the process of implementing the decal effect.

[0100] To set the attributes of the points (points to be decaled) based on the Attribute Wrangle node in Houdini, perform the following process:

[0101] Define a floating point variable scaling and initialize it to 0.0. Convert the attribute s@maxScale (maxScale can be the maximum value of the scaling value interval of the decal copied from the first decal data, which is a string type) to a floating point number (float type) to obtain the maximum scaling value max. Convert the attribute s@minScale (minScale can be the minimum value of the scaling value interval of the decal copied from the first decal data, which is a string type) to a floating point number (float type) to obtain the minimum scaling value min.

[0102] Generate a random number randnum based on the point number ptnum. If ptnum is used as the seed to generate random numbers, a unique random number can be generated at each point.

[0103] Multiply the random number randnum by the maximum scaling value max, and use the clamp function to clamp the result between the maximum scaling value max and the minimum scaling value min, to get the value of the floating point variable scaling, which can be assigned to the point's pscale attribute (decal scaling parameter). For example: scaling = randnum*max; scaling = clamp(scaling, min, max); f@pscale = scaling.

[0104] Get the integer value from the attribute s@wet (humidity) and convert it to a floating point number id, such as: int id = atof(s@wet). Adjust the position of the point according to the id value, such as increasing the y coordinate of the point by 10 plus 30 times the id.

[0105] Define a string variable ueoffset to store the value of the TranslucencySortDistanceOffset attribute. For example: string ueoffset = '10+50*id'.

[0106] Assign ueoffset to the point's unreal_uproperty_TranslucencySortDistanceOffset attribute. Set the point's unreal_uproperty_TranslucencySortPriority attribute to 0. Set the point's unreal_instance attribute to the specified StaticMesh path.

[0107] Delete the attributes of unnecessary points through Keepneededattrib. Set different materials for instance points in UE through split_by_mat_instance, such as: @scale*=@pscale*1.5; s@unreal_split_attr="unreal_instance".

[0108] Set the point attributes of the decal that enters the RVT (Runtime Virtual Texture) to identify and set the corresponding values ​​in the UE. Set the point's unreal_uproperty_DrawinVirtualTextures attribute to the specified virtual texture path. Set the point's unreal_uproperty_Element0 attribute to the value of the unreal_material_instance attribute.

[0109] Define two string variables a and b, and assign them values ​​of 100 and 200 respectively (this value can be customized, indicating the culling distance of decals in UE). Assign the value of string variable a to the unreal_uproperty_InstanceStartCullDistance attribute, and assign the value of string variable b to the unreal_uproperty_InstanceEndCullDistance attribute.

[0110] Set the point's unreal_rvt attribute to 1, indicating that this point uses RVT.

[0111] Figure 8 The decal effect diagram is shown by importing instance point information into the Unreal Engine and scattering corresponding decal instances in the Unreal Engine according to the material.

[0112] This exemplary embodiment can realize batch processing of decal materials, reduce the situation of multiple batches of RVT drawing, and reduce performance overhead.

[0113] The exemplary embodiment of the present disclosure also provides a decal processing device. Fig. 9 As shown, the decal processing device 900 includes the following program modules:

[0114] The environmental attribute determination module 910 is configured to obtain terrain information of a first area, and determine the environmental attribute of the first area according to the terrain information of the first area;

[0115] A module 920 for determining a region to be decaled is configured to determine a region to be decaled in the first region according to environmental attributes of the first region;

[0116] A first decal data acquisition module 930 is configured to acquire first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data;

[0117] The decal effect adding module 940 is configured to add a decal effect to the area to be decaled based on the first decal data.

[0118] In one embodiment, the method of determining the area to be decaled in the first area according to the environmental attributes of the first area includes: determining a second area that satisfies a first attribute condition in the first area according to the environmental attributes of the first area; filtering out the area where decals cannot be added from the second area to obtain the area to be decaled; the first area includes one or more preset type areas, and the preset type areas are areas corresponding to predefined area types to which decals cannot be added; the area where decals cannot be added is the preset type area, or is an area determined in the first area according to the preset type area.

[0119] In one implementation, the module 920 for determining the area to be decaled is further configured to: determine the area not to be decaled by extending the preset type area in the first area.

[0120] In one embodiment, the method of determining the non-appliable area by expanding the preset type area in the first area includes: smoothing a first mask corresponding to the first area to obtain a second mask; the first mask represents the position of the preset type area in the first area; and the second mask represents the position of the non-appliable area in the first area.

[0121] In one embodiment, the environmental attributes include multiple preset environmental attributes; determining the area to be decaled in the first area based on the environmental attributes of the first area includes: based on each preset environmental attribute of the first area, determining the area to be decaled corresponding to each preset environmental attribute in the first area; obtaining first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data includes: for the area to be decaled corresponding to any preset environmental attribute, obtaining first decal data matching any preset environmental attribute of the area to be decaled from pre-configured decal asset data.

[0122] In one embodiment, the step of obtaining first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data includes: determining second decal data satisfying a second attribute condition from the pre-configured decal asset data; the second attribute condition is a condition determined based on the environmental attributes of the area to be decaled; and for a point to be decaled in the area to be decaled, randomly determining first decal data corresponding to the point to be decaled from the second decal data.

[0123] In one embodiment, the points to be decaled are determined by: randomly determining the points to be decaled in the area to be decaled; if the distance between multiple points to be decaled is less than a preset distance, merging the multiple points to be decaled into one point to be decaled.

[0124] In one embodiment, adding the decal effect to the area to be decaled based on the first decal data includes: adding the first decal data to the data of the point to be decaled; and rendering the area to be decaled with the decal effect based on the data of the point to be decaled.

[0125] In one embodiment, the decal effect adding module 940 is further configured to: when determining the point to be decaled, set the decal scaling parameters of the point to be decaled; rendering the area to be decaled with the decal effect based on the data of the point to be decaled includes: scaling the decal corresponding to the first decal data in the data of the point to be decaled according to the decal scaling parameters of the point to be decaled, and adding the scaled decal to the point to be decaled to form the decal effect.

[0126] In one embodiment, adding a decal effect to the area to be decaled based on the first decal data includes: in digital content creation software, adding the first decal data to the area to be decaled to obtain art asset data of the first area with the first decal data; importing the art asset data of the first area into a game engine, and rendering the first area with the decal effect through the game engine.

[0127] The specific details of each part of the above-mentioned device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.

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

[0129] The exemplary embodiments of the present disclosure also provide a computer program product, which includes a computer program, and the computer program implements the above method when executed by a processor.

[0130] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory, and the like.

[0131] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.

[0132] The code of the computer program can be written in one or more programming languages. Programming languages ​​such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).

[0133] Computer programs can be carried or transmitted through electrical, magnetic, optical, electromagnetic, infrared and other signals. Electronic devices can convert signals carrying computer programs into digital signals to run the computer programs. When a computer program runs on an electronic device, its code is used to enable the electronic device to execute (more specifically, it can enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure. For example, the above method can be executed, which includes the following steps: Step S110, obtaining terrain information of the first area, and determining the environmental attributes of the first area based on the terrain information of the first area; Step S120, determining the area to be decaled in the first area based on the environmental attributes of the first area; Step S130, obtaining first decal data that matches the environmental attributes of the area to be decaled from pre-configured decal asset data; Step S140, adding a decal effect to the area to be decaled based on the first decal data.

[0134] By implementing the above method steps through a computer program, on the one hand, an automated decal processing solution is provided, which does not require artists to manually control the decal effect, reduces labor costs, and makes decal assets easier to manage. On the other hand, based on the environmental attributes of the first area, the area to be decaled whose environment is suitable for decals is determined, and the first decal data for decals is obtained by matching the environmental attributes, and then the corresponding decal effect is added. The decal processing process has strong logic and rationality, which can ensure that the decal effect matches the characteristics of the area to be decaled, and achieve surface decal distribution that conforms to natural effects.

[0135] The exemplary embodiments of the present disclosure also provide an electronic device, such as the terminal device 110 or the server 120 described above. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as a computer program. The processor executes the method steps of various exemplary embodiments of the present disclosure by executing the executable instructions. In addition, the electronic device may also include a display for displaying a graphical user interface.

[0136] Reference below Fig.10 , the electronic device is exemplified in the form of a general-purpose computing device. It should be understood that Fig.10 The electronic device 1000 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0137] like Fig.10 As shown, the electronic device 1000 may include: a processor 1010 , a memory 1020 , a bus 1030 , an I / O (input / output) interface 1040 , a network adapter 1050 , and a display 1060 .

[0138] The memory 1020 may include a volatile memory, such as a RAM 1021, a cache unit 1022, and may also include a non-volatile memory, such as a ROM 1023. The memory 1020 may also include one or more program modules 1024, such program modules 1024 include but are not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. For example, the program module 1024 may include each module in the above-mentioned device.

[0139] The processor 1010 may include one or more processing units. For example, the processor 1010 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0140] Processor 1010 can be used to execute executable instructions stored in memory 1020, such as the above-mentioned method, which includes the following steps: step S110, obtaining terrain information of the first area, and determining the environmental attributes of the first area based on the terrain information of the first area; step S120, determining the area to be decaled in the first area based on the environmental attributes of the first area; step S130, obtaining first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data; step S140, adding a decal effect to the area to be decaled based on the first decal data.

[0141] By executing the above method steps through the processor 1010, on the one hand, an automated decal processing solution is provided, which does not require artists to manually control the decal effect, reduces labor costs, and makes decal assets easier to manage. On the other hand, based on the environmental attributes of the first area, the area to be decaled whose environment is suitable for decals is determined, and the first decal data for decals is obtained by matching the environmental attributes, and then the corresponding decal effect is added. The decal processing process has strong logic and rationality, which can ensure that the decal effect matches the characteristics of the area to be decaled, and realize the surface decal distribution that conforms to the natural effect.

[0142] The bus 1030 is used to realize the connection between different components of the electronic device 1000, and may include a data bus, an address bus, and a control bus.

[0143] The electronic device 1000 can communicate with one or more external devices 1100 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 1040 .

[0144] The electronic device 1000 can communicate with one or more networks through the network adapter 1050. For example, the network adapter 1050 can provide mobile communication solutions such as 3G / 4G / 5G, or provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. The network adapter 1050 can communicate with other modules of the electronic device 1000 through the bus 1030.

[0145] The electronic device 1000 can display a graphical user interface through the display 1060, such as a DCC software interface, a game engine interface, etc.

[0146] although Fig.10 Not shown, other hardware and / or software modules may also be provided in the electronic device 1000, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0147] As can be seen from the above, the technical solution of the present disclosure can be implemented as a method, an apparatus, a system, a computer program product, a storage medium, an electronic device, etc. Those skilled in the art can understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, such as being respectively referred to as a "circuit", "module" or "system".

[0148] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are only exemplary, and the scope and spirit of the present disclosure are indicated by the claims, and any variations, uses or adaptive changes of the present disclosure should be covered, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field that are not disclosed in the present disclosure.

Claims

1. A decal processing method, characterized in that: The method comprises: Acquire terrain information of a first area, and determine environmental attributes of the first area according to the terrain information of the first area; Determining a region to be decaled in the first region according to the environmental attributes of the first region; Acquire first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data; A decal effect is added to the area to be decaled based on the first decal data.

2. The method according to claim 1, characterized in that The step of determining the area to be decaled in the first area according to the environmental attribute of the first area includes: Determining, in the first area, a second area that meets a first attribute condition according to an environmental attribute of the first area; The non-decalable area is filtered out from the second area to obtain the area to be decaled; the first area includes one or more preset type areas, and the preset type area is an area corresponding to a predefined area type to which decals cannot be added; the non-decalable area is the preset type area, or is an area determined in the first area based on the preset type area.

3. The method according to claim 2, characterized in that The method further comprises: The non-applique area is determined by extending the preset type area in the first area.

4. The method according to claim 3, characterized in that The step of extending the preset type area in the first area to determine the non-applique area includes: The first mask corresponding to the first area is smoothed to obtain a second mask; the first mask indicates the position of the preset type area in the first area; the second mask indicates the position of the non-appliable area in the first area.

5. The method according to claim 1, characterized in that The environmental attributes include a plurality of preset environmental attributes; and determining the area to be decaled in the first area according to the environmental attributes of the first area includes: According to each preset environmental attribute of the first area, determining a to-be-applied area corresponding to each preset environmental attribute in the first area; The step of acquiring first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data includes: For a region to be decaled corresponding to any preset environmental attribute, first decal data matching any preset environmental attribute of the region to be decaled is obtained from pre-configured decal asset data.

6. The method according to claim 1, characterized in that The step of acquiring first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data includes: Determining second decal data satisfying a second attribute condition from pre-configured decal asset data; the second attribute condition is a condition determined according to an environmental attribute of the area to be decaled; For a point to be decaled in the area to be decaled, first decal data corresponding to the point to be decaled is randomly determined from the second decal data.

7. The method according to claim 6, characterized in that The points to be decaled are determined by: Randomly determine points to be decaled in the area to be decaled; If the distance between the multiple points to be decaled is less than the preset distance, the multiple points to be decaled are merged into one point to be decaled.

8. The method according to claim 6, characterized in that The adding a decal effect to the area to be decaled based on the first decal data includes: Adding the first decal data to the data of the point to be decaled; The area to be decaled with a decal effect is rendered based on the data of the point to be decaled.

9. The method according to claim 8, characterized in that The method further comprises: When the point to be decaled is determined, setting a decal scaling parameter of the point to be decaled; The rendering of the area to be decaled with the decal effect based on the data of the point to be decaled includes: The decal corresponding to the first decal data in the data of the point to be decaled is scaled according to the decal scaling parameter of the point to be decaled, and the scaled decal is added to the point to be decaled to form a decal effect.

10. The method according to claim 1, characterized in that The adding a decal effect to the area to be decaled based on the first decal data includes: In the digital content creation software, the first decal data is added to the area to be decaled, and the art asset data of the first area with the first decal data is obtained; The art asset data of the first area is imported into a game engine, and the first area with a decal effect is rendered by the game engine.

11. A decal processing device, characterized in that: The device comprises: an environmental attribute determination module, configured to obtain terrain information of a first area, and determine the environmental attribute of the first area according to the terrain information of the first area; A module for determining a region to be decaled, configured to determine a region to be decaled in the first region according to environmental attributes of the first region; A first decal data acquisition module is configured to acquire first decal data matching the environmental attributes of the area to be decaled from pre-configured decal asset data; The decal effect adding module is configured to add a decal effect to the area to be decaled based on the first decal data.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

13. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 10 by executing the executable instructions.