WO2018177208A1 - 换装方法、装置、计算机可读介质和电子设备 - Google Patents

换装方法、装置、计算机可读介质和电子设备 Download PDF

Info

Publication number
WO2018177208A1
WO2018177208A1 PCT/CN2018/080213 CN2018080213W WO2018177208A1 WO 2018177208 A1 WO2018177208 A1 WO 2018177208A1 CN 2018080213 W CN2018080213 W CN 2018080213W WO 2018177208 A1 WO2018177208 A1 WO 2018177208A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
target component
object data
data
replaced
Prior art date
Application number
PCT/CN2018/080213
Other languages
English (en)
French (fr)
Inventor
蒋浩
林声炜
许弈
郭启发
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018177208A1 publication Critical patent/WO2018177208A1/zh
Priority to US16/438,676 priority Critical patent/US10722796B2/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/358Adapting the game course according to the network or server load, e.g. for reducing latency due to different connection speeds between clients
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/5546Details of game data or player data management using player registration data, e.g. identification, account, preferences, game history
    • A63F2300/5553Details of game data or player data management using player registration data, e.g. identification, account, preferences, game history user representation in the game field, e.g. avatar
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/16Cloth

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method, apparatus, computer readable medium, and electronic device.
  • the character model In the game scene, in order to provide a rich role, the character model often needs to have a dressing system, which can replace the dress of the character model.
  • the above-mentioned partial dressing mode has a limited number of sets of roles, and when the user obtains a partial new dress of the character model from the network, it is necessary to download a full set of model files (including the picture png, atlas, json file, generally 100M or more). ), the data traffic is too large, and the cost of reloading is large, so that the role model cannot flexibly implement partial reloading.
  • the embodiments of the present application aim to solve the above technical problems at least to some extent.
  • the embodiment of the present application proposes a reloading method, which can directly update the reloading data of the target component, and can obtain a partial quick reloading of the target component without acquiring the entire model skin resource. It facilitates the user's reloading of various parts of the model, improves the flexibility of the model dressing, saves the resource consumption of the user through the network, and facilitates the user to flexibly change through the network.
  • the embodiment of the first aspect of the present application provides a method for reinstalling, comprising the steps of: acquiring a model to be replaced, wherein the model to be replaced includes a plurality of components; and acquiring an atlas object corresponding to the model to be replaced Data, wherein the atlas object data includes a plurality of image data respectively corresponding to the plurality of components; acquiring reload data corresponding to the target component; and the atlas object data according to the reload data corresponding to the target component
  • the image data corresponding to the target component is updated to generate updated atlas object data; and the to-be-replaced model is rendered according to the updated atlas object data to update the dressing of the model to be replaced.
  • the reloading data corresponding to the target component in the character is directly copied to the memory space corresponding to the target component, and the dressing of the target component can be directly updated.
  • the flexibility of the role dressing saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • the embodiment of the second aspect of the present application provides a method for reinstalling, comprising the steps of: acquiring a model to be replaced, wherein the model to be replaced includes a plurality of components; and acquiring an atlas object corresponding to the model to be replaced Data, wherein the atlas object data includes a plurality of image data respectively corresponding to the plurality of components; acquiring reload data corresponding to the target component; and creating the reload data according to the atlas object data and the target component
  • the new atlas object data of the model to be replaced rendering the model to be replaced according to the new atlas object data to update the dressing of the model to be replaced.
  • the new atlas object data is created by the reload data and the atlas object data corresponding to the target component in the role (ie, the model to be replaced), and the reloading is performed according to the new atlas object data.
  • the model is rendered to update the dressing of the model to be replaced.
  • the embodiment of the third aspect of the present application provides a reloading device, comprising: a first acquiring module, configured to acquire a model to be replaced, wherein the model to be replaced includes a plurality of components; and the second acquiring module is configured to: Acquiring the atlas object data corresponding to the to-be-replaced model, wherein the atlas object data includes a plurality of image data corresponding to the plurality of components respectively; and the third acquiring module is configured to acquire the reloading corresponding to the target component a first update module, configured to update image data corresponding to the target component in the atlas object data according to the reload data corresponding to the target component to generate updated atlas object data; and second And an updating module, configured to render the to-be-replaced model according to the updated atlas object data to update the dressing of the model to be replaced.
  • the reloading data corresponding to the target component in the character is directly copied to the memory space corresponding to the target component, and the dressing of the target component can be directly updated.
  • the flexibility of the role dressing saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • the fourth aspect of the present application provides a reloading apparatus, comprising: a fifth obtaining module, configured to acquire a model to be replaced, wherein the model to be replaced includes a plurality of components; and the sixth acquiring module is configured to: Acquiring the atlas object data corresponding to the to-be-replaced model, wherein the atlas object data includes a plurality of image data corresponding to the plurality of components respectively; and the seventh obtaining module is configured to acquire the corresponding reloading of the target component a data creation module, configured to create new atlas object data of the model to be replaced according to the atlas object data and the reload data of the target component; and a third update module, configured to use the new atlas
  • the object data renders the model to be replaced to update the dressing of the model to be replaced.
  • new atlas object data is created by the reload data and the atlas object data corresponding to the target component in the character (ie, the model to be replaced), and the reloading is performed according to the new atlas object data.
  • the model is rendered to update the dressing of the model to be replaced.
  • the embodiment of the fifth aspect of the present application provides a reloading apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: acquire a model to be replaced, wherein The reloading model includes a plurality of components; and the atlas object data corresponding to the to-be-replaced model is acquired, wherein the atlas object data includes a plurality of image data corresponding to the plurality of components respectively; Loading data; updating image data corresponding to the target component in the atlas object data according to the reload data corresponding to the target component to generate updated atlas object data; and according to the updated atlas
  • the object data renders the model to be replaced to update the dressing of the model to be replaced.
  • the sixth aspect of the present application provides a reconfigurable apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: acquire a model to be replaced, wherein The reloading model includes a plurality of components; and the atlas object data corresponding to the to-be-replaced model is acquired, wherein the atlas object data includes a plurality of image data corresponding to the plurality of components respectively; Loading data; creating new atlas object data of the model to be replaced according to the atlas object data and the reload data of the target component; and the model to be replaced according to the new atlas object data Rendering to update the dress of the model to be replaced.
  • a seventh aspect of the present application provides a non-volatile computer storage medium storing one or more programs, when the one or more programs are executed by one device, causing the device The dressing method of the embodiment of the first aspect of the application is performed.
  • An embodiment of the eighth aspect of the present application provides a non-volatile computer storage medium storing one or more programs, when the one or more programs are executed by one device, causing the device The dressing method of the embodiment of the second aspect of the present application is performed.
  • the ninth aspect of the present application provides a computer program product, when the instruction processor in the computer program product executes, performing a reloading method, the method comprising: acquiring a model to be replaced, wherein The reloading model includes a plurality of components; and the atlas object data corresponding to the to-be-replaced model is acquired, wherein the atlas object data includes a plurality of image data corresponding to the plurality of components respectively; Loading data; updating image data corresponding to the target component in the atlas object data according to the reload data corresponding to the target component to generate updated atlas object data; and according to the updated atlas
  • the object data renders the model to be replaced to update the dressing of the model to be replaced.
  • the tenth aspect of the present application provides a computer program product, when the instruction processor in the computer program product executes, performing a reloading method, the method comprising: acquiring a model to be replaced, wherein The reloading model includes a plurality of components; and the atlas object data corresponding to the to-be-replaced model is acquired, wherein the atlas object data includes a plurality of image data corresponding to the plurality of components respectively; Loading data; creating new atlas object data of the model to be replaced according to the atlas object data and the reload data of the target component; and the model to be replaced according to the new atlas object data Rendering to update the dress of the model to be replaced.
  • An eleventh embodiment of the present application provides an electronic device, including: one or more processors; and a storage device, configured to store one or more programs, when the one or more programs are the one or more programs When executed by the processor, the one or more processors are caused to implement the dressing method as described in the first aspect of the present application.
  • An embodiment of the twelfth aspect of the present application provides an electronic device, including: one or more processors; and storage means for storing one or more programs when the one or more programs are When executed by the processor, the one or more processors are caused to implement the dressing method as described in the second aspect of the present application.
  • FIG. 1 is a flow chart of a dressing method according to an embodiment of the present application.
  • 2A is a diagram showing an example of atlas object data corresponding to a model to be replaced before reloading
  • 2B is a diagram showing an example of the reload data corresponding to the target component D;
  • 2C is a diagram showing an example of updated atlas object data
  • FIG. 3 is a flow chart of a dressing method according to another embodiment of the present application.
  • 4A is an exemplary diagram of an interface including a model to be replaced
  • 4B is an exemplary diagram of an interface including a remodeled model
  • FIG. 5 is a flow chart of a dressing method according to still another embodiment of the present application.
  • FIG. 6 is a schematic diagram of an interaction process of a reloading method according to an embodiment of the present application.
  • FIG. 7 is a flow chart of a dressing method according to another embodiment of the present application.
  • FIG. 8 is a flow chart of a dressing method according to still another embodiment of the present application.
  • FIG. 9 is a schematic diagram of an interaction process of a reloading method according to another embodiment of the present application.
  • FIG. 10 is a schematic structural view of a reloading device according to an embodiment of the present application.
  • FIG. 11 is a schematic structural view of a reloading device according to another embodiment of the present application.
  • FIG. 12 is a schematic structural view of a reloading device according to still another embodiment of the present application.
  • FIG. 13 is a schematic structural view of a reloading device according to still another embodiment of the present application.
  • FIG. 14 is a schematic structural view of a reloading device according to another embodiment of the present application.
  • FIG. 15 is a block diagram of a dressing device 1500, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a reloading method according to an embodiment of the present application. The embodiment is illustrated by using the reloading method in a terminal device, where the terminal device may be, for example, a personal computer, a mobile phone, a tablet computer, or the like. Hardware devices for various operating systems.
  • the dressing method of this embodiment includes the following steps.
  • Step 101 Acquire a model to be replaced.
  • the model to be replaced includes a plurality of components.
  • each component in the model to be replaced is replaceable, and the component is the minimum granularity of the reloading.
  • the model to be replaced may be a character model, such as a character model generated by a Spine skeleton model, which may include a head, a body, an arm, a leg, and the like.
  • the skeleton model generates a character model based on the relationship between each bone of the character model and the bones in the character model.
  • Step 102 Obtain atlas object data corresponding to the model to be replaced.
  • the atlas object data corresponding to the model to be replaced may be acquired according to the correspondence between the identification information of the model to be replaced and the identifier of the pre-stored model and the atlas object data.
  • the atlas object data includes a plurality of image data corresponding to the plurality of components in the model to be replaced, and the atlas object data is a set of all image data of each component of the model to be replaced.
  • the image data is image data required for the dressing or equipment displayed by the components of the model in the scene.
  • the atlas object data includes a hat image of a character, a clothes image, a glove image, a pants image, and the like.
  • the atlas object data holds the data so that when the character is rendered, the data can be loaded for rendering to generate the corresponding dress for the character.
  • Step 103 Acquire reload data corresponding to the target component.
  • the reload data corresponding to the target component can be obtained in various manners, as illustrated in the following examples:
  • the reload data of the target component is obtained in the local resource database.
  • the user has a reloading requirement for the reloading model
  • the terminal device receives the reloading instruction of the user, wherein the reloading instruction includes an identifier of the model to be replaced and an identifier of the target component.
  • the terminal device queries the local resource database according to the identifier of the model to be replaced and the identifier of the target component, and acquires the reload data of the target component.
  • the reload data of the target component is obtained in the server.
  • the user has a reloading requirement for the reloading model
  • the terminal device receives the reloading instruction of the user, wherein the reloading instruction includes an identifier of the model to be replaced and an identifier of the target component.
  • the terminal device sends a resource acquisition request including the identifier of the model to be replaced and the identifier of the target component to the server, so that the server obtains the data of the component component according to the identifier of the model to be replaced and the identifier of the target component, and The terminal device returns the reload data of the target component.
  • the terminal device receives the reload data of the target component sent by the server.
  • the user has a reloading requirement for the reloading model
  • the terminal device receives the reloading instruction of the user, wherein the reloading instruction includes an identifier of the model to be replaced and an identifier of the target component.
  • the terminal device When the terminal device does not find the reload data corresponding to the target component in the local resource database according to the identifier of the model to be reinstalled and the identifier of the target component, the terminal device sends the identifier including the model to be reinstalled and the identifier of the target component to the server.
  • the resource acquisition request is such that the server acquires the reload data of the target component according to the identifier of the model to be replaced and the identifier of the target component, and returns the reload data of the target component to the terminal device.
  • the terminal device receives the reload data of the target component sent by the server.
  • Step 104 Update image data corresponding to the target component in the atlas object data according to the reload data corresponding to the target component to generate updated atlas object data.
  • the model to be replaced includes component A to component H, and the target component is component D.
  • the atlas object data corresponding to the model to be replaced is displayed, as shown in FIG. 2A.
  • Image data corresponding to each component in the atlas object data is shown in FIG. 2A.
  • the reload data corresponding to the target component D is as shown in FIG. 2B
  • the updated image obtained is obtained.
  • An example diagram of set object data is shown in Figure 2C.
  • Step 105 Perform a rendering of the reloading model according to the updated atlas object data to update the dressing of the model to be replaced.
  • the image data of each component is read from the updated atlas object data to be rendered to replace the dressing to be replaced.
  • the reloading data corresponding to the target component in the character is directly copied to the memory space corresponding to the target component, and the dressing of the target component can be directly updated.
  • the flexibility of the role dressing saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • FIG. 3 is a flow chart of a reloading method according to another embodiment of the present application. The embodiment is illustrated by using the reloading method in a terminal device.
  • the dressing method of this embodiment includes the following steps.
  • Step 301 Acquire a model to be replaced.
  • the model to be replaced includes a plurality of components.
  • each component in the model to be replaced is replaceable, and the component is the minimum granularity of the reloading.
  • the model to be replaced may be a character model, such as a character model generated by a Spine skeleton model, which may include a head, a body, an arm, a leg, and the like.
  • the skeleton model generates a character model based on the relationship between each bone of the character model and the bones in the character model.
  • Step 302 Acquire the atlas object data corresponding to the model to be replaced.
  • the atlas object data corresponding to the model to be replaced may be acquired according to the correspondence between the identification information of the model to be replaced and the identifier of the pre-stored model and the atlas object data.
  • the atlas object data includes a plurality of image data corresponding to the plurality of components in the model to be replaced, and the atlas object data is a set of all image data of each component of the model to be replaced.
  • the image data is image data required for the dressing or equipment displayed by the components of the model in the scene.
  • the atlas object data includes a hat image of a character, a clothes image, a glove image, a pants image, and the like.
  • the atlas object data holds the data so that when the character is rendered, the data can be loaded for rendering to generate the corresponding dress for the character.
  • Step 303 Acquire reload data corresponding to the target component.
  • Step 304 Acquire a memory address of image data corresponding to the target component in the atlas object data.
  • the memory address of the image data corresponding to the target component in the atlas object data may be acquired.
  • the memory address corresponding to the atlas object data may be acquired first, and then, according to the memory address corresponding to the atlas object data and the pixel coordinates and the pixel offset of the image data corresponding to the target component in the atlas object data, the mapping is determined. Sets the memory address of the image data corresponding to the target component in the object data.
  • a schematic diagram of the atlas object data corresponding to the model to be replaced is assumed, as shown in FIG. 2A, assuming that the target component is the component D, the pixel offset is zero.
  • the corresponding memory address and the pixel D0 are calculated in the pixel coordinates in the atlas object to determine the memory address corresponding to the target component in the atlas object data, wherein It is understood that the corresponding memory address at the pixel D0 is the memory address of the image data corresponding to the component D.
  • Step 305 Copy the replacement data corresponding to the target component to the memory address to cover the original image data corresponding to the target component in the atlas object data, to generate the updated atlas object data.
  • the data of the target component can be copied to the original image data corresponding to the target component in the atlas object data by using the memory copy function memcopy.
  • the position, that is, the original image data corresponding to the target component in the atlas object data is covered by the reload data corresponding to the target component, and the image data of the target component in the atlas object data is updated.
  • the source address of the memory copy function memcopy points to the start position of the memory address of the target data of the target component, and the destination address points to the start position of the memory address of the original image data corresponding to the target component in the atlas object data.
  • Step 306 Perform a rendering of the reloading model according to the updated atlas object data to update the dressing of the model to be replaced.
  • the image data of each component is read from the updated atlas object data to be rendered to replace the dressing to be replaced.
  • FIG. 4A assume an example diagram of an interface including a model to be replaced, as shown in FIG. 4A.
  • the user can call up the dress selection interface by clicking the dressing control in the interface.
  • the image data of the corresponding target component in the atlas object data of the model to be replaced can be generated by the image data of Fugui Caishen to generate the updated atlas object data, and
  • the updated atlas object data is rendered after the rendering model is rendered, and the updated model obtained is as shown in FIG. 4B.
  • the reloading data corresponding to the target component in the character is directly copied to the memory space corresponding to the target component, and the dressing of the target component can be directly updated.
  • the flexibility of the role dressing saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • FIG. 5 is a flowchart of a reloading method according to still another embodiment of the present application. The embodiment is illustrated by using the reloading method in a terminal device. As shown in FIG. 5, the dressing method of this embodiment includes the following steps.
  • Step 501 Acquire a model to be replaced.
  • the model to be replaced includes a plurality of components.
  • each component in the model to be replaced is replaceable, and the component is the minimum granularity of the reloading.
  • the model to be replaced may be a character model, such as a character model generated by a Spine skeleton model, which may include a head, a body, an arm, a leg, and the like.
  • the skeleton model generates a character model based on the relationship between each bone of the character model and the bones in the character model.
  • Step 502 Obtain atlas object data corresponding to the model to be replaced.
  • the atlas object data corresponding to the model to be replaced may be acquired according to the correspondence between the identification information of the model to be replaced and the identifier of the pre-stored model and the atlas object data.
  • the atlas object data includes a plurality of image data corresponding to the plurality of components in the model to be replaced, and the atlas object data is a set of all image data of each component of the model to be replaced.
  • the image data is image data required for the dressing or equipment displayed by the components of the model in the scene.
  • the atlas object data includes a hat image of a character, a clothes image, a glove image, a pants image, and the like.
  • the atlas object data holds the data so that when the character is rendered, the data can be loaded for rendering to generate the corresponding dress for the character.
  • Step 503 Acquire reload data corresponding to the target component.
  • Step 504 Acquire a memory address of image data corresponding to the target component in the atlas object data.
  • Step 505 Acquire an area parameter corresponding to the target component.
  • the area parameter of the target component may be obtained from the correspondence between the identifier of the component that is saved in advance and the region parameter according to the identifier information corresponding to the target component.
  • the region parameter may include one or more of pixel coordinates, pixel offset, rotation amount, length, and width of the image data corresponding to the target component in the atlas object data.
  • Step 506 Adjust the reload data according to the regional parameter corresponding to the target component.
  • the angular rotation or the size scaling operation may be performed on the reload data according to the regional parameter corresponding to the target component.
  • the amount of rotation in the region parameter corresponding to the target component can determine whether the amount of rotation is not zero. If it is determined that the amount of rotation is not zero, the corresponding data is rotated according to the amount of rotation.
  • the reloading data of the target component may be scaled according to the length and width in the regional parameter.
  • Step 507 Copy the adapted data of the target component to the memory address to cover the original image data corresponding to the target component, to generate updated atlas object data.
  • Step 508 Perform a rendering of the reloading model according to the updated atlas object data to update the dressing of the model to be replaced.
  • the image data of each component is read from the updated atlas object data to be rendered to replace the dressing to be replaced.
  • the reloading data corresponding to the target component is adjusted according to the region parameter corresponding to the target component in the role (ie, the reloading model), and the remodeling data of the target component is copied to the target.
  • the memory space corresponding to the component can directly update the dressing of the target component, and the dressing can be the skin or clothes of the character. Therefore, the embodiment of the present application can directly update the replacement data of the target component, and can obtain a partial quick change of the character without acquiring the entire model skin resource, thereby facilitating the user to replace and replace the various components of the character.
  • the flexibility of the role dressing saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • FIG. 6 is a schematic diagram of an interaction process of a reloading method according to an embodiment of the present application.
  • the embodiment is described by taking a reloading data of a target component from a network side server by a terminal device as an example, and waiting in the interaction interface of the terminal device.
  • the process of reloading the model is: the processor in the terminal device determines the identification information of the target component according to the user's reloading operation, and then the processor acquires the reloading data corresponding to the target component from the network side server according to the identification information of the target component.
  • the processor acquires the atlas object data of the model to be reloaded from the memory according to the identification information of the model to be replaced, and then the processor controls to replace the target component in the atlas object data in the memory by the reload data of the target component.
  • the original image data finally, when the processor renders the model to be replaced, the image data of each component is read from the updated atlas object data to be rendered by the reloading model to update the dressing to be replaced.
  • the reloading data corresponding to the target component in the character is directly copied to the memory space corresponding to the target component, and the dressing of the target component can be directly updated.
  • the flexibility of the role dressing saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • FIG. 7 is a flowchart of a reloading method according to another embodiment of the present application. The embodiment is illustrated by using the reloading method in a terminal device. As shown in FIG. 7, the reloading method of this embodiment includes the following steps.
  • Step 701 Acquire a model to be replaced.
  • the model to be replaced includes a plurality of components.
  • each component in the model to be replaced is replaceable, and the component is the minimum granularity of the reloading.
  • the model to be replaced may be a character model, such as a character model generated by a Spine skeleton model, which may include a head, a body, an arm, a leg, and the like.
  • the skeleton model generates a character model based on the relationship between each bone of the character model and the bones in the character model.
  • Step 702 Obtain atlas object data corresponding to the model to be replaced.
  • the atlas object data corresponding to the model to be replaced may be acquired according to the correspondence between the identification information of the model to be replaced and the identifier of the pre-stored model and the atlas object data.
  • the atlas object data includes a plurality of image data corresponding to the plurality of components in the model to be replaced, and the atlas object data is a set of all image data of each component of the model to be replaced.
  • the image data is image data required for the dressing or equipment displayed by the components of the model in the scene.
  • the atlas object data includes a hat image of a character, a clothes image, a glove image, a pants image, and the like.
  • the atlas object data holds the data so that when the character is rendered, the data can be loaded for rendering to generate the corresponding dress for the character.
  • Step 703 Acquire reload data corresponding to the target component.
  • the reload data corresponding to the target component can be obtained in various manners, as illustrated in the following examples:
  • the reload data of the target component is obtained in the local resource database.
  • the user has a reloading requirement for the reloading model
  • the terminal device receives the reloading instruction of the user, wherein the reloading instruction includes an identifier of the model to be replaced and an identifier of the target component.
  • the terminal device queries the local resource database according to the identifier of the model to be replaced and the identifier of the target component, and acquires the reload data of the target component.
  • the reload data of the target component is obtained in the server.
  • the user has a reloading requirement for the reloading model
  • the terminal device receives the reloading instruction of the user, wherein the reloading instruction includes an identifier of the model to be replaced and an identifier of the target component.
  • the terminal device sends a resource acquisition request including the identifier of the model to be replaced and the identifier of the target component to the server, so that the server obtains the data of the component component according to the identifier of the model to be replaced and the identifier of the target component, and The terminal device returns the reload data of the target component.
  • the terminal device receives the reload data of the target component sent by the server.
  • the user has a reloading requirement for the reloading model
  • the terminal device receives the user's reloading instruction, wherein the reloading instruction includes an identifier of the model to be reinstalled and an identification of the target component.
  • the terminal device When the terminal device does not find the reload data corresponding to the target component in the local resource database according to the identifier of the model to be reinstalled and the identifier of the target component, the terminal device sends the identifier including the model to be reinstalled and the identifier of the target component to the server.
  • the resource acquisition request is such that the server acquires the reload data of the target component according to the identifier of the model to be replaced and the identifier of the target component, and returns the reload data of the target component to the terminal device.
  • the terminal device receives the reload data of the target component sent by the server.
  • Step 704 Create new atlas object data of the model to be replaced according to the atlas object data and the reload data of the target component.
  • image data of other components of the atlas object data other than the image data corresponding to the target component may be acquired, and regional parameters corresponding to the respective components are acquired, and then, according to the replacement data of the target component New atlas object data is created by the regional parameters of each component and the image data of other components.
  • the area parameter may include one or more of pixel coordinates, pixel offset, rotation amount, length, and width of the image data corresponding to the corresponding component in the atlas object data.
  • the new atlas object data includes a plurality of image data corresponding to the plurality of components in the model to be replaced, and the atlas object data is a set of all the image data of each component of the model to be replaced.
  • the model to be replaced points to the new atlas object data.
  • the model to be replaced includes component A to component H, and the atlas object data corresponding to the model to be replaced, as shown in FIG. 2A, assuming the replacement data corresponding to the target component D, as shown in FIG. 2B.
  • the image data of the atlas object data other than the image data corresponding to the target component may be acquired, and then the new atlas object data of the model to be replaced is created according to the other image data and the reload data of the target component, wherein The new atlas object data created is in the same form as the updated new atlas object, as shown in Figure 2C.
  • Step 705 Perform a rendering of the reloading model according to the new atlas object data to update the dressing of the model to be replaced.
  • the image data corresponding to each component of the model to be replaced is read from the new atlas object data corresponding to the model to be replaced, and the model after the reloading is obtained.
  • the new atlas object data is created by the reload data and the atlas object data corresponding to the target component in the role (ie, the model to be replaced), and the reloading is performed according to the new atlas object data.
  • the model is rendered to update the dressing of the model to be replaced, and the dressing can be the skin or clothes of the character, thereby achieving a local quick change of the target component without obtaining a complete set of model skin resources, which facilitates the user's model.
  • the replacement of each component improves the flexibility of the model dressing, and saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • FIG. 8 is a flowchart of a reloading method according to still another embodiment of the present application. The embodiment is illustrated by using the reloading method in a terminal device. As shown in FIG. 8, the dressing method of this embodiment includes the following steps.
  • Step 801 Acquire a model to be replaced.
  • Step 802 Acquire the atlas object data corresponding to the model to be replaced.
  • Step 803 Acquire reload data corresponding to the target component.
  • Step 804 Acquire a region parameter corresponding to the target component.
  • the area parameter of the target component may be obtained from the correspondence between the identifier of the component that is saved in advance and the region parameter according to the identifier information corresponding to the target component.
  • the region parameter may include one or more of pixel coordinates, pixel offset, rotation amount, length, and width of the image data corresponding to the target component in the atlas object data.
  • Step 805 Adjust the reload data according to the regional parameter corresponding to the target component.
  • the angular rotation or the size scaling operation may be performed on the reload data according to the regional parameter corresponding to the target component.
  • the amount of rotation in the region parameter corresponding to the target component can determine whether the amount of rotation is not zero. If it is determined that the amount of rotation is not zero, the corresponding data is rotated according to the amount of rotation.
  • the reloading data of the target component may be scaled according to the length and width in the regional parameter.
  • Step 806 Create new atlas object data of the model to be replaced according to the atlas object data and the adjusted dressing data.
  • Step 807 Perform a rendering of the reloading model according to the new atlas object data to update the dressing of the model to be replaced.
  • the image data of each component is read from the new atlas object data to be rendered to the reloaded model to update the dressing to be replaced.
  • the reloading data of the target component is adjusted by the region parameter corresponding to the target component in the character (ie, the model to be replaced), and the remodeling is adjusted according to the atlas object data and the target component.
  • the data creates new atlas object data, and renders the reloading model according to the new atlas object data to update the dressing of the model to be replaced, and the dressing can be the skin or clothes of the character, thereby eliminating the need to obtain the entire model skin resource.
  • the partial quick change of the target component can be realized, which facilitates the user to replace the various components of the model, improves the flexibility of the model dressing, saves the resource consumption of the user through the network, and facilitates the user. Flexible replacement through the network.
  • FIG. 9 is a schematic diagram of an interaction process of a reloading method according to another embodiment of the present application.
  • the embodiment is described by taking a reloading data of a target component from a network side server by a terminal device as an example, in an interaction interface with the terminal device.
  • the process of changing the model to be replaced is: the processor in the terminal device determines the identification information of the target component according to the user's reloading operation, and then the processor acquires the reloading corresponding to the target component from the network side server according to the identification information of the target component.
  • the processor acquires the atlas object data of the model to be reloaded from the memory according to the identification information of the model to be replaced, and then the processor controls the reload data according to the target component and the components in the atlas object data in the memory.
  • the original image data creates new atlas object data.
  • the processor renders the model to be replaced, the image data of each component is read from the new atlas object data, and the reloading model is rendered to update the dressing to be replaced.
  • the new atlas object data is created by the reload data and the atlas object data corresponding to the target component in the role (ie, the model to be replaced), and the reloading is performed according to the new atlas object data.
  • the model is rendered to update the dressing of the model to be replaced, and the dressing can be the skin or clothes of the character, thereby achieving a local quick change of the target component without obtaining a complete set of model skin resources, which facilitates the user's model.
  • the replacement of each component improves the flexibility of the model dressing, and saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • the present application also proposes a reloading device.
  • FIG. 10 is a schematic structural view of a reloading device according to an embodiment of the present application.
  • the reloading apparatus may include a first obtaining module 111, a second obtaining module 112, a third obtaining module 113, a first updating module 114, and a second updating module 115, where:
  • the first obtaining module 111 is configured to acquire a model to be replaced.
  • the model to be replaced includes a plurality of components.
  • each component in the model to be replaced is replaceable, and the component is the minimum granularity of the reloading.
  • the model to be replaced may be a character model, such as a character model generated by a Spine skeleton model, which may include a head, a body, an arm, a leg, and the like.
  • the skeleton model generates a character model based on the relationship between each bone of the character model and the bones in the character model.
  • the second obtaining module 112 is configured to acquire the atlas object data corresponding to the model to be replaced.
  • the atlas object data includes a plurality of image data corresponding to the plurality of components in the model to be replaced, and the atlas object data is a set of all image data of each component of the model to be replaced.
  • the image data is image data required for the dressing or equipment displayed by the components of the model in the scene.
  • the atlas object data includes a hat image of a character, a clothes image, a glove image, a pants image, and the like.
  • the atlas object data holds the data so that when the character is rendered, the data can be loaded for rendering to generate the corresponding dress for the character.
  • the third obtaining module 113 is configured to acquire the reload data corresponding to the target component.
  • the first update module 114 is configured to update the image data corresponding to the target component in the atlas object data according to the reload data corresponding to the target component to generate the updated atlas object data.
  • the second update module 115 is configured to render the reloading model according to the updated atlas object data to update the dressing of the model to be replaced.
  • the first update module 114 may include:
  • the obtaining unit 1141 acquires a memory address of the image data corresponding to the target component in the atlas object data.
  • the updating unit 1142 is configured to: copy the replacement data corresponding to the target component to the memory address to cover the original image data corresponding to the target component to generate the updated atlas object data.
  • the apparatus may further include a fourth obtaining module 116 and a first adjusting module 117, where:
  • the fourth obtaining module 116 is configured to acquire a region parameter corresponding to the target component.
  • the first adjustment module 117 is configured to adjust the reload data according to the region parameter corresponding to the target component.
  • the first adjustment module 117 is specifically configured to perform an angular rotation or a size scaling operation on the reload data according to the region parameter corresponding to the target component.
  • the region parameter includes one or more of pixel coordinates, pixel offset, rotation amount, length, and width of the target component in the atlas object data.
  • the reloading data corresponding to the target component in the character is directly copied to the memory space corresponding to the target component, and the dressing of the target component can be directly updated.
  • the flexibility of the role dressing saves the resource consumption of the user through the network, which is convenient for the user to flexibly change through the network.
  • the present application also proposes another reloading device.
  • FIG. 13 is a schematic structural view of a refilling apparatus according to still another embodiment of the present application.
  • the remodeling apparatus may include a fifth obtaining module 118, a sixth obtaining module 119, a seventh obtaining module 120, a creating module 121, and a third updating module 122, where:
  • the fifth obtaining module 118 is configured to acquire a model to be replaced.
  • the model to be replaced includes a plurality of components.
  • each component in the model to be replaced is replaceable, and the component is the minimum granularity of the reloading.
  • the model to be replaced may be a character model, such as a character model generated by a Spine skeleton model, which may include a head, a body, an arm, a leg, and the like.
  • the sixth obtaining module 119 is configured to acquire the atlas object data corresponding to the model to be replaced.
  • the atlas object data includes a plurality of image data corresponding to the plurality of components in the model to be replaced, and the atlas object data is a set of all image data of each component of the model to be replaced.
  • the image data is image data required for the dressing or equipment displayed by the components of the model in the scene.
  • the atlas object data includes a hat image of a character, a clothes image, a glove image, a pants image, and the like.
  • the atlas object data holds the data so that when the character is rendered, the data can be loaded for rendering to generate the corresponding dress for the character.
  • the seventh obtaining module 120 is configured to acquire the reload data corresponding to the target component.
  • the creating module 121 is configured to create new atlas object data of the model to be replaced according to the atlas object data and the reload data of the target component.
  • the third update module 122 is configured to render the reloading model according to the new atlas object data to update the dressing of the model to be replaced.
  • the apparatus in order to adapt the replacement data of the target component to the model to be replaced, on the basis of FIG. 13, as shown in FIG. 14, the apparatus may further include:
  • the eighth obtaining module 123 is configured to acquire a region parameter corresponding to the target component.
  • the second adjustment module 124 is configured to adjust the reload data according to the region parameter corresponding to the target component.
  • the creating module 121 is further configured to: create new atlas object data of the model to be replaced according to the atlas object data and the adjusted dressing data.
  • the second adjustment module 124 is specifically configured to perform an angular rotation or a size scaling operation on the reload data according to the region parameter corresponding to the target component.
  • the region parameter includes one or more of pixel coordinates, pixel offset, rotation amount, length, and width of the target component in the atlas object data.
  • new atlas object data is created by the reload data and the atlas object data corresponding to the target component in the character (ie, the model to be replaced), and the reloading is performed according to the new atlas object data.
  • the model is rendered to update the dressing of the model to be replaced, and the dressing can be the skin or clothes of the character, thereby realizing a partial quick change of the target component without acquiring the entire model skin resource, which is convenient for the user to model
  • the replacement of each component improves the flexibility of the model dressing, saves the resource consumption of the user through the network, and facilitates the user to flexibly change through the network.
  • FIG. 15 is a block diagram of a dressing device 1500, according to an exemplary embodiment.
  • device 1500 can include one or more of the following components: processing component 1502, memory 1504, power component 1506, multimedia component 1508, audio component 1510, input/output (I/O) interface 1512, sensor component 1514, And a communication component 1516.
  • Processing component 1502 typically controls the overall operation of device 1500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 1502 can include one or more processors 1520 to execute instructions to perform all or part of the steps of the above described methods.
  • processing component 1502 can include one or more modules to facilitate interaction between component 1502 and other components.
  • processing component 1502 can include a multimedia module to facilitate interaction between multimedia component 1508 and processing component 1502.
  • Memory 1504 is configured to store various types of data to support operation at device 1500. Examples of such data include instructions for any application or method operating on device 1500, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 1504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • Power component 1506 provides power to various components of device 1500.
  • Power component 1506 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 1500.
  • the multimedia component 1508 includes a touch display screen that provides an output interface between the device 1500 and a user.
  • the touch display screen can include a liquid crystal display (LCD) and a touch panel (TP).
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel.
  • the touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 1508 includes a front camera and/or a rear camera. When the device 1500 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data.
  • Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 1510 is configured to output and/or input an audio signal.
  • the audio component 1510 includes a microphone (MIC) that is configured to receive an external audio signal when the device 1500 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 1504 or transmitted via communication component 1516.
  • audio component 1510 also includes a speaker for outputting an audio signal.
  • the I/O interface 1512 provides an interface between the processing component 1502 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 1514 includes one or more sensors for providing device 1500 with a status assessment of various aspects.
  • sensor assembly 1514 can detect an open/closed state of device 1500, relative positioning of components, such as the display and keypad of device 1500, and sensor component 1514 can also detect a change in position of one component of device 1500 or device 1500. The presence or absence of contact by the user with the device 1500, the orientation or acceleration/deceleration of the device 1500 and the temperature change of the device 1500.
  • Sensor assembly 1514 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 1514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 1514 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 1516 is configured to facilitate wired or wireless communication between device 1500 and other devices.
  • the device 1500 can access a wireless network based on a communication standard, such as Wi-Fi, 2G or 3G, or a combination thereof.
  • communication component 1516 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • the communication component 1516 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • device 1500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above-described reloading method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above-described reloading method.
  • the present application further provides a non-volatile computer storage medium storing one or more programs, when the one or more programs are executed by one device, causing the The apparatus performs the dressing method of the embodiment of the first aspect of the present application.
  • the present application also proposes another non-volatile computer storage medium storing one or more programs, when the one or more programs are executed by one device, The apparatus performs the dressing method of the embodiment of the second aspect of the present application.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” or “second” may include at least one of the features, either explicitly or implicitly.
  • the meaning of "a plurality” is two or more unless specifically and specifically defined otherwise.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with such an instruction execution system, apparatus, or device.
  • computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
  • portions of the application can be implemented in hardware, software, firmware, or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. While the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the present application. The embodiments are subject to variations, modifications, substitutions and variations.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

