Method and device for binding bone vertexes in batches

By creating standard named shape keys in Blender software and automatically binding in 3DMax using maxscript script language, the problem of cumbersome binding operation between shape keys and controllers in the existing technology is solved, and vertex deformation and master control objects are realized. Automatic association improves the efficiency of 3D animation generation.

CN118918269APending Publication Date: 2024-11-08TUYOO GAMES +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411212825.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

During the three-dimensional scene development process, in the prior art, when binding the shape keys in Blender software to the controller in 3DMax software, the operation is cumbersome and requires multiple mouse clicks, which is inefficient, especially when dealing with complex roles or a large number of controls. Especially obvious at the time.

Method used

By creating a three-dimensional model with standard named shape keys in Blender software and importing them into 3DMax software, using the maxscript script language to automatically bind the shape keys to the corresponding master object, and implementing vertices through reactors and BaseLink functions Automatic association and binding of deformation and main control object.

Benefits of technology

It greatly simplifies the setting process, realizes automatic association and binding of vertex deformation and master control objects, and improves the generation efficiency of three-dimensional animations. Especially when dealing with complex characters or large amounts of control, operations can be completed with just one click.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918269A_ABST
    Figure CN118918269A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for binding skeleton vertexes in batches, computing equipment and a computer readable storage medium, and the method comprises the steps: creating a three-dimensional model and a corresponding shape key in Blender software, then importing the three-dimensional model and the corresponding shape key into 3DMax software, and automatically binding the shape key with a corresponding main control object in 3DMax through a maxscript language; wherein after deformation information of each vertex is obtained through a script, a reactor is created for deformation of each vertex, and the deformation of the vertex is bound with a target main control object by using a specific function. Through the method provided by the embodiment of the invention, automatic association and binding of vertex deformation and the main control object are realized, and the production process of the three-dimensional animation is greatly simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer graphics rendering, and in particular to a method and apparatus for batch binding of bone vertices, a computing device, and a computer-readable storage medium. Background Art

[0002] In the existing 3D scene development process, Blender software is usually used for basic 3D modeling, such as 3D modeling of characters, and Blender's shape key function is used to make deformations and animations of various models. These models will eventually be imported into 3DMax software for animation control to complete the final 3D rendering effect. After importing the Blender software file into 3DMax, the shape key needs to be bound to multiple controllers already in 3DMax. When the number of shape keys and controllers is large, the operation requires the designer to click the mouse multiple times, which is cumbersome and inefficient. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a method and apparatus for batch binding of bone vertices, a computing device, and a computer-readable storage medium to address the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a method for batch binding of bone vertices is provided, comprising:

[0005] Creating a three-dimensional model in Blender software, wherein the three-dimensional model includes a plurality of shape keys with standard naming;

[0006] Importing the three-dimensional model into 3D Max software and converting it into multiple vertex deformations;

[0007] The vertex deformation is traversed by using a script in 3D Max software, and the acquired vertex deformation is automatically bound to the corresponding master object through a reactor.

[0008] According to a second aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the method for batch binding of bone vertices when executing the instructions.

[0009] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, the steps of the method for batch binding of skeleton vertices are implemented.

[0010] Through the method provided in the embodiment of the present application, a three-dimensional model and a corresponding shape key are created in the Blender software, and then imported into the 3DMax software, and the shape key is automatically bound to the corresponding master object in 3DMax through the maxscript scripting language; wherein, after obtaining each vertex deformation information through the script, a reactor is created for each vertex deformation, and a specific function is used to bind the vertex deformation to the target master object. Through the method of the present application, the automatic association and binding of vertex deformation and master object is realized, which greatly simplifies the setting process, especially when dealing with complex characters or a large number of controls, the corresponding model can be selected in the software and one-key binding can be performed. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 is a structural block diagram of a computing device provided in an embodiment of the present application;

[0012] Figure 2 It is a flow chart of a method for batch binding of bone vertices provided in an embodiment of the present application. DETAILED DESCRIPTION

[0013] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0014] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0015] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "in response to determination".

[0016] In the present application, a method and apparatus for batch binding of bone vertices, a computing device and a computer-readable storage medium are provided, which will be described in detail one by one in the following embodiments.

[0017] Figure 1 The structure block diagram of a computing device 100 according to an embodiment of the present application is shown. The components of the computing device 100 include but are not limited to a memory 110 and a processor 120. The processor 120 is connected to the memory 110 via a bus 130, and the database 150 is used to store data.

[0018] The computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0019] In one embodiment of the present application, the above components of the computing device 100 and Figure 1 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 1 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0020] Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC.

