A method, device, equipment and storage medium for adjusting the skin of a virtual object
By obtaining the skin parameter information of the virtual object's original skin and editing and rendering it on the terminal device, the problem of inflexible adjustment of the virtual object's skin is solved, game resources are saved, and the flexibility of game development is improved.
Patent Information
- Application Number
- CN202310165208.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-02-21
AI Technical Summary
The adjustment method of virtual object skins in existing games is not flexible enough, which leads to the expansion of game resource packages and restricts further development of the game.
By obtaining the skin parameter information of the image area where each color in the original skin painting of the virtual object is located, storing it in a preset file, and receiving modification instructions through the terminal device display parameter editing interface, the virtual object is rendered according to the modified preset file and map.
This enables players to flexibly adjust the skin of virtual objects, reduces the game resources required for adjustments, and improves the flexibility of game development.
Smart Images

Figure CN116036607B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, apparatus, device and storage medium for adjusting the skin of a virtual object. Background Art
[0002] The most common skin production method in existing games is to first draw the skin's original artwork, then create a 3D (Three Dimensions) model and texture of the virtual object based on the skin's original artwork, and finally present the finished skin effect in the game. In the traditional method, the final presentation of the virtual object's skin directly depends on the 3D model and texture created in the above production stage. Therefore, players can only see the final presentation of the virtual object's skin and cannot adjust the presentation of the virtual object's skin, resulting in a lack of flexibility in adjusting the virtual object's skin. In addition, the repeated production of virtual object skins will also lead to the expansion of the game resource package due to the continuous increase in 3D models and textures, which will restrict the further development of the game. Summary of the Invention
[0003] In view of this, the purpose of this application is to provide a virtual object skin adjustment method, device, equipment and storage medium, so that players can more flexibly adjust the completed virtual object skin, while also helping to save game resources increased by adjusting the virtual object skin.
[0004] In a first aspect, an embodiment of the present application provides a method for adjusting the skin of a virtual object, the method comprising:
[0005] Obtaining skin parameter information corresponding to an image region containing each color in the skin original painting of the virtual object based on the color type contained in the skin original painting, and storing the obtained skin parameter information corresponding to each color in a partitioned manner in a preset file; wherein the skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information;
[0006] Displaying a parameter editing interface of the preset file to the target game user through a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file through the parameter editing interface;
[0007] In response to receiving a parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the original skin painting to obtain the target skin of the virtual object.
[0008] In a second aspect, an embodiment of the present application provides a skin adjustment device for a virtual object, the skin adjustment device comprising:
[0009] A first acquisition module is configured to acquire skin parameter information corresponding to an image region containing each color in an original skin image of a virtual object based on the color type contained in the original skin image, and to store the acquired skin parameter information corresponding to each color in a partitioned manner in a preset file; wherein the skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information;
[0010] a display module, configured to display a parameter editing interface of the preset file to a target game user via a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file via the parameter editing interface;
[0011] A rendering module is used to respond to a parameter editing instruction for the preset file sent by the target terminal device, modify the skin parameter information stored in the preset file according to the parameter editing instruction, and render the virtual object according to the modified preset file and multiple target maps corresponding to the original skin painting to obtain the target skin of the virtual object.
[0012] In a third aspect, an embodiment of the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned virtual object skin adjustment method when executing the computer program.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned virtual object skin adjustment method are executed.
[0014] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0015] The embodiments of the present application provide a method, apparatus, device and storage medium for adjusting the skin of a virtual object. According to the color type contained in the original skin painting of the virtual object, the skin parameter information corresponding to the image area where each color is located is obtained from the original skin painting, and the obtained skin parameter information corresponding to each color is partitioned and stored in a preset file; the parameter editing interface of the preset file is displayed to the target game user through the target terminal device corresponding to the target game user, so as to receive the parameter editing instruction for the preset file through the parameter editing interface; in response to receiving the parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the original skin painting to obtain the target skin of the virtual object. In this way, the present application enables players to adjust the finished virtual object skin more flexibly, and is also conducive to saving game resources increased by adjusting the virtual object skin.
[0016] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A schematic flow chart of a method for adjusting the skin of a virtual object provided in an embodiment of the present application is shown;
[0019] Figure 2 A schematic diagram of an original skin painting of a virtual object provided in an embodiment of the present application is shown;
[0020] Figure 3a A schematic flow chart of a method for drawing a color partition map for a skin original painting provided by an embodiment of the present application is shown;
[0021] Figure 3b A schematic diagram of a color partition map provided in an embodiment of the present application is shown;
[0022] Figure 4a A schematic flow chart of a method for drawing a target diffuse reflection map for a skin original painting provided by an embodiment of the present application is shown;
[0023] Figure 4bA schematic diagram of a target diffuse reflection map provided by an embodiment of the present application is shown;
[0024] Figure 5a A schematic flow chart of a method for drawing a target self-luminous map for a skin original painting provided by an embodiment of the present application is shown;
[0025] Figure 5b A schematic diagram of a target self-luminous map provided in an embodiment of the present application is shown;
[0026] Figure 6 A schematic structural diagram of a virtual object skin adjustment device provided in an embodiment of the present application is shown;
[0027] Figure 7 A schematic structural diagram of an electronic device 700 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can be implemented out of sequence, and steps without logical context can be reversed or implemented simultaneously. In addition, those skilled in the art, under the guidance of the contents of this application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0029] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0030] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0031] The most common skin creation method in existing games is to first draw the skin's original artwork, then create a 3D model and textures for the virtual object based on the original skin artwork, and finally present the finished skin in the game. In this traditional method, the final rendering of the virtual object's skin directly depends on the 3D model and textures created in the above production stages. Therefore, players can only see the final rendering of the virtual object's skin and cannot adjust the rendering of the virtual object's skin, resulting in a lack of flexibility in adjusting the virtual object's skin. In addition, the repeated creation of virtual object skins will also lead to the expansion of the game resource package due to the continuous increase in 3D models and textures, which will restrict the further development of the game.
[0032] Based on this, the embodiments of the present application provide a method, device, electronic device and storage medium for adjusting the skin of a virtual object, so that players can adjust the skin of the completed virtual object more flexibly, and it is also beneficial to save game resources increased by adjusting the skin of the virtual object.
[0033] In one embodiment of the present application, a method for adjusting the skin of a virtual object can be executed on a terminal device or a server. When the method for adjusting the skin of a virtual object is executed on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device (i.e., a terminal device).
[0034] In an optional embodiment, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a gaming method based on cloud computing. In the cloud game operation mode, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the virtual object skin adjustment method are completed on the cloud game server. The role of the client device is to receive and send data and present the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, TV, computer, PDA, etc.; but the terminal device for data processing is the cloud game server in the cloud. When playing the game, the player operates the client device to send operation instructions to the cloud game server. The cloud game server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0035] To facilitate understanding of this embodiment, a skin adjustment method for a virtual object provided in an embodiment of the present application is described in detail below.
[0036] Reference Figure 1 As shown, Figure 1A flowchart of a method for adjusting the skin of a virtual object provided in an embodiment of the present application is shown. The method includes steps S101-S103. Specifically:
[0037] S101, according to the color type contained in the skin original painting of the virtual object, obtain skin parameter information corresponding to the image area where each color is located from the skin original painting, and store the obtained skin parameter information corresponding to each color in a preset file in a partitioned manner.
[0038] S102: Displaying a parameter editing interface of the preset file to the target game user via a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file via the parameter editing interface.
[0039] S103, in response to receiving the parameter editing instruction for the preset file sent by the target terminal device, modify the skin parameter information stored in the preset file according to the parameter editing instruction, and render the virtual object according to the modified preset file and multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object.
[0040] The above-mentioned skin adjustment method provided by the embodiment of the present application obtains the skin parameter information corresponding to the image area where each color is located from the skin original painting according to the color type contained in the skin original painting of the virtual object, and stores the obtained skin parameter information corresponding to each color in a partition in a preset file; displays the parameter editing interface of the preset file to the target game user through the target terminal device corresponding to the target game user, so as to receive the parameter editing instruction for the preset file through the parameter editing interface; in response to receiving the parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object. In this way, the present application enables players to adjust the finished virtual object skin more flexibly, and is also conducive to saving game resources increased by adjusting the virtual object skin.
[0041] The following is an exemplary description of each step in the virtual object skin adjustment method provided in the embodiment of the present application:
[0042] S101, according to the color type contained in the skin original painting of the virtual object, obtain skin parameter information corresponding to the image area where each color is located from the skin original painting, and store the obtained skin parameter information corresponding to each color in a preset file in a partitioned manner.
[0043] Here, the virtual object can be a 3D model of any type of virtual object, wherein the specific object type of the virtual object can be determined according to the actual game planning requirements; for example, the virtual object can be a spaceship, battleship, etc. that appears in science fiction games; the virtual object can also be various game characters that appear in competitive games, etc.; the embodiments of this application do not impose any restrictions on the specific object types of the above-mentioned virtual objects.
[0044] Here, the above-mentioned skin original painting represents the original skin designed for the virtual object during the skin production stage; wherein, the skin original painting includes contour details designed for the virtual object (such as patterns, etc.), coloring information for different image areas (that is, specific color information corresponding to different image areas in the skin original painting), and the actual effects presented by the skin original painting in the game (such as diffuse reflection effect, self-luminous effect, glossiness effect, etc.); the embodiments of this application do not impose any restrictions on the specific form of the above-mentioned skin original painting.
[0045] It should be noted that when making skin original paintings, the number of color types commonly used is limited, among which the specific color types included in the skin original paintings can be set according to the actual game planning requirements; for example, when the preset upper limit of color type usage is 6, the color types included in the skin original painting will not exceed 6; the embodiment of this application does not impose any restrictions on the number of color types and specific color types included in the above-mentioned skin original paintings.
[0046] Specifically, take the example of a spaceship in a science fiction game as an example. Figure 2 A schematic diagram of a skin original painting of a virtual object provided in an embodiment of the present application is shown. Figure 2 As shown, the spaceship's skin original painting includes a total of four types of colors, namely: black 201, purple 202, cyan 203 and yellow 204; among them, in the skin original painting, the position and area of the image area where different colors are located are not fixed (equivalent to being determined according to the actual game planning needs, and there is no limitation on this); the skin effect currently presented by the skin original painting depends on the multiple original maps used when rendering the model of the virtual object. For example, the diffuse reflection effect currently presented by the skin original painting is determined according to the original diffuse reflection map drawn by the game planner; the embodiment of the present application also does not impose any limitation on the actual skin effect currently presented by the skin original painting.
[0047] Here, the above-mentioned skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information; that is, the specific parameter type and parameter quantity contained in the above-mentioned skin parameter information can be determined based on the skin effect currently presented by the original skin painting; the embodiment of this application does not impose any restrictions on the specific parameter type and parameter quantity contained in the above-mentioned skin parameter information.
[0048] Specifically, in the original skin painting, based on the skin effect currently presented by the original skin painting, the image area where each color is located contains the above-mentioned skin parameter information corresponding to itself; based on this, after obtaining the skin parameter information corresponding to the image area where each color is located, all the obtained skin parameter information can be classified according to different image areas corresponding to the same color, so that the skin parameter information classified according to the color information can be partitioned and stored in the preset file, so that the different skin parameter information corresponding to the same color in the preset file can be uniformly adjusted later, thereby improving the adjustment efficiency of the virtual object skin.
[0049] S102: Displaying a parameter editing interface of the preset file to the target game user via a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file via the parameter editing interface.
[0050] Here, the target game user is a player in the game. For example, still taking the virtual object spaceship as an example, the target game user can be a player who has purchased a spaceship skin; the target terminal device can be a terminal device used by the player to log in to the game; wherein, the target terminal device can be a fixed terminal device such as a personal computer, or a mobile terminal device such as a mobile phone or tablet; the embodiment of the present application does not impose any limitation on the specific device type of the above-mentioned target terminal device.
[0051] Specifically, the data interface corresponding to the above-mentioned skin parameter information stored in the preset file is opened, so that the target terminal device corresponding to the target game user can obtain the various skin parameter information stored in the above-mentioned preset file through the open data interface; at the same time, the parameter editing interface of the preset file is displayed to the target game user through the target terminal device, and the target game user can edit and modify the various skin parameter information in the preset file in the parameter editing interface (equivalent to generating parameter editing instructions for the preset file), so as to determine which skin parameter information stored in the preset file needs to be modified and edited by the target game user according to the received parameter editing instructions, thereby enabling players to adjust the completed virtual object skin more flexibly, and also helping to save game resources increased due to adjusting the virtual object skin.
[0052] S103, in response to receiving the parameter editing instruction for the preset file sent by the target terminal device, modify the skin parameter information stored in the preset file according to the parameter editing instruction, and render the virtual object according to the modified preset file and multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object.
[0053] Specifically, after receiving the parameter editing instruction sent by the target terminal device, the skin parameter information stored in the preset file can be modified according to the parameter editing instruction, and the modified preset file can be used instead of the original preset file during model rendering calculation, thereby obtaining the target skin customized by the target game user.
[0054] Here, the above-mentioned target maps include but are not limited to any of the following: diffuse map, color partition map, self-luminous map, normal map, AO map, roughness map, etc.; the embodiment of this application does not impose any restrictions on the specific map type and specific number of the above-mentioned target maps.
[0055] It should be noted that in an embodiment of the present application, when rendering a model of a virtual object, the newly added preset file can be used to replace the existing material + texture rendering method for determining the model rendering effect with a material + texture + preset file format; based on this, on the one hand, game users can more flexibly adjust the skin of the virtual object by modifying the skin parameter information stored in the preset file; on the other hand, without modifying the model of the virtual object itself, the purpose of changing the skin effect can be achieved by adjusting the skin parameter information stored in the preset file, which is conducive to reducing the expansion of the game resource package due to the addition of new models and textures, thereby effectively saving the game resources increased by adjusting the skin of the virtual object.
[0056] The following describes in detail the specific implementation process of the virtual object skin adjustment method described in steps S101-S103 in the embodiment of the present application:
[0057] Regarding the specific implementation process of the above step S103, for the multiple target maps corresponding to the above original skin painting, the following describes in detail the methods for obtaining the color partition map, the target diffuse reflection map, and the target self-luminous map in the target map:
[0058] 1. In an optional embodiment, referring to Figure 3a As shown, Figure 3a A flow chart of a method for drawing a color partition map for a skin original painting provided by an embodiment of the present application is shown, wherein the method includes steps S301-S302; specifically:
[0059] S301 , dividing the grayscale value range according to the color types included in the original skin picture to obtain the grayscale representation value corresponding to each color.
[0060] Specifically, in an embodiment of the present application, as an optional embodiment, 0-1 can be used to represent the grayscale value range; wherein, when the original skin painting contains x colors, the grayscale value range 0-1 is divided into x parts, thereby obtaining the grayscale representation value corresponding to each color.
[0061] For example, Figure 2 Take the original skin of the spaceship shown as an example. Figure 2 As shown, the original painting of the spaceship's skin includes: black 201, purple 202, cyan 203 and yellow 204, a total of 4 different types of colors. Based on this, the grayscale value range of 0-1 can be divided into 4 equal parts, and the grayscale representation value corresponding to black 201 is 1, the grayscale representation value corresponding to purple 202 is 0, the grayscale representation value corresponding to cyan 203 is 0.33, and the grayscale representation value corresponding to yellow 204 is 0.66.
[0062] S302: Replace each color contained in the original skin painting with the grayscale representation value corresponding to the color to obtain the color partition map for the original skin painting.
[0063] Specifically, Figure 2 Take the original skin of the spaceship shown as an example. Figure 3b A schematic diagram of a color partition map provided by an embodiment of the present application is shown, wherein after obtaining the grayscale representation value corresponding to each color, the following can be drawn: Figure 3b The color partition map shown.
[0064] It should be noted that Figure 2 The difference is that in Figure 3b In the color partition map shown, the image area corresponding to each color in the original skin painting has been replaced with the grayscale value corresponding to the color. Therefore, the color partition map can be stored in one channel of the G channel, and Figure 2 The color information in the original skin painting shown needs to be stored separately using the three RGB channels.
[0065] 2. In an optional embodiment, referring to Figure 4a As shown, Figure 4a A flow chart of a method for drawing a target diffuse reflection map for a skin original painting provided by an embodiment of the present application is shown, wherein the method includes steps S401-S402; specifically:
[0066] S401: Obtain an original diffuse reflection map of the original skin painting.
[0067] Here, the original diffuse reflection map is used to determine the diffuse reflection effect presented by the original skin painting. That is, the original diffuse reflection map contains the diffuse reflection color information of the original skin painting. At this time, the original diffuse reflection map is equivalent to a map containing color information and used to determine the diffuse reflection effect after the model is rendered.
[0068] S402 , retaining the outline details and light and dark effects of the virtual object in the original diffuse reflection map, removing the color information in the original diffuse reflection map, and obtaining the target diffuse reflection map for the original skin painting.
[0069] Specifically, Figure 2 Take the original skin of the spaceship shown as an example. Figure 4b A schematic diagram of a target diffuse reflection map provided by an embodiment of the present application is shown, wherein Figure 4b As shown in the figure, the target diffuse reflection map only contains the outline details of the virtual object in the skin original painting and the light and dark effects (that is, the black and white effects used to reflect the strength of the diffuse reflection), but does not contain Figure 2 The color information (i.e. RGB information) in the original skin painting shown.
[0070] It should be noted that, unlike the existing conventional diffuse reflection map (equivalent to the original diffuse reflection map mentioned above), Figure 4b In the target diffuse reflection map shown, since the target diffuse reflection map does not contain any color information (ie, RGB information), the target diffuse reflection map can also be stored in one channel, G channel, without having to use three channels, RGB, to store them separately.
[0071] 3. In an optional embodiment, referring to Figure 5a As shown, Figure 5a A flow chart of a method for drawing a target self-luminous map for a skin original painting provided by an embodiment of the present application is shown, wherein the method includes steps S501-S502; specifically:
[0072] S501: Obtain an original self-luminous map of the original skin painting.
[0073] Here, the original self-luminous map is used to determine the self-luminous effect presented by the skin original painting; that is, the original self-luminous map contains the self-luminous color information of the skin original painting. At this time, the original self-luminous map is equivalent to a map containing color information and used to determine the self-luminous effect after the model is rendered.
[0074] S502 , retaining the outline details and the self-luminous effect of the virtual object in the original self-luminous map, removing the color information in the original self-luminous map, and obtaining the target self-luminous map for the original skin painting.
[0075] Specifically, Figure 2 Take the original skin of the spaceship shown as an example. Figure 5b A schematic diagram of a target self-luminous map provided by an embodiment of the present application is shown, wherein Figure 5b As shown, the target self-luminous map only contains the outline details of the virtual object in the original skin painting and the light and dark effects (that is, the black and white effect used to reflect the strength of the self-luminous effect. Since some areas have no self-luminous effect, the specific outline details of these areas are not shown in the target self-luminous map), but does not contain Figure 2 The color information (i.e. RGB information) in the original skin painting shown.
[0076] It should be noted that, unlike the existing conventional self-luminous map (equivalent to the original self-luminous map mentioned above), Figure 5b In the target self-illumination map shown, since the target self-illumination map does not contain any color information (ie, RGB information), the target self-illumination map can also be stored in one channel of the G channel, without having to use the three RGB channels to store them separately.
[0077] Regarding the specific implementation process of the above step S103, combined with the color partition map in the above target map, the virtual object can be partitioned and rendered according to different image areas corresponding to the same color in the manner described in step a1 below, so as to uniformly adjust the different skin parameter information corresponding to the same color in the modified preset file, thereby improving the efficiency of adjusting the virtual object skin. Specifically:
[0078] Step a1: performing partition rendering on the different color areas corresponding to the virtual object in the original skin painting according to the modified preset file and the color partition map, and determining the skin effects presented by the different color areas in the target skin.
[0079] Here, in the specific implementation process, the grayscale representation value corresponding to each color in the color partition map can be converted into an array with only one valid bit, wherein the positions of the valid bits in different arrays are different. Therefore, when rendering the virtual object, whether it is to determine the diffuse reflection effect of the target skin or any other skin effect such as the self-luminous effect, the purpose of partitioning the different color areas corresponding to the virtual object in the original skin painting can be achieved based on the above array, thereby improving the rendering efficiency of the virtual object and the adjustment efficiency of the virtual object skin.
[0080] Exemplary description, with Figure 3bTaking the color partition map shown as an example, the grayscale representation values of 0, 1, 0.33 and 0.66 of the four different colors in the skin original painting are input into the Calc Material Weights function. Since the Calc MaterialWeights function can convert different grayscale representation values input into different arrays, we can get: the array corresponding to the grayscale representation value 1 (that is, the grayscale representation value corresponding to black 201) is (1.0, 0.0, 0.0, 0.0); the array corresponding to the grayscale representation value 0.33 (that is, the grayscale representation value corresponding to cyan 203) is (0.0, 1.0, 0.0, 0.0); the array corresponding to the grayscale representation value 0.66 (that is, the grayscale representation value corresponding to yellow 204) is (0.0, 0.0, 1.0, 0.0); the array corresponding to the grayscale representation value of gray 0 (that is, the grayscale representation value corresponding to purple 202) is (0.0, 0.0, 0.0, 1.0).
[0081] Based on this, when performing partition rendering on a virtual object, taking the color area corresponding to black 201 as an example, it is only necessary to bring in the array (1.0, 0.0, 0.0, 0.0) corresponding to the grayscale representation value 1 during rendering to ensure that only the color area corresponding to black 201 displays the color. The color areas corresponding to other colors do not participate in the partition rendering calculation for black 201 because the corresponding parameters in the array are 0.
[0082] With respect to the specific implementation process of the above step S103, combined with the target diffuse reflection map in the above target map, the diffuse reflection effect of the target skin modified by the target game user can be determined while implementing the partitioned rendering of the virtual object in the manner described in the following steps b1-b2. Specifically:
[0083] Step b1: Obtain target diffuse reflection color information corresponding to each color in the original skin image from the modified preset file.
[0084] Here, based on the drawing process of the target diffuse reflection map described in the aforementioned steps S401-S402, it can be seen that the target diffuse reflection map does not contain any color information. Therefore, in the actual rendering process, the target diffuse reflection color information stored in the modified preset file is used.
[0085] Step b2: performing partition rendering on the different color areas corresponding to the virtual object in the original skin painting according to the acquired diffuse reflection color information of each target and the target diffuse reflection map, and determining the diffuse reflection effect presented by the target skin.
[0086] Here, the specific implementation method for performing partition rendering on the different color areas corresponding to the virtual object in the original skin painting can be performed with reference to the aforementioned step a1, and the repeated parts will not be repeated here.
[0087] Specifically, in the actual partition rendering process, for each color area, the target lighting model can be used to multiply the target diffuse color information of the color area obtained on the basis of the target diffuse map to obtain the diffuse reflection effect presented by the final target skin.
[0088] It should be noted that the above-mentioned target illumination model can be any type of illumination model, such as a PBR (Physically-Based Rendering) illumination model based on glossiness and BRDF (Bidirectional Reflectance Distribution Function), a Rendering Equation global illumination model, a Blinn-Phong illumination model, etc. The embodiment of the present application does not impose any limitation on the specific model type of the above-mentioned target illumination model.
[0089] With respect to the specific implementation process of the above step S103, combined with the target self-luminous map in the above target map, the self-luminous effect of the target skin modified by the target game user can be determined while implementing the partitioned rendering of the virtual object in the manner described in the following steps c1-c2. Specifically:
[0090] Step c1: Obtain target self-luminous color information corresponding to each color in the original skin image from the modified preset file.
[0091] Here, based on the drawing process of the target self-luminous map described in the aforementioned steps S501-S502, it can be seen that the target self-luminous map does not contain any color information. Therefore, in the actual rendering process, the target self-luminous color information stored in the modified preset file is used.
[0092] Step c2: Based on the acquired self-luminous color information of each target and the target self-luminous map, perform partition rendering on the different color areas corresponding to the virtual object in the original skin painting to determine the self-luminous effect presented by the target skin.
[0093] Specifically, similar to the above-mentioned diffuse reflection effect, in the actual partition rendering process, for each color area, the target illumination model can also be used to multiply the target self-luminous color information of the color area obtained on the basis of the target self-luminous map to obtain the final self-luminous effect presented by the target skin.
[0094] Regarding the specific implementation process of the above-mentioned step S103, unlike the above-mentioned diffuse reflection effect and self-luminous effect, in the embodiment of the present application, the glossiness effect and Finil reflection effect presented by the target skin are determined solely by the glossiness information and Finil reflection information stored in the preset file. That is, when the target game user modifies the glossiness information and / or Finil reflection information stored in the preset file in the parameter editing interface, as described in the following steps d1-d2, the glossiness effect and Finil reflection effect presented by the target skin will be determined based on the glossiness information and / or Finil reflection information stored in the modified preset file. Specifically:
[0095] Step d1: Obtain target glossiness information and / or target Fresnel reflection color information corresponding to each color in the original skin image from the modified preset file.
[0096] Step d2, based on the obtained target glossiness information and / or target Fresnel reflection color information, partition the rendering of the different color areas corresponding to the virtual object in the original skin painting to determine the glossiness effect and / or Fresnel reflection effect presented by the target skin.
[0097] Here, for the above steps d1-d2, it should be noted that, unlike the above-mentioned diffuse reflection effect and self-luminous effect, the glossiness effect and / or Fresnel reflection effect presented by the target skin are only determined by the modified preset file, that is, by inputting the modified preset file into the target lighting model, the glossiness effect and / or Fresnel reflection effect presented by the final target skin can be directly obtained.
[0098] Through the above-mentioned virtual object skin adjustment method provided by the embodiment of the present application, according to the color type contained in the virtual object's skin original painting, the skin parameter information corresponding to the image area where each color is located is obtained from the skin original painting, and the obtained skin parameter information corresponding to each color is partitioned and stored in a preset file; through the target terminal device corresponding to the target game user, the parameter editing interface of the preset file is displayed to the target game user, so as to receive the parameter editing instruction for the preset file through the parameter editing interface; in response to receiving the parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object. In this way, the present application enables players to adjust the completed virtual object skin more flexibly, and is also conducive to saving game resources increased by adjusting the virtual object skin.
[0099] Based on the same inventive concept, the present application also provides a skin adjustment device for a virtual object corresponding to the above-mentioned skin adjustment method for a virtual object. Since the principle of solving the problem by the skin adjustment device for a virtual object in the embodiment of the present application is similar to the above-mentioned skin adjustment method for a virtual object in the embodiment of the present application, the implementation of the skin adjustment device for a virtual object can refer to the implementation of the skin adjustment method for a virtual object, and the repeated parts will not be repeated.
[0100] Reference Figure 6 As shown, Figure 6 A schematic diagram of the structure of a skin adjustment device for a virtual object provided in an embodiment of the present application is shown, wherein the skin adjustment device comprises:
[0101] A first acquisition module 601 is configured to acquire skin parameter information corresponding to an image region containing each color in an original skin image of a virtual object based on the color type contained in the original skin image, and to store the acquired skin parameter information corresponding to each color in a partitioned manner in a preset file; wherein the skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information;
[0102] A display module 602 is configured to display a parameter editing interface of the preset file to the target game user via a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file via the parameter editing interface;
[0103] The rendering module 603 is used to respond to the parameter editing instruction for the preset file sent by the target terminal device, modify the skin parameter information stored in the preset file according to the parameter editing instruction, and render the virtual object according to the modified preset file and multiple target maps corresponding to the original skin painting to obtain the target skin of the virtual object.
[0104] In an optional embodiment, the target map includes: a color partition map for the original skin painting, and the rendering module 603 is configured to obtain the color partition map by the following method:
[0105] Divide the grayscale value range according to the color types contained in the original skin painting to obtain the grayscale representation value corresponding to each color;
[0106] Each color contained in the original skin painting is replaced by the grayscale representation value corresponding to the color to obtain the color partition map for the original skin painting.
[0107] In an optional embodiment, the target map includes: a target diffuse reflection map for the original skin painting, and the rendering module 603 is configured to obtain the target diffuse reflection map by the following method:
[0108] Obtaining an original diffuse reflection map of the original skin painting; wherein the original diffuse reflection map is used to determine the diffuse reflection effect presented by the original skin painting;
[0109] The contour details and light and dark effects of the virtual object in the original diffuse reflection map are retained, and the color information in the original diffuse reflection map is removed to obtain the target diffuse reflection map for the original skin painting.
[0110] In an optional embodiment, the target map includes: a target self-luminous map for the original skin painting, and the rendering module 603 is configured to obtain the target self-luminous map by the following method:
[0111] Obtaining an original self-luminous map of the skin original painting; wherein the original self-luminous map is used to determine the self-luminous effect presented by the skin original painting;
[0112] The outline details and the self-luminous effect of the virtual object in the original self-luminous map are retained, and the color information in the original self-luminous map is removed to obtain the target self-luminous map for the original skin painting.
[0113] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the rendering module 603 is used to:
[0114] According to the modified preset file and the color partition map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the skin effects presented by the different color areas in the target skin.
[0115] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the rendering module 603 is used to:
[0116] Obtaining target diffuse reflection color information corresponding to each color in the original skin image from the modified preset file;
[0117] According to the obtained diffuse reflection color information of each target and the target diffuse reflection map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the diffuse reflection effect presented by the target skin.
[0118] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the rendering module 603 is used to:
[0119] Obtaining target self-luminous color information corresponding to each color in the original skin image from the modified preset file;
[0120] According to the acquired self-luminous color information of each target and the target self-luminous map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the self-luminous effect presented by the target skin.
[0121] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the rendering module 603 is used to:
[0122] Obtaining target glossiness information and / or target Fresnel reflection color information corresponding to each color in the original skin image from the modified preset file;
[0123] Based on the obtained target glossiness information and / or target Fresnel reflection color information, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the glossiness effect and / or Fresnel reflection effect presented by the target skin.
[0124] Through the above-mentioned skin adjustment device provided by the embodiment of the present application, according to the color type contained in the skin original painting of the virtual object, the skin parameter information corresponding to the image area where each color is located is obtained from the skin original painting, and the obtained skin parameter information corresponding to each color is partitioned and stored in a preset file; through the target terminal device corresponding to the target game user, the parameter editing interface of the preset file is displayed to the target game user, so as to receive the parameter editing instruction for the preset file through the parameter editing interface; in response to the parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object. In this way, the present application enables players to adjust the finished virtual object skin more flexibly, and is also conducive to saving game resources increased by adjusting the virtual object skin.
[0125] Based on the same inventive concept, the present application also provides an electronic device corresponding to the above-mentioned virtual object skin adjustment method. Since the principle of solving the problem by the electronic device in the embodiment of the present application is similar to the above-mentioned virtual object skin adjustment method in the embodiment of the present application, the implementation of the electronic device can refer to the implementation of the above-mentioned virtual object skin adjustment method, and the repeated parts will not be repeated.
[0126] Figure 7 This is a schematic diagram of the structure of an electronic device 700 provided in an embodiment of the present application, including: a processor 701, a memory 702, and a bus 703. The memory 702 stores machine-readable instructions executable by the processor 701. When the electronic device runs a virtual object skin adjustment method as described in the embodiment, the processor 701 communicates with the memory 702 via the bus 703, and the processor 701 executes the machine-readable instructions. When the processor 701 executes the machine-readable instructions, the following steps are implemented, specifically:
[0127] Obtaining skin parameter information corresponding to an image region containing each color in the skin original painting of the virtual object based on the color type contained in the skin original painting, and storing the obtained skin parameter information corresponding to each color in a partitioned manner in a preset file; wherein the skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information;
[0128] Displaying a parameter editing interface of the preset file to the target game user through a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file through the parameter editing interface;
[0129] In response to receiving a parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the original skin painting to obtain the target skin of the virtual object.
[0130] In an optional embodiment, the target map includes: a color partition map for the original skin painting, and the processor 701 is configured to obtain the color partition map by the following method:
[0131] Divide the grayscale value range according to the color types contained in the original skin painting to obtain the grayscale representation value corresponding to each color;
[0132] Each color contained in the original skin painting is replaced by the grayscale representation value corresponding to the color to obtain the color partition map for the original skin painting.
[0133] In an optional embodiment, the target map includes: a target diffuse reflectance map for the original skin painting, and the processor 701 is configured to obtain the target diffuse reflectance map by the following method:
[0134] Obtaining an original diffuse reflection map of the original skin painting; wherein the original diffuse reflection map is used to determine the diffuse reflection effect presented by the original skin painting;
[0135] The contour details and light and dark effects of the virtual object in the original diffuse reflection map are retained, and the color information in the original diffuse reflection map is removed to obtain the target diffuse reflection map for the original skin painting.
[0136] In an optional embodiment, the target map includes: a target self-luminous map for the original skin painting, and the processor 701 is configured to obtain the target self-luminous map by the following method:
[0137] Obtaining an original self-luminous map of the skin original painting; wherein the original self-luminous map is used to determine the self-luminous effect presented by the skin original painting;
[0138] The outline details and the self-luminous effect of the virtual object in the original self-luminous map are retained, and the color information in the original self-luminous map is removed to obtain the target self-luminous map for the original skin painting.
[0139] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor 701 is configured to:
[0140] According to the modified preset file and the color partition map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the skin effects presented by the different color areas in the target skin.
[0141] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor 701 is configured to:
[0142] Obtaining target diffuse reflection color information corresponding to each color in the original skin image from the modified preset file;
[0143] According to the obtained diffuse reflection color information of each target and the target diffuse reflection map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the diffuse reflection effect presented by the target skin.
[0144] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor 701 is configured to:
[0145] Obtaining target self-luminous color information corresponding to each color in the original skin image from the modified preset file;
[0146] According to the acquired self-luminous color information of each target and the target self-luminous map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the self-luminous effect presented by the target skin.
[0147] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor 701 is configured to:
[0148] Obtaining target glossiness information and / or target Fresnel reflection color information corresponding to each color in the original skin image from the modified preset file;
[0149] Based on the obtained target glossiness information and / or target Fresnel reflection color information, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the glossiness effect and / or Fresnel reflection effect presented by the target skin.
[0150] Through the electronic device provided by the embodiment of the present application, the skin parameter information corresponding to the image area where each color is located is obtained from the skin original painting according to the color type contained in the skin original painting of the virtual object, and the skin parameter information corresponding to each color obtained is partitioned and stored in a preset file; the parameter editing interface of the preset file is displayed to the target game user through the target terminal device corresponding to the target game user, so as to receive the parameter editing instruction for the preset file through the parameter editing interface; in response to receiving the parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object. In this way, the present application enables players to adjust the virtual object skin more flexibly, and is also conducive to saving game resources increased by adjusting the virtual object skin.
[0151] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed when a processor is run, and the processor performs the following steps:
[0152] Obtaining skin parameter information corresponding to an image region containing each color in the skin original painting of the virtual object based on the color type contained in the skin original painting, and storing the obtained skin parameter information corresponding to each color in a partitioned manner in a preset file; wherein the skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information;
[0153] Displaying a parameter editing interface of the preset file to the target game user through a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file through the parameter editing interface;
[0154] In response to receiving a parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the original skin painting to obtain the target skin of the virtual object.
[0155] In an optional embodiment, the target map includes: a color partition map for the original skin painting, and the processor is configured to obtain the color partition map by the following method:
[0156] Divide the grayscale value range according to the color types contained in the original skin painting to obtain the grayscale representation value corresponding to each color;
[0157] Each color contained in the original skin painting is replaced by the grayscale representation value corresponding to the color to obtain the color partition map for the original skin painting.
[0158] In an optional embodiment, the target map includes: a target diffuse reflection map for the original skin painting, and the processor is configured to obtain the target diffuse reflection map by the following method:
[0159] Obtaining an original diffuse reflection map of the original skin painting; wherein the original diffuse reflection map is used to determine the diffuse reflection effect presented by the original skin painting;
[0160] The contour details and light and dark effects of the virtual object in the original diffuse reflection map are retained, and the color information in the original diffuse reflection map is removed to obtain the target diffuse reflection map for the original skin painting.
[0161] In an optional embodiment, the target map includes: a target self-luminous map for the original skin painting, and the processor is configured to obtain the target self-luminous map by the following method:
[0162] Obtaining an original self-luminous map of the skin original painting; wherein the original self-luminous map is used to determine the self-luminous effect presented by the skin original painting;
[0163] The outline details and the self-luminous effect of the virtual object in the original self-luminous map are retained, and the color information in the original self-luminous map is removed to obtain the target self-luminous map for the original skin painting.
[0164] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor is configured to:
[0165] According to the modified preset file and the color partition map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the skin effects presented by the different color areas in the target skin.
[0166] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor is configured to:
[0167] Obtaining target diffuse reflection color information corresponding to each color in the original skin image from the modified preset file;
[0168] According to the obtained diffuse reflection color information of each target and the target diffuse reflection map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the diffuse reflection effect presented by the target skin.
[0169] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor is configured to:
[0170] Obtaining target self-luminous color information corresponding to each color in the original skin image from the modified preset file;
[0171] According to the acquired self-luminous color information of each target and the target self-luminous map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the self-luminous effect presented by the target skin.
[0172] In an optional embodiment, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the processor is configured to:
[0173] Obtaining target glossiness information and / or target Fresnel reflection color information corresponding to each color in the original skin image from the modified preset file;
[0174] Based on the obtained target glossiness information and / or target Fresnel reflection color information, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the glossiness effect and / or Fresnel reflection effect presented by the target skin.
[0175] Through the above-mentioned computer-readable storage medium provided by the embodiment of the present application, according to the color type contained in the skin original painting of the virtual object, the skin parameter information corresponding to the image area where each color is located is obtained from the skin original painting, and the obtained skin parameter information corresponding to each color is partitioned and stored in a preset file; through the target terminal device corresponding to the target game user, the parameter editing interface of the preset file is displayed to the target game user, so as to receive the parameter editing instruction for the preset file through the parameter editing interface; in response to receiving the parameter editing instruction for the preset file sent by the target terminal device, the skin parameter information stored in the preset file is modified according to the parameter editing instruction, and the virtual object is rendered according to the modified preset file and multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object. In this way, the present application enables players to adjust the finished virtual object skin more flexibly, and is also conducive to saving game resources increased by adjusting the virtual object skin.
[0176] In an embodiment of the present application, the computer-readable storage medium can also execute other machine-readable instructions when run by the processor to execute the skin adjustment method of the virtual object as described in other embodiments. For the specific steps and principles of the skin adjustment method, please refer to the description of the method side embodiment, which will not be repeated here.
[0177] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. There may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interface, indirect coupling or communication connection of the system or unit, which may be electrical, mechanical or other forms.
[0178] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0179] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0180] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0181] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0182] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The scope of protection of the present application is not limited thereto. Although the present application has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present application, or make equivalent replacements for some of the technical features thereof. However, these modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for adjusting the skin of a virtual object, characterized in that: The skin adjustment method comprises: Obtaining skin parameter information corresponding to an image region containing each color in the skin original painting of the virtual object based on the color type contained in the skin original painting, and storing the obtained skin parameter information corresponding to each color in a partitioned manner in a preset file; wherein the skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information; Displaying a parameter editing interface of the preset file to the target game user through a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file through the parameter editing interface; In response to receiving a parameter editing instruction for the preset file sent by the target terminal device, modifying the skin parameter information stored in the preset file according to the parameter editing instruction, and rendering the virtual object according to the modified preset file and a plurality of target maps corresponding to the skin original painting to obtain a target skin for the virtual object; The step of rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object includes: Obtaining target glossiness information and / or target Fresnel reflection color information corresponding to each color in the original skin image from the modified preset file; Based on the obtained target glossiness information and / or target Fresnel reflection color information, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the glossiness effect and / or Fresnel reflection effect presented by the target skin.
2. The skin conditioning method according to claim 1, wherein: The target map includes: a color partition map for the original skin painting, and the color partition map is obtained by the following method: Divide the grayscale value range according to the color types contained in the original skin painting to obtain the grayscale representation value corresponding to each color; Each color contained in the original skin painting is replaced by the grayscale representation value corresponding to the color to obtain the color partition map for the original skin painting.
3. The skin conditioning method according to claim 1, wherein: The target map includes: a target diffuse reflection map for the original skin painting, and the target diffuse reflection map is obtained by the following method: Obtaining an original diffuse reflection map of the original skin painting; wherein the original diffuse reflection map is used to determine the diffuse reflection effect presented by the original skin painting; The contour details and light and dark effects of the virtual object in the original diffuse reflection map are retained, and the color information in the original diffuse reflection map is removed to obtain the target diffuse reflection map for the original skin painting.
4. The skin conditioning method according to claim 1, wherein: The target map includes: a target self-luminous map for the original skin painting, and the target self-luminous map is obtained by the following method: Obtaining an original self-luminous map of the skin original painting; wherein the original self-luminous map is used to determine the self-luminous effect presented by the skin original painting; The outline details and the self-luminous effect of the virtual object in the original self-luminous map are retained, and the color information in the original self-luminous map is removed to obtain the target self-luminous map for the original skin painting.
5. The skin conditioning method according to claim 2, wherein: The step of rendering the virtual object according to the modified preset file and the plurality of target maps corresponding to the skin original painting to obtain the target skin of the virtual object includes: According to the modified preset file and the color partition map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the skin effects presented by the different color areas in the target skin.
6. The skin conditioning method according to claim 3, characterized in that: The step of rendering the virtual object according to the modified preset file and the plurality of target maps corresponding to the skin original painting to obtain the target skin of the virtual object includes: Obtaining target diffuse reflection color information corresponding to each color in the original skin image from the modified preset file; According to the obtained diffuse reflection color information of each target and the target diffuse reflection map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the diffuse reflection effect presented by the target skin.
7. The skin conditioning method according to claim 4, characterized in that: The step of rendering the virtual object according to the modified preset file and the plurality of target maps corresponding to the skin original painting to obtain the target skin of the virtual object includes: Obtaining target self-luminous color information corresponding to each color in the original skin image from the modified preset file; According to the acquired self-luminous color information of each target and the target self-luminous map, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the self-luminous effect presented by the target skin.
8. A device for adjusting the skin of a virtual object, characterized in that: The skin adjustment device comprises: A first acquisition module is configured to acquire skin parameter information corresponding to an image region containing each color in an original skin image of a virtual object based on the color type contained in the original skin image, and to store the acquired skin parameter information corresponding to each color in a partitioned manner in a preset file; wherein the skin parameter information includes at least one of the following: diffuse reflection color information, glossiness information, Fresnel reflection color information, and self-luminous color information; a display module, configured to display a parameter editing interface of the preset file to a target game user via a target terminal device corresponding to the target game user, so that the target game user receives a parameter editing instruction for the preset file via the parameter editing interface; a rendering module, configured to, in response to receiving a parameter editing instruction for the preset file sent by the target terminal device, modify the skin parameter information stored in the preset file according to the parameter editing instruction, and render the virtual object according to the modified preset file and a plurality of target maps corresponding to the original skin painting to obtain a target skin for the virtual object; Wherein, when rendering the virtual object according to the modified preset file and the multiple target maps corresponding to the skin original painting to obtain the target skin of the virtual object, the rendering module is used to: Obtaining target glossiness information and / or target Fresnel reflection color information corresponding to each color in the original skin image from the modified preset file; Based on the obtained target glossiness information and / or target Fresnel reflection color information, the different color areas corresponding to the virtual object in the original skin painting are partitioned and rendered to determine the glossiness effect and / or Fresnel reflection effect presented by the target skin.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executed by the processor. When the electronic device is running, the processor and the memory communicate via the bus. When the machine-readable instructions are executed by the processor, the steps of the skin adjustment method for a virtual object as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the virtual object skin adjustment method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Virtual character skin adjustment method and device
CN111784814A
Information processing method in game and device thereof, equipment and storage medium
CN113476849A