A method, device, and medium for character design
The method automates role design through data organization and genetic coding, enabling efficient bulk production of unique character designs for virtual communities and NFTs, addressing the limitations of existing role design tools.
Patent Information
- Application Number
- CN202310303073.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2043-03-27
AI Technical Summary
The existing role design methods are inefficient and lack the ability to produce intelligent batches of maps, which cannot meet the market needs of the virtual digital industry.
By obtaining the character accessories image dataset, building the accessories counter model, generating the style number using the jump scanning method, and combining the character name, product code and gene code into the product ID code, and finally rendering and outputting the character image.
It realizes efficient batch production of character design, provides massive animated character solutions and random appearance of character images, and meets the innovative needs of virtual communities, blind box design and other fields.
Smart Images

Figure CN116363276B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and specifically to a character design method, device and medium. Background Art
[0002] Character design belongs to a type of conceptual design. Artists concretely present the abstract "concept" of a certain character in the form of image vision. Character design is not just about drawing the character. It needs to accurately convey a lot of important information closely related to the character.
[0003] Current character design work basically belongs to the category of artistic creation. The basic majors of designers are generally art disciplines such as fine arts foundation, design theory, and film and television drama theory. It does not involve technical disciplines. In specific work, it basically does not involve technical research either. The tools used by designers are basically graphic image editing tools, material libraries, etc., mostly "drawing" tools, and there are no commercial software and plugins specifically for "design" with intelligent functions to assist mental work. With the rapid development of virtual digital industrial economies such as the second dimension, digital twins, and NFTs, the working method of "drawing" as a creative style can no longer meet the market demand. The invention of intelligent mass image generation makes it possible to generate tens of billions of images, enabling innovation and development in fields such as providing character images for virtual community talent shows, fan interaction, and blind box design products. Existing character design lacks methods for intelligent batch image generation and tools for managing design elements and products.
[0004] Therefore, it is necessary to further improve the character design method to solve the above problems. Summary of the Invention
[0005] The purpose of this application: is to solve and overcome the deficiencies of the prior art and applications, and provide a character design method, device and medium, effectively solving the problems of low character design efficiency and inability to batch generate images, and providing a large number of animated character solutions, randomly appearing character images, and blind box-style pattern products.
[0006] The purpose of this application is achieved through the following technical solutions. A character design method includes the following steps:
[0007] S1: Obtain a dataset of character accessory images;
[0008] S2: Organize the image dataset;
[0009] S3: Build an accessory counter model;
[0010] S4: Use the jump scanning method on the organized image dataset to obtain style numbers;
[0011] S5: Input the style serial number into the accessory counter model to generate a genetic code;
[0012] S6: Combine the role name, product code, and genetic code into a product ID code;
[0013] S7: Render the ID code and output the rendered picture;
[0014] The specific steps of step S4 include:
[0015] S41: Obtain the scanning base number, theoretical total number, and the number of accessories in the folder;
[0016] S42: Define the starting number array;
[0017] S43: Create a stride number array through the jump scanning method;
[0018] S44: Obtain the style serial number through the scanning base number, starting number, and stride number.
[0019] Preferably, the specific steps of step S2 are:
[0020] S21: Create a role folder;
[0021] S22: Create an accessory folder;
[0022] S23: Classify and name the accessory images.
[0023] Preferably, the specific steps of step S3 include:
[0024] S31: Set all bits of the counter to zero as the starting count number, corresponding to 0 of the decimal integer counter;
[0025] S32: Move the cursor on the 1st bit of the counter down one bit, corresponding to adding 1 to the decimal integer counter;
[0026] S33: When the cursor on a certain bit in the counter has reached the bottom bit and needs to add 1 to this bit, the cursor on its right bit moves down one bit, and the cursor on the relative left bit is set to zero;
[0027] S34: When the cursors on all bits of the accessory counter are at the bottom bits, the current number is the maximum value of the counter.
[0028] Preferably: S41 specifically includes:
[0029] S411: Obtain the number of accessories in all accessory folders in the order of bits;
[0030] S412: Calculate the base number for each bit, and the base number is equal to the product of the number of accessories in all left bits;
[0031] S413: Calculate and obtain the cumulative base number for each digit, where the cumulative base number is equal to the sum of the base numbers of all the left digits.
[0032] S414: Obtain the scanning base number, where the scanning base number is equal to the cumulative base number of the penultimate digit.
[0033] S415: Obtain the total number of styles, where the total number of styles is equal to the product of the number of fittings for all digits.
[0034] Preferably: The specific steps of S43 include:
[0035] S431: Calculate the minimum stride number, the maximum stride number, and the number of stride segments. The minimum stride number is 1, the maximum stride number is equal to the total number of styles divided by the scanning base number, and the number of stride segments is equal to the number of fittings of the rightmost digit.
[0036] S432: Calculate and obtain the total number of strides. The formula for the total number of strides is: (maximum stride number - minimum stride number) + 1.
[0037] S433: Calculate and obtain the maximum stride number within the starting segment. The formula is: maximum stride number within the starting segment = round up (total number of strides / number of stride segments).
[0038] S434: Calculate and obtain the difference between segments. The formula is: difference between segments = maximum stride number within the starting segment + 1 - minimum stride number within the starting segment.
[0039] S435: Generate the array elements of the stride numbers through the loop of the stride numbers within the starting segment.
[0040] Preferably, the specific steps of S5 include:
[0041] S51: Through the ascending loop of the digit numbers, obtain the maximum digit number, the value of the maximum digit, and the current remainder of the current style number. If the style number is less than the base number of the current digit, then:
[0042] The formula for the maximum digit number is: maximum digit number = current digit number - 1.
[0043] The formula for the value of the maximum digit is: value of the maximum digit = style number / base number of the maximum digit.
[0044] The formula for the current remainder is: current remainder = style number % base number of the maximum digit.
[0045] S52: Through the descending loop of the digit numbers, obtain the value of each digit. If the current remainder is greater than or equal to the base number of the current digit, then:
[0046] The formula for the value of the current digit is: value of the current digit = current remainder / base number of the current digit.
[0047] The formula for the current remainder is: current remainder = current remainder % base number of the current digit.
[0048] S53: Transcribe the value of each digit into a 2-digit string, and concatenate these strings in the order of digits to obtain the gene code.
[0049] Preferably, the step S6 specifically includes:
[0050] S61: Count the created ID codes. The counting result is an integer. Transcribe this integer into a 5-digit string, which is the product number.
[0051] S62: Combine the role name, product number, and gene code into an ID code, and save the ID code to the disk rendering list. The formula is as follows: ID code = role name + "_" + product number + "_" + gene code.
[0052] Preferably, the step S7 is specifically as follows:
[0053] Default the integer value of the first product code to 0, and the string text is 00000, which is used to form the first product code.
[0054] After generating the first product code, the integer value of the second product code is the integer value of the first product code + 1, that is, the string text is 00001, which is used to form the second product code.
[0055] Preferably, the step S7 is specifically as follows:
[0056] S71. Read the gene code: Open the ID code file, read all the ID code texts on the file into a string array, loop through the elements of the string array, intercept the gene code of each ID code, and translate the gene code into an array of paths pointing to the accessory folder. The array is used as a parameter.
[0057] S72. Set the layer texture nodes: Point each layer to an address on the disk, and synthesize an image through the calculation method between layers.
[0058] S73. Render and rename: Through the address input of the layer texture nodes, an image existing inside the maya software is obtained, the image is rendered to obtain a picture file, and the picture file is renamed.
[0059] The present invention also provides an electronic device, including: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the role design method provided by the present invention.
[0060] The present invention also provides a computer-readable storage medium storing a computer program that can be executed by a computer processor to implement the role design method described in any one of the above.
[0061] Compared with the prior art, the present application has at least the following obvious advantages and effects:
[0062] 1. For role designers, the present invention can reduce labor intensity, improve work efficiency, activate the source of inspiration, and provide more alternative solutions for customers.
[0063] 2. For role design customers, the present invention can enable them to participate in the design process, fulfill the desire to exhaust all possible solutions, and reduce decision-making costs.
[0064] 3. For platforms with a large number of members or players, the present invention can provide tools for hundreds of billions of non-repeating member players or avatars, personalized picture notes, and custom pattern markings.
[0065] 4. For the animation and game industries, second-generation communities, and digital twin virtual worlds, the present invention can provide a large number of animated character solutions, randomly appearing character images, and blind box-style pattern products.
[0066] 5. For the NFT industry, the present invention can provide a large number of non-fungible products. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 is a flowchart of the role design method of the present application.
[0068] Figure 2 is a schematic structural diagram of the accessory counter model of the present application.
[0069] Figure 3 is a schematic diagram of the use of the accessory counter in the present application.
[0070] Figure 4 is a schematic diagram of the use of the accessory counter in the present application.
[0071] Figure 5 is a schematic diagram of S4 in the present application.
[0072] Figure 6 is a schematic diagram of the jump scanning method of the present application.
[0073] Figure 7 is a schematic structural diagram of an electronic device in the application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0074] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only for explaining the present invention, rather than limiting the present invention. Additionally, it should be noted that for the sake of description, only the parts related to the present invention are shown in the drawings, rather than all the structures.
[0075] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations (or steps) can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0076] A role design method, device, and medium provided in the present application will be elaborated in detail below through the following various embodiments and their alternative solutions.
[0077] Figure 1 It is a flowchart of a role design method provided in an embodiment of the present invention. The embodiment of the present invention is applicable to a role design method, which can be executed by a role design device. The device can be implemented in software and / or hardware and integrated on any electronic device with network communication functions. As Figure 1 shown, the role design method provided in the embodiment of the present application may include the following steps:
[0078] S1: Obtain a dataset of role accessory images;
[0079] In the embodiment of the present application, the dataset of role accessory images includes categories such as body, face, clothes, hands, backpack, hat, glasses, etc. The number of pictures in each category is from 1 to several.
[0080] S2: Organize the image dataset; Step S2 specifically includes:
[0081] S21: Create a role folder;
[0082] In the embodiment of the present application, create a role folder named after the role name, such as "panda".
[0083] S22: Create an accessory folder;
[0084] In the embodiment of the present application, create an accessory folder under the role folder, named in the combination of "sequence number + accessory name + layer annotation", such as "09_body", "11_clothes_far", etc.;
[0085] S23. Classify and name the accessory images.
[0086] In the embodiment of the present application, all character accessory images are classified and placed in the accessory folder. Accessory images of the same type are placed in one folder and named in the combination of "accessory abbreviation + serial number + layer annotation + extension name", such as "bd_01_f.png", "cl_03_far.png", etc. Each accessory folder can hold up to 100 accessory pictures.
[0087] S3: Build an accessory counter model; specifically included in step S3 are:
[0088] S31. Set all bits of the counter to zero as the starting count number, corresponding to 0 of the decimal integer counter;
[0089] S32. Move the cursor on the 1-bit of the counter down one position, corresponding to adding 1 to the decimal integer counter;
[0090] S33. When the cursor on a certain bit in the counter has reached the bottommost position and it is necessary to add 1 to this bit, the cursor on its right bit moves down one position and the cursor on the relative left bit is set to zero;
[0091] S34. When the cursors on all bits of the accessory counter have reached the bottommost position, the current number is the maximum value of the counter.
[0092] In the embodiment of the present application, as Figure 2 shown is the structural diagram of the accessory counter model. The total count of the accessory counter is the total number of possibilities of the character design drawings formed by the accessory permutations and combinations, and its decimal integer value is: the continuous product of the number of accessory files in each accessory folder. All counts of the accessory counter are in one-to-one correspondence with a continuous sequence of decimal integers, and they can be converted to each other. Pick up the current count of each bit of the accessory counter and then represent it with two-digit numeric characters. Arranging them in sequence is the gene code of each product. Two consecutive decimal integers are converted into two design drawings by the accessory counter, and only one accessory is different while the other accessories are the same, that is, the similarity is extremely high. When the cursor on the 1-bit in the accessory counter has reached the bottommost position as Figure 3 shown, when it is necessary to add 1, the cursor on its right bar (2-bit) moves down one position and the cursor on the 1-bit is set to zero as Figure 4 shown. Through the accessory counter model, a digital management platform with planability, batchability, predictability, traceability, and controllability is established, thus laying an operational foundation for intelligent design and drawing generation.
[0093] S4: Obtain the style serial number by the jump scanning method for the sorted image data set; in the embodiment of the present application, as Figure 5 shown, step S3 specifically includes:
[0094] S41: Obtain the scanning base number, the theoretical total number, and the number of accessories in the folder; S31 specifically includes:
[0095] S411: Obtain the number of accessories in all accessory folders in the order of bits;
[0096] S412: Calculate and obtain the base number of each bit, where the base number is equal to the product of the number of accessories of all the left bits; add this number to the original decimal integer serial number. For the meaning of the gene code: only this bit of the gene code changes; for the meaning of the design drawing: only the accessory pattern corresponding to this bit changes.
[0097] S413: Calculate and obtain the cumulative base number of each bit, where the cumulative base number is equal to the sum of the base numbers of all the left bits; add this number to the original decimal integer serial number. For the meaning of the gene code: all bits of the gene code on the left (including this bit) change; for the meaning of the design drawing: all accessory patterns corresponding to the bits on the left (including this bit) change.
[0098] S414: Obtain the scanning base number, where the scanning base number is equal to the cumulative base number of the penultimate bit;
[0099] S415: Obtain the total number of styles, where the total number of styles is equal to the product of the number of accessories of all bits.
[0100] S42: Define the starting number array; in the embodiment of the present application, the data type is integer; the minimum value = 0; the maximum value = the scanning base number; the increment value = 1.
[0101] S43: Create a stride number array through the jump scanning method; in the embodiment of the present application, as Figure 6 shown, S43 specifically includes:
[0102] S431: Calculate the minimum stride number, the maximum stride number, and the number of stride segments. The minimum stride number is 1, the maximum stride number is equal to the total number of styles divided by the scanning base number, and the number of stride segments is equal to the number of accessories of the rightmost bit;
[0103] S432: Calculate and obtain the total number of strides, and the formula for the total number of strides is: (the maximum stride number - the minimum stride number) + 1;
[0104] S433: Calculate and obtain the maximum stride number within the starting segment, and the formula is: the maximum stride number within the starting segment = round up (the total number of strides / the number of stride segments);
[0105] S434: Calculate and obtain the inter-segment difference, and the formula is: the inter-segment difference = the maximum stride number within the starting segment + 1 - the minimum stride number within the starting segment;
[0106] S435: Generate the elements of the stride number array through the loop of the stride numbers within the starting segment. In the embodiment of the present application, the steps of the loop body are as follows:
[0107] Declare an integer variable named "return variable", with the initial value = the current departure number.
[0108] In the while loop, if the return variable is less than the maximum step number, then execute the following steps:
[0109] Deposit the return variable as a new element into the step number array;
[0110] return variable = return variable + the difference between segments.
[0111] S44: Obtain the style number by scanning the base number, departure number, and step number. In the embodiments of this application, the formula for obtaining the style number is: style number = departure number + base number of scanning * step number.
[0112] In the embodiments of this application, a batch creative strategy that meets the requirements of high accessory repeat length and low adjacent accessory repeat degree is provided and implemented using the two - jump scanning algorithm.
[0113] S5: Input the style number into the accessory counter model to generate a gene code; S5 specifically includes:
[0114] S51: Through an ascending loop of bit numbers (starting bit number = 1; ending bit number = total number of accessory folders - 1; increment = 1), obtain the maximum bit number, the value of the maximum bit, and the current remainder of the current style number; if the style number is less than the base number of the current bit, then:
[0115] The formula for the maximum bit number is: maximum bit number = current bit number - 1;
[0116] The formula for the value of the maximum bit is: value of the maximum bit = style number / base number of the maximum bit;
[0117] The formula for the current remainder is: current remainder = style number % base number of the maximum bit;
[0118] S52: Through a descending loop of bit numbers (starting bit number = maximum bit number - 1; ending bit number = 0; increment = - 1), obtain the value of each bit. If the current remainder is greater than or equal to the base number of the current bit, then:
[0119] The formula for the value of the current bit is: value of the current bit = current remainder / base number of the current bit;
[0120] The formula for the current remainder is: current remainder = current remainder % base number of the current bit; otherwise, go to the next bit number.
[0121] S53: Transcribe the value of each bit into a 2 - digit string, and connect these strings in the order of bits to form a gene code.
[0122] S6: Combine the character name, product code, and gene code into a product ID code;
[0123] In the application example, the product code specifically includes:
[0124] Default the integer value of the first product code to 0, and the string text to 00000, which is used to form the first product code;
[0125] After generating the first product code, the integer value of the second product code is the integer value of the first product code + 1, that is, the string text is 00001, which is used to form the second product code, and so on.
[0126] S7: Render the ID code and output the rendered picture. Step S7 is specifically as follows:
[0127] S71. Read the gene code: Open the ID code file, read all the ID code texts on the file into a string array, loop through the elements of the string array, intercept the gene code of each ID code, and translate the gene code into an array of paths pointing to the accessory folder. The array is used as a parameter;
[0128] S72. Set the layer texture nodes: Point each layer to an address on the disk, and synthesize the image through the calculation method between layers;
[0129] S73. Render and rename: By inputting the address of the layer texture node, an image existing inside the maya software is obtained, the image is rendered to obtain a picture file, and the picture file is renamed.
[0130] The present invention also provides an electronic device, such as Figure 7 As shown in the structural schematic diagram of an electronic device in this application, it includes one or more processors and a storage device; the processor in this electronic device can be one or more, Figure 7 Here, one processor is taken as an example; the storage device is used to store one or more programs; the one or more programs are executed by the one or more processors, so that the one or more processors implement a character design method as described in any one of the embodiments of the present invention.
[0131] This electronic device may further include: an input device and an output device. The processor, storage device, input device, and output device in this electronic device can be connected through a bus or other means, Figure 7 Here, connection through a bus is taken as an example.
[0132] The storage device in the electronic device, as a computer-readable storage medium, can be used to store one or more programs. The programs can be software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to a character design method provided in the embodiments of the present invention. The processor executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the storage device, that is, to implement a character design method in the above method embodiments.
[0133] The storage device may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the electronic device, etc. In addition, the storage device may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the storage device may further include a memory remotely set relative to the processor, and these remote memories can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0134] The input device can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function control of the electronic device. The output device may include a display device such as a display screen.
[0135] And when one or more programs included in the above electronic device are executed by the one or more processors, the programs perform the following operations:
[0136] S1: Obtain a character accessory image data set;
[0137] S2: Sort out the image data set;
[0138] S3: Build an accessory counter model;
[0139] S4: Use the jump scanning method on the sorted image data set to obtain a style number;
[0140] S5: Input the style number into the accessory counter model to generate a gene code;
[0141] S6: Combine the character name, product code, and gene code into a product ID code;
[0142] S7: Render the ID code and output the rendered picture;
[0143] Of course, those skilled in the art can understand that when one or more programs included in the above electronic device are executed by the one or more processors, the programs can also perform the related operations in the role design method provided in any embodiment of the present invention.
[0144] It should be further noted that the present invention also provides a computer-readable storage medium storing a computer program that can be executed by a computer processor to implement the role design method in the above embodiment. The computer program can be any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0145] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0146] The program code contained on the readable medium can be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.
[0147] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0148] As those skilled in the art can easily conceive, any modifications, equivalent replacements, improvements, etc. made within the concept and principle of the application should be included within the scope of the claims of the present application.
Claims
1. A character design method, characterized in that: It includes the following steps: S1: Obtain the dataset of character accessory images; S2: Organize the image dataset; S3: Build an accessory counter model; S4: Use the jump scanning method on the organized image dataset to obtain the style number; S5: Input the style number into the accessory counter model to generate a gene code; S6: Combine the character name, product code, and gene code into a product ID code; S7: Render the ID code and output the rendered picture; The specific steps of step S4 include: S41: Obtain the scanning base number, theoretical total number, and the number of accessories in the folder; S42: Define the starting number array; S43: Create a stride number array through the jump scanning method; S44: Obtain the style number through the scanning base number, starting number, and stride number Among them, the specific steps of step S41 include: S411: Obtain the number of accessories in all accessory folders in the order of bits; S412: Calculate the base number for each bit, where the base number is equal to the product of the number of accessories in all left bits; S413: Calculate the cumulative base number for each bit, where the cumulative base number is equal to the sum of the base numbers of all left bits; S414: Obtain the scanning base number, where the scanning base number is equal to the cumulative base number of the penultimate bit; S415: Obtain the total number of styles, where the total number of styles is equal to the product of the number of accessories in all bits; The specific steps of step S43 include: S431: Calculate the minimum stride number, maximum stride number, and stride segmentation number. The minimum stride number is 1, the maximum stride number is equal to the total number of styles divided by the scanning base number, and the stride segmentation number is equal to the number of accessories in the rightmost bit; S432: Calculate the total number of strides. The formula for the total number of strides is: (maximum stride number - minimum stride number) + 1; S433: Calculate the maximum stride number within the starting segment. The formula is: maximum stride number within the starting segment = round up (total number of strides / stride segmentation number); S434: Calculate the difference between segments. The formula is: difference between segments = maximum stride number within the starting segment + 1 - minimum stride number within the starting segment; S435: Generate the elements of the stride number array through the loop of the stride numbers within the starting segment.
2. The method for character design according to claim 1, wherein: The specific steps of step S2 are: S21: Create a character folder; S22: Create an accessory folder; S23: Classify and name the accessory images.
3. A character design method according to claim 1, characterized in that: The specific steps in step S3 include: S31: Set all bits of the counter to zero as the starting count number, corresponding to 0 of the decimal integer counter; S32: Move the cursor on the 1st bit of the counter down one bit, corresponding to adding 1 to the decimal integer counter; S33: When the cursor on a certain bit in the counter has reached the bottommost bit and needs to add 1 to this bit, the cursor on its right bit moves down one bit, and the cursor on the relative left bit is set to zero; S34: When the cursors on all bits of the accessory counter have reached the bottommost bit, the current number is the maximum value of the counter.
4. A method for character design according to claim 1, characterized in that: The specific steps of S5 include: S51: Through the ascending loop of the bit number, obtain the maximum bit number, the value of the maximum bit, and the current remainder of the current style number; if the style number is less than the base number of the current bit, then: The formula for the maximum bit number is: maximum bit number = current bit number - 1; The formula for the value of the maximum bit is: value of the maximum bit = style number / base number of the maximum bit; The current remainder formula is: current remainder = style serial number % radix of the largest digit; S52: Through a descending loop of bit numbers, obtain the value of each bit. If the current remainder is greater than or equal to the radix of the current bit, then: The formula for the value of the current bit is: value of the current bit = current remainder / radix of the current bit; The current remainder formula is: current remainder = current remainder % radix of the current bit; S53: Transcribe the value of each bit into a 2-digit string, and concatenate these strings in the order of bits to form a gene code.
5. A method for character design according to claim 1, characterized in that: The product coding in S6 specifically includes: The integer value of the first product coding is defaulted to 0, and the string text is 00000, which is used to form the first product coding; After generating the first product coding, the integer value of the second product coding is the integer value of the first product coding + 1, that is, the string text is 00001, which is used to form the second product coding.
6. The method for designing a role according to claim 1, characterized in that: The specific step S7 is as follows: S71. Read the gene code: Open the ID code file, read all the ID code texts on the file into a string array, loop through the elements of the string array, intercept the gene code of each ID code, and translate the gene code into an array of paths pointing to the accessory folder, with the array as a parameter; S72. Set the layer texture nodes: Point each layer to an address on the disk, and synthesize an image through the calculation method between layers; S73. Render and rename: Through the address input of the layer texture nodes, an image existing inside the maya software is obtained, the image is rendered to obtain a picture file, and the picture file is renamed.
7. An electronic device, characterized in that, Including: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the role design method described in any one of claims 1 to 6.
8. A computer-readable storage medium storing a computer program, characterized in that, The computer program can be executed by a computer processor to implement computer-readable instructions for the method described in any one of claims 1 to 6.
Citation Information
Patent Citations
BIM-based bridge pile foundation coordinate table automatic generation method
CN110633554A
Model automatic coding method and device, equipment and storage medium
CN113656869A