[0021] In the prior art, when making three-dimensional animations, designers make multiple shape keys of three-dimensional characters in Blender software according to needs, such as expression shape keys. When these shape keys are imported into 3DMax software, they need to be linked with existing reaction controllers in 3DMax software, such as expression controllers. This operation requires using reaction controllers to bind dozens of master objects and several different expressions in multiple vertex deformation Morphs converted from expression shape keys in sequence, and set several states of each master object. Manual processing requires at least two or three hundred clicks of the mouse, and it is necessary to find a specific name in multiple options, which is time-consuming, labor-intensive, and cumbersome to operate.

[0022] In the embodiments of the present application, Figure 2 A flowchart of a method for batch binding of skeleton vertices provided by the present application is shown, including steps 202 to 206.

[0023] Step 202: Create a three-dimensional model in Blender software, where the three-dimensional model includes a plurality of shape keys with standard naming.

[0024] Blender is a free and open-source 3D creation software. It is widely used in 3D modeling, animation, texturing, rendering, etc. It supports the creation and editing of shape keys, which is a common method for making character expressions.

[0025] In this step, create a basic 3D model of the character in Blender software, for example, make a head and face model of an animated character; further use Blender's shape key function to make various facial expressions, and each expression shape key has a standard naming format. For example:

[0026] Mouth related:

[0027] mouth_open_wide: mouth wide open

[0028] mouth_pucker: mouth pucker

[0029] mouth_smile_slight: Slight smile

[0030] Eye related:

[0031] eye_wide_both: Eyes wide open

[0032] eye_squint_left: left eye squinted

[0033] eye_blink_right: Blink right eye

[0034] Naming rules include but are not limited to:

[0035] Use lowercase letters and underscores, and avoid spaces and special characters.

[0036] Use the "category_description_details" structure.

[0037] For expressions that are symmetrical, clearly indicate "left" or "right".

[0038] Use descriptive words such as "raise," "lower," "wide," etc.

[0039] For expressions of varying intensity, use modifiers such as "slight," "mild," and "intense."

[0040] Step 204: Import the three-dimensional model into 3DMax software to generate multiple vertex deformations.

[0041] When the shape key created in Blender is imported into 3DMax software, the shape key is converted into Vertex Morph in 3d Max.

[0042] In 3DMax software, there are multiple master objects for controlling the facial expressions of character models, such as left eyebrow controller, right eyebrow controller, etc. Vertex deformation needs to be bound to the master object.

[0043] Step 206: Use a script in the 3D Max software to traverse the vertex deformations, and automatically bind the acquired vertex deformations to the corresponding master object through the reactor.

[0044] (1) Get vertex deformation information:

[0045] First, use the maxscript script to obtain all vertex deformation information in the model.

[0046] This information is stored in an array and can be accessed as Morph[number].

[0047] For example, Morph[1]-

[10] may represent "mouth", Morph

[11] -

[19] may represent "eyebrows", and so on.

[0048] (2) Create a reactor:

[0049] Create a Reactor for each vertex deformation using the float_reactor() function.

[0050] This reactor will be used to control how active the vertex deformation is.

[0051] For example: Reaction1 = Morph[1].controller = float_reactor()

[0052] (3) Bind vertex deformation and master object:

[0053] Use the reactto function to bind the vertex deformation to the target master object through the reactor created earlier.

[0054] For example: reactto Reaction1$main object 1.transform.controller[1][2][3][1].controller, this statement binds Morph[1] to main object 1.

[0055] Here [1][2][3][1] refers to the specific transformation properties of the master object (such as position or rotation axis). The purpose is to control the degree of vertex deformation through the value of a certain axis of the master object.

[0056] (4) Obtain the value range of the main control object and then bind it:

[0057] Get the values ​​of the main control object and the values ​​of vertex deformation. The schematic code is as follows:

[0058] ControlValue = $main control object.transform.controller[1][2][3].controller to get the value range of the main control object;

[0059] MorpherValue = morphArray[i].controller gets the value of vertex deformation.

[0060] The value of the master object represents the parameter that controls or drives the deformation, usually an attribute that can be animated or interactively controlled. The value of the vertex deformation represents the degree to which the 3D model's vertices move from their original positions, defining the amount of change in the model's shape. For example:

[0061] Main object: a slider indicating the degree of smile

[0062] Value range: 0 to 10

[0063] 0 means no smile, 10 means maximum smile

[0064] Vertex deformation: the character's mouth corners are raised

[0065] Value range: 0% to 100%

[0066] 0% is a neutral expression, 100% is a maximum smile

[0067] Further use the custom function to bind the values ​​in the master object and the values ​​of the vertex deformation through the reactor, establish the relationship between the movement of the master object and the activation of the vertex deformation, and link the input of the master object with the output of the vertex deformation. Schematic code:

