Game Data Processing Method, Device, Electronic Device, and Storage Medium

By obtaining and calculating the node data of the main model and the additional model in a three-dimensional game, determining the matching relationship's hanging points is solved, and data redundancy is improved.

CN114377404BActive Publication Date: 2025-07-25BEIJING PIXEL SOFTWARE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111615428.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-07-25
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In the prior art, data redundancy occurs when the main model mounts additional models in a three-dimensional game, affecting data maintenance and update efficiency.

Method used

By obtaining the master node of the master model and the slave node of the additional model, the matching relationship between the master and slave nodes is determined, and the node data of the slave node is calculated based on the node data of the master node, the master and slave nodes is realized to achieve the connection between the models.

Benefits of technology

Reduces data redundancy and improves the efficiency of data update and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114377404B_ABST
    Figure CN114377404B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer games, and provides a game data processing method, device, electronic device, and storage medium. By obtaining the main node of the main model and the slave node of the additional model, the main node includes node data representing the position information of the main model in the standard three-dimensional coordinate system; then obtaining the main hanging point of the main model and the slave hanging point of the additional model, and there is a matching relationship between the main hanging point and the slave hanging point. The main hanging point includes node data representing its position information in the three-dimensional coordinate system established by the main node, and the slave hanging point includes node data representing its position information in the three-dimensional coordinate system established by the slave node; finally, based on the node data of the main node, the node data of the main hanging point, and the node data of the slave hanging point, the node data of the slave node is obtained, and the node data of the slave node represents the position information of the additional model in the standard three-dimensional coordinate system. The connection between models is realized, thereby reducing data redundancy and improving the efficiency of data update and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer games, and more particularly, to a game data processing method, apparatus, electronic device, and storage medium. Background Art

[0002] As games have gradually become a mainstream form of entertainment for the public, moderate gaming can enable people to balance work and rest, relieve their mental stress, and soothe their moods.

[0003] In 3D games, multiple additional models such as weapon models are generally attached to a main model such as a character model. Currently, usually, each time an additional model is added to the main model, a hanging point is created on the main model. This method can lead to data redundancy and is not conducive to maintenance and update. Summary of the Invention

[0004] In view of this, an object of the present invention is to provide a game data processing method, apparatus, electronic device, and storage medium.

[0005] To achieve the above object, the technical solutions adopted in the embodiments of the present invention are as follows:

[0006] In a first aspect, the present invention provides a game data processing method, the method comprising:

[0007] Obtain a main node of a main model and a slave node of an additional model; the main node includes node data, and the node data of the main node represents the position information of the main model in a standard three-dimensional coordinate system;

[0008] Determine a main hanging point of the main model and a slave hanging point of the additional model; the main hanging point and the slave hanging point have a matching relationship;

[0009] Obtain the node data of the main hanging point and the node data of the slave hanging point; the node data of the main hanging point represents the position information of the main hanging point in a three-dimensional coordinate system established based on the main node; the node data of the slave hanging point represents the position information of the slave hanging point in a three-dimensional coordinate system established based on the slave node;

[0010] Obtain the node data of the slave node according to the node data of the main node, the node data of the main hanging point, and the node data of the slave hanging point; the node data of the slave node represents the position information of the additional model in a standard three-dimensional coordinate system.

[0011] In an optional embodiment, the step of obtaining the node data of the slave node according to the node data of the main node, the node data of the main hanging point, and the node data of the slave hanging point includes:

[0012] Obtain the transformation amount of the slave node based on the node data of the main hanging point and the node data of the slave hanging point; the transformation amount of the slave node represents the transformation amount of the slave node relative to the main node;

[0013] Obtain the node data of the slave node based on the node data of the main node and the transformation amount of the slave node.

[0014] In an alternative embodiment, the step of obtaining the transformation amount of the slave node based on the node data of the main hanging point and the node data of the slave hanging point includes:

[0015] Create a first node, a second node, and a third node; the first node is a child node of the main node, the second node is a child node of the first node, the third node is a child node of the second node, and the slave node is a child node of the third node;

[0016] Obtain a first transformation amount, a second transformation amount, a third transformation amount, and a fourth transformation amount based on the node data of the main hanging point and the node data of the slave hanging point; the transformation amount of the slave node includes the first transformation amount, the second transformation amount, the third transformation amount, and the fourth transformation amount;

[0017] Wherein, the first transformation amount represents the transformation amount of the first node relative to the main node; the second transformation amount represents the transformation amount of the second node relative to the first node; the third transformation amount represents the transformation amount of the third node relative to the second node; the fourth transformation amount represents the transformation amount of the slave node relative to the third node.

[0018] In an alternative embodiment, the step of obtaining the node data of the slave node based on the node data of the main node and the transformation amount of the slave node includes:

[0019] Obtain the node data of the first node based on the node data of the main node and the first transformation amount;

[0020] Obtain the node data of the second node based on the node data of the first node and the second transformation amount;

[0021] Obtain the node data of the third node based on the node data of the second node and the third transformation amount;

[0022] Obtain the node data of the slave node based on the node data of the third node and the fourth transformation amount.

[0023] In an alternative embodiment, the node data includes a coordinate value, an orientation value, and a scaling value, and the additional model includes an initial scaling value;

[0024] The step of obtaining a first transformation quantity, a second transformation quantity, a third transformation quantity, and a fourth transformation quantity according to the node data of the main hanging point and the node data of the secondary hanging point includes:

