A method, system and computer-readable storage medium for changing the costume of a virtual character
Through the Spine client, the virtual character's bones and split files are modified and combined, which solves the problem of cumbersome process of adding new costumes for virtual characters, and efficient skin updates and data management are achieved, avoiding the problem of excessive data volume.
Patent Information
- Application Number
- CN202110238330.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-04
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-03-04
AI Technical Summary
In multiplayer online tactical competitive games and role-playing games, the process of adding new outfits (skins) to virtual characters is too cumbersome, and the existing technology has not effectively solved this problem.
The Spine client generates the bone files and split files of the virtual character, and modify and combine them according to the designer's operation instructions to generate a new model, avoiding the process of re-exporting bone and animation information, and realizing skin updates of different shapes.
The virtual character skin update process is simplified, work efficiency is improved, and the data volume increases significantly as the number of costumes increases. It provides a standardized production process for easy management.
Smart Images

Figure CN113082695B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, system and computer-readable storage medium for changing the costume of a virtual character. Background Art
[0002] In multiplayer online battle arena (MOBA) and role-playing game (RPG), in order to improve the player's experience and meet commercial needs, a virtual character is usually provided with multiple costumes (also called skins), where the costumes may include the shape, composition colors, skill special effects, etc. of the virtual character.
[0003] In the related art, when adding new costumes to virtual characters, all files related to the costumes need to be exported through the skin function of the 2D animation resource Spine, and then the R&D personnel need to re-plan and configure the resources; in this process, the steps of resource management and configuration are too cumbersome. At the same time, as the number of new costumes added increases, the amount of data for the entire virtual character also increases.
[0004] Currently, no effective solution has been proposed for the problem that the process of adding new costumes (skins) to virtual characters is relatively complicated in the related art. Summary of the invention
[0005] The embodiments of the present application provide a method, system, computer device and computer-readable storage medium for changing the costumes of a virtual character, so as to at least solve the problem in the related art that the process of adding new costumes (skins) to a virtual character is relatively cumbersome.
[0006] In a first aspect, an embodiment of the present application provides a method for changing the costume of a virtual character, the method comprising:
[0007] The Spine client generates a first model of the virtual character according to a first operation instruction of the designer, wherein the first model includes a skeleton file and a plurality of first split files;
[0008] Saving the skeleton file and the first split file in the first model in a first folder;
[0009] Copy the first split file to the second folder, the Spine client obtains the first split file and modifies the first split file according to the second operation instruction to generate a second split file;
[0010] The skeleton file and the second split file are combined to generate a second model.
[0011] In some embodiments, the spine client obtains the first split file and modifies the first split file according to the second operation instruction to generate the second split file, including:
[0012] The spine client receives a second operation instruction from the designer, modifies the color and shape of the first split file according to the modification instruction in the second operation instruction, and generates the second split file;
[0013] The split file is deleted according to the deletion instruction in the second operation instruction to generate the second split file.
[0014] In some embodiments, modifying the shape of the first split file according to the second operation instruction includes:
[0015] The spine client modifies the shape of the first split file by configuring the ratio of the header file and the body file in the first split file through the ratio switching instruction in the second operation instruction.
[0016] In some embodiments, the spine client modifies the first split file according to the second operation instruction to generate the second split file, including:
[0017] After the spine client modifies the first split file according to the second operation instruction, the spine client obtains the size information of the first split file, exports the modified first split file according to the size information, and generates the second split file.
[0018] In some embodiments, saving the data of the second model in a second folder comprises:
[0019] The Spine client obtains the naming information of the first split file and the correspondence between the first split file and the second split file, and names the second split file according to the correspondence.
[0020] In some embodiments, combining the skeleton file and the second split file to generate the second model includes:
[0021] The Spine client obtains the export setting information of the first split file, and generates an initial second model after combining the skeleton file and the second split file;
[0022] The spine exports the initial second model according to the export setting information to generate the second folder;
[0023] The spine client receives a third operation instruction from the designer and changes the scale of the second model according to the third operation instruction.
[0024] In a second aspect, an embodiment of the present application provides a virtual character dressing system, the system comprising: a spine client and a storage end, wherein:
[0025] The Spine client is used to generate a first model of a virtual character according to a first operation instruction of a designer, wherein the first model includes a skeleton file and multiple first split files, the first split file is modified according to a second operation instruction to generate a second split file, and the skeleton file and the second split file are combined to generate a second model;
[0026] The storage end is used to save the skeleton file and the first split file in the first model in a first folder, and copy the first split file to a second folder.
[0027] In some embodiments, the Spine client is also used to receive a second operation instruction from the designer, modify the color and shape of the first split file according to the modification instruction in the second operation instruction, and delete the split file according to the deletion instruction in the second operation instruction.
[0028] 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 when the processor executes the computer program, a method for changing the clothes of a virtual character as described in the first aspect above is implemented.
[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for changing the costume of a virtual character as described in the first aspect above.
[0030] Compared with the related art, the Spine client provided in the embodiment of the present application generates a first model of a virtual character according to a first operation instruction of a designer, wherein the first model includes a skeleton file and multiple first split files; the skeleton file and the first split files in the first model are saved in a first folder; the first split file is copied to a second folder, and the Spine client modifies the first split file according to a second operation instruction to generate a second split file; the skeleton file and the second split file are combined to generate a second model. The problem of the related art that the process of adding new costumes (skins) to virtual characters is relatively cumbersome, and skins of different shapes can be realized without re-exporting skeleton and animation information. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0032] Figure 1 is a schematic diagram of an application environment of a method for changing the costume of a virtual character according to an embodiment of the present application;
[0033] Figure 2 is a flow chart of a method for changing the costume of a virtual character according to an embodiment of the present application;
[0034] Figure 3 is a schematic diagram of the main skin and the extended skin of an embodiment of the present application;
[0035] Figure 4 is a schematic diagram of changing the scale of a model according to an embodiment of the present application;
[0036] Figure 5 is a schematic diagram of changing the head-to-body ratio of the model according to this embodiment;
[0037] Figure 6 is a structural block diagram of a virtual character dressing system according to an embodiment of the present application;
[0038] Figure 7 It is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0040] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0041] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0042] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0043] The embodiment of the present application provides a method for changing the costume of a virtual character, which can be applied in Figure 1 In the application environment shown, Figure 1 is a schematic diagram of an application environment of a method for changing a virtual character's clothes according to an embodiment of the present application, such as Figure 1As shown, the terminal 10 communicates with the server 11 through the network, and the terminal 10 is installed with an application client for designing and rendering the costumes of the virtual characters. The user can issue operation instructions to the application through external devices such as the touch screen, physical buttons, keyboard and mouse on the terminal 10 to realize the functions of designing, modifying, updating and saving related data of the virtual character skin model. In addition, the relevant data of the virtual character skin modification and update generated on the terminal 10 can be uploaded to the server, and the terminal 10 can also receive the instruction information such as the addition and update of the virtual character skin issued by the server 11 to realize the management of the virtual character's dressing and skin resources. Furthermore, the terminal 10 can be a smart phone, a tablet computer, a desktop computer, a laptop computer and a smart wearable device; the server 11 can be an independent server or a cluster composed of multiple servers.
[0044] This application provides a method for changing the costume of a virtual character. Figure 2 is a flowchart of a method for changing the costume of a virtual character according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0045] Step S201, the Spine client generates a first model of the virtual character according to the first operation instruction of the designer, wherein the first model includes a skeleton file and multiple first split files; it should be noted that Spine is a 2D animation software specially designed for software and game development, and the first operation instruction is a design instruction generated by the game designer through a computer processor in combination with project requirements and technical experience. In addition, the virtual character can be an entity operated by a player in a game system, or an NPC game entity controlled by a computer program. Furthermore, in this embodiment, the first model is the most basic model, and the subsequent dressing process is based on the first model. When designing the first model, the designer designs the first model to be the most complex state, including the head, hem and decorative light parts, for the convenience of subsequent deletion and modification, and reserves sufficient expansion space for the subsequent generation of expanded skins. It should be noted that in the spine animation software, the animation model is usually composed of bones and textures, wherein the split file is generated by splitting the textures in the base model. Optionally, the split file can be a head decoration texture, a hairstyle texture, a clothing texture, a crown texture, etc. In this embodiment, the first split file contains all the textures of the virtual object;
[0046] Step S202, save the skeleton file and the first split file in the first model in the first folder; it should be noted that, in the process of saving, the skeleton file and all the first split files are set with independent and different file names, so as to facilitate the subsequent creation of the extended skin and maintain the consistency of the split files; in addition, in order to facilitate the distinction between the main skin and the extended skin, the first folder adopts an independent naming method that easily highlights the main and secondary relationship, for example: the first folder is named: images-Hengshan Nun, and optionally, the second file is named: images-Hengshan Nun_Bai Xiaoqing;
[0047] Step S203, copy the first split file to the second folder, and the Spine client modifies the first split file according to the second operation instruction to generate a second split file; wherein the second operation instruction is an instruction for the designer to modify the first split file, such as an instruction to modify the color of the split file or an instruction to scale the texture. Wherein, when modifying the color of the split file, there can be any pixel changes in the split file. It can be understood that after the pixel changes of multiple split files, the shape of the extended skin generated by the rendering will change significantly; in this embodiment, in the process of copying the first split file from the first folder to the second folder, the naming information and size information of the first split file cannot be changed, and it is necessary to keep consistent with the naming and size of the first split file of the main skin, so as to ensure that the subsequently generated second model will not be distorted;
[0048] Step S204, the Spine client generates a second model based on the skeleton file and the second split file. Optionally, the second model can be exported to local storage according to preset export setting information.
[0049] Through the above steps S201 to S204, compared with the related art method of exporting all files related to the costume, and then the R&D personnel re-plan and configure resources to update the virtual character skin, this embodiment designs a basic model containing all background maps in the design stage, and then splits all background maps into several sub-files. When updating the skin, it is only necessary to obtain the sub-files, delete and modify or add the sub-files, and then combine them with the skeleton diagram of the basic model to generate a new skin costume. At the same time, in the process of changing the costume of the virtual character, a set of standardized production processes is provided to facilitate subsequent management. This solves the problem in the related art that when updating the skin, all data related to the original skin needs to be exported, resulting in a large workload in the skin updating process, and improves the work efficiency.
[0050] In some of these embodiments, Figure 3 is a schematic diagram of a main skin 301 and an extended skin 302 according to an embodiment of the present application. Figure 3As shown, the main skin 301 includes the most complex state of the virtual character, and the extended skin 302 generated based on the main skin 301 is generated by changing the split map, deleting the split map, etc. on the basis of the main skin 301. Through the method provided by this embodiment, in the case of version update, it is not necessary to update the entire set of files of the virtual character, only the new map, that is, the split file and the configuration file need to be updated. At the same time, because there is no need to update the entire set of files, only new split files need to be added, the data volume of the character's skin file will not increase significantly with the increase in the number of skins.
[0051] In some embodiments, the spine client obtains the first split file and modifies the first split file according to the second operation instruction to generate the second split file, including that the spine client receives the second operation instruction of the designer, modifies the color and shape of the first split file according to the modification instruction in the second operation instruction, and generates the second split file; in addition, the split file can be deleted according to the deletion instruction in the second operation instruction to generate the second split file. Furthermore, the spine client can also modify the shape of the first split file according to the scaling instruction in the second operation instruction, and configure the ratio of the header file and the body file in the first split file and the overall ratio according to the scaling instruction. It should be noted that the second operation instruction is an operation instruction for the designer to perform operations on the split file through a computer external device and in the spine client environment. After modifying or deleting the first split file, the spine client obtains the size information of the first split file, and generates the second split file after exporting the first split file according to the size information. In the above manner, the model size and texture size of the main skin 301 and the extended skin 302 can be kept consistent.
[0052] In some of these embodiments, Figure 4 is a schematic diagram of changing the model proportion according to an embodiment of the present application, such as Figure 4 As shown, 401 is the basic model, i.e., the main skin 301; 402 is the extended skin 302 generated after changing the split image; 403 is one of the extended skins 302 generated by changing the model proportion, wherein the model proportion change includes changing the proportion of the head area and the body area texture in the model; 404 is another extended skin 302 generated by changing the model proportion and the split image. It can be understood that by changing the split files and changing the proportion of the head texture and the body texture or the overall proportion of the model, extended skins 302 of different body shapes and styles can be realized. Optionally, based on the above basic model, extended skins 302 for some larger body shape differences can also be realized. Figure 5 is a schematic diagram of changing the head-to-body ratio of the model according to this embodiment. Figure 5As shown, different body shapes of virtual characters are realized by changing the ratio of the head area map and the overall model of the model. For example, when the virtual character's extended skin 302 is shorter, the ratio of the head area split file to the overall model is increased; when the virtual character's extended skin 302 is taller, the ratio of the head area split file to the overall model is reduced. By using the above-mentioned scaling method, the proportion of the virtual character in the game environment is coordinated.
[0053] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0054] This embodiment also provides a virtual character dressing system, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the terms "module", "unit", "subunit", etc. can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0055] Figure 6 is a structural block diagram of a virtual character dressing system according to an embodiment of the present application, such as Figure 6 As shown, the system includes a spine client 61 and a storage terminal 62, wherein:
[0056] The Spine client 61 is used to generate a first model of the virtual character according to a first operation instruction of a designer, wherein the first model includes a skeleton file and a plurality of first sub-files, obtain the first sub-file, modify the first sub-file according to a second operation instruction to generate a second sub-file, and combine the skeleton file and the second sub-file to generate a second model;
[0057] The storage end 62 is used to save the skeleton file and the first split file in the first model in the first folder, and copy the first split file to the second folder.
[0058] In some of the embodiments, the Spine client 61 is also used to receive a second operation instruction from the designer, modify the color and shape of the first split file according to the modification instruction in the second operation instruction, and delete the split file according to the deletion instruction in the second operation instruction.
[0059] In one embodiment, a computer device is provided, which may be a terminal. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for changing the costume of a virtual character is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, trackball, or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0060] In one embodiment, Figure 7 is a schematic diagram of the internal structure of an electronic device according to an embodiment of the present application, such as Figure 7 As shown, an electronic device is provided, which may be a server, and its internal structure diagram may be as shown in Figure 7 As shown. The electronic device includes a processor, a memory and a network interface connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for changing the costume of a virtual character is implemented.
[0061] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0062] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0063] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0064] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for changing the costume of a virtual character, characterized in that: The method comprises: The Spine client generates a first model of the virtual character according to a first operation instruction of the designer, wherein the first model includes a skeleton file and a plurality of first split files; Saving the skeleton file and the first split file in the first model in a first folder specifically includes: obtaining, by the Spine client, naming information of the first split file and a correspondence between the first split file and the second split file, and naming the second split file according to the correspondence, wherein, during the saving process, independent and different file names are set for the skeleton file and all the first split files; Copying the first split file to a second folder, the Spine client obtaining the first split file and modifying the first split file according to a second operation instruction to generate a second split file, specifically including: the Spine client receiving the second operation instruction of the designer, modifying the color and shape of the first split file according to the modification instruction in the second operation instruction, after the Spine client modifies the first split file according to the second operation instruction, the Spine client obtains size information of the first split file, exports the modified first split file according to the size information, and generates the second split file; Deleting the split file according to the deletion instruction in the second operation instruction to generate the second split file, wherein the second operation instruction is an operation instruction for the designer to perform an operation on the split file in the Spine client environment through an external device connected to the computer; The skeleton file and the second split file are combined to generate a second model.
2. The method according to claim 1, characterized in that Modifying the shape of the first split file to generate the second split file according to the second operation instruction includes: The Spine client modifies the shape of the first split file by configuring the ratio of the header file and the body file in the first split file and the overall ratio according to the scaling instruction in the second operation instruction.
3. The method according to claim 1, characterized in that Combining the skeleton file and the second split file to generate the second model includes: Combining the skeleton file and the second split file to generate an initial second model; The Spine client obtains export setting information of the first split file, and the Spine exports the initial second model according to the export setting information to generate the second folder; The Spine client receives a third operation instruction from the designer and changes the scale of the second model according to the third operation instruction.
4. A virtual character dressing system, characterized in that: The system includes: a Spine client and a storage terminal, wherein: The Spine client is used to generate a first model of a virtual character according to a first operation instruction of a designer, wherein the first model includes a skeleton file and multiple first split files, and the first split file is obtained and modified according to a second operation instruction to generate a second split file, specifically including: the Spine client receives the second operation instruction of the designer, modifies the color and shape of the first split file according to the modification instruction in the second operation instruction, after the Spine client modifies the first split file according to the second operation instruction, the Spine client obtains the size information of the first split file, exports the modified first split file according to the size information, and generates the second split file; Deleting the split file according to the deletion instruction in the second operation instruction to generate the second split file, wherein the second operation instruction is an operation instruction for the designer to perform an operation on the split file in the Spine client environment through an external device connected to a computer; and combining the skeleton file and the second split file to generate a second model; The storage end is used to save the skeleton file and the first split file in the first model in a first folder, and copy the first split file to a second folder, specifically including: the Spine client obtains the naming information of the first split file and the correspondence between the first split file and the second split file, and names the second split file according to the correspondence. During the saving process, independent and different file names are set for the skeleton file and all the first split files.
5. The system according to claim 4, characterized in that The Spine client is also used to receive the second operation instruction from the designer, modify the color and shape of the first split file according to the modification instruction in the second operation instruction, and delete the split file according to the deletion instruction in the second operation instruction.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for changing the costume of a virtual character according to any one of claims 1 to 3 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for changing the costume of a virtual character according to any one of claims 1 to 3 is implemented.
