Methods, devices, electronic devices, and storage media for handling game material effects
Patent Information
- Application Number
- CN202311786222.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-12-22
AI Technical Summary
[0004]通过上述内容可知,现有的材质制作技术存在材质开发的技术复杂、技术门槛高、对于程序人员的程序整合依赖程度高流程依赖严重、材质开发的周期长等缺陷
[0012] The method for processing game material effects provided in this application includes: in response to an editing operation on material attribute information on a graphical user interface, obtaining a Shader configuration file; wherein, the Shader configuration file is an attribute parameter file used to prepare material effects; the above process can transfer most of the material Shader effect integration work undertaken by programmers, and any person can directly complete the editing and adjustment of material attribute information on the graphical user interface, realizing the free customization of the Shader configuration file and reducing the complexity and technical threshold of material development technology. Further, in response to a loading operation on the Shader configuration file, generating an initial model target material effect on the graphical user interface; this process allows for real-time viewing of the target material effect. The above process can reduce the reliance on programmers for program integration during material development and shorten the development cycle of material creation.
Smart Images

Figure CN117861203B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a method, apparatus, electronic device, and computer-readable storage medium for processing game material effects. Background Technology
[0002] In the rendering process of game scenes, material creation technology is often involved. The aforementioned material creation technology allows game developers to add material effects to 3D models through material programming, enabling the graphics processor to calculate and render the lighting, color, texture, and other details of the 3D model's surface in real time, thus making the model look more realistic and vivid.
[0003] To achieve ideal material effects in a 3D model, current material creation techniques typically involve the following process: First, the technical artist responsible for material design and development needs to write low-level shader code that runs on the graphics processor and output the completed shader code as a shader code file. Second, the technical artist applies the shader code file to the material sphere, outputting a material file. Then, the technical artist applies the material file to the 3D model and other art resources, outputting corresponding resource files. Next, programmers write logic code to load the resource files in the virtual game; programmers output corresponding code scripts by controlling the changes in shader parameters. Finally, the technical artist evaluates the effect of the code scripts on the 3D model, and if it does not meet expectations, further process iterations are required.
[0004] As can be seen from the above, existing material manufacturing technologies have drawbacks such as complex material development, high technical barriers, high dependence on programmers for program integration, serious process dependence, and long material development cycles. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, and computer-readable storage medium for processing game material effects to solve the aforementioned problems existing in the prior art.
[0006] This application provides a method for processing game material effects. The method includes: in response to an editing operation on material attribute information on a graphical user interface, obtaining a Shader configuration file; wherein the Shader configuration file is an attribute parameter file for preparing material effects; and in response to a loading operation on the Shader configuration file, generating an initial model target material effect on the graphical user interface.
[0007] This application embodiment also provides a rendering apparatus for game material effects, the apparatus comprising:
[0008] An attribute processing unit is configured to obtain a Shader configuration file in response to an editing operation on material attribute information on a graphical user interface; wherein the Shader configuration file is an attribute parameter file for preparing material effects; and an effect generation unit is configured to generate an initial model target material effect on the graphical user interface in response to a loading operation on the Shader configuration file.
[0009] This application also provides an electronic device, including a processor and a memory; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the above-described method.
[0010] This application also provides a computer-readable storage medium storing one or more computer instructions that are executed by a processor to implement the above-described method.
[0011] Compared with the prior art, the embodiments of this application have the following advantages:
[0012] The method for processing game material effects provided in this application includes: in response to an editing operation on material attribute information on a graphical user interface, obtaining a Shader configuration file; wherein, the Shader configuration file is an attribute parameter file used to prepare material effects; the above process can transfer most of the material Shader effect integration work undertaken by programmers, and any person can directly complete the editing and adjustment of material attribute information on the graphical user interface, realizing the free customization of the Shader configuration file and reducing the complexity and technical threshold of material development technology. Further, in response to a loading operation on the Shader configuration file, generating an initial model target material effect on the graphical user interface; this process allows for real-time viewing of the target material effect. The above process can reduce the reliance on programmers for program integration during material development and shorten the development cycle of material creation. Attached Figure Description
[0013] Figure 1 This is a schematic diagram of an application scenario provided in the embodiments of this application;
[0014] Figure 2 This is a schematic diagram of a method for processing game material effects provided in an embodiment of this application;
[0015] Figure 3 This is a schematic diagram of the Shader parameter template editing tool provided in the embodiments of this application;
[0016] Figure 4 This is a schematic diagram of the material viewing tool provided in an embodiment of this application;
[0017] Figure 5 This is a schematic diagram of the material resource track provided in the embodiments of this application;
[0018] Figure 6 This is a schematic diagram illustrating the setting of the Shader configuration file associated with the material resource track in the attribute editing window provided in this application embodiment;
[0019] Figure 7 This is a schematic diagram of the material resource track creation effect display model object provided in the embodiments of this application;
[0020] Figure 8 This is a schematic diagram illustrating the establishment of a second association between the effect display model and the Shader configuration file provided in this application embodiment;
[0021] Figure 9 This is a schematic diagram of adding keyframes to the timeline corresponding to the material resource track provided in this application embodiment;
[0022] Figure 10 This is a schematic diagram illustrating the setting of attribute values corresponding to keyframes in the attribute window provided in this application embodiment;
[0023] Figure 11 This is a schematic diagram illustrating the dynamic display of material effects using the effect demonstration model provided in the embodiments of this application;
[0024] Figure 12 This is a unit block diagram of a game material effect processing device provided in an embodiment of this application;
[0025] Figure 13 This is a schematic diagram of the logical structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0026] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0027] First, the technical terms used in this application will be explained:
[0028] Shaders, as programs used to render the surfaces of 3D (three-dimensional) models, handle graphics processing and shading within the rendering pipeline. Materials typically consist of one or more shaders. By passing specific textures, colors, and other parameters to the shaders, the visual effects of the 3D model's surface, such as color, texture, and reflections, are controlled. This makes the 3D model look more realistic and provides a better visual experience for the player. Furthermore, by changing the shader parameters corresponding to the material on the 3D model's surface, the desired material effects can be achieved.
[0029] A Technical Artist (TA) is a person responsible for designing and developing materials and shaders during game development. These TAs are typically professionals with a programming or computer science background, who combine art and technology to ensure the quality of the game's visuals while maintaining performance.
[0030] Artists are personnel responsible for creating assets during game development. Their work typically involves texture painting, texturing, and color adjustment. In game development, artists are usually categorized into roles such as scene designers, special effects artists, modelers, audio artists, and UI designers based on the type of assets they create.
[0031] Next, in order to facilitate understanding of the methods provided in the embodiments of this application, the background of the embodiments of this application will be introduced before introducing the embodiments of this application.
[0032] Material creation technology is an indispensable part of the image rendering process. Game developers (including technical artists and programmers) create material effects for 3D models by developing program code. Furthermore, game developers can also adjust the lighting, color, texture, and other details of the 3D model's surface through real-time calculations on the graphics processing unit (GPU), making the material effects of the 3D model more realistic and vivid. Material creation technology has attracted much attention because it enables the creation of customized material effects for 3D models, enhancing their visual realism and immersive experience.
[0033] Existing material creation techniques mainly involve the following process: First, the technical artists responsible for material design and development need to write low-level shader code that runs on the graphics processor and output the completed low-level shader code as a shader code file; second, the technical artists apply the above shader code file to the material sphere and output the material file; then, the technical artists apply the above material file to art resources such as 3D models and output the corresponding resource files; next, the programmers write logic code to load the above resource files in the virtual game; the programmers output the corresponding code script by controlling the changes in shader parameters; finally, the technical artists judge the effect of the above code script on the 3D model, and if it does not meet expectations, further process iteration is required.
[0034] As discussed above, existing material creation technologies suffer from several challenges: First, material shader development requires integrating technical resources from multiple fields, including code, models, textures, and mapping. This necessitates strong knowledge, development experience, and resource coordination skills; otherwise, ensuring the quality and stability of material effects is difficult, leading to complex and high-barrier-to-entry material development. Second, material shader development requires collaboration from multiple roles, including designers, technical artists (TAs), artists, and programmers, resulting in high communication costs and long development cycles. Third, material shader implementation relies heavily on program code, placing a high degree of dependence on programmers for code integration and exhibiting significant process dependencies, making it difficult to achieve the desired results in one go. Fourth, due to the programmers' reliance on code integration, technical artists can only identify problems during the implementation verification phase and resolve them through a new round of process iterations, further extending the material creation development cycle. In summary, existing material creation technologies suffer from high technical complexity, high barriers to entry, high dependence on programmers for code integration, significant process dependencies, and long development cycles.
[0035] Having provided the background information above, those skilled in the art can understand the problems existing in current material creation technologies. The following section will detail the application scenarios of the game material effect processing method of this application. The game material effect processing method provided in this application can be applied to related fields of image rendering, or other related technical fields with material effect creation requirements.
[0036] The following section first illustrates the application scenarios of the game material effect processing method in the embodiments of this application.
[0037] Figure 1 This is a schematic diagram illustrating an application scenario of the game material effect processing method provided in the first embodiment of this application. For example... Figure 1As shown, this application scenario includes a client 101 and a server 102; the client 101 and the server 102 are connected via network communication. The client 101 is a terminal device with a preset editing tool for editing material attribute information and a preset viewing tool for viewing material effects installed.
[0038] by Figure 1 To illustrate in detail, in the context of game material effect creation, the technical artist (TA) at client 101 adjusts the parameters of the material attribute information on the graphical user interface using a preset editing tool for editing material attribute information, generating a Shader configuration file. The Shader configuration file is then loaded using a preset viewing tool for viewing material effects, generating the initial model target material effect. Correspondingly, client 101 transmits the Shader configuration file corresponding to the initial model target material effect to the server 102 of the game server via a network communication connection; server 102 then applies the Shader configuration file in the game.
[0039] It should be noted that, Figure 1 This is a schematic diagram illustrating an application scenario of a game material effect processing method provided in this application embodiment. This application embodiment does not... Figure 1 The included devices are limited, but the number of client 101 and server 102 is not limited. For example, satisfying... Figure 1 The application scenario shown may also include a data storage device, which can be an external storage device relative to the client 101 and server 102, or an internal storage device integrated into the client 101 and server 102. The client 101 can be a smartphone, smart bracelet, tablet, wearable device, multimedia player, e-reader, or other devices with communication capabilities, and a game-based application (APP) can be installed on this device; the server 102 can be a single server or a cluster of servers, or a cloud computing service center.
[0040] In the embodiments of this application, Figure 1 The number of client 101 and server 102 devices can vary. For the specific implementation process of the above application scenario, please refer to the following embodiment descriptions.
[0041] Having described the application scenarios of the embodiments of this application, the embodiments of this application also provide a method for processing game material effects, as well as a corresponding device, electronic device, and computer-readable storage medium. The following embodiments provide a detailed description of the above method, device, electronic device, and computer-readable storage medium.
[0042] The second embodiment of this application provides a method for processing game material effects. This method can be applied to technical artists (TAs) and / or artists in game development projects using terminal devices equipped with preset editing tools for editing material attribute information and preset viewing tools for viewing material effects. This allows the technical artists and / or artists to participate in the material shader integration process in the early stages of development. Of course, the method for processing game material effects in this embodiment can be applied to any user with game material effect processing needs; the application to technical artists (TAs) and / or artists is merely illustrative and not a practical limitation. For ease of understanding, the method for processing game material effects in this embodiment is exemplified by its application to technical artists (TAs) and / or artists.
[0043] Figure 2 A flowchart illustrating a method for processing game material effects provided in this application embodiment is shown below in conjunction with... Figure 2 The method provided in this embodiment will be described in detail. The embodiments described below are used to explain the principle of the method and are not intended to limit actual use.
[0044] like Figure 2 As shown, the method for processing game material effects provided in this embodiment includes the following steps S201 to S202:
[0045] S201, in response to the editing operation of material property information on the graphical user interface, obtain the Shader configuration file; wherein, the Shader configuration file is a property parameter file used to create material effects.
[0046] The purpose of this step is to obtain the Shader configuration file obtained after the user performs editing operations on the graphical user interface.
[0047] In one feasible implementation of this application embodiment, the graphical user interface includes: a parameter display interface for editing material parameters and an effect display interface for viewing material effects. The parameter display interface for editing material parameters can also be understood as a preset editing tool for editing material parameters; the effect display interface for viewing material effects can also be understood as a preset viewing tool for viewing material effects. In this application embodiment, to facilitate understanding of the functions of different interfaces within the graphical user interface, each interface within the graphical user interface will be described in the form of a tool in the following description.
[0048] In practice, in response to editing operations on the material attribute information exposed in the Shader file within the preset editing tool (parameter display interface) used for editing material parameters, a Shader configuration file is obtained. The Shader file is the code file used to create material effects; the Shader configuration file is the attribute parameter file used to create material effects. That is, the preset editing tool for editing material parameters is used to adjust the parameters of the material attribute information exposed in the currently opened Shader file, generating the Shader configuration file. This material attribute information includes: material attributes and their corresponding attribute values.
[0049] Before obtaining the Shader configuration file in response to the editing operation of the material attribute information exposed in the Shader file of the preset editing tool used for editing material parameters, the game material effect processing method of this application embodiment further includes the following implementation process: A terminal device (such as the terminal device of a technical artist (TA)) obtains a preset editing tool and a preset viewing tool for rendering game material effects on a 3D model. The preset editing tool is used for editing material parameters, and the preset viewing tool is used for viewing material effects.
[0050] The aforementioned preset editing tool for editing material parameters is an application used in computer graphics to edit material parameters, thereby changing the material effects of game models by editing and setting the material parameters in the application. This preset editing tool provides a series of editable options and parameter adjustment ranges (attribute value adjustment ranges). It also allows users to save and share their personal preset material parameters for the convenience of others.
[0051] The aforementioned preset viewing tool (effect display interface) for viewing material effects is an application used to display material effects. This preset viewing tool allows users to quickly view and compare different material effects and filter out those that meet their requirements. Furthermore, this preset viewing tool also allows for the editing of material parameters, specifically through the attribute editing window within the tool.
[0052] In this embodiment, the preset editing tool for editing material parameters can be a Shader parameter template editing tool. The preset viewing tool for viewing material effects can be a material viewing tool. Specifically, by developing a Shader parameter template editing tool, a Shader configuration file is generated by editing the parameter values (attributes and attribute values) within the Shader parameter template. The material viewing tool allows viewing the material effects produced by the Shader configuration file generated by the Shader parameter template editing tool. It should be understood that the Shader parameter values (attributes and attribute values) within the Shader parameter template serve as material parameters (material attribute information) and can be used to generate corresponding material effects in the initial model. Because the aforementioned Shader parameter template editing tool and material viewing tool lower the technical barrier to material development, technical artists (TAs) and / or artists in game development can directly use them, facilitating their participation in the material and Shader integration process during material creation.
[0053] First, let's explain the Shader parameter template editing tool.
[0054] The Shader Parameter Template Editing Tool is an application specifically designed for editing and managing Shader parameters. This tool helps users easily control and adjust the values of Shader parameters, saving the adjusted values in the Shader configuration file for later use to achieve the desired material effects.
[0055] To better understand the Shader parameter template editing tool, please refer to [link / reference]. Figure 3 The illustration. Figure 3 This is a schematic diagram of the Shader parameter template editing tool provided in an embodiment of this application. Figure 3 As shown, the editing interface of the Shader parameter template editing tool mainly consists of four modules, including:
[0056] Module 1 - Shader file name display module;
[0057] Module 2 - Shader Parameter List Window Module;
[0058] Module 3 - Shader Parameter Properties Window Module;
[0059] Module 4 - Shader configuration file operation module.
[0060] The Shader file name display module, located at reference 3.1 in the attached diagram, is used to display the name of the currently opened Shader file, allowing the user to clearly identify the identity of the Shader file being edited; for example... Figure 3 In the current settings, the currently opened shader file is named "Shaders / PBR Monster.fx".
[0061] The attached diagram, labeled 3.2, shows the Shader Parameter List window module: This module automatically reads all attributes from the currently open Shader file and displays them. Users can select the target attribute by checking the checkboxes to the left of each attribute name. For example... Figure 3 In this context, the open target properties are the cBrightness property and the cEmmisionColor property.
[0062] The Shader Parameter Properties window module (marked at 3.3 in the attached figure) is used to edit the attribute values corresponding to the open target attributes. This module can be used to edit the default values and value ranges of the target attributes, and can also add annotations to the target attributes, such as the parameter descriptions in the figure; that is, the Shader Parameter Properties window module is used to edit the Shader attribute parameter values. Figure 3 The following explanation uses the cBrightness attribute as an example, as shown in Figure 3.3. The “Parameter Description: Brightness” section in the figure is the attribute note for cBrightness; the “Minimum value 0.0, Maximum value 1.0, and Default value 0.0” indicate the value range and default value of the cBrightness attribute.
[0063] The attached diagram, labeled 3.4, shows the Shader configuration file operation module. This module is used to set up Shader configuration file operation controls. Users can manipulate these controls to save, rename, and perform other operations on the target attribute values edited in the Shader parameter property window, using the Shader configuration file named "Shaders / PBR Monster.fx". It's important to understand that by editing the attribute values of the target attribute in the currently opened Shader file named "Shaders / PBR Monster.fx", the edited attribute values are saved in this Shader configuration file, allowing for subsequent calls to the "Shaders / PBR Monster.fx" Shader configuration file. Alternatively, it can be understood as editing and adjusting the Shader parameter values (attributes and attribute values) in the Shader file and then saving them within the Shader configuration file.
[0064] Here, the currently opened Shader file mentioned in the above description is explained. A Shader file is a text file containing programming code, used to specify how to draw the surface of a 3D model on a graphics processing unit (GPU). There is a one-to-one correspondence between this Shader file and the Shader configuration file; the data source for the target attributes and their corresponding attribute values is the programming code in the Shader file. After editing the attribute values corresponding to the target attributes using a Shader parameter template editing tool, they are saved in the form of a Shader configuration file. For example, in this embodiment, the user's currently opened Shader file is "Shaders / PBR Monster.fx," and after the user edits and adjusts the attribute values, a Shader configuration file of "Shaders / PBR Monster.fx" is generated.
[0065] The above description also involves Shader configuration files, which will be explained below. A Shader configuration file is a text file used to control Shader behavior. This file contains target attributes and their corresponding values. These target attributes and values allow the Shader configuration file to correctly and accurately generate the required material effects when applied to the initial model. Of course, as a feasible implementation method in this application, the aforementioned Shader configuration file can serve as a Shader parameter template. A Shader parameter template is a predefined Shader parameter configuration file containing a series of pre-defined target attributes and their values. This template facilitates the sharing of personal Shader parameter templates by users.
[0066] It should be understood that, in this embodiment, the use of a Shader parameter template editing tool can lower the technical threshold for material development, thereby reducing the complexity of material development technology. This allows users to freely edit and set Shader configuration files to achieve complex material effects on the initial model. Of course, the aforementioned Shader parameter template editing tool also helps users edit material parameters quickly and easily, saving them time and effort and improving the efficiency of Shader configuration file editing.
[0067] Next, we will explain the material viewing tool.
[0068] A material viewing tool, as an application for viewing and displaying the material effects of 3D models, allows users to browse the texture, color, reflectivity, transparency, and other characteristics of the 3D model surface and preview changes in the material in real time. Of course, in addition to viewing material effects, the material viewing tool in this embodiment also has the function of editing the attribute values corresponding to the attributes (material parameter editing and adjustment). In this embodiment, the material viewing tool specifically edits the attribute values corresponding to the aforementioned target attributes.
[0069] To better understand the material viewing tool, please refer to [link / reference]. Figure 4 The illustration. Figure 4 This is a schematic diagram of a material viewing tool provided in an embodiment of this application. Figure 4 As shown, the material viewing tool mainly consists of five parts, including:
[0070] Window 1 - File List Window (File List Module);
[0071] Window 2 - Log Output Window (Log Output Module);
[0072] Window 3 - Effect Viewing Window (Effect Viewing Module);
[0073] Window 4 - Resource Animation Window (Resource Animation Module);
[0074] Window 5 - Property Editing Window (Property Editing Module).
[0075] The attached diagram includes the following: Figure 4.1 - File List Window: This window is used for quickly loading and viewing Shaders and Shader configuration files; Figure 4.2 - Log Output Window: This window is used to print out logs to locate editor problems; Figure 4.3 - Effect Viewing Window (Material Effect Viewing Window or Effect Viewing Module): This window is used to view the in-game effect of the material Shader configuration file on the 3D model (i.e., the target material effect generated by the Shader configuration file on the 3D model); Figure 4.4 - Resource Animation Window: This window is used to add resources such as models, materials, and effects; it should be noted that this window also has a material resource track; the material resource track is a tool used to display material effects in an animated way; that is, the material effects in the Effect Viewing Window can be displayed in an animated way using the material resource track; this material resource track consists of a timeline and keyframes; Figure 4.5 - Attribute Editing Window: This window is used to edit and adjust the attribute values of the attributes in the Shader configuration file corresponding to the keyframes. Since the above-mentioned Figure 4.2 - Log Output Window in the material viewing tool is not the focus of this application's embodiment, it will not be described in detail.
[0076] Here, we will explain the loading and viewing of shaders in the file list window (reference 4.1 in the attached diagram) mentioned above. Loading and viewing shaders refers to the process of checking and using shader code during material creation; that is, this process is used to check whether the shader code can function correctly. By importing the shader code into the material viewing tool, we ensure that it can function correctly when running in the material viewing tool.
[0077] As described above, the shader configuration files can be obtained using a shader parameter template editing tool. In practical applications, material files are also involved. These files store the material properties of a 3D model, containing all the details of the material, such as texture, color, reflectivity, and transparency. Typically, material files are pre-set by artists; however, since they are not the focus of this application's embodiments, they will not be discussed further.
[0078] To facilitate understanding, a detailed explanation will be provided regarding the Resource Animation window (reference mark 4.4) mentioned above. As previously stated, the Resource Animation window is used to add resources such as models, materials, and effects. This window also includes a material resource track, which consists of a timeline and keyframes. It's important to note the relationship between the Resource Animation window (reference mark 4.4) and the Effect Viewing window (reference mark 4.3): If no binding relationship (first association, second association) is established between the Effect Viewing window and the Resource Animation window, the material effects generated by the Shader configuration file in the 3D model are displayed statically in the Effect Viewing window. If a binding relationship (first association, second association) is established between the Effect Viewing window and the Resource Animation window, the Resource Animation window uses the timeline and keyframes to dynamically display the material effects generated by the Shader configuration file in the 3D model in the Effect Viewing window. In other words, the Resource Animation window uses the timeline and keyframes to control the changes in the attribute values corresponding to the target attributes in the Shader configuration file, thereby achieving a dynamic display of the material effects in the Effect Viewing window. This can also be understood as the resource animation window (resource animation display interface) being used to display the material effect animation corresponding to the target material effect.
[0079] It's important to understand that within this resource animation window, users can also adjust various animation parameters, such as loop count, playback speed, and reverse playback. The resource animation window of the material viewer consists of two parts: the resource window and the animation window. Figure 4In the attached diagram at marker 4.4 – the resource animation window – is on the left, displaying a list of 3D models, effects, and materials; the animation window is on the right, displaying the timeline and keyframes corresponding to the material resource tracks. Of course, different shader configuration files generate different material effects, and the resulting visuals in the material effects view window will also differ.
[0080] In this embodiment, a material viewing tool allows for real-time viewing of the shader configuration file's effect on the 3D model. Through the above steps, a shader parameter template editing tool for editing material parameters and a material viewing tool for viewing material effects are obtained.
[0081] Next, we will provide a detailed explanation of how to obtain the Shader configuration file in response to editing operations on the material property information exposed in the Shader file of the preset editing tool used to edit material parameters.
[0082] The purpose of this step is to respond to the above material property information editing operation, and use the preset editing tool to adjust the parameter values of the material properties exposed in the currently opened Shader file, and generate the Shader configuration file.
[0083] The material attribute information exposed in the Shader file includes: material attributes and their corresponding attribute values; in response to editing operations on the material attribute information exposed in the Shader file in the preset editing tool used to edit material parameters, obtaining the Shader configuration file includes the following steps S201-1 to S201-4:
[0084] S201-1. Load the Shader file on the parameter display interface, and read the material properties and their corresponding property values from the Shader file.
[0085] S201-2. In response to the selection operation of material properties on the parameter display interface, obtain the target material properties used to generate the target material effect of the initial model.
[0086] S201-3. In response to parameter adjustment operations on the attribute values corresponding to material properties on the parameter display interface, obtain the target attribute values corresponding to the target material properties used to generate the target material effect of the initial model.
[0087] S201-4. Generate the Shader configuration file based on the target attributes and target attribute values.
[0088] In the material attribute information, the material attributes are the target attributes selected by the user from the properties exposed in the Shader file currently opened by the user, within the Shader file's programming code. The attribute values corresponding to the material attributes can be understood as the attribute values corresponding to the target attributes, or as the process of assigning values to the target attributes selected by the user. Typically, each attribute has a default value; modifying these values changes the material effect. For example, Figure 3 In the Shader parameter template editing tool shown (the parameter display interface for editing material parameters), at the Shader parameter property window module marked 3.3 in the attached figure, by adjusting the default value of the target property cBrightness property from "0.0" to "0.1", the generated Shader configuration file can be used to increase the brightness in the material effect of the 3D model.
[0089] As mentioned earlier, the shader configuration file is a text file used to control the behavior of the shader. This file contains attributes and attribute values. By adjusting the parameters corresponding to these attributes and obtaining the target attribute value, the shader can correctly generate the desired target material effect.
[0090] In this embodiment of the application, as a feasible implementation method, the attribute values corresponding to the material properties are adjusted according to a preset editing tool used to edit material parameters: this adjustment can be used to determine the target attributes exposed in the Shader file. That is, in practical applications, since the Shader file can expose one or more attributes, when there are multiple attributes: the aforementioned adjustment of attribute values using the preset editing tool for editing material parameters can be a process of filtering and determining the target attributes for editing. For example, Figure 3 The attributes exposed in the Shader file in the Shader parameter list window module (reference 3.2) include: cBrightness, cEmmisionColor, cFire-Color, cFire-Enable, and cEnvStrength. Users can select the target attributes for editing by checking the checkboxes to the left of each attribute name. These are the cBrightness and cEmmisionColor attributes displayed in the Shader parameter attribute window module (reference 3.3).
[0091] In this embodiment of the application, as another feasible implementation, the attribute values corresponding to the material properties are adjusted according to a preset editing tool used to edit material parameters: This can also be a process of adjusting the attribute values corresponding to target attributes selected by the user for editing. That is, in practical applications, the attribute values corresponding to the target attributes selected by the user are adjusted. For example, Figure 3 As shown in Figure 3.3 - in the Shader parameter template editing tool, the default value of the target attribute cBrightness attribute, "0.0", is adjusted to the attribute value "0.1".
[0092] It should be understood that the two feasible implementation methods described above in this application embodiment can also be used in combination. That is, adjusting the filter to determine the target attribute and adjusting the filter to determine the attribute value corresponding to the target attribute can be used in combination. This embodiment is for illustration only and is not a practical limitation. If the Shader parameter template editing tool is applied to technical artists (TAs) and / or artists to adjust the attribute values corresponding to material attributes, it can directly reduce the technical threshold and technical complexity in the material creation process.
[0093] Through the above steps, the technical artist (TA) generates a Shader configuration file after adjusting the attribute values using the Shader parameter template editing tool. This Shader configuration file consists of target attributes and their corresponding target attribute values. It can also be saved and shared as a Shader parameter template for use by other personnel. In other words, the Shader configuration files accumulated by the technical artist (TA) during material creation and development can be quickly reused in other 3D models, thereby improving the efficiency of material creation and development and reducing the workload.
[0094] S202, in response to the loading operation of the Shader configuration file, generates the initial model target material effect on the graphical user interface.
[0095] The purpose of this step is to load the Shader configuration file in the preset viewing tool and then generate the target material effect on the initial model.
[0096] In this embodiment, in response to the loading operation of the Shader configuration file, the initial model target material effect is generated on the graphical user interface, which can be carried out as follows:
[0097] S202-1, Load the Shader configuration file on the effect display interface and create an initial model for displaying material effects;
[0098] S202-2, in the effect display interface, in response to the association operation between the Shader configuration file and the initial model, establishes an association between the Shader configuration file and the initial model so that the initial model generates the target material effect.
[0099] The preset viewing tool for material effects is as described above; this tool is an application used to view and display the material effects of 3D models. For example, Figure 4 The interface of the material viewing tool mainly consists of five parts: a file list window, a log output window, an effect viewing window, a resource animation window, and a property editing window. Of course, in this embodiment, the preset viewing tool for material effect viewing also includes a material resource track, which can be used to compare the effects of different materials in the Shader configuration file.
[0100] It's important to understand that in the material viewing tool, each resource is associated with a material resource track, corresponding to a row in the resource animation window. That is, models have a model track, and materials have a material track. You can set parameters for the tracks, such as setting initial shader parameters and binding materials to characters. You can also add sub-tracks to resources on the track.
[0101] In this embodiment of the application, step S202-1 above, loading the Shader configuration file on the effect display interface and creating an initial model for displaying material effects, can be carried out as follows:
[0102] S202-1-1, Load the Shader configuration file on the effect display interface to add material resource tracks for creating material effect animations to the effect display interface;
[0103] S202-1-2, Create an initial model object based on the material resource track so that an initial model for displaying material effects is generated on the effect display interface.
[0104] The effect display interface includes: an attribute editing interface for editing the attribute values corresponding to the material properties, and an effect viewing interface for displaying the material effects. For example, the attribute editing window and the effect viewing window in a material viewing tool.
[0105] In this embodiment of the application, in step S202-2 above, on the effect display interface, in response to the association operation between the Shader configuration file and the initial model, the association relationship between the Shader configuration file and the initial model is established so that the initial model generates the target material effect, which can be carried out in the following manner:
[0106] S202-2-1, In the property editing interface, in response to the first association operation between the Shader configuration file and the material resource track, a first association relationship is established between the Shader configuration file and the material resource track; the first association relationship is used by the material resource track to load and use the Shader configuration file;
[0107] S202-2-2, on the material resource track, in response to the second association operation between the Shader configuration file and the initial model object, establishes a second association relationship between the Shader configuration file and the initial model object; the second association relationship is used by the initial model object to load and use the Shader configuration file;
[0108] S202-2-3, Based on the first and second association relationships, the initial model on the effect viewing interface generates the target material effect.
[0109] The above process briefly describes how the target material effect corresponding to the Shader configuration file is generated in the preset viewing tool used for viewing material effects. For ease of understanding, the characteristics of the material resource track, the initial model object (effect display model object), the initial model (effect display model), and other features involved in the above process, as well as the specific implementation process, will be explained in detail.
[0110] The Material Resource Track, as a tool for storing and managing material resource shader configuration files, can be used for the dynamic display of material effects. Specifically, the Material Resource Track can animate the material effects displayed in the material effect viewing window; it consists of a timeline and keyframes. The time points on the timeline represent the generation time of the material effect, and the timeline itself is composed of multiple time points. The initial image formed in the material effect viewing window based on the shader configuration file is called a keyframe. Furthermore, since the attribute editing window within the preset viewing tool for material effect viewing can be used to edit and adjust the target attribute values in the shader configuration file corresponding to the keyframes, when the target attribute value in the shader configuration file changes, the image formed in the material effect viewing window changes accordingly. The Material Resource Track can be understood as multiple frames representing the material effect obtained by editing and adjusting the target attribute values multiple times based on the keyframes corresponding to the target attribute values. The generation time points of these multiple frames representing the material effect constitute the timeline of the Material Resource Track.
[0111] For easier understanding, please refer to Figure 5 The illustration. Figure 5 This is a schematic diagram of the material resource track provided in an embodiment of this application. For example... Figure 5As shown in Figure 5.2, the frame values at different points in the timeline (Timeline-1) of the material resource track differ. These frame values represent the material effects generated based on the target attribute values adjusted in the Shader configuration file. Using the attribute editing window of the preset viewing tool for viewing material effects, the values of the target attributes at different points in the timeline can be adjusted, thus changing the material effects displayed in the material effect viewing window.
[0112] The initial model object (demonstration model object), also known as the character model object, refers to the object created in the material resource track for managing character models; in other words, the character model object can be used to describe and manage various character models related to material resources. For example, Figure 5 In the material resource track shown, at reference 5.1 in the attached figure, there is a model object named "EntityAvatar-1".
[0113] The initial model (effect display model), also known as the character model, refers to the model used in the material effect viewer window to display the material effects corresponding to the Shader configuration file. It's important to understand that there is a one-to-one correspondence between the effect display model object and the effect display model; when an effect display model object is created in the material resource track, a corresponding effect display model is generated in the material effect viewer window.
[0114] In step S202-2-1, when establishing the first association between the Shader configuration file and the material resource track in the attribute editing window, the first association operation between the Shader configuration file and the material resource track includes: binding the Shader configuration file and the material resource track. Based on this, the first association operation also includes: parameter adjustment operations for the target attribute values in the Shader configuration file. For a detailed explanation of this process, please refer to the following illustration:
[0115] As mentioned earlier, the attribute editing window can be used to edit and adjust the target attribute values in the Shader configuration file. In the attribute editing window, the primary association between the Shader configuration file and the material resource track is established. This can also be understood as the material effects corresponding to the Shader configuration file set in the preset viewing tool being displayed as material effect animations.
[0116] For easier understanding, please refer to Figure 6 The illustration. Figure 6 This is a schematic diagram of setting the Shader configuration file associated with the material resource track within the attribute editing window provided in this application embodiment; as shown... Figure 6As shown in Figure 6.1, in the property editing window of the material viewing tool, under the "Configuration File Name" field, the Shader configuration file associated with the material resource track is set to "PBR-Monster-hightlight2.json". Correspondingly, in Figure 6.2, the "Track Parameters - Tracking Parameters" field displays the target properties cBrightness and cEmmisionColor of the Shader configuration file, along with their respective values. By establishing the primary association between the Shader configuration file and the material resource track in the property editing window, the material resource track can load and use the Shader configuration file.
[0117] In this embodiment of the application, as a feasible implementation method, after establishing the first association between the Shader configuration file and the material resource track, the target attribute values in the Shader configuration file can be adjusted. That is, in this embodiment of the application, before the Shader configuration file is generated, the attribute values can be adjusted through the Shader parameter attribute window module of the Shader parameter template editing tool; after the Shader configuration file is generated, the target attribute values corresponding to the target attributes in the Shader configuration file can be adjusted through the attribute editing window of the material viewing tool.
[0118] To better understand the process of adjusting the target attribute values in the Shader configuration file, please refer to [link / reference needed]. Figure 6 The illustration is shown in Figure 6.2. The "track parameter" section displays the target attributes cBrightness and cEmmisionColor corresponding to the Shader configuration file, along with their respective values. By manipulating the controls in the window, the value of cBrightness ("0.5") can be adjusted to "0.0," and the value of cEmmisionColor ("yellow") can be adjusted to "blue." It is important to understand that the parameter adjustments performed after the Shader configuration file is generated only affect the target attribute values; the attributes themselves cannot be adjusted. In this embodiment, the method for adjusting target attribute values is simple and quick, enabling technical artists (TAs) to adjust target attribute parameters based on the real-time material effects generated by the Shader configuration file to obtain the desired material effects.
[0119] In step S202-2-2, an effect display model object needs to be created in the material resource track; once the effect display model object is created, the corresponding effect display model is simultaneously generated in the material effect viewing window. For a detailed explanation of this process, please refer to the following illustration:
[0120] As mentioned earlier, the effect display model object refers to the object created in the material resource track for resource management of character models. The effect display model is the model used in the material effect viewer window to display the material effects corresponding to the Shader configuration file.
[0121] In this embodiment, to display the material effects generated by the aforementioned Shader configuration file, it is also necessary to create a model for displaying the material effects. That is, by creating an effect display model object, an effect display model for displaying the material effects is obtained. For ease of understanding, please refer to... Figure 7 The indication, Figure 7 This is a schematic diagram illustrating the creation of a display model object on a material resource track, as provided in this embodiment of the application. For example... Figure 7 As shown in the attached figure, at reference 7.1, a character model object "EntityAvatar-1" is created on the resource material track. At the same time, at reference 7.2, the material effect viewing window of the preset viewing tool also forms a corresponding effect display model.
[0122] In step S202-2-3, a second association needs to be established between the Shader configuration file and the effect display model object in the material resource track; based on the first and second associations, the effect display model in the material effect viewing window generates the target material effect. For a detailed explanation of this process, please refer to the following illustration:
[0123] The purpose of establishing a second association between the model object and the Shader configuration file is to ensure that the target material effect is generated from the model displayed in the material effect viewing window. For a clearer understanding of this process, please refer to [link to relevant documentation / reference]. Figure 8 The indication, Figure 8 This is a schematic diagram illustrating the establishment of a second association between the effect demonstration model object and the Shader configuration file provided in this application embodiment. For example... Figure 8As shown in Figure 8.1, the associated track binds the Shader configuration file "PBR-Monster-hightlight2.json" to the effect display model object "EntityAvatar-1". After establishing a second association between the effect display model object "EntityAvatar-1" and the Shader configuration file "PBR-Monster-hightlight2.json", the effect display model at Figure 8.2 in the material effect viewing window is affected by the material settings, generating the target material effect, based on the first and second associations.
[0124] The above process generates the target material effect from the effect display model in the material effect viewing window. This method of processing game material effects can also be used to generate material effect animations corresponding to the target material effect. The specific implementation process is as follows:
[0125] S203-1. Obtain the initial image corresponding to the target material effect of the initial model and use the initial image as the first frame of the material resource track;
[0126] S203-2, Responding to parameter adjustment operations on the target attribute value in the Shader configuration file on the attribute editing interface, so as to change the target material effect and obtain the target material effect after the initial model adjustment;
[0127] S203-3. Obtain the intermediate image corresponding to the target material effect after the initial model adjustment and use the intermediate image as the second frame of the material resource track;
[0128] S203-4. Based on the first and second screen frames, generate the material effect animation corresponding to the target material effect on the resource animation display interface.
[0129] In this embodiment of the application, as a feasible implementation method, in order to control the change of the target attribute value in the Shader configuration file, frames representing material effects can be added to the timeline of the material resource track. The above process can also be understood as adding a first frame and a second frame to the timeline. It should be understood that if the parameter adjustment operation is performed once on the target attribute value in the Shader configuration file on the attribute editing interface, then the number of second frames is one; if the parameter adjustment operation is performed multiple times on the target attribute value in the Shader configuration file on the attribute editing interface, then the number of second frames is multiple.
[0130] In this application embodiment, as a feasible implementation method, if the number of second frame frames is one, the correspondence between the target attribute value and the time point is a direct proportional function. For ease of understanding, this application embodiment uses one second frame frame as an example. Of course, the specific parameter values of the target attribute values corresponding to the frame frames can also be set in the attribute editing window.
[0131] In step S203-1, the initial image is used as the first frame of the material resource track, which includes the following implementation steps:
[0132] S203-1-1. Obtain the first time point used to represent the effect of generating the target material of the initial model on the initial model; the first time point corresponds one-to-one with the initial image;
[0133] S203-1-2. In the resource material track, create a timeline to represent the generation time of material effects on the initial model;
[0134] S203-1-3. Record the first time point on the time axis so that the initial image corresponding to the first time point is used as the first frame on the time axis.
[0135] In step S203-3, the intermediate image is used as the second frame of the material resource track, which includes the following implementation steps:
[0136] S203-3-1. Obtain a second time point to represent the effect of the target material after the initial model is adjusted and generated on the initial model; the second time point corresponds one-to-one with the intermediate image.
[0137] S203-3-2. Record the second time point on the time axis so that the intermediate image corresponding to the second time point is used as the second frame on the time axis.
[0138] In step S203-4, based on the first and second screen frames, a material effect animation corresponding to the target material effect is generated on the resource animation display interface, including the following implementation steps:
[0139] S203-4-1. Based on the first time point and target attribute value corresponding to the first frame, the second time point and target attribute value corresponding to the second frame, calculate the correspondence between target attribute value and time point;
[0140] S203-4-2. Based on the correspondence between target attribute values and time points, generate the material effect animation corresponding to the target material effect on the resource animation display interface.
[0141] To better understand the addition of frames to the timeline corresponding to the aforementioned material resource tracks, please refer to... Figure 9 The illustration. Figure 9 This is a schematic diagram of adding frame images to the timeline corresponding to the material resource track provided in this application embodiment. For example... Figure 9 As shown, to control the change of the target attribute value corresponding to the cBrightness attribute of the material resource, two frames (first frame Float-1 and second frame Float-2) were added to the timeline (Timeline-1) at reference 9.1. Correspondingly, the attribute values corresponding to the first and second frames can be edited and set in the attribute editing window. Figure 10 The indication, Figure 10 This is a diagram illustrating how to set the attribute values corresponding to the screen frame within the attribute editing window. For example... Figure 10 As shown, when the first frame Float-1 is the keyframe mentioned above (the initial frame formed by the Shader configuration file in the material effect viewing window, with the target attribute value corresponding to the cBrightness attribute being 0.1), at the reference mark 10.1 in the attached figure, in the second frame Float-2, the attribute value corresponding to the cBrightness attribute can be dragged and set to 0.5. Figure 10 The diagram also shows that the attribute value change curve of the target attribute cBrightness is a straight line corresponding to a direct proportional function.
[0142] In this embodiment of the application, as a feasible implementation method, after adding two frame images to the timeline and setting the attribute values corresponding to the target attribute, the attribute values of the target attribute at each time point on the timeline can be calculated based on the attribute difference between the attribute values corresponding to the target attribute of the two frame images. It can also be understood that the attribute value at each time point on the timeline is calculated from the difference in attribute values between the two frame images.
[0143] In step S203-4-1, based on the first time point and target attribute value corresponding to the first frame, the second time point and target attribute value corresponding to the second frame, the correspondence between target attribute values and time points is calculated, including the following implementation steps:
[0144] S203-4-1-1, Calculate the time difference between the first time point and the second time point;
[0145] S203-4-1-2. Calculate the attribute difference between the target attribute value corresponding to the first frame and the target attribute value corresponding to the second frame.
[0146] S203-4-1-3. Based on the time difference and attribute difference, calculate the correspondence between the target attribute value and the time point.
[0147] To facilitate understanding, the above content is illustrated with examples. For instance, the first time point on the timeline corresponding to the first frame Float-1 is 11:01, and the second time point on the timeline corresponding to the second frame Float-2 is 11:05; the attribute value of the target cBrightness attribute corresponding to the first frame Float-1 is "0.1", and the attribute value of the target cBrightness attribute corresponding to the second frame Float-2 is "0.5". Therefore, the correspondence between the attribute value and the time point is a direct proportional relationship (increasing by 0.1 every minute). Based on this direct proportional relationship, the attribute value of the cBrightness attribute corresponding to the frame at time 11:02 can be calculated to be "0.2", and the attribute value of the cBrightness attribute corresponding to the frame at time 11:07 can be "0.7". Of course, the correspondence between the attribute value and the time point can also be an inverse proportional relationship, an exponential function relationship, etc. This embodiment is for illustrative purposes only and is not intended to limit the actual implementation.
[0148] To better understand the process of dynamically displaying material effects on the demo model, please refer to [link / reference]. Figure 11 The illustration. Figure 11 This is a schematic diagram illustrating the dynamic display of material effects within the material effect viewing window provided in this application embodiment. For example... Figure 11 As shown in the attached figure, at reference 11.1, the dynamic playback button in the upper left corner can be used to control the material effects on the effect display model to play in the form of animation; at reference 11.2, the timeline on the time axis is used to indicate the current playback time point; as shown in the figure, the current playback time point is "1:15" on the time axis; the effect display model in the material effect viewing window will also produce continuous material effect changes as the time point on the time axis moves.
[0149] It's important to understand that you can preview the material effect as an animation by controlling the changes in the attribute values corresponding to the target attribute. Of course, if the generated material effect does not meet expectations during the preview, you can edit the attribute values corresponding to the target attribute in the Shader configuration file through the attribute editing window of the material viewing tool, so that the effect display model (initial model) can generate the target material effect.
[0150] Through the above process, dynamic display of material effects is achieved on the effect display model, improving the efficiency of material effect display in a WYSIWYG manner, thereby increasing the convenience of technical artists (TAs) and their satisfaction with the tools. Of course, in this embodiment, after the effect display model in the material effect viewing window generates the target material effect, the Shader configuration file can be applied to the actual game scene through game commands. For example, the Shader configuration file can be loaded and displayed on the game character through in-game quick debugging commands; and the Shader configuration file can be attached to character actions through the support of the character action editor and the addition of actions.
[0151] The method for processing game material effects provided in this application embodiment allows technical artists to obtain preset editing tools for editing material parameters and preset viewing tools for viewing material effects. Based on the preset editing tools, they adjust the attribute values corresponding to the material properties to generate a Shader configuration file. This process transfers most of the material Shader effect integration work undertaken by programmers to technical artists (TAs). TAs can directly use the preset editing tools to edit and adjust material parameters, reducing the complexity and technical threshold of material development. Furthermore, by loading the Shader configuration file using the preset viewing tools, the target material effect of the 3D model is generated, enabling real-time viewing of the material effect and editing and adjusting attribute values. This reduces the reliance on programmers for program integration during material development and shortens the material creation development cycle.
[0152] The second embodiment described above provides a method for processing game material effects. Correspondingly, an embodiment of this application also provides a device for processing game material effects. Since the device embodiment is basically similar to the method embodiment, it is described simply. For details of the relevant technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the device embodiment is merely illustrative. Figure 12 The diagram shown is a unit block diagram of the game material effect processing device 1200 provided in this embodiment, including:
[0153] The attribute processing unit 1201 is configured to obtain a shader configuration file in response to an editing operation on material attribute information on a graphical user interface; wherein the shader configuration file is an attribute parameter file used to prepare material effects.
[0154] Effect generation unit 1202 is configured to generate initial model target material effects on the graphical user interface in response to a loading operation for the Shader configuration file.
[0155] The above embodiments provide a device for processing game material effects. In addition, this application also provides an electronic device. Since the electronic device embodiment is basically similar to the method embodiment, it is described simply. For details of the relevant technical features, please refer to the corresponding descriptions of the above-provided method embodiments. The following description of the electronic device embodiment is merely illustrative. The electronic device embodiment is as follows: Please refer to... Figure 13 To understand this embodiment, Figure 13 This is a schematic diagram of the electronic device provided in this embodiment.
[0156] like Figure 13 As shown, Figure 13 This is a schematic diagram of an electronic device provided in the fourth embodiment of this application.
[0157] In this embodiment, an optional hardware structure of the electronic device 1300 may be as follows: Figure 13 As shown, it includes: at least one processor 1301, at least one memory 1302 and at least one communication bus 1305; the memory 1302 contains a program 1303 and data 1304.
[0158] Bus 1305 can be a communication device for transmitting data between components within electronic device 1300, such as an internal bus (e.g., CPU-memory bus, where the processor is the central processing unit, or CPU for short) or an external bus (e.g., a universal serial bus port or a peripheral component interconnection fast port).
[0159] Additionally, the electronic device also includes at least one network interface 1306 and at least one peripheral interface 1307. The network interface 1306 provides wired or wireless communication with an external network 1308 (e.g., the Internet, intranet, local area network, mobile communication network, etc.). In some embodiments, the network interface 1006 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc.
[0160] Peripheral interface 1307 is used to connect to peripherals, such as peripheral 1 in the figure. Figure 13 1309 in the middle), peripheral 2 ( Figure 13 1310 in the middle) and peripheral 3 ( Figure 13 (1311 in the original text). Peripherals are peripheral devices, which may include, but are not limited to, cursor control devices (such as mice, touchpads, or touchscreens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays), displays or light-emitting diode displays, video input devices (such as cameras or input interfaces coupled to video files), etc.
[0161] The processor 1301 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0162] The memory 1302 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage device.
[0163] In this embodiment, the processor 1301 calls the program and data stored in the memory 1302 to execute the method of the second embodiment of this application.
[0164] Fifth Embodiment
[0165] Corresponding to the method of the second embodiment of this application, the fifth embodiment of this application also provides a computer storage medium storing a computer program that is executed by a processor to perform the method of the second embodiment of this application.
[0166] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this invention. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0167] This application may involve the use of user data. In practical applications, user-specific personal data may be used within the scope permitted by applicable laws and regulations in the scheme described herein, provided it complies with applicable laws and regulations (e.g., with explicit user consent and actual notification to the user). In the above embodiments, methods for processing game material effects, as well as corresponding devices and electronic devices, are provided. Furthermore, this application also provides a computer-readable storage medium for implementing the above-described methods for processing game material effects. The computer-readable storage medium embodiments provided in this application are described in a relatively simple manner; relevant parts can be found in the corresponding descriptions of the above method embodiments. The embodiments described below are merely illustrative.
[0168] The computer-readable storage medium provided in this embodiment stores computer instructions, which, when executed by a processor, implement the steps of the above-described method embodiments.
[0169] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0170] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0171] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0172] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0173] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope defined in the claims of the present invention.
[0174] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
Claims
1. A method of processing a game material effect, characterized in that, The graphical user interface includes a parameter display interface for editing material parameters and an effect display interface for viewing material effects. The method includes: In response to an editing operation on material property information in a graphical user interface, a shader configuration file is obtained; wherein, the shader configuration file is a property parameter file used to create material effects; the material property information includes material properties and the property values corresponding to the material properties; In response to a loading operation for the Shader configuration file, an initial model target material effect is generated on the graphical user interface; The step of obtaining the Shader configuration file in response to editing operations on material attribute information on the graphical user interface includes: Load the shader file on the parameter display interface, and read the material properties and their corresponding attribute values from the shader file. In response to the selection operation of the material property on the parameter display interface, the target material property used to generate the target material effect of the initial model is obtained; In response to a parameter adjustment operation on the attribute value corresponding to the material attribute on the parameter display interface, a target attribute value corresponding to the target material attribute used to generate the target material effect of the initial model is obtained; A shader configuration file is generated based on the target attribute and the target attribute value.
2. The method of claim 1, wherein, The step of generating the initial model target material effect on the graphical user interface in response to a loading operation for the Shader configuration file includes: Load the Shader configuration file on the effect display interface and create an initial model to showcase the material effects; On the effect display interface, in response to the association operation between the Shader configuration file and the initial model, the Shader configuration file and the initial model are associated to generate the target material effect from the initial model.
3. The method of claim 2, wherein, The step of loading the Shader configuration file on the effect display interface and creating the initial model for displaying material effects includes: Load the Shader configuration file onto the effect display interface to add material resource tracks for creating material effect animations onto the effect display interface; An initial model object is created based on the material resource track so that an initial model for displaying material effects is generated on the effect display interface.
4. The method for processing game material effects according to claim 3, characterized in that, The effect display interface includes: an attribute editing interface for editing the attribute values corresponding to the material attributes, and an effect viewing interface for displaying the material effects.
5. The method for processing game material effects according to claim 4, characterized in that, On the effect display interface, in response to the association operation between the Shader configuration file and the initial model, establishing an association between the Shader configuration file and the initial model to generate the target material effect from the initial model includes: On the attribute editing interface, in response to the first association operation between the Shader configuration file and the material resource track, a first association relationship is established between the Shader configuration file and the material resource track; the first association relationship is used by the material resource track to load and use the Shader configuration file; On the material resource track, in response to a second association operation between the Shader configuration file and the initial model object, a second association relationship is established between the Shader configuration file and the initial model object; the second association relationship is used by the initial model object to load and use the Shader configuration file; Based on the first association relationship and the second association relationship, the initial model on the effect viewing interface generates the target material effect.
6. The method for processing game material effects according to claim 5, characterized in that, The first association operation between the Shader configuration file and the material resource track includes: a binding operation between the Shader configuration file and the material resource track.
7. The method for processing game material effects according to claim 5, characterized in that, The first association operation between the Shader configuration file and the material resource track further includes: a binding operation between the Shader configuration file and the material resource track, and a parameter adjustment operation for the target attribute value in the Shader configuration file.
8. The method for processing game material effects according to claim 4, characterized in that, The effect display interface also includes a resource animation display interface for displaying the material effect animation corresponding to the target material effect.
9. The method for processing game material effects according to claim 8, characterized in that, The method further includes: Obtain the initial image corresponding to the target material effect of the initial model and use the initial image as the first frame of the material resource track; In response to parameter adjustment operations on the target attribute value in the Shader configuration file on the attribute editing interface, the target material effect is changed to obtain the target material effect after the initial model adjustment; Obtain the intermediate image corresponding to the target material effect after the initial model is adjusted, and use the intermediate image as the second frame of the material resource track; Based on the first frame and the second frame, generate the material effect animation corresponding to the target material effect on the resource animation display interface.
10. The method for processing game material effects according to claim 9, characterized in that, The step of using the initial image as the first frame of the material resource track includes: A first time point is obtained to represent the effect of generating the target material of the initial model on the initial model; the first time point corresponds one-to-one with the initial image; In the material resource track, a timeline is created to represent the generation time of material effects on the initial model; The first time point is recorded on the timeline so that the initial image corresponding to the first time point is used as the first frame on the timeline.
11. The method for processing game material effects according to claim 10, characterized in that, The step of using the intermediate image as the second frame of the material resource track includes: A second time point is obtained to represent the effect of the target material after the initial model is adjusted and generated on the initial model; the second time point corresponds one-to-one with the intermediate image. The second time point is recorded on the timeline so that the intermediate image corresponding to the second time point is used as the second frame on the timeline.
12. The method for processing game material effects according to claim 9, characterized in that, The step of generating the material effect animation corresponding to the target material effect on the resource animation display interface based on the first frame and the second frame includes: Based on the first time point corresponding to the first frame and the target attribute value corresponding to the first frame, and the second time point corresponding to the second frame and the target attribute value corresponding to the second frame, the correspondence between the target attribute value and the time point is calculated. Based on the correspondence between the target attribute value and the time point, a material effect animation corresponding to the target material effect is generated on the resource animation display interface.
13. The method for processing game material effects according to claim 12, characterized in that, The step of calculating the correspondence between target attribute values and time points based on the first time point corresponding to the first frame and the target attribute value corresponding to the first frame, and the second time point corresponding to the second frame and the target attribute value corresponding to the second frame, includes: Calculate the time difference between the first time point and the second time point; Calculate the attribute difference between the target attribute value corresponding to the first frame and the target attribute value corresponding to the second frame; Based on the time difference and the attribute difference, the correspondence between the target attribute value and the time point is calculated.
14. The method for processing game material effects according to claim 9, characterized in that, If a parameter adjustment operation is performed on the target attribute value in the Shader configuration file on the attribute editing interface, and the number of parameter adjustment operations is one, then the number of the second screen frames is one. If parameter adjustment operations are performed on the target attribute value in the Shader configuration file on the attribute editing interface, and the number of parameter adjustment operations is multiple, then the number of the second screen frames is multiple.
15. The method for processing game material effects according to claim 14, characterized in that, If the number of the second frame is one, the correspondence between the target attribute value and the time point is a direct proportional function.
16. A device for processing game material effects, characterized in that, The graphical user interface includes a parameter display interface for editing material parameters and an effect display interface for viewing material effects. The device includes: The attribute processing unit is configured to obtain a Shader configuration file in response to an editing operation on material attribute information on a graphical user interface; wherein the Shader configuration file is an attribute parameter file for preparing material effects, and the material attribute information includes material attributes and attribute values corresponding to the material attributes; The effect generation unit is configured to generate initial model target material effects on the graphical user interface in response to a loading operation for the Shader configuration file. The step of obtaining the Shader configuration file in response to editing operations on material attribute information on the graphical user interface includes: Load the shader file on the parameter display interface, and read the material properties and their corresponding attribute values from the shader file. In response to the selection operation of the material property on the parameter display interface, the target material property used to generate the target material effect of the initial model is obtained; In response to a parameter adjustment operation on the attribute value corresponding to the material attribute on the parameter display interface, a target attribute value corresponding to the target material attribute used to generate the target material effect of the initial model is obtained; A shader configuration file is generated based on the target attribute and the target attribute value.
17. An electronic device, characterized in that, It includes a processor and a memory; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method as described in any one of claims 1-15.
18. A computer-readable storage medium storing one or more computer instructions thereon, characterized in that, The instruction is executed by the processor to implement the method as described in any one of claims 1-15.
Citation Information
Patent Citations
Animation loading method and device, server and storage medium
CN111481928A
Picture rendering method and device, computer equipment and medium
CN111597003A