[0025] Taking the coordinate value, orientation value, and scaling value of the main hanging point as the first transformation quantity;

[0026] Calculating the opposite values of the coordinate value, orientation value, and scaling value of the secondary hanging point respectively to obtain the coordinate opposite value, orientation opposite value, and scaling opposite value of the secondary hanging point;

[0027] Taking the orientation opposite value and scaling opposite value of the secondary hanging point as the second transformation quantity;

[0028] Taking the initial scaling value of the additional model as the third transformation quantity;

[0029] Taking the coordinate opposite value of the secondary hanging point as the fourth transformation quantity.

[0030] In a second aspect, the present invention provides a game data processing device, and the device includes:

[0031] An acquisition module, configured to acquire a main node of a main model and a secondary node of an additional model; the main node includes node data, and the node data of the main node represents the position information of the main model in a standard three-dimensional coordinate system;

[0032] A determination module, configured to determine a main hanging point of the main model and a secondary hanging point of the additional model; the main hanging point and the secondary hanging point have a matching relationship;

[0033] A calculation module, configured to acquire the node data of the main hanging point and the node data of the secondary hanging point; the node data of the main hanging point represents the position information of the main hanging point in a three-dimensional coordinate system established based on the main node; the node data of the secondary hanging point represents the position information of the secondary hanging point in a three-dimensional coordinate system established based on the secondary node;

[0034] A processing module, configured to obtain the node data of the secondary node according to the node data of the main node, the node data of the main hanging point, and the node data of the secondary hanging point; the node data of the secondary node represents the position information of the additional model in a standard three-dimensional coordinate system.

[0035] In an optional implementation manner, the processing module is further configured to:

[0036] Obtain a transformation quantity of the secondary node according to the node data of the main hanging point and the node data of the secondary hanging point; the transformation quantity of the secondary node represents the transformation quantity of the secondary node relative to the main node;

[0037] Obtain the node data of the slave node according to the node data of the master node and the transformation amount of the slave node.

[0038] In an alternative embodiment, the processing module is further configured to:

[0039] Create a first node, a second node, and a third node; the first node is a child node of the master node, the second node is a child node of the first node, the third node is a child node of the second node, and the slave node is a child node of the third node;

[0040] Obtain a first transformation amount, a second transformation amount, a third transformation amount, and a fourth transformation amount according to the node data of the master hanging point and the node data of the slave hanging point; the transformation amount of the slave node includes the first transformation amount, the second transformation amount, the third transformation amount, and the fourth transformation amount;

[0041] Wherein, the first transformation amount represents the transformation amount of the first node relative to the master node; the second transformation amount represents the transformation amount of the second node relative to the first node; the third transformation amount represents the transformation amount of the third node relative to the second node; the fourth transformation amount represents the transformation amount of the slave node relative to the third node.

[0042] In a third aspect, the present invention provides an electronic device, including a processor and a memory, where the memory stores a computer program, and when the processor executes the computer program, the method described in any one of the foregoing embodiments is implemented.

[0043] In a fourth aspect, the present invention provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the foregoing embodiments is implemented.

[0044] The game data processing method, device, electronic device, and storage medium provided by the embodiments of the present invention obtain the main nodes of the main model and the slave nodes of the additional model. The main nodes include node data representing the position information of the main model in the standard three-dimensional coordinate system. Then, the main hanging points of the main model and the slave hanging points of the additional model are obtained, and there is a matching relationship between the main hanging points and the slave hanging points. The main hanging points include node data representing their position information in the three-dimensional coordinate system established by the main nodes, and the slave hanging points include node data representing their position information in the three-dimensional coordinate system established by the slave nodes. Finally, based on the node data of the main nodes, the node data of the main hanging points, and the node data of the slave hanging points, the node data of the slave nodes is obtained, and the node data of the slave nodes represents the position information of the additional model in the standard three-dimensional coordinate system. Connecting the hanging points with a matching relationship on the models realizes the connection between the models. Compared with the method of establishing hanging points for each additional model mounted in the prior art, the models can be connected based on two hanging points, thereby reducing data redundancy and improving the efficiency of data update and maintenance.

[0045] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, gives a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0047] Figure 1 Shows a schematic block diagram of an electronic device provided by an embodiment of the present invention;

[0048] Figure 2 Shows a schematic flowchart of a game data processing method provided by an embodiment of the present invention;

[0049] Figure 3 Shows another schematic flowchart of a game data processing method provided by an embodiment of the present invention;

[0050] Figure 4 Shows another schematic flowchart of a game data processing method provided by an embodiment of the present invention;

[0051] Figure 5 Shows another schematic flowchart of a game data processing method provided by an embodiment of the present invention;

[0052] Figure 6 Shows another schematic flowchart of a game data processing method provided by an embodiment of the present invention;

[0053] Figure 7 It shows a functional module diagram of the game data processing device provided by an embodiment of the present invention.

[0054] Icons: 110 - Bus; 120 - Processor; 130 - Memory; 150 - I / O Module; 170 - Communication Interface; 300 - Game Data Processing Device; 310 - Acquisition Module; 330 - Determination Module; 350 - Calculation Module; 370 - Processing Module. Detailed implementation manners

[0055] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Usually, the components of the embodiments of the present invention described and shown in the accompanying drawings here can be arranged and designed in various different configurations.

[0056] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed present invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.