一种换装方法、装置、计算机可读介质和电子设备,该方法包括:获取待换装模型(101);获取待换装模型对应的图集对象数据(102),其中,图集对象数据包括多个部件分别对应的多个图像数据;获取目标部件对应的换装数据(103);根据目标部件对应的换装数据对图集对象数据中目标部件对应的图像数据进行更新以生成更新后的图集对象数据(104);以及根据更新后的图集对象数据对待换装模型进行渲染以更新待换装模型的装扮(105)。该方法直接对目标部件的换装数据进行更新,无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。

Description

换装方法、装置、计算机可读介质和电子设备
本申请要求申请日为2017年04月01日、申请号为CN201710214239.2、发明创造名称为《换装方法和装置》的发明专利申请的优先权。
技术领域
本申请涉及计算机技术领域,特别涉及一种换装方法、装置、计算机可读介质和电子设备。
背景技术
在游戏场景中,为了提供丰富的角色,角色模型往往需要有换装系统,可以替换角色模型的装扮。
目前,游戏开发通常是基于游戏引擎开发的,而游戏引擎中只提供了整体换肤接口。为了实现角色模型的局部换装,相关技术中,可通过为角色模型预置多套皮肤资源,在引擎加载角色模型时,将多套皮肤资源一起加载到内存中,并通过修改现有换肤接口将不同皮肤的部件进行替换以实现局部换装。
然而,上述局部换装的方式角色换装的套数有限,在用户从网络中获取角色模型的局部的新装扮时,需要下载全套的模型文件(包括图片png,atlas,json文件,一般是100M以上),数据流量太大,换装成本消耗较大,从而使得角色模型不能灵活实现局部换装。
发明内容
本申请实施例旨在至少在一定程度上解决上述技术问题。
为此,本申请实施例提出一种换装方法,该换装方法可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
本申请第一方面实施例提出了一种换装方法,包括以下步骤:获取待换装模型,其中,所述待换装模型包括多个部件;获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;获取目标部件对应的换装数据;根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据;以及根据更新后的图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
在本申请实施例的换装方法中,将角色(即待换装模型)中目标部件对应的换装数据直接拷贝至该目标部件对应的内存空间,可直接更新该目标部件的装扮,该装扮可以为角色的皮肤或者衣服等。因此本申请的实施例可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对角色的局部快速换装,方便了用户对角色的各个部件的换装,提高了角色换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
本申请第二方面实施例提出了一种换装方法,包括以下步骤:获取待换装模型,其中,所述待换装模型包括多个部件;获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;获取目标部件对应的换装数据;根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据;根据所述新图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
在本申请实施例的换装方法中,通过角色(即待换装模型)中目标部件对应的换装数据和图集对象数据创建新图集对象数据,并根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮,由此,无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
本申请第三方面实施例提出了一种换装装置,包括:第一获取模块,用于获取待换装模型,其中,所述待换装模型包括多个部件;第二获取模块,用于获取所述待换装模型对 应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;第三获取模块,用于获取目标部件对应的换装数据;第一更新模块,用于根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据;以及第二更新模块,用于根据更新后的图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
在本申请实施例的换装装置中,将角色(即待换装模型)中目标部件对应的换装数据直接拷贝至该目标部件对应的内存空间,可直接更新该目标部件的装扮,该装扮可以为角色的皮肤或者衣服等。因此本申请的实施例可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对角色的局部快速换装,方便了用户对角色的各个部件的换装,提高了角色换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
本申请第四方面实施例提供了一种换装装置,包括:第五获取模块,用于获取待换装模型,其中,所述待换装模型包括多个部件;第六获取模块,用于获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;第七获取模块,用于获取目标部件对应的换装数据;创建模块,用于根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据;第三更新模块,用于根据所述新图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
在本申请实施例的换装装置中,通过角色(即待换装模型)中目标部件对应的换装数据和图集对象数据创建新图集对象数据,并根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮,由此,无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
本申请第五方面实施例提供了一种换装装置,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:获取待换装模型,其中,所述待换装模型包括多个部件;获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;获取目标部件对应的换装数据;根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据;以及根据更新后的图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
本申请第六方面实施例提供了一种换装装置,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:获取待换装模型,其中,所述待换装模型包括多个部件;获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;获取目标部件对应的换装数据;根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据;根据所述新图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
本申请第七方面实施例提供了一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备执行本申请第一方面实施例的换装方法。
本申请第八方面实施例提供了一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备执行本申请第二方面实施例的换装方法。
本申请第九方面实施例提供了一种计算机程序产品,当所述计算机程序产品中的指令处理器执行时,执行一种换装方法,所述方法包括:获取待换装模型,其中,所述待换装模型包括多个部件;获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;获取目标部件对应的换装数据;根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据;以及根据更新后的图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
本申请第十方面实施例提供了一种计算机程序产品,当所述计算机程序产品中的指令处理器执行时,执行一种换装方法,所述方法包括:获取待换装模型,其中,所述待换装 模型包括多个部件;获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;获取目标部件对应的换装数据;根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据;根据所述新图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
本申请第十一方面实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如本申请第一方面实施例中所述的换装方法。
本申请第十二方面实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如本申请第二方面实施例中所述的换装方法。
本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。
附图说明
本申请的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:
图1为根据本申请一个实施例的换装方法的流程图;
图2A为换装前待换装模型对应的图集对象数据的示例图;
图2B为目标部件D对应的换装数据的示例图;
图2C为更新后的图集对象数据的示例图;
图3为根据本申请另一个施例的换装方法的流程图;
图4A为包含待换装模型的界面的示例图;
图4B为包含换装后的模型的界面的示例图;
图5为根据本申请又一个实施例的换装方法的流程图;
图6为根据本申请一个实施例的换装方法的交互流程示意图;
图7为根据本申请另一个实施例的换装方法的流程图;
图8为根据本申请又一个实施例的换装方法的流程图;
图9为根据本申请另一个实施例的换装方法的交互流程示意图;
图10为根据本申请一个实施例的换装装置的结构示意图;
图11为根据本申请另一个实施例的换装装置的结构示意图;
图12为根据本申请又一个实施例的换装装置的结构示意图;
图13为根据本申请再一个实施例的换装装置的结构示意图;
图14为根据本申请另一个实施例的换装装置的结构示意图;
图15为根据一示例性实施例示出的一种换装装置1500的框图。
具体实施方式
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能理解为对本申请的限制。
在本申请的描述中,需要理解的是,术语“多个”指两个或两个以上;术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性。
下面参考附图描述根据本申请实施例的换装方法和装置。
图1为根据本申请一个实施例的换装方法的流程图,本实施例以该换装方法应用在终端设备中来举例说明,其中,终端设备可以例如是个人计算机、手机、平板电脑等具有各种操作系统的硬件设备。
如图1所示,该实施例的换装方法,包括以下步骤。
步骤101,获取待换装模型。
其中,待换装模型包括多个部件。
其中,该待换装模型中的每个部件均是可以换装的,部件是换装的最小粒度。
其中,该待换装模型可以为人物模型,例如由Spine骨骼模型所生成的人物模型,该 人物模型可包括头、身体、胳膊、腿等部件。
其中,骨骼模型是根据人物模型的各个骨骼的图片和人物模型中各个骨骼之间的关系生成人物模型。
步骤102,获取待换装模型对应的图集对象数据。
作为一种示例性的实施方式,可根据待换装模型的标识信息和预先保存的模型的标识和图集对象数据之间的对应关系获取待换装模型对应的图集对象数据。
其中,图集对象数据包括待换装模型中多个部件分别对应的多个图像数据,该图集对象数据为待换装模型各个部件的所有图像数据的集合。
其中,图像数据是模型的部件在场景中显示的装扮或者装备所需要的图像数据。例如,该图集对象数据包括人物的帽子图像、衣服图像、手套图像、裤子图像等等。该图集对象数据保存这些数据,这样在渲染该角色时可以加载这些数据进行渲染,生成该角色对应的装扮。
步骤103,获取目标部件对应的换装数据。
在本申请的一个实施例中,可通过多种方式获取目标部件对应的换装数据,举例说明如下:
作为一种示例,在本地资源数据库中获取目标部件的换装数据。
具体地,在用户对待换装模型有换装需求,终端设备接收用户的换装指令,其中,换装指令中包括待换装模型的标识和目标部件的标识。
对应地,终端设备根据待换装模型的标识和目标部件的标识,查询本地资源数据库中,获取目标部件的换装数据。
作为另一示例,在服务器中获取目标部件的换装数据。
具体地,在用户对待换装模型有换装需求,终端设备接收用户的换装指令,其中,换装指令中包括待换装模型的标识和目标部件的标识。
对应地,终端设备向服务器发送包含待换装模型的标识和目标部件的标识的资源获取请求,以使服务器根据待换装模型的标识和目标部件的标识获取目标部件的换装数据,并向终端设备返回目标部件的换装数据。
对应地,终端设备接收服务器发送的目标部件的换装数据。
作为一种优选的方案,在用户对待换装模型有换装需求,终端设备接收用户的换装指令,其中,换装指令中包括待换装模型的标识和目标部件的标识。
当终端设备根据待换装模型的标识和目标部件的标识在本地资源数据库中未查找到与目标部件对应的换装数据时,终端设备向服务器发送包含待换装模型的标识和目标部件的标识的资源获取请求,以使服务器根据待换装模型的标识和目标部件的标识获取目标部件的换装数据,并向终端设备返回目标部件的换装数据。对应地,终端设备接收服务器发送的目标部件的换装数据。
步骤104,根据目标部件对应的换装数据对图集对象数据中目标部件对应的图像数据进行更新以生成更新后的图集对象数据。
举例而言,假设待换装模型包括部件A至部件H,目标部件为部件D,在对目标部件D换装之前,待换装模型对应的图集对象数据,如图2A所示,其中,图2A中示出了图集对象数据中各个部件对应的图像数据。假设目标部件D对应的换装数据,如图2B所示,在通过目标部件D对应的换装数据对图集对象数据中目标部件D对应的图像数据进行更新后,所获得的更新后的图集对象数据的示例图,如图2C所示。
步骤105,根据更新后的图集对象数据对待换装模型进行渲染以更新待换装模型的装扮。
在渲染待换装模型时,从更新后的图集对象数据中读取各个部件的图像数据对待换装模型进行渲染以更新待换装的装扮。
在本申请实施例的换装方法中,将角色(即待换装模型)中目标部件对应的换装数据直接拷贝至该目标部件对应的内存空间,可直接更新该目标部件的装扮,该装扮可以为角色的皮肤或者衣服等。因此本申请的实施例可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对角色的局部快速换装,方便了用户对角色的各个部件的换装,提高了角色换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方 便了用户通过网络灵活换装。
图3为根据本申请另一个施例的换装方法的流程图,本实施例以该换装方法应用在终端设备中来举例说明。
如图3所示,该实施例的换装方法,包括以下步骤。
步骤301,获取待换装模型。
其中,待换装模型包括多个部件。
其中,该待换装模型中的每个部件均是可以换装的,部件是换装的最小粒度。
其中,该待换装模型可以为人物模型,例如由Spine骨骼模型所生成的人物模型,该人物模型可包括头、身体、胳膊、腿等部件。
其中,骨骼模型是根据人物模型的各个骨骼的图片和人物模型中各个骨骼之间的关系生成人物模型。
步骤302,获取待换装模型对应的图集对象数据。
作为一种示例性的实施方式,可根据待换装模型的标识信息和预先保存的模型的标识和图集对象数据之间的对应关系获取待换装模型对应的图集对象数据。
其中,图集对象数据包括待换装模型中多个部件分别对应的多个图像数据,该图集对象数据为待换装模型各个部件的所有图像数据的集合。
其中,图像数据是模型的部件在场景中显示的装扮或者装备所需要的图像数据。例如,该图集对象数据包括人物的帽子图像、衣服图像、手套图像、裤子图像等等。该图集对象数据保存这些数据,这样在渲染该角色时可以加载这些数据进行渲染,生成该角色对应的装扮。
步骤303,获取目标部件对应的换装数据。
步骤304,获取图集对象数据中目标部件对应的图像数据的内存地址。
在本申请的一个实施例中,在获取目标部件的换装数据后,可获取图集对象数据中目标部件对应的图像数据的内存地址。
具体地,可先获取图集对象数据对应的内存地址,然后,根据图集对象数据对应的内存地址和图集对象数据中目标部件对应的图像数据的像素坐标和像素偏移量,确定出图集对象数据中目标部件对应的图像数据的内存地址。
举例而言,假设待换装模型对应的图集对象数据的示意图,如图2A所示,假设目标部件为部件D,像素偏移量为零。在获取图集对象数据中每行所占的像素数以及每个像素所占的字节数后,可根据每行所占的像素数、每个像素所占的字节数、图集对象数据对应的内存地址和像素点D0(目标部件D所对应的图像数据所在的区域上的左上顶点)在图集对象中的像素坐标计算确定图集对象数据中目标部件对应的内存地址,其中,需要理解的是,像素D0处对应的内存地址即为部件D对应的图像数据的内存地址。
步骤305,将目标部件对应的换装数据拷贝至内存地址以覆盖图集对象数据中目标部件对应的原有图像数据,以生成更新后的图集对象数据。
作为一种示例性的实施方式,在获取目标部件对应的图像数据的内存地址之后,可通过内存拷贝函数memcopy将目标部件的换装数据拷贝至图集对象数据中目标部件对应的原有图像数据的位置,即,通过目标部件对应的换装数据覆盖图集对象数据中目标部件对应的原有图像数据,实现了对图集对象数据中目标部件的图像数据的更新。
其中,内存拷贝函数memcopy的源地址指向目标部件的换装数据的内存地址的起始位置,目的地址指向图集对象数据中目标部件对应的原有图像数据的内存地址的起始位置。
步骤306,根据更新后的图集对象数据对待换装模型进行渲染以更新待换装模型的装扮。
在渲染待换装模型时,从更新后的图集对象数据中读取各个部件的图像数据对待换装模型进行渲染以更新待换装的装扮。
举例而言,假设包含待换装模型的界面的示例图,如图4A所示,此时,用户可通过点击界面中的换装控件,调出装扮选择界面。在用户触发装扮选择界面中富贵财神衣后,可通过富贵财神衣的图像数据覆盖待换装模型的图集对象数据中的对应目标部件的图像数据以生成更新后的图集对象数据,并通过更新后的图集对象数据对待换装模型进行渲染 后,所获得的更新后的模型,如图4B所示。由此,实现了对模型的上衣进行灵活换装。
在本申请实施例的换装方法中,将角色(即待换装模型)中目标部件对应的换装数据直接拷贝至该目标部件对应的内存空间,可直接更新该目标部件的装扮,该装扮可以为角色的皮肤或者衣服等。因此本申请的实施例可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对角色的局部快速换装,方便了用户对角色的各个部件的换装,提高了角色换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
图5为根据本申请又一个实施例的换装方法的流程图,本实施例以该换装方法应用在终端设备中来举例说明。如图5所示,该实施例的换装方法,包括以下步骤。
步骤501,获取待换装模型。
其中,待换装模型包括多个部件。
其中,该待换装模型中的每个部件均是可以换装的,部件是换装的最小粒度。
其中,该待换装模型可以为人物模型,例如由Spine骨骼模型所生成的人物模型,该人物模型可包括头、身体、胳膊、腿等部件。
其中,骨骼模型是根据人物模型的各个骨骼的图片和人物模型中各个骨骼之间的关系生成人物模型。
步骤502,获取待换装模型对应的图集对象数据。
作为一种示例性的实施方式,可根据待换装模型的标识信息和预先保存的模型的标识和图集对象数据之间的对应关系获取待换装模型对应的图集对象数据。
其中,图集对象数据包括待换装模型中多个部件分别对应的多个图像数据,该图集对象数据为待换装模型各个部件的所有图像数据的集合。
其中,图像数据是模型的部件在场景中显示的装扮或者装备所需要的图像数据。例如,该图集对象数据包括人物的帽子图像、衣服图像、手套图像、裤子图像等等。该图集对象数据保存这些数据,这样在渲染该角色时可以加载这些数据进行渲染,生成该角色对应的装扮。
步骤503,获取目标部件对应的换装数据。
步骤504,获取图集对象数据中目标部件对应的图像数据的内存地址。
步骤505,获取目标部件对应的区域参数。
作为一种示例性的实施方式,可根据目标部件对应的标识信息从预先保存的部件的标识与区域参数之间的对应关系中获取目标部件的区域参数。
其中,区域参数可以包括目标部件对应的图像数据在图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
步骤506,根据目标部件对应的区域参数对换装数据进行调整。
在本申请的一个实施例中,为了使目标部件的换装数据适合待换装模型,可根据目标部件对应的区域参数对换装数据进行角度旋转或大小缩放操作。
在目标部件对应的区域参数中旋转量,可判断旋转量是否不为零,若判断旋转量不为零,则根据旋转量对换装数据进行相应的角度旋转。
在根据区域参数中的长度和宽度信息确定目标部件的换装数据不符合待换装模型时,可根据区域参数中的长度和宽度对目标部件的换装数据进行大小缩放操作。
步骤507,将目标部件调整后的换装数据拷贝至内存地址以覆盖目标部件对应的原有图像数据,以生成更新后的图集对象数据。
步骤508,根据更新后的图集对象数据对待换装模型进行渲染以更新待换装模型的装扮。
在渲染待换装模型时,从更新后的图集对象数据中读取各个部件的图像数据对待换装模型进行渲染以更新待换装的装扮。
在本实施例的换装方法中,根据角色(即换装模型)中目标部件对应的区域参数对目标部件对应的换装数据进行调整,并将目标部件调整后的换装数据拷贝至该目标部件对应的内存空间,可直接更新该目标部件的装扮,该装扮可以为角色的皮肤或者衣服等。因此本申请的实施例可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对角色的局部快速换装,方便了用户对角色的各个部件的换装,提高了角色 换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
图6为根据本申请一个实施例的换装方法的交互流程示意图,该实施例以终端设备从网络侧服务器获取目标部件的换装数据为例进行描述,在对终端设备的交互界面中的待换装模型换装的过程为:终端设备中的处理器根据用户的换装操作确定目标部件的标识信息,然后,处理器根据目标部件的标识信息从网络侧服务器获取目标部件对应的换装数据,之后,处理器根据待换装模型的标识信息从存储器中获取待换装模型的图集对象数据,之后,处理器控制通过目标部件的换装数据替换存储器中图集对象数据中目标部件的原有图像数据,最后,处理器在渲染待换装模型时,从更新后的图集对象数据中读取各个部件的图像数据对待换装模型进行渲染以更新待换装的装扮。
在本申请实施例的换装方法中,将角色(即待换装模型)中目标部件对应的换装数据直接拷贝至该目标部件对应的内存空间,可直接更新该目标部件的装扮,该装扮可以为角色的皮肤或者衣服等。因此本申请的实施例可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对角色的局部快速换装,方便了用户对角色的各个部件的换装,提高了角色换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
图7为根据本申请另一个实施例的换装方法的流程图,本实施例以该换装方法应用在终端设备中来举例说明。如图7所示,该实施例的换装方法,包括以下步骤。
步骤701,获取待换装模型。
其中,待换装模型包括多个部件。
其中,该待换装模型中的每个部件均是可以换装的,部件是换装的最小粒度。
其中,该待换装模型可以为人物模型,例如由Spine骨骼模型所生成的人物模型,该人物模型可包括头、身体、胳膊、腿等部件。
其中,骨骼模型是根据人物模型的各个骨骼的图片和人物模型中各个骨骼之间的关系生成人物模型。
步骤702,获取待换装模型对应的图集对象数据。
作为一种示例性的实施方式,可根据待换装模型的标识信息和预先保存的模型的标识和图集对象数据之间的对应关系获取待换装模型对应的图集对象数据。其中,图集对象数据包括待换装模型中多个部件分别对应的多个图像数据,该图集对象数据为待换装模型各个部件的所有图像数据的集合。
其中,图像数据是模型的部件在场景中显示的装扮或者装备所需要的图像数据。例如,该图集对象数据包括人物的帽子图像、衣服图像、手套图像、裤子图像等等。该图集对象数据保存这些数据,这样在渲染该角色时可以加载这些数据进行渲染,生成该角色对应的装扮。
步骤703,获取目标部件对应的换装数据。
在本申请的一个实施例中,可通过多种方式获取目标部件对应的换装数据,举例说明如下:
作为一种示例,在本地资源数据库中获取目标部件的换装数据。
具体地,在用户对待换装模型有换装需求,终端设备接收用户的换装指令,其中,换装指令中包括待换装模型的标识和目标部件的标识。
对应地,终端设备根据待换装模型的标识和目标部件的标识,查询本地资源数据库中,获取目标部件的换装数据。
作为另一示例,在服务器中获取目标部件的换装数据。
具体地,在用户对待换装模型有换装需求,终端设备接收用户的换装指令,其中,换装指令中包括待换装模型的标识和目标部件的标识。
对应地,终端设备向服务器发送包含待换装模型的标识和目标部件的标识的资源获取请求,以使服务器根据待换装模型的标识和目标部件的标识获取目标部件的换装数据,并向终端设备返回目标部件的换装数据。
对应地,终端设备接收服务器发送的目标部件的换装数据。
作为一种优选的方案,在用户对待换装模型有换装需求,终端设备接收用户的换装指 令,其中,换装指令中包括待换装模型的标识和目标部件的标识。
当终端设备根据待换装模型的标识和目标部件的标识在本地资源数据库中未查找到与目标部件对应的换装数据时,终端设备向服务器发送包含待换装模型的标识和目标部件的标识的资源获取请求,以使服务器根据待换装模型的标识和目标部件的标识获取目标部件的换装数据,并向终端设备返回目标部件的换装数据。对应地,终端设备接收服务器发送的目标部件的换装数据。
步骤704,根据图集对象数据和目标部件的换装数据创建待换装模型的新图集对象数据。
作为一种示例性的实施方式,可获取图集对象数据中除目标部件对应的图像数据之外的其他部件的图像数据,并获取各个部件对应的区域参数,然后,根据目标部件的换装数据、各个部件的区域参数以及其他部件的图像数据创建新图集对象数据。
其中,区域参数可以包括对应部件对应的图像数据在图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种参数。
其中,新图集对象数据包括待换装模型中多个部件分别对应的多个图像数据,该图集对象数据为待换装模型各个部件的所有图像数据的集合。
其中,需要理解的是,在创建待换装模型的新图集对象数据后,待换装模型指向新图集对象数据。举例而言,假设待换装模型包括部件A至部件H,待换装模型对应的图集对象数据,如图2A所示,假设目标部件D对应的换装数据,如图2B所示,此时,可获取图集对象数据中除目标部件对应的图像数据之外的其他图像数据,然后,根据其他图像数据和目标部件的换装数据创建待换装模型的新图集对象数据,其中,所创建的新图集对象数据与更新后的新图集对象的形式相同,如图2C所示。
步骤705,根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮。
在角色引擎渲染模型时,从待换装模型对应的新图集对象数据中读取待换装模型各个部件对应的图像数据进行渲染,以获取换装后的模型。
在本申请实施例的换装方法中,通过角色(即待换装模型)中目标部件对应的换装数据和图集对象数据创建新图集对象数据,并根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮,该装扮可以为角色的皮肤或者衣服等由此,无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
图8为根据本申请又一个实施例的换装方法的流程图,本实施例以该换装方法应用在终端设备中来举例说明。如图8所示,该实施例的换装方法,包括以下步骤。
步骤801,获取待换装模型。
步骤802,获取待换装模型对应的图集对象数据。
步骤803,获取目标部件对应的换装数据。
其中,需要说明的是,前述对步骤701-步骤703的解释说明也适用于步骤801-步骤803,此处不再赘述。
步骤804,获取目标部件对应的区域参数。
作为一种示例性的实施方式,可根据目标部件对应的标识信息从预先保存的部件的标识与区域参数之间的对应关系中获取目标部件的区域参数。
其中,区域参数可以包括目标部件对应的图像数据在图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
步骤805,根据目标部件对应的区域参数对换装数据进行调整。
在本申请的一个实施例中,为了使目标部件的换装数据适合待换装模型,可根据目标部件对应的区域参数对换装数据进行角度旋转或大小缩放操作。
在目标部件对应的区域参数中旋转量,可判断旋转量是否不为零,若判断旋转量不为零,则根据旋转量对换装数据进行相应的角度旋转。
在根据区域参数中的长度和宽度信息确定目标部件的换装数据不符合待换装模型时,可根据区域参数中的长度和宽度对目标部件的换装数据进行大小缩放操作。
步骤806,根据图集对象数据和调整后的换装数据创建待换装模型的新图集对象数 据。
步骤807,根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮。
在渲染待换装模型时,从新图集对象数据中读取各个部件的图像数据对待换装模型进行渲染以更新待换装的装扮。
在本实施例的换装方法中,通过角色(即待换装模型)中目标部件对应的区域参数对目标部件的换装数据进行调整,并根据图集对象数据和目标部件调整后的换装数据创建新图集对象数据,并根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮,该装扮可以为角色的皮肤或者衣服等,由此,无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
图9为根据本申请另一个实施例的换装方法的交互流程示意图,该实施例以终端设备从网络侧服务器获取目标部件的换装数据为例进行描述,在对终端设备的交互界面中的待换装模型换装的过程为:终端设备中的处理器根据用户的换装操作确定目标部件的标识信息,然后,处理器根据目标部件的标识信息从网络侧服务器获取目标部件对应的换装数据,之后,处理器根据待换装模型的标识信息从存储器中获取待换装模型的图集对象数据,之后,处理器控制根据目标部件的换装数据和存储器中图集对象数据中部件的原有图像数据创建新图集对象数据,最后,处理器在渲染待换装模型时,从新图集对象数据中读取各个部件的图像数据对待换装模型进行渲染以更新待换装的装扮。
在本申请实施例的换装方法中,通过角色(即待换装模型)中目标部件对应的换装数据和图集对象数据创建新图集对象数据,并根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮,该装扮可以为角色的皮肤或者衣服等由此,无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
为了实现上述实施例,本申请还提出一种换装装置。
图10为根据本申请一个实施例的换装装置的结构示意图。
如图10所示,根据本申请实施例的换装装置可以包括第一获取模块111、第二获取模块112、第三获取模块113、第一更新模块114和第二更新模块115,其中:
第一获取模块111用于获取待换装模型。
其中,待换装模型包括多个部件。
其中,该待换装模型中的每个部件均是可以换装的,部件是换装的最小粒度。
其中,该待换装模型可以为人物模型,例如由Spine骨骼模型所生成的人物模型,该人物模型可包括头、身体、胳膊、腿等部件。
其中,骨骼模型是根据人物模型的各个骨骼的图片和人物模型中各个骨骼之间的关系生成人物模型。
第二获取模块112用于获取待换装模型对应的图集对象数据。
其中,图集对象数据包括待换装模型中多个部件分别对应的多个图像数据,该图集对象数据为待换装模型各个部件的所有图像数据的集合。
其中,图像数据是模型的部件在场景中显示的装扮或者装备所需要的图像数据。例如,该图集对象数据包括人物的帽子图像、衣服图像、手套图像、裤子图像等等。该图集对象数据保存这些数据,这样在渲染该角色时可以加载这些数据进行渲染,生成该角色对应的装扮。
第三获取模块113用于获取目标部件对应的换装数据。
第一更新模块114用于根据目标部件对应的换装数据对图集对象数据中目标部件对应的图像数据进行更新以生成更新后的图集对象数据。以及
第二更新模块115用于根据更新后的图集对象数据对待换装模型进行渲染以更新待换装模型的装扮。
在本申请的一个实施例中,在图10所示的基础上,如图11所示,该第一更新模块114可以包括:
获取单元1141于获取图集对象数据中目标部件对应的图像数据的内存地址。
更新单元1142用于根据将目标部件对应的换装数据拷贝至内存地址以覆盖目标部件对应的原有图像数据,以生成更新后的图集对象数据。
在本申请的一个实施例中,在图11所示的基础上,如图12所示,该装置还可以包括第四获取模块116和第一调整模块117,其中:
第四获取模块116用于获取目标部件对应的区域参数。
第一调整模块117用于根据目标部件对应的区域参数对换装数据进行调整。
在本申请的一个实施例中,第一调整模块117具体用于:根据目标部件对应的区域参数对换装数据进行角度旋转或大小缩放操作。
其中,区域参数包括目标部件在图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
其中,需要说明的是,前述对换装方法的解释说明也适用于该实施例的换装装置,此处不再赘述。
在本申请实施例的换装装置中,将角色(即待换装模型)中目标部件对应的换装数据直接拷贝至该目标部件对应的内存空间,可直接更新该目标部件的装扮,该装扮可以为角色的皮肤或者衣服等。因此本申请的实施例可以直接对目标部件的换装数据进行更新,而无需获取整套模型皮肤资源,即可实现对角色的局部快速换装,方便了用户对角色的各个部件的换装,提高了角色换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
为了实现上述实施例,本申请还提出另一种换装装置。
图13为根据本申请再一个实施例的换装装置的结构示意图。
如图13所示,根据本申请实施例的换装装置可以包括第五获取模块118、第六获取模块119、第七获取模块120、创建模块121和第三更新模块122,其中:
第五获取模块118用于获取待换装模型。
其中,待换装模型包括多个部件。
其中,该待换装模型中的每个部件均是可以换装的,部件是换装的最小粒度。
其中,该待换装模型可以为人物模型,例如由Spine骨骼模型所生成的人物模型,该人物模型可包括头、身体、胳膊、腿等部件。
第六获取模块119用于获取待换装模型对应的图集对象数据。
其中,图集对象数据包括待换装模型中多个部件分别对应的多个图像数据,该图集对象数据为待换装模型各个部件的所有图像数据的集合。
其中,图像数据是模型的部件在场景中显示的装扮或者装备所需要的图像数据。例如,该图集对象数据包括人物的帽子图像、衣服图像、手套图像、裤子图像等等。该图集对象数据保存这些数据,这样在渲染该角色时可以加载这些数据进行渲染,生成该角色对应的装扮。
第七获取模块120用于获取目标部件对应的换装数据。
创建模块121用于根据图集对象数据和目标部件的换装数据创建待换装模型的新图集对象数据。
第三更新模块122用于根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮。
在本申请的一个实施例中,为了目标部件的换装数据适合待换装模型,在图13所示的基础上,如图14所示,该装置还可以包括:
第八获取模块123用于获取目标部件对应的区域参数。
第二调整模块124用于根据目标部件对应的区域参数对换装数据进行调整。
在本申请的一个实施例中,创建模块121还用于:根据图集对象数据和调整后的换装数据创建待换装模型的新图集对象数据。
在本申请的一个实施例中,第二调整模块124具体用于:根据目标部件对应的区域参数对换装数据进行角度旋转或大小缩放操作。
其中,区域参数包括目标部件在图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
其中,需要说明的是,前述对换装方法的解释说明也适用于该实施例的换装装置,此 处不再赘述。
在本申请实施例的换装装置中,通过角色(即待换装模型)中目标部件对应的换装数据和图集对象数据创建新图集对象数据,并根据新图集对象数据对待换装模型进行渲染以更新待换装模型的装扮,该装扮可以为角色的皮肤或者衣服等,由此,无需获取整套模型皮肤资源,即可实现对目标部件的局部快速换装,方便了用户对模型的各个部件的换装,提高了模型换装的灵活性的同时,节约了用户通过网络换装的资源消耗,方便了用户通过网络灵活换装。
图15为根据一示例性实施例示出的一种换装装置1500的框图。
参照图15,装置1500可以包括以下一个或多个组件:处理组件1502,存储器1504,电源组件1506,多媒体组件1508,音频组件1510,输入/输出(I/O)的接口1512,传感器组件1514,以及通信组件1516。
处理组件1502通常控制装置1500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1502可以包括一个或多个处理器1520来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1502可以包括一个或多个模块,便于处理组件1502和其他组件之间的交互。例如,处理组件1502可以包括多媒体模块,以方便多媒体组件1508和处理组件1502之间的交互。
存储器1504被配置为存储各种类型的数据以支持在装置1500的操作。这些数据的示例包括用于在装置1500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件1506为装置1500的各种组件提供电力。电源组件1506可以包括电源管理系统,一个或多个电源,及其他与为装置1500生成、管理和分配电力相关联的组件。
多媒体组件1508包括在所述装置1500和用户之间的提供一个输出接口的触控显示屏。在一些实施例中,触控显示屏可以包括液晶显示器(LCD)和触摸面板(TP)。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1508包括一个前置摄像头和/或后置摄像头。当装置1500处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件1510被配置为输出和/或输入音频信号。例如,音频组件1510包括一个麦克风(MIC),当装置1500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1504或经由通信组件1516发送。在一些实施例中,音频组件1510还包括一个扬声器,用于输出音频信号。
I/O接口1512为处理组件1502和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件1514包括一个或多个传感器,用于为装置1500提供各个方面的状态评估。例如,传感器组件1514可以检测到装置1500的打开/关闭状态,组件的相对定位,例如所述组件为装置1500的显示器和小键盘,传感器组件1514还可以检测装置1500或装置1500一个组件的位置改变,用户与装置1500接触的存在或不存在,装置1500方位或加速/减速和装置1500的温度变化。传感器组件1514可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1514还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1514还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件1516被配置为便于装置1500和其他设备之间有线或无线方式的通信。装置1500可以接入基于通信标准的无线网络,如Wi-Fi,2G或3G,或它们的组合。在一个示 例性实施例中,通信组件1516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置1500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述换装方法。
为了实现上述实施例,本申请还提出一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备执行本申请第一方面实施例的换装方法。
为了实现上述实施例,本申请还提出另一种非易失性计算机存储介质,所述计算机存储介质存储有一个或者多个程序,当所述一个或者多个程序被一个设备执行时,使得所述设备执行本申请第二方面实施例的换装方法。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是 可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。