[0068] BaseLink Reaction1ControlValue MorpherValue

[0069] fn BaseLink myReaction myReacName ControlValue morpherValue= (

[0071] myReaction.reactions.create name:myReacName

[0072] setReactionValue myReaction ControlValue

[0073] setReactionState myReaction morpherValue )

[0075] In a feasible implementation, the relationship between the movement of the main control object and the vertex deformation includes: when the relevant attributes of the main control object are at the minimum value of their set range, the vertex deformation of the controlled 3D model is also at its minimum state, which can be the original shape or the starting point of the deformation; when the relevant attributes of the main control object reach the maximum value of their set range, the vertex deformation of the controlled 3D model reaches its maximum state, that is, a fully deformed state.

[0076] Furthermore, the relationship between the movement of the master object and the vertex deformation is linear, that is, the mapping curve of the reactor Reaction1 is linear. For example:

[0077] When the slider (master object) is at 0, the vertex deformation is 0% (no smile)

[0078] When the slider is at 5, vertex deformation might be at 50% (medium smile)

[0079] When the slider reaches 10, the vertex deformation is 100% (maximum smile)

[0080] (5)Automated cycle:

[0081] Use a loop to iterate over all master objects.

[0082] Repeat steps 2-5 above for each master object.

[0083] This will automatically bind all master objects to their corresponding vertex deformations.

[0084] Preferably, you can also use the naming convention and the sequence number of the vertex deformation to achieve automatic correspondence between the vertex deformation Morph and the master object, so that you can more intelligently match the correct object when performing reactTo binding. Here is an example:

[0085] Naming conventions:

[0086] Assume the following naming convention:

[0087] Morph target name generated by shape key: [Part]_[Action]_Morph

[0088] Control object name: [Part]_[Action]_Control

[0089] For example:

[0090] Morph Target: Eyebrow_Raise_Morph

[0091] Corresponding control object: Eyebrow_Raise_Control

[0092] Therefore, you can first find all objects with Morpher modifiers through the script. For each channel in each Morpher, find the master object with a matching name, and then perform steps 2-5 above to complete the binding.

[0093] In the above-mentioned embodiment of the present application, in order to improve the generation efficiency of three-dimensional animation, a three-dimensional model and a corresponding shape key are created in the Blender software, and then imported into the 3DMax software, and the shape key is automatically bound to the corresponding master object in 3DMax through the maxscript scripting language; wherein, after obtaining the deformation information of each vertex, a reactor is created for each vertex deformation, and the vertex deformation is bound to the target master object using the reactto function and the BaseLink function. Through the method of the present application, automatic association and binding of vertex deformation and master object are realized, which greatly simplifies the setting process, especially when dealing with complex characters or a large number of controls, just select the corresponding model in 3DMax and perform one-key binding.

[0094] In one embodiment of the present application, a computing device is also provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein when the processor executes the instructions, the steps of the method for batch binding of bone vertices are implemented.

[0095] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned method for batch binding of bone vertices belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be found in the description of the technical scheme of the above-mentioned method for batch binding of bone vertices.

[0096] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the method for batch binding of bone vertices as described above.

[0097] The above is a schematic scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned method for batch binding of bone vertices belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the above-mentioned method for batch binding of bone vertices.

[0098] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0099] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0100] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0101] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0102] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A method for batch binding of bone vertices, characterized in that: include: Creating a three-dimensional model in Blender software, wherein the three-dimensional model includes a plurality of shape keys with standard naming; Importing the three-dimensional model into 3D Max software and converting it into multiple vertex deformations; The vertex deformation is traversed by using a script in 3D Max software, and the acquired vertex deformation is automatically bound to the corresponding master object through a reactor.

2. The method according to claim 1, wherein: In the method, the three-dimensional model includes a face model, and the shape key includes an expression shape key.

3. The method according to claim 1, wherein: The method of traversing the vertex deformations by using a script in the 3D Max software and automatically binding the obtained vertex deformations to the corresponding master object by using a reactor includes: Get all vertex deformation information through the maxscript script; Create one reactor for each vertex deformation; Use the reactto function of the maxscript script to bind the vertex deformation and the target master object through the reactor; Furthermore, the value of the target master object and the value of the vertex deformation are obtained, and the two values ​​are bound through the reactor.

4. The method according to claim 3, wherein: Acquiring the value of the target master object and the value of the vertex deformation, and binding the two values ​​through the reactor includes: Maps the master object's values ​​to the vertex deformation values ​​into a linear relationship.

5. The method according to claim 3, wherein: The method further includes: Use naming conventions and morph numbers to automatically map morphs to masters.

6. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.