[0057] It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non - exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0058] As games gradually become a mainstream form of entertainment for the public, moderate gaming can enable people to combine work and rest, relieve people's mental stress, and soothe people's mood. In 3D games, models are usually connected together by hanging points, and a main model may be connected to multiple additional models. For example, different weapon models such as knives, swords, and guns can be mounted on a character model. The hanging point information corresponding to each additional model is different.

[0059] In the prior art, usually, every time an additional model is added to the main model, hanging points are created on the main model. This will result in a relatively large amount of data for the model, leading to data redundancy, making it inconvenient for updating and maintenance, and reducing the game running efficiency. Furthermore, the present invention provides a method for processing game data to solve the above problems.

[0060] Please refer to Figure 1 , which is a block diagram of an electronic device provided by an embodiment of the present invention. The electronic device includes a bus 110, a processor 120, a memory 130, an I / O module 150, and a communication interface 170.

[0061] The bus 110 can be a circuit that interconnects the above elements and transmits communications (such as control messages) between the above elements.

[0062] The processor 120 can receive commands from the above other elements (such as the memory 130, the I / O module 150, the communication interface 170, etc.) through the bus 110, can interpret the received commands, and can perform calculations or data processing according to the interpreted commands.

[0063] The processor 120 may be an integrated circuit chip with signal processing capabilities. The processor 120 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0064] The memory 130 can store commands or data received from the processor 120 or other elements (such as the I / O module 150, the communication interface 170, etc.) or commands or data generated by the processor 120 or other elements.

[0065] The memory 130 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.

[0066] The I / O module 150 can receive commands or data input by the user via input-output means (such as sensors, keyboards, touchscreens, etc.), and can transmit the received commands or data to the processor 120 or the memory 130 via the bus 110. And it is used to display various information received, stored, and processed from the above components (such as multimedia data, text data), and can display videos, images, data, etc. to the user.

[0067] The communication interface 170 can be used for signaling or data communication with other node devices.

[0068] It can be understood that Figure 1 the structure shown is only a schematic diagram of the structure of the electronic device, and the electronic device may also include more or fewer components than those shown Figure 1 shown, or have a configuration different from that Figure 1 shown. Figure 1 Each component shown can be implemented by hardware, software, or a combination thereof.

[0069] The electronic device provided by the embodiments of the present invention can be a smart phone, a personal computer, a tablet computer, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiments of the present invention do not make any restrictions in this regard.

[0070] Next, taking the above-mentioned electronic device as the execution subject, each step in each method provided by the embodiments of the present invention will be executed, and the corresponding technical effects will be achieved.

[0071] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a game data processing method provided by an embodiment of the present invention.

[0072] Step S202, obtain the main node of the main model and the slave node of the additional model;

[0073] Among them, the main node includes node data, and the node data of the main node represents the position information of the main model in the standard three-dimensional coordinate system.

[0074] It can be understood that the standard three-dimensional coordinate system represents the three-dimensional coordinate system established in the three-dimensional game. In this standard three-dimensional coordinate system, the position information of game elements can be uniformly managed, and game elements include game models.

[0075] Each game model has a central node for representing the position information of the game model. The main node is the central node of the main model such as the character model. The slave node is the central node of the additional model such as the weapon model.

[0076] A client for running a game is installed in the electronic device, and the electronic device is communicatively connected to a game server, which is used to provide corresponding services when the game is running on the client.

[0077] Optionally, the electronic device can obtain the master node of the main model and the slave node of the additional model through communication and interaction with the game server, and obtain the node data of the master node, that is, the position information of the main model in the standard three-dimensional coordinate system.

[0078] Step S204, determine the master hanging point of the main model and the slave hanging point of the additional model;

[0079] Among them, the master hanging point and the slave hanging point have a matching relationship.

[0080] It can be understood that each game model has a hanging point for hooking up with other game models. The master hanging point represents the hanging point on the main model, and the slave hanging point represents the hanging point on the additional model.

[0081] Taking the main model as a character model as an example, the character model has multiple hanging points, and each hanging point is located at a different hanging part, such as hanging parts like the hand, back, waist, etc.

[0082] Different additional models may be mounted on different hanging parts of the main model. For example, an accessory model can be mounted on the waist of the character model, and a weapon model can be mounted on the hand of the character model.

[0083] For additional models mounted on the same hanging part of the main model, their hanging points may also be different. For example, a weapon model can be mounted on the hand of the character model. For a knife model, usually the handle of the knife model is connected to the hand, and the hanging point of the knife model is at the handle. For a gun model, usually the middle part of the gun model is connected to the hand, and the hanging point of the gun model is in the middle.

[0084] Optionally, hanging points can be set in advance on each game model, and a matching relationship between the hanging points can be established so that the continuous connection of the game models can meet the game effects. For example, the main model is a character model and the additional model is a gun model. Determine the hanging point located on the hand of the character model as the master hanging point, and determine the hanging point in the middle of the gun model as the slave hanging point.

[0085] Step S206, obtain the node data of the master hanging point and the node data of the slave hanging point;

[0086] Among them, the node data of the master hanging point represents the position information of the master hanging point in the three-dimensional coordinate system established based on the master node; the node data of the slave hanging point represents the position information of the slave hanging point in the three-dimensional coordinate system established based on the slave node.

[0087] It is understandable that each hanging point includes node data, and the node data of the hanging point represents the position information of the hanging point in the model space of the game model.

