Bone target point determination method and apparatus, electronic device, and readable storage medium
By determining the target skeleton's attachment point and pose during game runtime, the second target point data is calculated, solving the problem of sharing object target point data for characters of different body types, achieving efficient data sharing and reducing configuration workload.
Patent Information
- Application Number
- CN202211612474.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-12-14
AI Technical Summary
In existing technologies, multiple characters of different body types need to be configured with different inverse dynamics target point data, resulting in data redundancy and increased pre-configuration workload, and making it impossible to effectively share the target point data of objects.
During game execution, the target limb is determined by obtaining the first target bone attachment point identifier and data of the target object, and the second target bone attachment point, which serves as the starting attachment point in inverse kinematics, is not offset. The second target point data is calculated based on the current pose and the first target point data, so that the target point data of the object can be shared by characters of different body types.
It reduces configuration work, improves production efficiency, and allows characters of different body types to share object target point data, avoiding redundant configuration.
Smart Images

Figure CN115920384B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a skeleton target point determination method and device, electronic equipment and readable storage medium. BACKGROUND
[0002] Inverse dynamics is a commonly used technology in three-dimensional games. Using the inverse dynamics technology can better show the interaction effect between objects. Generally, a target point of inverse dynamics is configured in advance for a target object, that is, a target coordinate and an orientation are configured. For example, a finger clicks a button, and the coordinate and orientation of the wrist of the character when the character's finger clicks the button are configured in advance (that is, the target point is configured for the button), and when the character needs to click the button, the pre-configured target point is used to specify the position and orientation of the wrist bone of inverse dynamics, so that the finger can accurately click on the button. However, if the size of the bone is greatly different due to pinching and other reasons, for example, the size of the hand is greatly different, then characters of different body types cannot use the same target point data. If different target point data is configured for each character, although the above situation can be avoided, data redundancy will be caused and the pre-configuration workload will be increased. SUMMARY
[0003] The embodiment of the present application provides a skeleton target point determination method, device, electronic equipment and readable storage medium, which can make multiple characters of different body types share the inverse dynamics target point data of an object, without configuring different target point data for each character.
[0004] The embodiment of the present application can be implemented as follows:
[0005] In a first aspect, the embodiment of the present application provides a skeleton target point determination method, which comprises:
[0006] obtaining a first target bone hanging point identifier and first target point data corresponding to a current target object during game running, wherein the first target point data is used to make a first target bone hanging point corresponding to the first target bone hanging point identifier contact the target object;
[0007] determining a target limb where a first target bone corresponding to the first target bone hanging point is located;
[0008] determining a second target bone hanging point of the target limb as a starting hanging point in inverse dynamics, wherein the second target bone hanging point has no offset with a second target bone corresponding to the second target bone hanging point;
[0009] obtaining second target point data corresponding to the second target bone hanging point according to the current poses of the first target bone hanging point and the second target bone hanging point and the first target point data.
[0010] In a second aspect, an embodiment of the present application provides a skeleton target point determination apparatus, the apparatus comprising:
[0011] an information obtaining module configured to obtain, during game running, a first target skeleton joint identifier and first target point data corresponding to a current target object, wherein the first target point data is used to make a first target skeleton joint corresponding to the first target skeleton joint identifier contact the target object;
[0012] a limb determining module configured to determine a target limb in which a first target skeleton corresponding to the first target skeleton joint is located;
[0013] a skeleton joint determining module configured to determine a second target skeleton joint in the target limb as a starting joint in inverse dynamics, wherein the second target skeleton joint has no offset with a second target skeleton corresponding to the second target skeleton joint;
[0014] a calculating module configured to obtain second target point data corresponding to the second target skeleton joint according to current poses of the first target skeleton joint and the second target skeleton joint and the first target point data.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor is capable of executing the machine executable instructions to implement the skeleton target point determination method in the foregoing embodiments.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, wherein a computer program is stored on the readable storage medium, and the computer program is executed by a processor to implement the skeleton target point determination method in the foregoing embodiments.
[0017] The skeletal target point determination method, apparatus, electronic device, and readable storage medium provided in this application, during game execution, obtain a first target bone attachment point identifier and first target point data corresponding to the current target object. The first target point data is used to ensure contact between the first target bone attachment point corresponding to the first target bone identifier and the target object. Then, the target limb where the first target bone corresponding to the first target bone attachment point is located is determined, and subsequently, a second target bone attachment point, which serves as the starting attachment point in inverse dynamics, is determined. This second target bone attachment point has no offset from the corresponding second target bone. Finally, based on the current pose of the first and second target bone attachment points and the first target point data, the second target point data corresponding to the second target bone attachment point is obtained. Thus, by establishing two attachment points at the second target bone and the first target bone near the target object, the target point data of the second target bone is calculated, achieving the effect of sharing the target point data of objects for characters of different body types. This reduces configuration work and improves production efficiency. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A block diagram illustrating an electronic device provided in an embodiment of this application;
[0020] Figure 2 One of the flowcharts for the skeletal target point determination method provided in the embodiments of this application;
[0021] Figure 3 A second schematic flowchart illustrating the skeletal target point determination method provided in this application embodiment;
[0022] Figure 4 A schematic diagram of the finger bones and finger model provided in the embodiments of this application;
[0023] Figure 5 for Figure 2 A flowchart illustrating the sub-steps included in step S140;
[0024] Figure 6 The third flowchart illustrating the skeletal target point determination method provided in this application embodiment;
[0025] Figure 7 One of the block diagrams of the skeletal target point determination device provided in the embodiments of this application;
[0026] Figure 8 Block schematic diagram of the skeleton target point determination apparatus provided by the embodiment of the present application (2);
[0027] Figure 9 Block schematic diagram of the skeleton target point determination apparatus provided by the embodiment of the present application (3).
[0028] Icon: 100-electronic device; 110-memory; 120-processor; 130-communication unit; 200-skeleton target point determination apparatus; 201-configuration module; 210-information obtaining module; 220-limb determination module; 230-skeleton hanging point determination module; 240-computation module; 250-processing module. DETAILED DESCRIPTION
[0029] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions of the embodiments of the present application. Obviously, the described embodiments are only some 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 accompanying drawings can be arranged and designed in various different configurations.
[0030] 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 claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of the present application.
[0031] It should be noted that the relational terms such as “first” and “second” and the like are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms “comprises”, “comprising” or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or apparatus including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or apparatus. Without more limitations, the element defined by the statement “comprises a” does not exclude the presence of additional identical elements in the process, method, article or apparatus including the element.
[0032] The following will be a detailed description of some embodiments of the present application combined with the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
[0033] Please refer to Figure 1 ,Figure 1 A block diagram of an electronic device 100 is provided in the embodiments of the present application. The electronic device 100 can be, but is not limited to, a computer, a server, etc. The electronic device 100 includes a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, the elements can be electrically connected to each other through one or more communication buses or signal lines.
[0034] The memory 110 is configured to store programs or data. The memory 110 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0035] The processor 120 is configured to read / write the data or programs stored in the memory 110 and perform corresponding functions. For example, the memory 110 stores a skeletal target point determination apparatus 200. The skeletal target point determination apparatus 200 includes at least one software function module stored in the memory 110 in the form of software or firmware. The processor 120 runs the software programs and modules stored in the memory 110, such as the skeletal target point determination apparatus 200 in the embodiments of the present application, to perform various function applications and data processing, i.e., to implement the skeletal target point determination method in the embodiments of the present application.
[0036] The communication unit 130 is configured to establish a communication connection between the electronic device 100 and other communication terminals through a network and to receive / transmit data through the network.
[0037] It should be understood that, Figure 1 The structure shown is only a structural schematic diagram of the electronic device 100. The electronic device 100 can further include more or fewer components than those shown in the embodiments of the present application or have a different configuration from that shown in the embodiments of the present application. Figure 1 The components shown in the embodiments of the present application can be implemented in hardware, software, or a combination thereof. Figure 1 Figure 1 The components shown in the embodiments of the present application can be implemented in hardware, software, or a combination thereof.
[0038] Please refer to Figure 2 , Figure 2 FIG. 1 is a schematic diagram of a method for determining a skeletal target point according to an embodiment of the present application. The method can be applied to the electronic device 100 described above. The specific process of the method for determining a skeletal target point will be described in detail below. In this embodiment, the method can include steps S110-S140.
[0039] In step S110, a first target skeletal anchor identifier and first target point data corresponding to a current target object are obtained during game running.
[0040] During game running, an object that needs to be contacted by a character can be determined according to game scenario requirements, and the object is taken as a target object. The game can be a 3D game. Then, the first target skeletal anchor identifier and the first target point data corresponding to the target object can be determined in combination with configuration information. The first target skeletal anchor identifier is an identifier of a first target skeletal anchor, which can be a name or a number, etc. The identifier is unique, and the identifiers of different skeletal anchors are different, for example, the identifiers of a finger anchor and a palm anchor are different. The skeletal anchor is a point created based on a character skeleton, which can or can not have a relative offset from the skeleton, and is determined in combination with actual conditions.
[0041] The first target point data is used to make the first target skeletal anchor corresponding to the first target skeletal anchor identifier contact the target object. As can be seen, in this embodiment, the target point data configured for the object is not used to directly indicate the coordinates and orientation of a limb skeleton, but is used to indicate the coordinates and orientation of a skeletal anchor that contacts the object. This manner can ensure the final display effect and facilitate reuse of the target point data by different characters.
[0042] In step S120, a target limb in which a first target skeleton corresponding to the first target skeletal anchor is located is determined.
[0043] In step S130, a second target skeletal anchor that is a starting anchor of the target limb in inverse dynamics is determined.
[0044] After the first target skeletal anchor is determined, the limb in which the first target skeleton corresponding to the first target skeletal anchor is located can be analyzed and determined, and the limb is taken as a target limb. Then, the starting anchor of the target limb in inverse dynamics can be analyzed and determined, and the starting anchor is taken as a second target skeletal anchor. The second target skeletal anchor has no offset from the second target skeleton corresponding to the second target skeletal anchor.
[0045] For example, assuming that the first target skeletal anchor is an anchor of a finger a of a hand A, the first target skeleton corresponding to the anchor can be determined to be a finger a skeleton, and the target limb can be determined to be a hand A limb.
[0046] Inverse kinematics is used in 3D games to calculate the coordinates and orientation of each bone in a skeletal chain based on the final coordinates and orientation of a given bone. In other words, it calculates the coordinates and orientation of the parent node based on the final coordinates and orientation of its child nodes (i.e., the target data). In inverse kinematics, the final coordinates and orientations assigned to bones are represented using target point data. Typically, the target point for an arm is the final coordinates and orientation of the wrist bones.
[0047] The initial attachment point is the attachment point of the bone corresponding to the target point data specified in the inverse dynamics. For example, the initial attachment point of the arm is the attachment point of the wrist bone, and the attachment point of the wrist bone is not offset from the wrist bone.
[0048] Step S140: Based on the current poses of the first target bone attachment point and the second target bone attachment point and the first target point data, obtain the second target point data corresponding to the second target bone attachment point.
[0049] Given the second target bone attachment point of the target limb and the first target bone attachment point (which is the bone attachment point closest to the target point), the target point data of the second target bone attachment point can be calculated based on the current positions of these two bone attachment points and the data of the first target point. This yields the target point data of the initial attachment point of the target limb. In this way, characters of different body types can use the target data points corresponding to objects, eliminating the need to configure the target point count for each character separately, reducing configuration work and improving production efficiency.
[0050] Optionally, the electronic device 100 can pre-configure the target point data, skeletal attachment points, and limb details of the object, or other devices can complete the above configuration and send the configuration information to the electronic device 100.
[0051] As one possible implementation, the electronic device 100 can be pre-configured. Please refer to... Figure 3 , Figure 3 This is a second schematic flowchart illustrating the skeletal target point determination method provided in this application embodiment. In this embodiment, before step S110, the method may further include steps S101 to S104.
[0052] Step S101: Create different second skeletal attachment points for the character.
[0053] Optionally, a corresponding bone anchor can be created for a specified bone, and the created bone anchor is taken as the second bone anchor. Optionally, the specified bone can be determined according to the bone corresponding to the target point data required by the game when inverse dynamics is used, for example, if only finger clicking objects is required in the game, only a wrist bone anchor can be set. It can be understood that the determination of the specified bone is only an example, and the actual requirements can be determined.
[0054] The second bone anchor has no offset with the bone corresponding to the second bone anchor. For example, a bone anchor is established at the wrist position of the character, and the bone anchor has no relative offset with the wrist bone, and the position of the bone anchor represents the position of the wrist bone in the world space.
[0055] It is worth noting that when the second bone anchor is created, it can not be created for each character respectively, but can be created uniformly. For example, if a wrist anchor is created for a character, it can be considered that all characters have a wrist anchor. In this way, the second bone anchor with no offset with the bone can be quickly created.
[0056] Step S102, a corresponding first bone anchor is created for different target point types.
[0057] In this embodiment, the target point type can be determined by combining the scene setting of the game, and determining how the character contacts the object in the game. That is, the target type is used to indicate which part of the character is required to contact the object. Then, a corresponding first bone anchor is created for each target point type. The first bone anchor is used to contact the object corresponding to the target point type. For example, if a finger is required to click an object, a corresponding finger anchor is established. For example, if the palm is required to hit an object, a palm anchor can be established.
[0058] The first bone anchor and the first bone corresponding to the first bone anchor can not have a relative offset, which is determined according to the actual situation. For example, if the bone completely coincides with the model, the first bone anchor created at this time and the first bone can have no offset. If it does not completely coincide, for example, the finger model does not completely coincide with the finger bone, the finger anchor and the finger bone have an offset.
[0059] Step S103, configuring an inverse dynamics limb, and selecting an initial anchor corresponding to the limb from the second bone anchor corresponding to the limb for each limb.
[0060] In the embodiment, different bones can be combined into a reverse dynamics limb according to actual requirements. The number of configured limbs can be determined according to actual requirements. After the limbs are configured, for each limb, a second bone joint point can be specified from the second bone joint points created in step S101 as the initial joint point of the limb. For example, for the left hand limb, the left hand wrist joint point is specified as the initial joint point of the left hand limb; for the right hand limb, the right hand wrist joint point is specified as the initial joint point of the right hand limb.
[0061] In step S104, for each object, a first bone joint point corresponding to the object is selected from the created first bone joint points according to the target point type corresponding to the object, and a pose of the selected first bone joint point when the object is in contact is obtained as target point data corresponding to the object according to the position of the object, and the first bone joint point identifier of the selected first bone joint point and the obtained target point data are saved corresponding to the object.
[0062] For each object that needs to be contacted by the character in the game, a first bone joint point corresponding to the object can be selected from the first bone joint points created in step S102 according to the target point type corresponding to the object. Then, the rotation and position between the fingers and the object can be adjusted according to the coordinates of the object in the world space, and the pose of the first bone joint point when the object is in contact is recorded as the target point data corresponding to the object.
[0063] For the convenience of subsequent search, the target point data corresponding to the object and the first bone joint point corresponding to the object can be saved. For example, the target point data corresponding to the object and the first bone joint point identifier of the corresponding first bone joint point are stored on the object.
[0064] In the above configuration, the target point data configured for the object is the target point data of the first bone joint point in contact with the object, not the target point data of the bone as in the prior art. The first bone joint point is not the end bone of the limb. As shown in Figure 4 The box represents a finger model, and the line represents the finger bone, which is a point. The finger bone does not generally coincide with the end of the finger model. If the finger bone is directly used as the end bone of reverse dynamics, the model cannot accurately contact the corresponding object. Therefore, if the finger bone is used as the end bone of reverse dynamics, on the one hand, multiple reverse dynamics bone chains need to be configured for the character, and on the other hand, it is not accurate.
[0065] In the above configuration process, step S103 is after step S101, and step S104 is after step S102. The specific execution order can be set according to actual requirements.
[0066] After the relevant configuration is completed, during the game running, a target object that needs to be contacted by the current role can be determined according to the scene requirement, and then the first target skeleton hanging point identifier and the first target point data corresponding to the target object are obtained to be passed to the inverse dynamics system to specify the target point and the target hanging point identifier for the corresponding target limb. For example, when a finger needs to click a button, the finger hanging point identifier and the first target point data corresponding to the button are determined based on the foregoing configuration.
[0067] Before the inverse dynamics system is used to calculate the bone data of the target limb, the first target bone where the first target skeleton hanging point is located can be determined according to the first correspondence relationship between the inverse dynamics limb and the bone, and then the second skeleton hanging point of the target limb as the starting hanging point is determined. Then, the second target point data corresponding to the second target skeleton point can be calculated according to the current pose of the first target skeleton hanging point and the second target skeleton hanging point and the first target point data, that is, the final orientation and position of the second target skeleton are obtained.
[0068] Optionally, as a possible implementation manner, the second target point data can be calculated according to the current pose of one of the first target hanging point and the second target hanging point, the relative pose relationship and the first target point data.
[0069] Optionally, as another possible implementation manner, the second target point data can be obtained in the manner shown in FIG. 8. Please refer to Figure 5 Figure 5 Figure 5 Figure 2 The step S140 in the method shown in FIG. 7 includes the flowchart of the sub-steps. In the embodiment, the method can include the sub-step S141 to the sub-step S144.
[0070] The sub-step S141 obtains the first current pose of the first target skeleton hanging point in the world space.
[0071] The sub-step S142 obtains the second current pose of the second target skeleton hanging point in the world space.
[0072] The sub-step S143 calculates the conversion information according to the first current pose and the first target point data.
[0073] The sub-step S144 calculates the second target point data according to the second current pose and the conversion information.
[0074] In the embodiment, a first current pose of the first target skeletal anchor in a world space and a second current pose of the second target skeletal anchor in the world space can be obtained. Then, a conversion information is calculated by how the first current pose needs to be converted to reach the pose represented by the first target point data. Finally, the second current pose is converted by using the conversion information, so as to obtain the second target point data.
[0075] For example, the target limb is a hand, the wrist anchor is the starting anchor (i.e., the second target skeletal anchor), denoted as T0, and the finger anchor is set as the target anchor (i.e., the first target skeletal anchor), denoted as T1. The orientation and displacement information recorded on the target object (i.e., the first target point data) is M0, the current orientation and displacement information of T0 is M1, and the current orientation and displacement of T1 is M2. The offset between M2 and M0 is calculated as M3, i.e., M2*M3=M0, which means that M2 is equal to M0 after being converted by M3. Similarly, M1 needs to be converted by M3, and the data of M1 after conversion is calculated as M4, i.e., the final orientation and rotation of the wrist in the world space is M4. In this way, if the hand is larger than the default, the wrist position will move backward, and if the hand is smaller than the default, the wrist position will move forward, so as to achieve the function of accurate pointing for different body types.
[0076] Please refer to Figure 6 , Figure 6 This is the third flowchart of the skeletal target point determination method provided by the embodiments of the present application. In the embodiment, after step S140, the method can further include step S150.
[0077] In step S150, the skeletal data of the target limb is calculated based on inverse dynamics according to the second target point data.
[0078] Since the second target skeletal anchor has no offset from the second target skeleton, the second target point corresponding to the second target skeletal anchor is the target point data of the second target skeleton. In the case where the second target point data is obtained, the poses expected to be reached by each skeleton in the target limb can be calculated based on inverse dynamics, so as to present the corresponding object contact effect.
[0079] The skeletal data is the data in the character model space, and the second target point data uses the world space. Therefore, the poses expected to be reached by each skeleton in the target limb in the world space can be calculated according to the second target point data, and then the skeletal data is calculated by combining the pose of the target character in the world space which needs to be in contact with the target object at this time.
[0080] To perform the corresponding steps in the above-mentioned embodiments and various possible manners, an implementation of a skeletal target point determination apparatus 200 is given below, which can optionally employ the device structure of the electronic device 100 shown in Figure 1 Further, please refer to Figure 7 , Figure 7 A block schematic diagram of a skeletal target point determination apparatus 200 provided by an embodiment of the present application is shown. It should be noted that the skeletal target point determination apparatus 200 provided by the present embodiment has the same basic principles and technical effects as the above-mentioned embodiments, and for brief description, the part not mentioned in the present embodiment can refer to the corresponding content in the above-mentioned embodiments. In the present embodiment, the skeletal target point determination apparatus 200 can include an information obtaining module 210, a limb determination module 220, a skeletal anchor point determination module 230, and a calculation module 240.
[0081] The information obtaining module 210 is configured to obtain a first target skeletal anchor point identifier and first target point data corresponding to a target object during game running. The first target point data is used to make the first target skeletal anchor point corresponding to the first target skeletal anchor point identifier contact the target object.
[0082] The limb determination module 220 is configured to determine a target limb where the first target skeletal anchor point is located.
[0083] The skeletal anchor point determination module 230 is configured to determine a second target skeletal anchor point of the target limb as a starting anchor point in inverse dynamics. The second target skeletal anchor point has no offset with the second target skeletal anchor point corresponding to the second target skeletal anchor point.
[0084] The calculation module 240 is configured to obtain second target point data corresponding to the second target skeletal anchor point according to the current poses of the first target skeletal anchor point and the second target skeletal anchor point and the first target point data.
[0085] Optionally, in the present embodiment, the calculation module 240 is specifically configured to: obtain a first current pose of the first target skeletal anchor point in a world space; obtain a second current pose of the second target skeletal anchor point in the world space; calculate conversion information according to the first current pose and the first target point data; and calculate the second target point data according to the second current pose and the conversion information.
[0086] Optionally, in the present embodiment, the limb determination module 220 is specifically configured to determine the target limb according to a first correspondence relationship between each inverse dynamics limb and skeletal anchor point.
[0087] Please refer to Figure 8 , Figure 8 A block schematic diagram of a skeleton target point determination apparatus 200 according to another embodiment of the present application is provided. In this embodiment, the skeleton target point determination apparatus 200 can further include a configuration module 201 configured to: create different second skeleton hooks for a character, wherein the second skeleton hooks are not offset from the skeletons corresponding to the second skeleton hooks; create corresponding first skeleton hooks for different target point types, wherein the first skeleton hooks are used for object contact corresponding to the target point types; configure inverse dynamics limbs, and select an initial hook corresponding to each limb from the second skeleton hook corresponding to the limb; for each object, select a first skeleton hook corresponding to the object from the created first skeleton hooks according to the target point type corresponding to the object, and obtain a pose of the selected first skeleton hook when in contact with the object as target point data corresponding to the object according to a position of the object, and save the first skeleton hook identifier of the selected first skeleton hook and the obtained target point data corresponding to the object.
[0088] Please refer to Figure 9 , Figure 9 A block schematic diagram of a skeleton target point determination apparatus 200 according to another embodiment of the present application is provided. In this embodiment, the skeleton target point determination apparatus 200 can further include a processing module 250 configured to: based on inverse dynamics, calculate skeleton data of the target limb according to the second target point data.
[0089] Optionally, the above modules can be stored in the memory 110 shown in the form of software or firmware (Firmware) or solidified in an operating system (Operating System, OS) of the electronic device 100, and can be executed by the processor 120 in the Figure 1 Meanwhile, data, program codes, etc. required for execution of the above modules can be stored in the memory 110. Figure 1
[0090] The embodiment of the present application further provides a readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the skeleton target point determination method.
[0091] In summary, the embodiment of the present application provides a skeleton target point determination method and device, electronic equipment and readable storage medium. When a game is running, a first target skeleton hanging point identifier and first target point data corresponding to a current target object are obtained. The first target point data is used to contact the first target skeleton hanging point identifier corresponding to the first target skeleton hanging point and the target object. Then, a target limb where the first target skeleton hanging point corresponds to the first target skeleton is determined, and a second target skeleton hanging point which is a starting hanging point in inverse dynamics of the target limb is determined. The second target skeleton hanging point has no offset with the corresponding second target skeleton. Finally, based on the current poses of the first target skeleton hanging point and the second target skeleton hanging point and the first target point data, second target point data corresponding to the second target skeleton hanging point is obtained. In this way, the target point data of the second target skeleton is calculated inversely through two hanging points established at the second target skeleton and the first target skeleton close to the target object, the effect of sharing the target point data of the object by different body type characters is achieved, the configuration work can be reduced, and the production efficiency is improved.
[0092] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are only schematic, for example, the flowcharts and block diagrams in the drawings show the possible implementation architectures, functions and operations of the devices, methods and computer program products according to the embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders from those noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system for implementing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0093] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0094] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts of the prior art that make contributions or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0095] The above only describes optional embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, 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 skeletal landmark determination method, comprising: The method comprises: creating different second bone attachment points for the character, wherein the second bone attachment points have no offset from the bones corresponding to the second bone attachment points; creating corresponding first bone attachment points for different target point types, wherein the first bone attachment points are used for contact with objects corresponding to the target point types; configuring inverse dynamics limbs and selecting, for each limb, an initial attachment point corresponding to the limb from the second bone attachment points corresponding to the limb; for each object, selecting a first bone attachment point corresponding to the object from the created first bone attachment points according to the target point type corresponding to the object, obtaining, according to the position of the object, a pose of the selected first bone attachment point when in contact with the object as target point data corresponding to the object, and saving the first bone attachment point identifier of the selected first bone attachment point and the obtained target point data corresponding to the object; during game running, obtaining a first target bone attachment point identifier and first target point data corresponding to a current target object, wherein the first target point data is used to make the first target bone attachment point corresponding to the first target bone attachment point identifier contact the target object; determining a target limb in which a first target bone corresponding to the first target bone attachment point is located; determining a second target bone attachment point of the target limb as a starting attachment point in inverse dynamics, wherein the second target bone attachment point has no offset from a second target bone corresponding to the second target bone attachment point; obtaining second target point data corresponding to the second target bone attachment point according to the current poses of the first target bone attachment point and the second target bone attachment point and the first target point data.
2. The method of claim 1, wherein, The method further comprises: obtaining a first current pose of the first target bone attachment point in a world space; obtaining a second current pose of the second target bone attachment point in the world space; calculating conversion information according to the first current pose and the first target point data; calculating the second target point data according to the second current pose and the conversion information.
3. The method of claim 1, wherein, The method further comprises: determining the target limb according to a first correspondence relationship between each inverse dynamics limb and bone preconfigured.
4. The method according to any one of claims 1 to 3, characterized in that, After the method of obtaining the second target point data corresponding to the second target bone attachment point according to the current poses of the first target bone attachment point and the second target bone attachment point and the first target point data, the method further comprises: calculating bone data of the target limb according to the second target point data based on inverse dynamics.
5. A skeletal landmark determination apparatus, characterized by, The device comprises: The configuration module is configured to: create different second bone attachment points for a role, wherein the second bone attachment points have no offset with respect to the bones corresponding to the second bone attachment points; create corresponding first bone attachment points for different target point types, wherein the first bone attachment points are used for object contact corresponding to the target point types; configure inverse dynamics limbs, and select an initial attachment point corresponding to each limb from the second bone attachment point corresponding to the limb; for each object, select a first bone attachment point corresponding to the object from the created first bone attachment points according to the target point type corresponding to the object, and obtain a pose of the selected first bone attachment point when in contact with the object as target point data corresponding to the object according to a position of the object, and save the first bone attachment point identifier of the selected first bone attachment point and the obtained target point data corresponding to the object; The information obtaining module is configured to obtain a first target bone attachment point identifier and first target point data corresponding to a target object in a current game, wherein the first target point data is used to make a first target bone attachment point corresponding to the first target bone attachment point identifier in contact with the target object. The limb determining module is configured to determine a target limb in which a first target bone corresponding to the first target bone attachment point is located. The bone attachment point determining module is configured to determine a second target bone attachment point of the target limb as a starting attachment point in inverse dynamics, wherein the second target bone attachment point has no offset with respect to a second target bone corresponding to the second target bone attachment point. The calculation module is configured to obtain second target point data corresponding to the second target bone attachment point according to current poses of the first target bone attachment point and the second target bone attachment point and the first target point data.
6. The apparatus of claim 5, wherein, The device further includes a processing module configured to: Calculate, based on inverse dynamics, bone data of the target limb according to the second target point data.
7. An electronic device, comprising: The device further includes a processing module configured to:
8. A readable storage medium, having stored thereon a computer program, characterized in that, Calculate, based on inverse dynamics, bone data of the target limb according to the second target point data. The computer program is executed by the processor to implement the bone target point determination method according to any one of claims 1-4. The computer program is executed by the processor to implement the bone target point determination method according to any one of claims 1-4.
Citation Information
Patent Citations
Reverse dynamics resolving method and device applied to humanoid skeleton
CN111079071A
Animation data processing method and device, storage medium and computer equipment
CN112669414A