Claims (20)

  1. 一种换装方法,其中,包括以下步骤:
    终端获取待换装模型,其中,所述待换装模型包括多个部件;
    获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;
    获取目标部件对应的换装数据;
    根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据;以及
    根据更新后的图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
  2. 如权利要求1所述的换装方法,其中,所述根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据,包括:
    获取所述图集对象数据中所述目标部件对应的图像数据的内存地址;
    将所述目标部件对应的换装数据拷贝至所述内存地址以覆盖所述目标部件对应的原有图像数据,以生成更新后的图集对象数据。
  3. 如权利要求2所述的换装方法,其中,在所述将所述目标部件对应的换装数据拷贝至所述内存地址以覆盖所述目标部件对应的原有图像数据,以生成更新后的图集对象数据之前,还包括:
    获取所述目标部件对应的区域参数;
    根据所述目标部件对应的区域参数对所述换装数据进行调整。
  4. 如权利要求3所述的换装方法,其中,所述根据所述目标部件对应的区域参数对所述换装数据进行调整,包括:
    根据所述目标部件对应的区域参数对所述换装数据进行角度旋转或大小缩放操作。
  5. 如权利要求3所述的换装方法,其中,所述区域参数包括所述目标部件在所述图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
  6. 一种换装方法,其中,包括以下步骤:
    终端获取待换装模型,其中,所述待换装模型包括多个部件;
    获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;
    获取目标部件对应的换装数据;
    根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据;
    根据所述新图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
  7. 如权利要求6所述的换装方法,其中,在根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据之前,还包括:
    获取所述目标部件对应的区域参数;
    根据所述目标部件对应的区域参数对所述换装数据进行调整;
    所述根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据,包括:
    根据所述图集对象数据和调整后的换装数据创建所述待换装模型的新图集对象数据。
  8. 如权利要求7所述的换装方法,其中,所述根据所述目标部件对应的区域参数对所述换装数据进行调整,包括:
    根据所述目标部件对应的区域参数对所述换装数据进行角度旋转或大小缩放操作。
  9. 如权利要求8所述的换装方法,其中,所述区域参数包括所述目标部件在所述图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
  10. 一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求1至5中任一项所述的换装方法。
  11. 一种计算机可读介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现如权利要求6至9中任一项所述的换装方法。
  12. 一种电子设备,其特征在于,包括:
    一个或多个处理器;以及
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如下步骤:
    获取待换装模型,其中,所述待换装模型包括多个部件;
    获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;
    获取目标部件对应的换装数据;
    根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据;以及
    根据更新后的图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
  13. 如权利要求12所述的电子设备,其中,所述根据所述目标部件对应的换装数据对所述图集对象数据中所述目标部件对应的图像数据进行更新以生成更新后的图集对象数据,包括:
    获取所述图集对象数据中所述目标部件对应的图像数据的内存地址;
    将所述目标部件对应的换装数据拷贝至所述内存地址以覆盖所述目标部件对应的原有图像数据,以生成更新后的图集对象数据。
  14. 如权利要求13所述的电子设备,其中,在所述将所述目标部件对应的换装数据拷贝至所述内存地址以覆盖所述目标部件对应的原有图像数据,以生成更新后的图集对象数据之前,还包括:
    获取所述目标部件对应的区域参数;
    根据所述目标部件对应的区域参数对所述换装数据进行调整。
  15. 如权利要求14所述的电子设备,其中,所述根据所述目标部件对应的区域参数对所述换装数据进行调整,包括:
    根据所述目标部件对应的区域参数对所述换装数据进行角度旋转或大小缩放操作。
  16. 如权利要求14所述的电子设备,其中,所述区域参数包括所述目标部件在所述图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
  17. 一种电子设备,其特征在于,包括:
    一个或多个处理器;以及
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如下步骤:
    获取待换装模型,其中,所述待换装模型包括多个部件;
    获取所述待换装模型对应的图集对象数据,其中,所述图集对象数据包括所述多个部件分别对应的多个图像数据;
    获取目标部件对应的换装数据;
    根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据;
    根据所述新图集对象数据对所述待换装模型进行渲染以更新所述待换装模型的装扮。
  18. 如权利要求17所述的电子设备,其中,在根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据之前,还包括:
    获取所述目标部件对应的区域参数;
    根据所述目标部件对应的区域参数对所述换装数据进行调整;
    所述根据所述图集对象数据和所述目标部件的换装数据创建所述待换装模型的新图集对象数据,包括:
    根据所述图集对象数据和调整后的换装数据创建所述待换装模型的新图集对象数据。
  19. 如权利要求18所述的电子设备,其中,所述根据所述目标部件对应的区域参数对所述换装数据进行调整,包括:
    根据所述目标部件对应的区域参数对所述换装数据进行角度旋转或大小缩放操作。
  20. 如权利要求19所述的电子设备,其中,所述区域参数包括所述目标部件在所述图集对象数据中的像素坐标、像素偏移量、旋转量、长度和宽度中的一种或多种。