[0088] Optionally, a three-dimensional coordinate system can be established with the main node of the main model as the origin to obtain the model space of the main model. A three-dimensional coordinate system can be established with the slave node of the additional model as the origin to obtain the model space of the additional model.

[0089] Based on determining the main hanging point, i.e., the hanging point of the hand of the character model, the position information of the main hanging point in the main model space, that is, the node data of the main hanging point, can be obtained. Based on determining the slave hanging point, i.e., the hanging point in the middle of the gun model, the position information of the slave hanging point in the space of the additional model, that is, the node data of the slave hanging point, can be obtained.

[0090] Step S208, obtain the node data of the slave node according to the node data of the main node, the node data of the main hanging point, and the node data of the slave hanging point;

[0091] Among them, the node data of the slave node represents the position information of the additional model in the standard three-dimensional coordinate system.

[0092] It is understandable that the electronic device communicates with the game server and only obtains the node data of the main node. The main model is connected to the additional model, and it can obtain the position information of the additional model in the standard three-dimensional coordinate system through the node data of the main node, that is, the position information of the main model in the standard three-dimensional coordinate system, so as to facilitate rendering and achieve the effect of connecting the main model and the additional model.

[0093] Optionally, the main model and the additional model are connected through the main hanging point and the slave hanging point. Based on the position information of the main hanging point relative to the main model, the position information of the slave hanging point relative to the additional model, and combined with the position information of the main model in the standard three-dimensional coordinate system, the position information of the additional model in the standard three-dimensional coordinate system, that is, the node data of the slave node, can be calculated.

[0094] It can be seen that based on the above design, by obtaining the main node of the main model and the slave node of the additional model, the main node includes node data representing the position information of the main model in the standard three-dimensional coordinate system; then obtaining the main hanging point of the main model and the slave hanging point of the additional model, and there is a matching relationship between the main hanging point and the slave hanging point. The main hanging point includes node data representing its position information in the three-dimensional coordinate system established by the main node, and the slave hanging point includes node data representing its position information in the three-dimensional coordinate system established by the slave node; finally, based on the node data of the main node, the node data of the main hanging point and the node data of the slave hanging point, the node data of the slave node is obtained, and the node data of the slave node represents the position information of the additional model in the standard three-dimensional coordinate system. Connecting the hanging points with a matching relationship on the models to achieve the connection between the models. Compared with the method of establishing hanging points for each mounted additional model in the prior art, it is possible to connect two models based on two hanging points, thereby reducing data redundancy and improving the efficiency of data update and maintenance.

[0095] Optionally, for the above step S208, an embodiment of the present invention provides a possible implementation manner. Please refer to Figure 3 , where step S208 may further include the following steps:

[0096] Step S208-1, obtaining the transformation amount of the slave node according to the node data of the main hanging point and the node data of the slave hanging point;

[0097] Among them, the transformation amount of the slave node represents the transformation amount of the slave node relative to the main node.

[0098] Optionally, the node data of the main hanging point represents the position information of the main hanging point in the three-dimensional coordinate system established by the main node. Based on the node data of the main hanging point, the transformation amount of the main hanging point relative to the main node can be obtained.

[0099] The node data of the slave hanging point represents the position information of the slave hanging point in the three-dimensional coordinate system established by the slave node. Based on the node data of the slave hanging point, the transformation amount of the slave hanging point relative to the slave node can be obtained.

[0100] When the main hanging point and the slave hanging point are connected, the transformation amount of the slave hanging point relative to the main node can be determined. Then, based on the transformation amount of the slave hanging point relative to the slave node, the transformation amount of the slave node relative to the main node, that is, the transformation amount of the slave node, can be obtained. The transformation amount of the slave node can be understood as the position information of the slave node in the three-dimensional coordinate system established by the main node.

[0101] Step S208-3, obtaining the node data of the slave node according to the node data of the main node and the transformation amount of the slave node;

[0102] Optionally, the node data of the main node represents the position information of the main model in the standard three-dimensional coordinate system, and the transformation amount of the slave node can be understood as the position information of the slave node in the three-dimensional coordinate system established by the main node. Based on the node data of the main node and the transformation amount of the slave node, the node data of the slave node, that is, the position information of the additional model in the standard three-dimensional coordinate system, can be obtained.

[0103] It can be seen that based on the node data of the main hanging point and the node data of the slave hanging point, the transformation amount of the slave node relative to the main node can be obtained; based on the transformation amount of the slave node and the node data of the main node, that is, the position information of the main model in the standard three-dimensional coordinate system, the node data of the slave node, that is, the position information of the additional model in the standard three-dimensional coordinate system, can be obtained. Thus, based on the hanging points on the two models, the two models are connected, making the data flexible and improving the convenience of data maintenance.

[0104] Optionally, for the above step S208-1, an embodiment of the present invention provides a possible implementation manner. Please refer to Figure 4 , where step S208-1 may further include the following steps:

[0105] Step S208-1-2, create a first node, a second node, and a third node;

[0106] Among them, the first node is a child node of the main node, the second node is a child node of the first node, the third node is a child node of the second node, and the slave node is a child node of the third node;

[0107] Optionally, three scene nodes, that is, a first node, a second node, and a third node, can be created, and the main node, the first node, the second node, the third node, and the slave node are connected in sequence.

