Combined element generation method and device of target model, equipment and storage medium
By splitting and cutting the combined element textures of the virtual character target model to generate reference textures and length and width data files, the problem of a single virtual character expression resource is solved and the richness of expression rendering is improved.
Patent Information
- Application Number
- CN202310914563.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2025-01-24
AI Technical Summary
Virtual characters have single expression resources in film and television animations or game animations, resulting in poor rendering effects.
Obtain the combined element map corresponding to the pre-configured target model, perform split processing to obtain multiple sub-element maps, perform redundant pixel cropping on these sub-element maps, and finally store the cropped sub-element map arrangement in the reference In the map, the length and width data files are generated for rendering.
Improved the richness of virtual role expression rendering, reducing hand -drawn workload, avoiding the problem of single expression resources, and achieving a richer rendering effect.
Smart Images

Figure CN119359869A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for generating a combination element of a target model. Background Art
[0002] In film and television animation or game animation, the rendering effect of the virtual character's facial expression plays an important role in the portrayal of the virtual character.
[0003] At present, although the expression resources of virtual characters can be loaded, the expression resources of virtual characters are relatively simple, which results in poor rendering effect when the expression resources are used to render the expression of the virtual character's face in the later stage.
[0004] Therefore, how to avoid the phenomenon that the expression resources of virtual characters are relatively single and make the expression rendering results obtained later richer is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of the present application is to provide a method, device, equipment and storage medium for generating combined elements of a target model in view of the deficiencies in the above-mentioned prior art, so as to avoid the phenomenon that the expression resources of the virtual character are relatively single, thereby making the expression rendering results obtained later richer.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for generating a combination element of a target model, the method comprising:
[0008] Acquire a pre-configured composite element map corresponding to the target model, wherein the composite element map is used to display a composite element corresponding to a target virtual object of the target model during rendering, wherein the composite element includes a plurality of sub-elements;
[0009] Splitting the combined element map to obtain a plurality of sub-element maps corresponding to the target model;
[0010] Performing redundant pixel cropping on a sub-element map among the plurality of sub-element maps, and arranging and storing the cropped sub-element maps in a designated reference map;
[0011] The reference texture and a length and width data file for describing the positions of a plurality of cropped sub-element textures in the reference texture are output, so that corresponding composite elements can be generated through the length and width data file and the reference texture when rendering the target virtual object.
[0012] In a second aspect, an embodiment of the present application further provides a device for generating a combination element of a target model, the device comprising:
[0013] An acquisition module, used to acquire a pre-configured composite element map corresponding to the target model, wherein the composite element map is used to display a composite element corresponding to a target virtual object of the target model during rendering, wherein the composite element includes a plurality of sub-elements;
[0014] A splitting module, used for splitting the combined element map to obtain a plurality of sub-element maps corresponding to the target model;
[0015] A cropping process is used to crop redundant pixels of a sub-element texture among the plurality of sub-element textures, and store the cropped sub-element textures in a designated reference texture;
[0016] An output module is used to output the reference map and a length and width data file for describing the positions of multiple cropped sub-element maps in the reference map, so as to generate corresponding combined elements through the length and width data file and the reference map when rendering the target virtual object.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for generating combined elements of the target model of the first aspect above.
[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for generating a combined element of the target model of the first aspect are executed.
[0019] The beneficial effects of this application are:
[0020] The embodiment of the present application provides a method, device, equipment and storage medium for generating a composite element of a target model. After obtaining the composite element map corresponding to the target model, the method can split the composite element map to obtain multiple sub-element maps corresponding to the target model. After obtaining the multiple sub-element maps corresponding to the target model, the sub-element maps in the multiple sub-element maps can be cropped for redundant pixels, and the cropped sub-element maps are arranged and stored in a specified reference map. In this way, on the one hand, since a single composite element map can be split into multiple sub-element maps, a large number of composite elements are included in the reference map. On the other hand, cropping redundant pixels can remove useless pixels in the sub-element map. In this way, a large number of sub-element maps can be arranged and stored in the reference map, increasing the number of sub-element maps stored in a single reference map. In this way, when the target virtual object is rendered later according to the reference map and the length and width data file, the richness of the sub-elements in the rendered target virtual object can be improved. That is to say, if the combined element map is an expression map, then under the premise of reducing the hand-drawing workload, it can avoid the phenomenon that the expression resources of the target model (such as a virtual character) are relatively single, thereby making the expression rendering results obtained later richer. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 A schematic diagram of a flow chart of a method for generating a combination element of a target model provided in an embodiment of the present application;
[0023] Figure 2 A schematic diagram of a flow chart of another method for generating a combination element of a target model provided in an embodiment of the present application;
[0024] Figure 3 A schematic flow chart of another method for generating a combination element of a target model provided in an embodiment of the present application;
[0025] Figure 4 A schematic diagram of arranging sub-element textures in a reference texture provided in an embodiment of the present application;
[0026] Figure 5 A schematic diagram of a flow chart of a method for generating a combination element of another target model provided in an embodiment of the present application;
[0027] Figure 6A schematic diagram of a flow chart of another method for generating a combination element of a target model provided in an embodiment of the present application;
[0028] Figure 7 A schematic flow chart of another method for generating a combination element of a target model provided in an embodiment of the present application;
[0029] Figure 8 A schematic diagram of the structure of a device for generating a combination element of a target model provided in an embodiment of the present application;
[0030] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0032] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0033] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0034] The following is an example of the method for generating the combined elements of the target model mentioned in the present application in conjunction with the accompanying drawings. The virtual character can be used in a variety of game scenarios, such as multiplayer competitive game scenarios, and the present application does not limit it.
[0035] Figure 1 A schematic diagram of a method for generating a combination element of a target model provided in an embodiment of the present application. Figure 1 As shown, the method may include:
[0036] S101, obtaining a pre-configured combined element map corresponding to a target model.
[0037] Among them, the combined element map is used to display the combined element corresponding to the target virtual object of the target model during rendering, and the combined element includes multiple sub-elements.
[0038] Exemplarily, the combined element map may be an expression map, a decal map, etc. It should be noted that this application does not limit the specific type of the combined element map. If the combined element map is an expression map, then the multiple sub-elements in the combined element map may include: eyebrow elements, mouth elements, etc.; if the combined element map is a decal map, then the multiple sub-elements in the combined element map may include various decal elements, such as decorative decals, clothing patterns, etc.
[0039] It can be understood that the combined element map corresponding to the target model can be configured locally or on a device other than the local device, wherein the target model can be a three-dimensional model of the target virtual object.
[0040] It is feasible, assuming that the combined element map is an expression map, then the target model corresponding to the target virtual object and the basic map can be input into the expression map generator in advance, and based on the user's touch operation on the expression drawing control on the expression map generator, the combined element map corresponding to the target model is obtained. The combined element map may include the eyebrow and mouth areas corresponding to the target virtual object, and the image information of the eyebrow and mouth areas can express the emotional state of the virtual character, such as happy, sad, etc.
[0041] The combined element map and the identifier of the virtual model may be associated and stored on a storage device. When it is determined that the target model needs to be processed, the combined element map corresponding to the identifier of the target model may be obtained from the storage device.
[0042] S102: split the combined element map to obtain a plurality of sub-element maps corresponding to the target model.
[0043] Exemplarily, the combined element map corresponding to the target model may include multiple feature areas. It should be noted that the present application does not limit the number of feature areas. The image processing algorithm can be used to identify the dividing line between adjacent feature areas, and the combined element map is split based on the identified dividing line to obtain a sub-element map containing each feature area. If the combined element map is an expression map, the sub-element map obtained by splitting is, for example, a sub-element map corresponding to the eyebrow area and a sub-element map corresponding to the mouth area.
[0044] S103, performing redundant pixel cropping processing on a sub-element texture among the plurality of sub-element textures, and arranging and storing the cropped sub-element textures in a designated reference texture.
[0045] Exemplarily, according to the above description, each sub-element map includes a feature area, so the sub-element map can be processed with redundant pixels cropped based on the pixel values corresponding to the identified feature areas to obtain the cropped sub-element maps corresponding to each sub-element map, and each cropped sub-element map can be arranged and stored in the storage map according to the positional relationship between the size of each cropped sub-element map and the reference map.
[0046] It can be seen that each sub-element texture is cropped to remove useless pixels in the sub-element texture, so that a large number of sub-element textures can be arranged and stored in the reference texture, increasing the number of sub-element textures stored in a single reference texture.
[0047] Furthermore, the combined element map is split to obtain a plurality of sub-element maps corresponding to the combined element map, and then each sub-element map is cropped to obtain a plurality of cropped sub-element maps corresponding to the target model. In this way, a limited number of sub-element maps can be used to generate a large number of combined element maps in a later stage, which can improve the richness of the combined elements on the target virtual object displayed when the target virtual object is rendered in a later stage, such as the richness of the expression of the target virtual object.
[0048] S104: Output a reference texture and a length and width data file for describing the positions of the plurality of cropped sub-element textures in the reference texture.
[0049] Among them, when rendering the target virtual object, the corresponding combination elements can be generated through the length and width data files and the reference map.
[0050] According to the above description, the arrangement of the cropped sub-element textures can be stored in a reference texture, and the positions of the cropped sub-element textures in the reference texture can be recorded in a length and width data file, so that a reference texture storing multiple cropped sub-element textures and a length and width data file for characterizing the positions of each cropped sub-element texture on the reference texture can be obtained.
[0051] In this way, when the target virtual object needs to be rendered at a later stage, the composite elements corresponding to the target virtual object can be generated by referring to the texture and length and width data files, and the target virtual object can be rendered based on the generated composite elements. For example, the desired expression can be displayed on the rendered target virtual object.
[0052] In summary, in the combined element generation method of the target model provided by the present application, after obtaining the combined element map corresponding to the target model, the combined element map can be split to obtain multiple sub-element maps corresponding to the target model. After obtaining the multiple sub-element maps corresponding to the target model, the sub-element maps in the multiple sub-element maps can be subjected to redundant pixel cropping, and the cropped sub-element maps are arranged and stored in a specified reference map. In this way, on the one hand, since a single combined element map can be split into multiple sub-element maps, a large number of combined elements are included in the reference map. On the other hand, cropping of redundant pixels can remove useless pixels in the sub-element map. In this way, a large number of sub-element maps can be arranged and stored in the reference map, increasing the number of sub-element maps stored in a single reference map. In this way, when the target virtual object is rendered later according to the reference map and the length and width data file, the richness of the sub-elements in the rendered target virtual object can be improved. That is to say, if the combined element map is an expression map, then under the premise of reducing the hand-drawing workload, it can avoid the phenomenon that the expression resources of the target model (such as a virtual character) are relatively single, thereby making the expression rendering results obtained later richer.
[0053] Figure 2 A flowchart of another method for generating a combination element of a target model provided in an embodiment of the present application. Figure 2 As shown, the above-mentioned combined element map is split to obtain multiple sub-element maps corresponding to the target model, including:
[0054] S201, determining a region to be deleted in a combined element map.
[0055] S202: Adjust the pixel value of the area to be deleted to a preset threshold value to obtain a target combined element map.
[0056] S203: split the target combined element map to obtain multiple sub-element maps corresponding to the target model.
[0057] Exemplarily, the combined element map of the target model can be outputted by the expression map generator, and then the combined element map is inputted into the map adjuster, and the area to be deleted in the combined element map can be determined according to the user's selection operation, and the pixel value of the area to be deleted is adjusted to a preset threshold, so as to obtain the target combined element map corresponding to the target model. It can be understood that the combined element map corresponding to the target model initially obtained may contain pixel information that does not meet the preset requirements, so the combined element map can be inputted into the map adjuster, and the area to be deleted in the combined element map is determined based on the user's triggering operation of the adjustment control on the map adjuster, and then the pixel value of each pixel point on the area to be deleted is adjusted to a preset threshold, which can be the pixel value of the backboard in the combined element map, and then the target combined element map corresponding to the target model can be obtained. Finally, each feature area in the target combined element map is split and processed to obtain multiple sub-element maps corresponding to the pre-target model, so that the quality of the sub-element maps obtained by splitting can be improved.
[0058] It is feasible that after obtaining the target combined element texture corresponding to the target model, a mapping relationship between the combined element texture and the texture identifier can be established, such as setting a corresponding number for each combined element texture, and also setting a corresponding number for each obtained sub-element texture based on the number of the combined element texture. For example, the sub-element texture may include the eyebrow area and the mouth area. Here, the combined element texture is used as the mapping relationship between the combined element texture and the texture identifier. Figure 1 Take this as an example to illustrate, you can set the combination element sticker Figure 1 The corresponding number of the middle eyebrow area is 1-1, and the corresponding number of the combined element map is 1-2, which makes it easier to render the expression of the target virtual object in a certain game scene in the later stage.
[0059] Optionally, the above-mentioned sub-element maps in the multiple sub-element maps are subjected to redundant pixel cropping, and the arrangement of the cropped sub-element maps is stored in a specified reference map, including: identifying redundant pixel values from each sub-element map according to pixel values corresponding to sub-elements included in each sub-element map; cropping the area corresponding to the redundant pixel values in each sub-element map to obtain multiple cropped sub-element maps; and arranging and storing each cropped sub-element map in the specified reference map based on the size of each cropped sub-element map.
[0060] Exemplarily, after obtaining each sub-element map, the pixel values corresponding to the sub-elements included in each sub-element map can be identified respectively, and the pixel values other than the pixel values of the sub-elements are referred to as redundant pixel values in the sub-element map. After obtaining the redundant pixel values in each sub-element map, the area corresponding to the redundant pixel values can be cropped from each sub-element map to obtain the cropped sub-element map corresponding to each sub-element map, so that the useless pixels in the sub-element map can be removed, reducing the size of each sub-element map. After obtaining each cropped sub-element map, the size of each cropped sub-element map can be determined, and based on the size of each cropped sub-element map, each cropped sub-element map is arranged and stored in a designated reference map.
[0061] Optionally, the above-mentioned storing the arrangement of each cropped sub-element texture in a specified reference texture based on the size of each cropped sub-element texture includes: determining a target arrangement area of each cropped sub-element texture in the reference texture according to the size of each cropped sub-element texture and an available arrangement area of the reference texture; and storing the arrangement of each cropped sub-element texture in the target arrangement area of the reference texture.
[0062] Exemplarily, after obtaining the cropped sub-element maps corresponding to the target model, the cropped sub-element maps corresponding to the same target model can be placed in the same folder, that is, a correspondence between the target model and the folder is established. Based on the correspondence between the target model and the folder, the cropped sub-element maps are read from the folder corresponding to each target model and automatically arranged on the reference map.
[0063] Here, the cropped sub-element map corresponding to a target model is taken as an expression map as an example for explanation. First, the area of each expression map corresponding to the target model can be determined, and the size of each expression map is characterized based on the area size of each expression map. Each expression map is automatically arranged in the reference map according to the size of each expression map. When arranging for the first time, the upper left vertex of the map can be used as a reference to arrange the expression image with the largest area (such as expression image A) in the upper left area of the reference map. Then, the available arrangement area of the reference map can be determined according to the area where the expression image A arranged on the expression map is located. Based on the available arrangement area of the reference map and the area of the expression image to be arranged after the expression image A, the target arrangement area of the expression map to be arranged in the reference map is determined in turn.
[0064] Based on this, according to the target arrangement area corresponding to each expression map, each expression map corresponding to the target model can be arranged in turn on the corresponding target arrangement area.
[0065] It should be noted that if the currently used reference map cannot contain all the expression maps corresponding to the target model, the remaining expression maps can be arranged on the newly added reference map according to the above automatic arrangement scheme until all the expression maps corresponding to the target model are arranged on the reference map. The automatic arrangement of the expression maps of other virtual models on the reference map can refer to the above description of the relevant part, which will not be explained here.
[0066] It can be seen that after obtaining the cropped sub-element texture corresponding to the target model, the cropped sub-element texture corresponding to the target model can be automatically arranged on the reference texture based on the size of the cropped sub-element texture corresponding to the target model and the available arrangement area of the reference texture during the arrangement process. There is no need for manual arrangement, which can greatly reduce the workload of art and thus improve the efficiency of loading expression and / or decal resources.
[0067] Optionally, the format of the combined element map is usually PNG format, and the sub-element image is usually TGA format. After obtaining the combined element map in PNG format, the alpha channel information and the color channel information are extracted from the combined element map in PNG format, and the two are separated to obtain the separated combined element map in PNG format, and the separated combined element map in PNG format is converted into a target combined element map in TGA format, and then the target combined element map in TGA format is split to obtain multiple sub-element maps in TGA format corresponding to the target model.
[0068] In this way, the alpha channel information and color channel information in the combined element map in PNG format are separated and then converted into the target combined element map in TGA format, which can avoid the white edge problem caused by converting PNG format to TGA format.
[0069] Figure 3 A flowchart of another method for generating a combined element of a target model provided by an embodiment of the present application. Optionally, the above-mentioned determining the target arrangement area of each cropped sub-element texture in the reference texture according to the size of each cropped sub-element texture and the available arrangement area of the reference texture includes:
[0070] S301 , sorting the cropped sub-element textures in descending order to obtain a sub-element texture set.
[0071] Exemplarily, after obtaining multiple cropped sub-element maps corresponding to the target model, the area of each cropped sub-element map can be determined according to the size (length and width) of each cropped sub-element map. The order of the cropped sub-element maps from large to small is the order of the areas of the cropped sub-element maps from large to small. Then, the first cropped sub-element map in the sub-element map set is the sub-element map with the largest area corresponding to the target model, and the last cropped sub-element map is the sub-element map with the smallest area corresponding to the target model.
[0072] S302: Traverse the sub-element texture set, and for the currently cropped sub-element texture that is currently traversed, divide the available arrangement area of the reference texture into at least one sub-area to be arranged.
[0073] S303: Determine a target arrangement area for the currently cut sub-element map according to the area of each to-be-arranged sub-area in the reference map and the size of the currently cut sub-element map.
[0074] According to the above description, each time a cropped sub-element texture is arranged on the reference texture in the above manner, the available area of the reference texture will change, and a match is performed based on the area of each sub-area to be arranged included in the available area of the reference texture and the size of the current cropped sub-element texture, and the target arrangement area of the current cropped sub-element texture is determined based on the matching result.
[0075] Assume that the sub-element map set corresponding to the target model includes expression image A, expression image B, and expression image C, and the areas of expression image A, expression image B, and expression image C decrease in sequence.
[0076] refer to Figure 4 To explain, Figure 4A schematic diagram of arranging sub-element maps in a reference map provided in an embodiment of the present application. When traversing to expression image A, the available area of the reference map can be directly used as the sub-area to be arranged, then the upper left vertex of the reference map can be used as a reference to automatically arrange expression image A on the upper left area of the sub-area to be arranged. When traversing to expression image B, the available area of the reference map is the area excluding the area where expression image A is located, then the available area of the expression map can be divided into sub-area S1 to be arranged and sub-area S2 to be arranged. According to the area of sub-area S1 to be arranged, the area of sub-area S2 to be arranged and the area of expression image B, the target arrangement sub-area corresponding to expression image B is determined. Assuming that the matching result indicates that the area of expression image B is closest to that of sub-area S1 to be arranged, then The target arrangement sub-region corresponding to the expression image B is the sub-region S1 to be arranged. Then, the expression image B can be arranged on the sub-region S1 to be arranged based on the upper left vertex of the sub-region S1 to be arranged. When traversing to the expression image C, the available area of the reference map is the area excluding the area where the expression image A and the area where the expression image B are located. Then, the available area of the expression map can be redivided into the sub-region S1 to be arranged, the sub-region S2 to be arranged, and the sub-region S3 to be arranged. Subsequently, the target arrangement area corresponding to the expression image C can be determined according to the area of the sub-region S1 to be arranged, the area of the sub-region S2 to be arranged, the area of the sub-region S3 to be arranged, and the area of the expression image B, and so on.
[0077] Finally, multiple expression images corresponding to the target model can be automatically arranged on the reference map. The number of reference maps can be one or more, depending on the areas of the multiple expression images corresponding to the target model.
[0078] It can be seen that the present application divides the region of the reference map based on the area of the sub-element map, and then automatically arranges the sub-element map on the reference map, rather than dividing the region of the reference map into 4*4 regions and then manually arranging the sub-element map on each region of the reference map. This not only increases the number of sub-element maps on the reference map, but also improves the resolution of the sub-element map.
[0079] Optionally, the above-mentioned determining the target arrangement area of the sub-element map currently cut according to the area of each sub-area to be arranged in the reference map and the size of the sub-element map currently cut includes: matching the size of the sub-element map currently cut with the area of each sub-area to be arranged, and taking the sub-area to be arranged with the highest degree of matching as the target arrangement area of the sub-element map currently cut.
[0080] Exemplarily, the sub-regions to be arranged are sorted in order of their areas from small to large to obtain a set of sub-regions to be arranged, and the area of the current sub-region to be arranged in the set of sub-regions to be arranged that is currently traversed is compared (matched) with the size (area) of the currently cropped sub-element map. If the area of the current sub-region to be arranged that is currently traversed is larger than the area of the currently cropped sub-element map, then the current sub-region to be arranged that is currently traversed can be used as the sub-region to be arranged with the highest degree of matching, that is, the current sub-region to be arranged that is currently traversed can be used as the target arrangement area. Otherwise, continue to traverse the arrangement sub-regions in the set of sub-regions to be arranged until the above requirements are met.
[0081] Combination Figure 4 For explanation, assuming that the current cropped sub-element map traversed is the expression image B, the area of the sub-region S1 to be arranged is smaller than the area of the sub-region S2 to be arranged, and assuming that the current sub-region to be arranged traversed is the sub-region S1 to be arranged, the area of the sub-region S1 to be arranged is compared with the area of the expression image B. If the comparison result indicates that the area of the sub-region S1 to be arranged is larger than the area of the expression image B, then the sub-region S1 to be arranged can be used as the target arrangement area.
[0082] Figure 5 A flowchart of another method for generating a combination element of a target model provided in an embodiment of the present application is shown below. Figure 5 As shown, before outputting the reference texture and the length and width data file for describing the positions of the plurality of cropped sub-element textures in the reference texture, the method further comprises:
[0083] S501, obtaining the reference coordinates of each target arrangement area in the reference map.
[0084] S502: Generate a length and width data file according to each reference coordinate and the size of each cropped sub-element texture.
[0085] Exemplarily, the coordinates of the upper left vertex of the target arrangement area can be used as reference coordinates. Then, after determining the target arrangement area corresponding to the cropped sub-element map, a correspondence between the coordinates of the upper left vertex of the target arrangement area and the cropped sub-element map can be established, and the correspondence can be stored in an associated memory. After each cropped sub-element map is automatically arranged on the reference map, the reference coordinates corresponding to the cropped sub-element map can be obtained from the memory based on the pre-established correspondence between the coordinates of the upper left vertex of the target arrangement area and the cropped sub-element map. The reference coordinates corresponding to the cropped sub-element map and the size of the cropped sub-element map (i.e., the length and width of the expression image) are combined to obtain the position information of the cropped sub-element map on the reference map. The reference coordinates and size corresponding to the same cropped sub-element map can be associated and recorded in a length and width data file, i.e., the length and width data file is generated.
[0086] Optionally, the length and width data file mentioned above also includes position information of the cropped sub-element texture in the combined element texture.
[0087] Among them, according to the above description, the length and width data file can be used to render expressions and / or decals for the target virtual object. That is to say, when it is necessary to render expressions for the target virtual object in the game scene at a later stage, multiple target sub-element textures can be first obtained from the reference texture according to the size and reference coordinates of the cropped sub-element texture in the length and width data file, and then the target sub-element textures are combined according to the position information of the cropped sub-element texture corresponding to the target sub-element texture in the combined element texture to obtain the target combined element texture corresponding to the target virtual object, and finally the target virtual object is rendered according to the target combined element texture to obtain the rendered target virtual object.
[0088] The target model combination element generation method in the following embodiments can be run on a local terminal device or a server. When the target model combination element generation method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0089] In an optional implementation, various cloud applications, such as cloud games, can be run under the cloud interaction system. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the combined element generation method of the target model are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud performs information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0090] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0091] In a possible implementation, an embodiment of the present application provides a method for generating combined elements of a target model, providing a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above.
[0092] The following is an example of generating the combined elements of the target model mentioned in the present application in conjunction with the accompanying drawings. A graphical user interface of the game can be rendered and displayed on the terminal device, and a target virtual object in the game scene can be displayed on the graphical user interface. The game scene can specifically be a multiplayer competitive game scene or other types of games, which are not limited in the present application.
[0093] Figure 6 A schematic diagram of another process for generating a combination element of a target model provided in an embodiment of the present application. Figure 6 As shown, the method also includes:
[0094] S601, obtaining game data of a target virtual object in a game scene, and determining an identifier of a required target map according to the game data.
[0095] Exemplarily, the server can monitor the game data of the target virtual object in the game scene in real time to obtain the game data of the target virtual object in the game scene, wherein the game data can be used to characterize the emotional state corresponding to the target virtual object, wherein the emotional state may include a happy state, a sad state, etc.
[0096] It can be understood that the combined element map of the target model corresponding to the target virtual object can be an expression map, and the expression maps all have corresponding emotional states, and there is a corresponding relationship between the emotional state and the number of the expression map. Furthermore, there is also a corresponding relationship between the emotional state and each characteristic area in the expression map, that is, there is a corresponding relationship between the emotional state and the number of the sub-element map. Based on this, the identification of the required target map can be determined according to the determined emotional state and the corresponding relationship between the emotional state and the number of the sub-element map.
[0097] For example, assuming that the keyword included in the game data of the target virtual object in the game scene can be characterized as "happy state", the identifier of the target map can be determined based on the correspondence between the happy state and the identifier of the sub-element map.
[0098] It should be noted that the emotional state corresponding to the game data can be a single emotional state or a fusion emotional state, and this application does not limit it.
[0099] S602: Read the position information corresponding to the required target map from the length and width data file according to the identifier of the required target map.
[0100] Exemplarily, after determining the identifier of the desired target map, the target cropped sub-element image corresponding to the identifier of the desired target map can be read from the length and width data file based on the reference coordinates and size corresponding to the cropped sub-element image stored in the length and width data file, and then the reference coordinates and size corresponding to the target cropped sub-element image can be used as position information.
[0101] S603: Based on the position information corresponding to the required target texture, obtain at least one target cropped sub-element texture corresponding to the required target texture from the reference texture.
[0102] S604, generating a target composite element map of the target model according to each target cut sub-element map corresponding to the required target map, rendering the target virtual object according to the target composite element map, and displaying the rendered target virtual object on the graphical user interface.
[0103] Exemplarily, after determining the position information corresponding to the desired target map, at least one target cropped sub-element map corresponding to the desired target map can be obtained from the reference map according to the reference coordinates and size information included in the position information. It can be understood that the desired target map can be one or more. If it is one, the target virtual object can be rendered according to the target cropped sub-element map corresponding to the target map; if it is more than one, then it is first necessary to combine the multiple target cropped sub-element maps according to the positional relationship of each of the target cropped sub-element maps on the combined element map to generate a target combined element map of the target model, and render the target virtual object according to the target combined element map, and output the rendered target virtual object. Optionally, the rendered target virtual object can be displayed on a graphical user interface.
[0104] Figure 7 A flowchart of another method for generating a combination element of a target model provided in an embodiment of the present application. Figure 7 As shown, the target combined element texture of the target model is generated according to the sub-element textures cut out of each target corresponding to the required target texture, including:
[0105] S701, obtaining position information of each of the target cut-out sub-element textures corresponding to the required target texture on the combined element texture corresponding to the target model.
[0106] S702: Generate a target combined element map of the target model based on the position information of the cut sub-element maps of each target on the combined element map corresponding to the model.
[0107] Exemplarily, after obtaining the cropped sub-element textures of each target corresponding to the required target texture, the position information of the cropped sub-element textures of each target on the combined element texture can be obtained according to the position information of the cropped sub-element textures on the combined element texture stored in the length and width data file, and then the cropped sub-element textures of each target can be combined according to the position information of the cropped sub-element textures of each target on the combined element texture to generate the target combined element texture of the target model.
[0108] It can be seen that the target combined element map may include multiple sub-elements, which can enhance the richness of the rendering result obtained after the target virtual object is subsequently rendered.
[0109] Figure 8 A schematic diagram of a target model combination element generation device provided in an embodiment of the present application. Figure 8 As shown, the device comprises:
[0110] An acquisition module 801 is used to acquire a pre-configured composite element map corresponding to a target model, where the composite element map is used to display a composite element corresponding to a target virtual object of the target model during rendering, where the composite element includes multiple sub-elements;
[0111] A splitting module 802 is used to split the combined element map to obtain multiple sub-element maps corresponding to the target model;
[0112] A cutting module 803 is used to cut off redundant pixels of a sub-element texture among the multiple sub-element textures, and store the cut sub-element textures in a designated reference texture;
[0113] The output module 804 is used to output a reference texture and a length and width data file for describing the positions of multiple cropped sub-element textures in the reference texture, so as to generate corresponding combined elements through the length and width data file and the reference texture when rendering the target virtual object.
[0114] Optionally, the splitting module 802 is specifically used to determine the area to be deleted in the combined element map; adjust the pixel value of the area to be deleted to a preset threshold to obtain a target combined element map; split the target combined element map to obtain multiple sub-element maps corresponding to the target model.
[0115] Optionally, the cropping module 803 is specifically used to identify redundant pixel values from each of the sub-element maps according to the pixel values corresponding to the sub-elements included in each of the sub-element maps; crop the areas corresponding to the redundant pixel values in each of the sub-element maps to obtain a plurality of cropped sub-element maps; and arrange and store each of the cropped sub-element maps in a specified reference map based on the size of each of the cropped sub-element maps.
[0116] Optionally, the cropping module 803 is also used to determine the target arrangement area of each cropped sub-element texture in the reference texture based on the size of each cropped sub-element texture and the available arrangement area of the reference texture; and store the arrangement of each cropped sub-element texture in the target arrangement area of the reference texture.
[0117] Optionally, the cropping module 803 is further specifically used to sort the cropped sub-element textures in order from large to small to obtain a sub-element texture set; traverse the sub-element texture set, and for the current cropped sub-element texture currently traversed, divide the available arrangement area of the reference texture into at least one sub-area to be arranged; and determine the target arrangement area of the current cropped sub-element texture according to the area of each sub-area to be arranged in the reference texture and the size of the current cropped sub-element texture.
[0118] Optionally, the cropping module 803 is further specifically configured to match the size of the currently cropped sub-element map with the area of each of the sub-regions to be arranged, and use the sub-region to be arranged with the highest matching degree as the target arrangement region of the currently cropped sub-element map.
[0119] Optionally, the output module 804 is specifically configured to obtain reference coordinates of each of the target arrangement areas in the reference map; and generate the length and width data file according to each of the reference coordinates and the size of each of the cropped sub-element maps.
[0120] Optionally, the device further comprises: a generating module;
[0121] The generation module is used to obtain game data of the target virtual object in the game scene, and determine the identifier of the required target map based on the game data; read the position information corresponding to the required target map from the length and width data file based on the identifier of the required target map; based on the position information corresponding to the required target map, obtain at least one target cropped sub-element map corresponding to the required target map from the reference map; generate a target combination element map of the target model based on each of the target cropped sub-element maps corresponding to the required target map, render the target virtual object based on the target combination element map, and display the rendered target virtual object on a graphical user interface.
[0122] Optionally, the generation module is also used to obtain position information of each of the target cropped sub-element textures corresponding to the required target texture on the combined element texture corresponding to the target model; based on the position information of each of the target cropped sub-element textures on the combined element texture corresponding to the model, generate the target combined element texture of the target model.
[0123] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0124] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0125] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the electronic device may include: a processor 901, a storage medium 902 and a bus 903, the storage medium 902 stores machine-readable instructions executable by the processor 901, when the electronic device is running, the processor 901 communicates with the storage medium 902 through the bus 903, and the processor 901 executes the machine-readable instructions to perform the following steps:
[0126] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: obtain a pre-configured combined element map corresponding to the target model, the combined element map is used to display the combined element corresponding to the target virtual object of the target model during rendering, and the combined element includes multiple sub-elements; split the combined element map to obtain multiple sub-element maps corresponding to the target model; cut off the redundant pixels of the sub-element maps in the multiple sub-element maps, and arrange and store the cut sub-element maps in a specified reference map; output the reference map and a length and width data file for describing the positions of the multiple cut sub-element maps in the reference map, so as to generate the corresponding combined element through the length and width data file and the reference map when rendering the target virtual object.
[0127] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: determine the area to be deleted in the combined element map; adjust the pixel value of the area to be deleted to a preset threshold to obtain the target combined element map; and split the target combined element map to obtain multiple sub-element maps corresponding to the target model.
[0128] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: identify redundant pixel values from each sub-element map based on the pixel values corresponding to the sub-elements included in each sub-element map; crop the area corresponding to the redundant pixel values in each sub-element map to obtain a plurality of cropped sub-element maps; and arrange and store each cropped sub-element map in a specified reference map based on the size of each cropped sub-element map.
[0129] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: determine the target arrangement area of each cropped sub-element texture in the reference texture based on the size of each cropped sub-element texture and the available arrangement area of the reference texture; and store the arrangement of each cropped sub-element texture in the target arrangement area of the reference texture.
[0130] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: sort the cropped sub-element maps in order from large to small to obtain a sub-element map set; traverse the sub-element map set, and for the current cropped sub-element map currently traversed, divide the available arrangement area of the reference map into at least one sub-area to be arranged; determine the target arrangement area of the current cropped sub-element map according to the area of each sub-area to be arranged in the reference map and the size of the current cropped sub-element map.
[0131] In a feasible implementation scheme, when the processor 901 executes the combined element generation method of the target model, it is specifically used to: match the size of the sub-element map after the current cropping with the area of each sub-region to be arranged, and use the sub-region to be arranged with the highest matching degree as the target arrangement area of the sub-element map after the current cropping.
[0132] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: obtain the reference coordinates of each target arrangement area in the reference map; and generate a length and width data file according to each reference coordinate and the size of each cropped sub-element map.
[0133] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: obtain game data of the target virtual object in the game scene, and determine the identification of the required target map based on the game data; read the position information corresponding to the required target map from the length and width data file according to the identification of the required target map; based on the position information corresponding to the required target map, obtain at least one target cropped sub-element map corresponding to the required target map from the reference map; generate a target combined element map of the target model according to each target cropped sub-element map corresponding to the required target map, render the target virtual object according to the target combined element map, and display the rendered target virtual object on the graphical user interface.
[0134] In a feasible implementation scheme, when executing the combined element generation method of the target model, the processor 901 is specifically used to: obtain the position information of each target cropped sub-element texture corresponding to the required target texture on the combined element texture corresponding to the target model; based on the position information of each target cropped sub-element texture on the combined element texture corresponding to the model, generate the target combined element texture of the target model.
[0135] Optionally, the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following steps:
[0136] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: obtain a pre-configured combined element map corresponding to the target model, the combined element map is used to display the combined element corresponding to the target virtual object of the target model during rendering, and the combined element includes multiple sub-elements; split the combined element map to obtain multiple sub-element maps corresponding to the target model; cut off the redundant pixels of the sub-element maps in the multiple sub-element maps, and arrange and store the cut sub-element maps in a specified reference map; output the reference map and the length and width data file used to describe the positions of the multiple cut sub-element maps in the reference map, so as to generate the corresponding combined element through the length and width data file and the reference map when rendering the target virtual object.
[0137] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: determine the area to be deleted in the combined element map; adjust the pixel value of the area to be deleted to a preset threshold to obtain the target combined element map; split the target combined element map to obtain multiple sub-element maps corresponding to the target model.
[0138] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: identify redundant pixel values from each sub-element map based on the pixel values corresponding to the sub-elements included in each sub-element map; crop the area corresponding to the redundant pixel values in each sub-element map to obtain a plurality of cropped sub-element maps; and arrange and store each cropped sub-element map in a specified reference map based on the size of each cropped sub-element map.
[0139] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: determine the target arrangement area of each cropped sub-element texture in the reference texture based on the size of each cropped sub-element texture and the available arrangement area of the reference texture; and store the arrangement of each cropped sub-element texture in the target arrangement area of the reference texture.
[0140] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: sort the cropped sub-element maps in order from large to small to obtain a sub-element map set; traverse the sub-element map set, and for the current cropped sub-element map currently traversed, divide the available arrangement area of the reference map into at least one sub-area to be arranged; determine the target arrangement area of the current cropped sub-element map based on the area of each sub-area to be arranged in the reference map and the size of the current cropped sub-element map.
[0141] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: match the size of the currently cropped sub-element map with the area of each sub-region to be arranged, and use the sub-region to be arranged with the highest matching degree as the target arrangement area of the currently cropped sub-element map.
[0142] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: obtain the reference coordinates of each target arrangement area in the reference map; and generate a length and width data file based on each reference coordinate and the size of each cropped sub-element map.
[0143] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: obtain game data of the target virtual object in the game scene, and determine the identification of the required target map based on the game data; read the position information corresponding to the required target map from the length and width data file according to the identification of the required target map; based on the position information corresponding to the required target map, obtain at least one target cropped sub-element map corresponding to the required target map from the reference map; generate a target combined element map of the target model according to each target cropped sub-element map corresponding to the required target map, render the target virtual object according to the target combined element map, and display the rendered target virtual object on the graphical user interface.
[0144] In a feasible implementation scheme, when the processor executes the combined element generation method of the target model, it is specifically used to: obtain the position information of each target cropped sub-element texture corresponding to the required target texture on the combined element texture corresponding to the target model; based on the position information of each target cropped sub-element texture on the combined element texture corresponding to the model, generate the target combined element texture of the target model.
[0145] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0146] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0147] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0148] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0149] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0150] The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. The above description is only the preferred embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a combination element of a target model, characterized in that: The method comprises: Acquire a pre-configured composite element map corresponding to the target model, wherein the composite element map is used to display a composite element corresponding to a target virtual object of the target model during rendering, wherein the composite element includes a plurality of sub-elements; Splitting the combined element map to obtain a plurality of sub-element maps corresponding to the target model; Performing redundant pixel cropping on a sub-element map among the plurality of sub-element maps, and arranging and storing the cropped sub-element maps in a designated reference map; The reference texture and a length and width data file for describing the positions of a plurality of cropped sub-element textures in the reference texture are output, so that corresponding composite elements can be generated through the length and width data file and the reference texture when rendering the target virtual object.
2. The method according to claim 1, characterized in that The step of splitting the combined element map to obtain a plurality of sub-element maps corresponding to the target model includes: Determining a region to be deleted in the combined element map; The pixel value of the area to be deleted is adjusted to a preset threshold value to obtain a target combined element map; The target combined element map is split to obtain a plurality of sub-element maps corresponding to the target model.
3. The method according to claim 1, characterized in that The method of performing redundant pixel cropping on a sub-element map of the plurality of sub-element maps and arranging and storing the cropped sub-element maps in a designated reference map includes: According to the pixel values corresponding to the sub-elements included in each of the sub-element maps, identifying redundant pixel values from each of the sub-element maps; Cutting the area corresponding to the redundant pixel values in each of the sub-element maps to obtain a plurality of cut sub-element maps; Based on the size of each of the cropped sub-element textures, each of the cropped sub-element textures is arranged and stored in a designated reference texture.
4. The method according to claim 3, characterized in that The step of arranging and storing each of the cut sub-element textures in a designated reference texture based on the size of each of the cut sub-element textures comprises: Determining a target arrangement area of each of the cropped sub-element textures in the reference texture according to the size of each of the cropped sub-element textures and the available arrangement area of the reference texture; The cut sub-element texture arrangements are stored in the target arrangement area in the reference texture.
5. The method according to claim 4, characterized in that The step of determining a target arrangement area of each of the cropped sub-element textures in the reference texture according to the size of each of the cropped sub-element textures and the available arrangement area of the reference texture comprises: Sorting the cropped sub-element maps in descending order to obtain a sub-element map set; Traversing the sub-element texture set, and for the currently cropped sub-element texture currently traversed, dividing the available arrangement area of the reference texture into at least one sub-area to be arranged; According to the area of each of the to-be-arranged sub-regions in the reference map and the size of the currently cropped sub-element map, a target arrangement region of the currently cropped sub-element map is determined.
6. The method according to claim 5, characterized in that Determining the target arrangement area of the current cropped sub-element map according to the area of each of the to-be-arranged sub-areas in the reference map and the size of the current cropped sub-element map comprises: The size of the currently cropped sub-element map is matched with the area of each of the sub-regions to be arranged, and the sub-region to be arranged with the highest matching degree is used as the target arrangement region of the currently cropped sub-element map.
7. The method according to claim 4, characterized in that Before outputting the reference texture and the length and width data file for describing the positions of the plurality of cropped sub-element textures in the reference texture, the method further comprises: Obtaining the reference coordinates of each of the target arrangement areas in the reference map; The length and width data file is generated according to the reference coordinates and the size of the cropped sub-element textures.
8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Acquire game data of the target virtual object in the game scene, and determine the identifier of the required target map according to the game data; According to the identifier of the required target map, read the position information corresponding to the required target map from the length and width data file; Based on the position information corresponding to the required target map, obtaining at least one target cropped sub-element map corresponding to the required target map from the reference map; A target composite element map of the target model is generated according to each of the target cut sub-element maps corresponding to the required target map, and the target virtual object is rendered according to the target composite element map, and the rendered target virtual object is displayed on a graphical user interface.
9. The method according to claim 8, characterized in that The step of generating a target combined element texture of the target model according to each of the target cut sub-element textures corresponding to the required target texture comprises: Acquire position information of each of the target cut-out sub-element textures corresponding to the required target texture on the combined element texture corresponding to the target model; Based on the position information of the sub-element textures after each target cutout on the combined element texture corresponding to the model, a target combined element texture of the target model is generated.
10. A device for generating a combination element of a target model, characterized in that: The device comprises: An acquisition module, used to acquire a pre-configured composite element map corresponding to the target model, wherein the composite element map is used to display a composite element corresponding to a target virtual object of the target model during rendering, wherein the composite element includes a plurality of sub-elements; A splitting module, used for splitting the combined element map to obtain a plurality of sub-element maps corresponding to the target model; A cutting module, used for cutting redundant pixels of the sub-element textures among the plurality of sub-element textures, and arranging and storing the cut sub-element textures in a designated reference texture; An output module is used to output the reference map and a length and width data file for describing the positions of multiple cropped sub-element maps in the reference map, so as to generate corresponding combined elements through the length and width data file and the reference map when rendering the target virtual object.
11. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for generating a combined element of a target model as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a combined element of a target model according to any one of claims 1 to 9 are executed.