PCT/CN2018/080213 2017-04-01 2018-03-23 换装方法、装置、计算机可读介质和电子设备 WO2018177208A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/438,676 US10722796B2 (en) 2017-04-01 2019-06-12 Dressing method, device, computer readable medium, and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710214239.2A CN106970800B (zh) 2017-04-01 2017-04-01 换装方法和装置
CN201710214239.2 2017-04-01

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/438,676 Continuation US10722796B2 (en) 2017-04-01 2019-06-12 Dressing method, device, computer readable medium, and electronic device

Publications (1)

Publication Number Publication Date
WO2018177208A1 true WO2018177208A1 (zh) 2018-10-04

Family

ID=59336131

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/080213 WO2018177208A1 (zh) 2017-04-01 2018-03-23 换装方法、装置、计算机可读介质和电子设备

Country Status (3)

Country Link
US (1) US10722796B2 (zh)
CN (1) CN106970800B (zh)
WO (1) WO2018177208A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109903395A (zh) * 2019-03-01 2019-06-18 Oppo广东移动通信有限公司 模型的处理方法、装置、存储介质及电子设备

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106970800B (zh) * 2017-04-01 2019-05-07 腾讯科技(深圳)有限公司 换装方法和装置
CN109598776A (zh) * 2017-09-30 2019-04-09 腾讯科技(深圳)有限公司 一种动画实现方法、装置、终端和存储介质
CN107930116A (zh) * 2017-11-22 2018-04-20 中国科学院上海高等研究院 虚拟玩偶的管理系统、操控方法/系统、存储介质及终端
CN108010112B (zh) * 2017-11-28 2023-08-22 腾讯数码(天津)有限公司 动画处理方法、装置及存储介质
CN110569382A (zh) * 2018-05-16 2019-12-13 阿里巴巴集团控股有限公司 图片处理方法、装置、计算机设备、存储介质
CN109529339A (zh) * 2018-11-21 2019-03-29 北京像素软件科技股份有限公司 游戏角色换装方法及装置
CN111214832A (zh) * 2018-11-27 2020-06-02 上海尤家网络科技有限公司 一种2d游戏局部换装方法
CN109558383B (zh) * 2018-12-10 2021-07-09 网易(杭州)网络有限公司 游戏角色的时装输出处理方法与装置、电子设备
CN109908579A (zh) * 2019-01-27 2019-06-21 镇江奇游网络科技有限公司 一种选择游戏角色的方法和系统
CN110738716B (zh) * 2019-10-12 2023-12-22 天津芸芸科技有限公司 一种基于PIXI的spine动画多部位局部换装方法
CN110889880A (zh) * 2019-12-19 2020-03-17 上海米哈游天命科技有限公司 一种贴图处理方法、装置、设备及存储介质
CN111420399B (zh) * 2020-02-28 2021-01-12 苏州叠纸网络科技股份有限公司 一种虚拟人物的换装方法、装置、终端及存储介质
CN111462287A (zh) * 2020-03-31 2020-07-28 网易(杭州)网络有限公司 游戏中骨骼动画的数据处理方法、装置以及电子设备
CN112221133A (zh) * 2020-10-21 2021-01-15 Oppo(重庆)智能科技有限公司 游戏画面的定制方法、云服务器、终端及存储介质
CN112843701B (zh) * 2021-03-09 2023-01-10 腾讯科技(深圳)有限公司 可穿戴元素的替换方法、装置、终端及存储介质
CN113069763A (zh) * 2021-03-19 2021-07-06 广州三七互娱科技有限公司 游戏角色换装方法、装置及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385759A (zh) * 2011-10-28 2012-03-21 深圳第七大道科技有限公司 一种改变网页游戏中人物形象的方法及装置
CN103198505A (zh) * 2013-04-23 2013-07-10 四三九九网络股份有限公司 一种基于gpu渲染游戏角色及角色换装的方法和装置
CN106075909A (zh) * 2016-07-15 2016-11-09 珠海金山网络游戏科技有限公司 一种游戏换装系统和方法
CN106970800A (zh) * 2017-04-01 2017-07-21 腾讯科技(深圳)有限公司 换装方法和装置

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10109315B2 (en) * 2005-03-01 2018-10-23 Eyesmatch Ltd Devices, systems and methods for auto-delay video presentation
US7657341B2 (en) * 2006-01-31 2010-02-02 Dragon & Phoenix Software, Inc. System, apparatus and method for facilitating pattern-based clothing design activities
CN102722411B (zh) * 2010-12-08 2014-09-24 浪潮软件股份有限公司 一种节省内存的纸娃娃系统
US9839844B2 (en) * 2011-03-01 2017-12-12 Disney Enterprises, Inc. Sprite strip renderer
CN103177173B (zh) * 2011-12-23 2015-04-22 腾讯科技(深圳)有限公司 一种网络虚拟角色装扮的选取方法和装置
US20140022238A1 (en) * 2012-07-20 2014-01-23 Clo Virtual Fashion Inc. System for simulating user clothing on an avatar
DE102013203667B4 (de) * 2013-03-04 2024-02-22 Adidas Ag Kabine zum Ausprobieren eines oder mehrerer Bekleidungsstücke
US9626808B2 (en) * 2014-08-01 2017-04-18 Electronic Arts Inc. Image-based deformation of simulated characters of varied topology
CN105261055B (zh) * 2015-09-07 2018-06-26 网易(杭州)网络有限公司 一种游戏角色换装方法、装置及终端
EP3654290A1 (en) * 2016-09-23 2020-05-20 Apple Inc. Avatar creation and editing
US10432559B2 (en) * 2016-10-24 2019-10-01 Snap Inc. Generating and displaying customized avatars in electronic messages
WO2018095273A1 (zh) * 2016-11-24 2018-05-31 腾讯科技(深圳)有限公司 图像合成方法、装置以及匹配实现方法、装置
US10282897B2 (en) * 2017-02-22 2019-05-07 Microsoft Technology Licensing, Llc Automatic generation of three-dimensional entities
US11145138B2 (en) * 2017-04-28 2021-10-12 Linden Research, Inc. Virtual reality presentation of layers of clothing on avatars
US20190114037A1 (en) * 2017-10-17 2019-04-18 Blend Systems, Inc. Systems and methods for distributing customized avatars responsive to events
US10918151B2 (en) * 2018-02-27 2021-02-16 Levi Strauss & Co. Collaboration in an apparel design system
DK201870374A1 (en) * 2018-05-07 2019-12-04 Apple Inc. AVATAR CREATION USER INTERFACE

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385759A (zh) * 2011-10-28 2012-03-21 深圳第七大道科技有限公司 一种改变网页游戏中人物形象的方法及装置
CN103198505A (zh) * 2013-04-23 2013-07-10 四三九九网络股份有限公司 一种基于gpu渲染游戏角色及角色换装的方法和装置
CN106075909A (zh) * 2016-07-15 2016-11-09 珠海金山网络游戏科技有限公司 一种游戏换装系统和方法
CN106970800A (zh) * 2017-04-01 2017-07-21 腾讯科技(深圳)有限公司 换装方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109903395A (zh) * 2019-03-01 2019-06-18 Oppo广东移动通信有限公司 模型的处理方法、装置、存储介质及电子设备
CN109903395B (zh) * 2019-03-01 2021-07-09 Oppo广东移动通信有限公司 模型的处理方法、装置、存储介质及电子设备