[0108] It can be understood that the connection of the scene nodes can refer to establishing a parent-child node relationship between the nodes in the three-dimensional game, that is, establishing a parent-child relationship between a scene node and the previous scene node it is connected to. The scene node is the child node of the previous scene node it is connected to, and the scene node can record the position information relative to its previous connected node, that is, the parent node.

[0109] When multiple scene nodes are connected, when the position information of their parent node in the standard three-dimensional coordinate system changes, the multiple scene nodes can be updated level by level to obtain the updated position information of each scene node in the standard three-dimensional coordinate system.

[0110] For example, the first node is a child node of the master node, and the first node can record its position information relative to the master node. The second node is a child node of the first node, and the second node can record its position information relative to the first node. The third node is a child node of the second node, and the third node can record its position information relative to the second node. The slave node is a child node of the third node, and the slave node can record its position information relative to the third node.

[0111] Step S208-1-4: Obtain a first transformation quantity, a second transformation quantity, a third transformation quantity, and a fourth transformation quantity according to the node data of the master hanging point and the node data of the slave hanging point.

[0112] Among them, the transformation quantity of the slave node includes a first transformation quantity, a second transformation quantity, a third transformation quantity, and a fourth transformation quantity.

[0113] The first transformation quantity represents the transformation quantity of the first node relative to the master node; the second transformation quantity represents the transformation quantity of the second node relative to the first node; the third transformation quantity represents the transformation quantity of the third node relative to the second node; the fourth transformation quantity represents the transformation quantity of the slave node relative to the third node.

[0114] Optionally, by creating three scene nodes between the master node and the slave node, the transformation quantity of the slave node relative to the master node obtained according to the node data of the master hanging point and the node data of the slave hanging point can be converted into the transformation quantity of each scene node in the three scene nodes relative to its parent node, and the transformation quantity of the slave node relative to its parent node.

[0115] It can be understood that the transformation quantity of the slave node relative to the master node is divided into four transformation quantities, namely, the first transformation quantity, the second transformation quantity, the third transformation quantity, and the fourth transformation quantity, by the three scene nodes. By calculating these four transformation quantities respectively, the node data of the slave node can be obtained according to these four transformation quantities and the node data of the master node.

[0116] It can be seen that based on creating three scene nodes and connecting the master node and the slave node, that is, establishing a multi-level parent-child node relationship between the master node and the slave node, the transformation quantity of the slave node relative to the master node obtained according to the master hanging point and the slave hanging point can be divided into multiple transformation quantities. The master model and the additional model can be connected according to the two hanging points, and based on the master node and multiple transformation quantities, the position information of the additional model in the standard three-dimensional coordinate system can be obtained, thereby avoiding the difficulty of data maintenance caused by creating multiple hanging points on the master model and improving the data maintenance efficiency and convenience.

[0117] Optionally, based on the manner of obtaining the transformation quantity of the slave node by creating three scene nodes between the master node and the slave node, for the above step S208-3, an embodiment of the present invention provides a possible implementation manner. Please refer to Figure 5, where step S208-3 may further include the following steps:

[0118] Step S208-3-2, obtaining the node data of the first node according to the node data of the main node and the first transformation amount;

[0119] It can be understood that in the above introduction, the scene node can record the position information of the scene node relative to its parent node, and this position information can be understood as the transformation amount of the scene node relative to its parent node.

[0120] Optionally, based on the node data of the main node and the first transformation amount, that is, the transformation amount of the first node relative to the main node, the node data of the first node can be obtained, and the node data of the first node represents the position information of the first node in the standard three-dimensional coordinate system.

[0121] Step S208-3-4, obtaining the node data of the second node according to the node data of the first node and the second transformation amount;

[0122] Optionally, based on the node data of the first node and the second transformation amount, that is, the transformation amount of the second node relative to the first node, the node data of the second node can be obtained, and the node data of the second node represents the position information of the second node in the standard three-dimensional coordinate system.

[0123] Step S208-3-6, obtaining the node data of the third node according to the node data of the second node and the third transformation amount;

[0124] Optionally, based on the node data of the second node and the third transformation amount, that is, the transformation amount of the third node relative to the second node, the node data of the third node can be obtained, and the node data of the third node represents the position information of the third node in the standard three-dimensional coordinate system.

[0125] Step S208-3-8, obtaining the node data of the slave node according to the node data of the third node and the fourth transformation amount.

[0126] Optionally, based on the node data of the third node and the fourth transformation amount, that is, the transformation amount of the slave node relative to the third node, the node data of the slave node can be obtained, and the slave node data represents the position information of the additional model in the standard three-dimensional coordinate system.

[0127] It can be understood that a multi-level parent-child node relationship between the master node and the slave node is established by creating three scenarios. According to the node data of the master node, step-by-step updates can be performed by calling the set update interface to obtain the position information of the first node, the second node, and the third node in the standard three-dimensional coordinate system in sequence. Based on the fact that the slave node is a child node of the third node, the node data of the slave node, that is, the position information of the additional model in the standard three-dimensional coordinate system, can be obtained. Thus, by cleverly establishing a multi-level parent-child node relationship and combining the node data of the master node, the node data of the slave node is obtained to achieve the connection of the two models.

[0128] Optionally, for the above step S208-1-4, an embodiment of the present invention provides a possible implementation manner. Please refer to Figure 6 , where step S208-1-4 may further include the following steps:

[0129] Step S208-1-4-1, taking the coordinate value, orientation value, and scaling value of the main hanging point as the first transformation quantity;

[0130] It can be understood that the node data includes a coordinate value, an orientation value, and a scaling value; the additional model includes an initial scaling value.

[0131] The node data of the main hanging point includes the coordinate value, orientation value, and scaling value of the main hanging point in the three-dimensional coordinate system established based on the master node.

[0132] Optionally, taking the coordinate value, orientation value, and scaling value of the main hanging point as the first transformation quantity, that is, taking the coordinate value, orientation value, and scaling value of the main hanging point as the transformation quantity of the first node relative to the master node.

[0133] Step S208-1-4-3, respectively calculating the opposite values of the coordinate value, orientation value, and scaling value of the secondary hanging point to obtain the coordinate opposite value, orientation opposite value, and scaling opposite value of the secondary hanging point;

[0134] It can be understood that the node data of the secondary hanging point includes the coordinate value, orientation value, and scaling value of the secondary hanging point in the three-dimensional coordinate system established based on the slave node.

[0135] Based on the known position information of the secondary hanging point relative to the slave node, to obtain the position information of the slave node relative to the secondary hanging point, the position information of the secondary hanging point relative to the slave node needs to be inversely operated, that is, calculating the opposite values of the coordinate value, orientation value, and scaling value of the secondary hanging point.

[0136] Optionally, taking the opposite number of the coordinate value of the secondary hanging point as the coordinate opposite value of the secondary hanging point; taking the opposite number of the orientation value of the secondary hanging point as the orientation opposite value of the secondary hanging point, and taking the reciprocal of the scaling value of the secondary hanging point as the scaling opposite value of the secondary hanging point.

[0137] Step S208-1-4-5, take the opposite orientation value and the opposite scaling value of the hanging point as the second transformation quantity;

[0138] Optionally, take the opposite orientation value and the opposite scaling value of the hanging point as the second transformation quantity, that is, take the opposite orientation value and the opposite scaling value of the hanging point as the transformation quantity of the second node relative to the first node. It can be understood that there is no change in the coordinate value of the second node relative to the first node.

[0139] Step S208-1-4-7, take the initial scaling value of the additional model as the third transformation quantity;

[0140] It can be understood that when creating the additional model, its initial scaling value can be set, and its initial scaling value will affect the position information of the additional model in the standard three-dimensional coordinate system. That is, use the third node to record the initial scaling value of the additional model to make the position information of the obtained additional model in the standard three-dimensional coordinate system more accurate.

[0141] Optionally, take the initial scaling value of the additional model as the third transformation quantity, that is, take the initial scaling value of the additional model as the transformation quantity of the third node relative to the second node. It can be understood that there is no change in the coordinate value and the orientation value of the third node relative to the second node.

[0142] Step S208-1-4-9, take the opposite coordinate value of the hanging point as the fourth transformation quantity.

[0143] Optionally, take the opposite coordinate value of the hanging point as the fourth transformation quantity, that is, take the opposite coordinate value of the hanging point as the transformation quantity of the slave node relative to the third node. It can be understood that there is no change in the orientation value and the scaling value of the slave node relative to the third node.

[0144] For the convenience of understanding, the above steps will be introduced below by taking the main model as a character model and the additional model as a gun model as an example.

[0145] Obtain the central node of the character model, that is, the main node N0, and obtain the central node of the gun model, that is, the slave node N4. The main node N0 includes node data, namely coordinate value, orientation value and scaling value, which respectively represent the coordinate, orientation and scaling of the character model in the standard three-dimensional coordinate system.

[0146] Then determine the hanging point of the hand of the character model as the main hanging point G0, and determine the hanging point in the middle of the gun model as the slave hanging point G1. Then obtain the coordinate value, orientation value and scaling value of the main hanging point G0 in the three-dimensional coordinate system established based on the main node N0, that is, the model space of the character model; and the coordinate value, orientation value and scaling value of the slave hanging point G1 in the three-dimensional coordinate system established based on the slave node N4, that is, the model space of the gun model.

[0147] Then create three scene nodes, namely the first node N1, the second node N2, and the third node N3. Connect the main node N0 to the first node N1, the first node N1 to the second node N2, the second node N2 to the third node N3, and the third node N3 to the slave node N4, successively establishing a parent-child node relationship.

[0148] Then, take the coordinate value, orientation value, and scaling value of the main hanging point G0 as the first transformation quantity, that is, the transformation quantity of the first node N1 relative to the main node N0. Calculate the opposite values of the coordinate value, orientation value, and scaling value of the slave hanging point G1 to obtain the opposite coordinate value, opposite orientation value, and opposite scaling value of the slave hanging point G1. Take the opposite values of the orientation value and scaling value of the slave hanging point G1 as the second transformation quantity, that is, the transformation quantity of the second node N2 relative to the first node N1.

[0149] Take the initial scaling value of the gun model as the third transformation quantity, that is, the transformation quantity of the third node N3 relative to the second node N2; take the opposite coordinate value of the slave hanging point G1 as the fourth transformation quantity, that is, the transformation quantity of the slave node N4 relative to the third node N3.

[0150] Finally, perform step-by-step updates based on the node data of the main node N0 and the four transformation quantities. Based on the node data of the main node N0 and the first transformation quantity, obtain the node data of the first node N1, that is, the coordinate value, orientation value, and scaling value of the first node N1 in the standard three-dimensional coordinate system. Based on the node data of the first node N1 and the second transformation quantity, obtain the node data of the second node N2, that is, the coordinate value, orientation value, and scaling value of the second node N2 in the standard three-dimensional coordinate system.