Also Published As

Publication number Publication date
US10722796B2 (en) 2020-07-28
US20190291006A1 (en) 2019-09-26
CN106970800A (zh) 2017-07-21
CN106970800B (zh) 2019-05-07

Similar Documents

Publication Publication Date Title
WO2018177208A1 (zh) 换装方法、装置、计算机可读介质和电子设备
CN109600659B (zh) 播放视频时的操作方法、装置、设备及存储介质
EP3104590A1 (en) Electronic device and method for displaying image therein
WO2017071096A1 (zh) 应用程序更新方法、装置及系统
WO2016011743A1 (zh) 节省存储空间的方法和装置
WO2019109564A1 (zh) 屏幕显示控制的方法和装置
WO2017113666A1 (zh) 应用界面切换方法及装置
JP2017531330A (ja) ピクチャ処理方法および装置
CN107357613B (zh) 应用更新方法、装置及计算机可读存储介质
RU2645282C2 (ru) Способ и устройство для вызова по облачным визиткам
CN107436712B (zh) 为呼出菜单设置皮肤的方法、装置及终端
CN105763552B (zh) 远程控制中的传输方法、装置及系统
CN104850643B (zh) 图片对比方法和装置
CN111966410A (zh) 启动处理方法、装置、电子设备及存储介质
US20240045583A1 (en) Page display method, electronic device and storage medium
CN108322673B (zh) 视频生成方法和视频生成装置
EP3425533A1 (en) Displaying page
CN112416486A (zh) 信息引导方法、装置、终端及存储介质
WO2017128664A1 (zh) 进程调用的方法及装置
CN114924769A (zh) 组件更新方法、装置、电子设备及存储介质
CN110457084B (zh) 一种加载方法及装置
CN114268802A (zh) 虚拟空间展示方法、装置、电子设备及存储介质
CN107423060B (zh) 动画效果的呈现方法、装置及终端
WO2023245374A1 (zh) 视图显示方法、装置、电子设备和存储介质
CN111767063A (zh) 应用程序的资源更新方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18774572

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18774572

Country of ref document: EP

Kind code of ref document: A1