[0151] Based on the node data of the second node N2 and the third transformation quantity, obtain the node data of the third node N3, that is, the coordinate value, orientation value, and scaling value of the third node N3 in the standard three-dimensional coordinate system. Based on the node data of the third node N3 and the fourth transformation quantity, obtain the node data of the slave node N4, that is, the coordinate value, orientation value, and scaling value of the gun model in the standard three-dimensional coordinate system.

[0152] Through the main hanging point and the slave hanging point, as well as the node data of the main node, obtain the node data of the slave node, that is, the coordinate value, orientation value, and scaling value of the gun model in the standard three-dimensional coordinate system. It is possible to render the character model and the gun model based on the node data of the main node and the node data of the slave node to achieve the effect of connecting the weapon gun in the middle of the character's hand.

[0153] To execute the corresponding steps in the above embodiments and each possible manner, the following gives an implementation manner of a game data processing device. Please refer to Figure 7 , Figure 7It is a functional module diagram of a game data processing device 300 provided by an embodiment of the present invention. It should be noted that for the game data processing device 300 provided in this embodiment, its basic principle and the generated technical effects are the same as those in the above embodiment. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the above embodiment.

[0154] The game data processing device 300 includes:

[0155] An acquisition module 310, configured to acquire the main node of the main model and the slave node of the additional model; the main node includes node data, and the node data of the main node represents the position information of the main model in the standard three-dimensional coordinate system;

[0156] A determination module 330, configured to determine the main hanging point of the main model and the slave hanging point of the additional model; the main hanging point and the slave hanging point have a matching relationship;

[0157] A calculation module 350, configured to acquire the node data of the main hanging point and the node data of the slave hanging point; the node data of the main hanging point represents the position information of the main hanging point in the three-dimensional coordinate system established based on the main node; the node data of the slave hanging point represents the position information of the slave hanging point in the three-dimensional coordinate system established based on the slave node;

[0158] A processing module 370, configured to obtain the node data of the slave node according to the node data of the main node, the node data of the main hanging point, and the node data of the slave hanging point; the node data of the slave node represents the position information of the additional model in the standard three-dimensional coordinate system.

[0159] Optionally, the processing module 370 is further configured to: obtain the transformation amount of the slave node according to the node data of the main hanging point and the node data of the slave hanging point; the transformation amount of the slave node represents the transformation amount of the slave node relative to the main node; obtain the node data of the slave node according to the node data of the main node and the transformation amount of the slave node.

[0160] Optionally, the processing module 370 is further configured to: create a first node, a second node, and a third node; the first node is a child node of the main node, the second node is a child node of the first node, the third node is a child node of the second node, and the slave node is a child node of the third node;

[0161] Obtain a first transformation amount, a second transformation amount, a third transformation amount, and a fourth transformation amount according to the node data of the main hanging point and the node data of the slave hanging point; the transformation amount of the slave node includes the first transformation amount, the second transformation amount, the third transformation amount, and the fourth transformation amount;

[0162] Among them, the first transformation quantity represents the transformation quantity of the first node relative to the main node; the second transformation quantity represents the transformation quantity of the second node relative to the first node; the third transformation quantity represents the transformation quantity of the third node relative to the second node; the fourth transformation quantity represents the transformation quantity of the slave node relative to the third node.

[0163] Optionally, the processing module 370 is further configured to: obtain the node data of the first node according to the node data of the main node and the first transformation quantity; obtain the node data of the second node according to the node data of the first node and the second transformation quantity; obtain the node data of the third node according to the node data of the second node and the third transformation quantity; obtain the node data of the slave node according to the node data of the third node and the fourth transformation quantity.

[0164] Optionally, the processing module 370 is further configured to: use the coordinate value, orientation value, and scaling value of the main hanging point as the first transformation quantity; calculate the opposite values of the coordinate value, orientation value, and scaling value of the slave hanging point respectively to obtain the opposite coordinate value, opposite orientation value, and opposite scaling value of the slave hanging point; use the opposite orientation value and opposite scaling value of the slave hanging point as the second transformation quantity; use the initial scaling value of the additional model as the third transformation quantity; use the opposite coordinate value of the slave hanging point as the fourth transformation quantity.

[0165] An embodiment of the present invention further provides an electronic device, including a processor 120 and a memory 130. The memory 130 stores a computer program. When the processor executes the computer program, the game data processing method disclosed in the above embodiment is implemented.

[0166] An embodiment of the present invention further provides a storage medium, on which a computer program is stored. When the computer program is executed by the processor 120, the game data processing method disclosed in the embodiment of the present invention is implemented.

[0167] In summary, the game data processing method, device, electronic device, and storage medium provided by the embodiments of the present invention obtain the main node of the main model and the slave node of the additional model. The main node includes node data representing the position information of the main model in the standard three-dimensional coordinate system. Then, the main hanging point of the main model and the slave hanging point of the additional model are obtained, and the main hanging point and the slave hanging point have a matching relationship. The main hanging point includes node data representing its position information in the three-dimensional coordinate system established by the main node, and the slave hanging point includes node data representing its position information in the three-dimensional coordinate system established by the slave node. Finally, based on the node data of the main node, the node data of the main hanging point, and the node data of the slave hanging point, the node data of the slave node is obtained. The node data of the slave node represents the position information of the additional model in the standard three-dimensional coordinate system. Connecting the hanging points with a matching relationship on the models realizes the connection between the models, thereby reducing data redundancy and improving the efficiency of data update and maintenance.

[0168] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0169] In addition, each functional module in various embodiments of the present invention can be integrated together to form an independent part, or each module can exist alone, or two or more modules can be integrated to form an independent part.

[0170] If the described functions are implemented in the form of software function modules and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several 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 various embodiments of the present invention. The aforementioned storage medium includes various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0171] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and transformations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A game data processing method, characterized in that, The method includes: Obtaining the main node of the main model and the slave node of the additional model; the main node includes node data, and the node data of the main node represents the position information of the main model in the standard three-dimensional coordinate system; Determining the main hanging point of the main model and the slave hanging point of the additional model; the main hanging point and the slave hanging point have a matching relationship; Obtaining the node data of the main hanging point and the node data of the slave hanging point; the node data of the main hanging point represents the position information of the main hanging point in the three-dimensional coordinate system established based on the main node; the node data of the slave hanging point represents the position information of the slave hanging point in the three-dimensional coordinate system established based on the slave node; Creating a first node, a second node, and a third node; the first node is a child node of the main node, the second node is a child node of the first node, the third node is a child node of the second node, and the slave node is a child node of the third node; Obtaining a first transformation quantity, a second transformation quantity, a third transformation quantity, and a fourth transformation quantity according to the node data of the main hanging point and the node data of the slave hanging point; the transformation quantity of the slave node includes the first transformation quantity, the second transformation quantity, the third transformation quantity, and the fourth transformation quantity; Wherein, the first transformation quantity represents the transformation quantity of the first node relative to the main node; the second transformation quantity represents the transformation quantity of the second node relative to the first node; the third transformation quantity represents the transformation quantity of the third node relative to the second node; the fourth transformation quantity represents the transformation quantity of the slave node relative to the third node; the transformation quantity of the slave node represents the transformation quantity of the slave node relative to the main node; Obtaining the node data of the slave node according to the node data of the main node and the transformation quantity of the slave node; the node data of the slave node represents the position information of the additional model in the standard three-dimensional coordinate system.

2. The method according to claim 1, wherein The step of obtaining the node data of the slave node according to the node data of the main node and the transformation quantity of the slave node includes: Obtaining the node data of the first node according to the node data of the main node and the first transformation quantity; Obtaining the node data of the second node according to the node data of the first node and the second transformation quantity; Obtaining the node data of the third node according to the node data of the second node and the third transformation quantity; Obtaining the node data of the slave node according to the node data of the third node and the fourth transformation quantity.

3. The method according to claim 1, characterized in that The node data includes coordinate values, orientation values, and scaling values, and the additional model includes an initial scaling value; The step of obtaining a first transformation quantity, a second transformation quantity, a third transformation quantity, and a fourth transformation quantity according to the node data of the main hanging point and the node data of the slave hanging point includes: Taking the coordinate value, orientation value, and scaling value of the main hanging point as the first transformation quantity; Respectively calculating the opposite values of the coordinate value, orientation value, and scaling value of the slave hanging point to obtain the coordinate opposite value, orientation opposite value, and scaling opposite value of the slave hanging point; Taking the orientation opposite value and scaling opposite value of the slave hanging point as the second transformation quantity; Use the initial scaling value of the additional model as the third transformation quantity; Use the opposite value of the coordinates of the slave attachment point as the fourth transformation quantity.

4. A game data processing device, characterized in that, The device includes: An acquisition module, configured to acquire a main node of a main model and a slave node of an additional model; the main node includes node data, and the node data of the main node represents the position information of the main model in a standard three-dimensional coordinate system; A determination module, configured to determine a main attachment point of the main model and a slave attachment point of the additional model; the main attachment point and the slave attachment point have a matching relationship; A calculation module, configured to acquire the node data of the main attachment point and the node data of the slave attachment point; the node data of the main attachment point represents the position information of the main attachment point in a three-dimensional coordinate system established based on the main node; the node data of the slave attachment point represents the position information of the slave attachment point in a three-dimensional coordinate system established based on the slave node; A processing module, configured to create a first node, a second node, and a third node; the first node is a child node of the main node, the second node is a child node of the first node, the third node is a child node of the second node, and the slave node is a child node of the third node; obtain a first transformation quantity, a second transformation quantity, a third transformation quantity, and a fourth transformation quantity according to the node data of the main attachment point and the node data of the slave attachment point; the transformation quantity of the slave node includes the first transformation quantity, the second transformation quantity, the third transformation quantity, and the fourth transformation quantity; Wherein, the first transformation quantity represents the transformation quantity of the first node relative to the main node; the second transformation quantity represents the transformation quantity of the second node relative to the first node; the third transformation quantity represents the transformation quantity of the third node relative to the second node; the fourth transformation quantity represents the transformation quantity of the slave node relative to the third node; the transformation quantity of the slave node represents the transformation quantity of the slave node relative to the main node; obtain the node data of the slave node according to the node data of the main node and the transformation quantity of the slave node; the node data of the slave node represents the position information of the additional model in a standard three-dimensional coordinate system.

5. An electronic device, characterized in that, It includes a processor and a memory, the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 3 is implemented.

6. A storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Game scene node updating method and device, storage medium and electronic equipment

    CN111127612A

  • Game data processing method and device and storage medium

    CN112870704A