Game Character Model Rendering Method, Device, Electronic Device, and Storage Medium
By splitting the game character model into a character fabric model and a character body model, and using bounding boxes and preset parameters to render, the problem of rigid characters after the porting of the game is solved, improving the authenticity of the game and the player's sense of substitution.
Patent Information
- Application Number
- CN202210482735.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-05-05
AI Technical Summary
When porting the plug-in game into a mobile game, turning off the game character fabric swing system causes the game character to be stiff, reducing the authenticity of the game and the player's sense of substitution.
Split the game character model into a character fabric model and a character body model, bind the bones and adjust the preset drawing parameters respectively, add the bounding box to simulate the collision effect, and render based on the bounding box and preset parameters.
On the premise of saving terminal equipment functions, a more natural fabric movement effect is simulated to improve the authenticity of the game and the player's sense of substitution.
Smart Images

Figure CN114797108B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and particularly to a method, apparatus, electronic device, and storage medium for rendering a game character model. Background Art
[0002] In the prior art, when porting a popular PC game to a mobile game version, in order to save the consumption of the mobile phone's performance, systems that have less impact on the game playability are usually turned off, such as the system that controls the swinging of the game character's cloth.
[0003] However, after turning off the above system, the cloth of the game character in the game can only move rigidly following the bones of the game character, reducing the authenticity of the game and affecting the player's sense of immersion. Summary of the Invention
[0004] The embodiments of the present application provide a method, apparatus, electronic device, and storage medium for rendering a game character model, which can improve the problem of reducing the authenticity of the game and affecting the player's sense of immersion in the prior art.
[0005] The embodiments of the present application provide a method for rendering a game character model. The game character model includes a character cloth model and a character body model. The method includes: performing skinning binding on the character cloth model with a first number of bones; adjusting preset rendering parameters for the character cloth model after the skinning binding; adding a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model; and performing corresponding binding on the character cloth model with the adjusted preset rendering parameters and the character body model with the added bounding box to render and display the game character model.
[0006] The embodiments of the present application further provide a device for rendering a game character model. The game character model includes a character cloth model and a character body model. The device includes:
[0007] A bone binding unit, configured to perform skinning binding on the character cloth model with a first number of bones;
[0008] A parameter adjusting unit, configured to adjust preset rendering parameters for the character cloth model after the skinning binding;
[0009] A bounding box unit, configured to add a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model;
[0010] A model binding unit, configured to perform corresponding binding on the character cloth model with the adjusted preset rendering parameters and the character body model with the added bounding box to render and display the game character model.
[0011] In some embodiments, the parameter adjustment unit includes:
[0012] A parameter addition subunit, configured to add the preset rendering parameters to the character cloth model after skinning and binding;
[0013] A parameter adjustment subunit, configured to adjust the preset rendering parameters.
[0014] In some embodiments, the preset rendering parameters include one or more of the following: a limit value, a suppression value, a vibration frequency, and a collision thickness;
[0015] The parameter addition subunit is specifically configured to, in response to a parameter addition operation characterizing adding parameters, add one or more of the limit value, the suppression value, the vibration frequency, and the collision thickness to the character cloth model after skinning and binding;
[0016] The parameter adjustment subunit is specifically configured to, in response to a parameter adjustment operation characterizing adjusting parameters, adjust one or more of the limit value, the suppression value, the vibration frequency, and the collision thickness.
[0017] In some embodiments, the model binding unit is specifically configured to, in response to an operation of adding the identity identifier of the character cloth model to a preset item column corresponding to the character body model, perform corresponding binding between the character cloth model and the character body model.
[0018] In some embodiments, the apparatus further includes:
[0019] A motion state unit, configured to add motion state parameters to the character body model so that the character body model is rendered based on the motion state parameters.
[0020] In some embodiments, the apparatus further includes:
[0021] A first splitting unit, configured to split the character cloth model into multiple cloth sub-models;
[0022] A second splitting unit, configured to split the character body model into multiple body sub-models;
[0023] A visualization generation unit, configured to add each of the cloth sub-models into their respective corresponding meshes, and add each of the body sub-models into their respective corresponding meshes, so as to generate and display a character visualization script corresponding to the game character, where the character visualization script is used to reflect the dynamic performance of the game character.
[0024] In some embodiments, the apparatus further includes:
[0025] A parameter adjustment unit for adjusting the preset rendering parameters or the bounding box when the character visualization script reflects inconsistent dynamic performances of the game character.
[0026] In some embodiments, the device further includes:
[0027] A motion image acquisition unit for acquiring the motion image of a real character, where the real character is the character corresponding to the game character in real life;
[0028] A comparison unit for comparing the motion image of the real character with the dynamic performance of the game character reflected by the character visualization script;
[0029] A result determination unit for determining that the character visualization script reflects inconsistent dynamic performances of the game character when the similarity between the dynamic performance of the game character reflected by the character visualization script and the motion image of the real character is lower than a preset threshold.
[0030] An embodiment of the present application further provides a computer-readable storage medium storing multiple instructions adapted to be loaded by a processor to execute the steps in any of the game character model rendering methods provided by the embodiments of the present application.
[0031] In the game character model rendering method provided by the embodiments of the present application, the game character model can be split into two independent models: a character cloth model and a character body model. For the character cloth model, a first number of bones are bound to it and its corresponding preset rendering parameters are adjusted; where the first number can be the minimum value that ensures no penetration occurs in the game character model. For the character body model, a bounding box is added. Subsequently, the character cloth model and the character body model are bound so that when rendering the game character model, the dynamic effect of the game character's cloth can be rendered based on the bounding box and the preset rendering parameters.
[0032] In the present application, by splitting the game character model into two independent models: a character cloth model and a character body model, and separately rendering the character cloth model based on the bounding box and the preset rendering parameters, even when the parameters involved in the operation are reduced, a relatively natural cloth movement effect can still be simulated, thereby increasing the authenticity of the game as much as possible and improving the player's sense of immersion on the premise of saving the performance of the terminal device. Description of the Drawings
[0033] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0034] Figure 1a It is a schematic diagram of the scene of the game character model rendering method provided by the embodiment of the present application;
[0035] Figure 1b It is a schematic flowchart of the game character model rendering method provided by an embodiment of the present application;
[0036] Figure 1c It shows a schematic diagram of the effect of the game character's body after binding the first number of bones to the character cloth model;
[0037] Figure 1d It shows a schematic diagram of the effect of the bounding box wrapping the character body model;
[0038] Figure 1e It shows the animation blueprint provided by the embodiment of the present application;
[0039] Figure 2a It is a schematic flowchart of the game character model rendering method provided by another embodiment of the present application;
[0040] Figure 2b In (1), it shows a schematic diagram of the game character in the mobile game version without adopting the game character model rendering method provided by the embodiment of the present application;
[0041] Figure 2b In (2), it shows a schematic diagram of the game character in the mobile game version adopting the game character model rendering method provided by the embodiment of the present application;
[0042] Figure 2b In (3), it shows that in the PC game version, Figure 2b In (2), it is a schematic diagram of the same game character;
[0043] Figure 3 It is a schematic structural diagram of a game character model rendering device provided by an embodiment of the present application;
[0044] Figure 4 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0045] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.
[0046] The embodiments of the present application provide a method, device, mobile terminal, and storage medium for rendering a game character model.
[0047] Among them, the method for rendering the game character model can be specifically integrated in an electronic device, and the electronic device can be a device such as a terminal or a server. Among them, the terminal can be a device such as a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, or a personal computer (PC); the server can be a single server or a server cluster composed of multiple servers.
[0048] In some embodiments, the method for rendering the game character model can also be integrated in multiple electronic devices. For example, the method for rendering the game character model can be integrated in multiple servers, and the method for rendering the game character model of the present application can be implemented by multiple servers.
[0049] In some embodiments, the server can also be implemented in the form of a terminal.
[0050] For example, please refer to Figure 1a , in some embodiments, the electronic device can be a mobile terminal. In this embodiment, the character cloth model can be skinned and bound to a first number of bones; preset rendering parameters can be adjusted for the skinned and bound character cloth model; a bounding box can be added to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model; the character cloth model with the preset rendering parameters adjusted can be correspondingly bound to the character body model with the bounding box added to render and display the game character model.
[0051] In one of the embodiments of the present disclosure, a method for rendering a game character model can run on a terminal device or a server. Among them, the terminal device can be a local terminal device. When the method for rendering the game character model runs on the server, the method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and a client device.
[0052] In an optional implementation, various cloud applications can run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running entity of the game program and the entity presenting the game screen are separated. The storage and operation of the game character model rendering method are completed on the cloud game server, and the role of the client device is to receive and send data and present the game screen. For example, the client device can be a display device with data transmission function near the user side, such as a terminal, a television, a computer, a personal digital assistant, etc.; however, the terminal device for rendering the game character model is the cloud game server in the cloud. When playing a game, the user operates the client device to send an operation instruction, such as an operation instruction for a touch operation, to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses data such as the game screen, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0053] In an optional implementation, the terminal device can be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present the game screen. The local terminal device is used to interact with the user through a graphical user interface, that is, conventionally, the game program is downloaded and installed on an electronic device and run. The ways for the local terminal device to provide the graphical user interface to the user can include various methods. For example, it can be rendered and displayed on the display screen of the terminal, or provided to the user through holographic projection. For example, the local terminal device can include a display screen and a processor. The display screen is used to present the graphical user interface, which includes the game screen, and the processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.
[0054] A game character refers to a virtual object in a virtual scene. The virtual object can be a character controlled by the user through an input device, or an AI set in a virtual environment battle through training, or an NPC set in a virtual scene battle.
[0055] Optionally, the game character can be a virtual character competing in a virtual scene. Optionally, the number of game characters in the virtual scene battle is preset or dynamically determined according to the number of client devices joining the battle. The embodiments of the present application do not limit this.
[0056] Fabric is a material reflecting the clothing of the game character. In the game, the fabric is generally mainly silk, light gauze, cotton cloth, linen cloth, etc.
[0057] Skinning is a production technique for 3D animation. Based on the model created in 3D software, bones are added to the model. Since the bones and the model are independent of each other, in order to make the bones drive the model to produce reasonable movements, the model can be bound to the bones. The technique of binding the model to the bones is called skinning.
[0058] Bounding box is an algorithm for solving the optimal bounding space of a discrete point set. The basic idea is to approximately replace complex geometric objects with geometric bodies (called bounding boxes) that are slightly larger in volume and have simple characteristics. The most common bounding box algorithms include AABB (Axis-aligned bounding box), Sphere, OBB (Oriented bounding box), and FDH (Fixed directions hulls or k-DOP).
[0059] The following will be described in detail respectively. It should be noted that the serial numbers of the following embodiments do not limit the preferred order of the embodiments.
[0060] In this embodiment, a method for rendering a game character model is provided. As Figure 1b shown, this method for rendering a game character model is applied to a terminal device. The specific process of this method may include the following steps 110 to step 140:
[0061] 110. Perform skinning binding on the character cloth model and a first number of bones.
[0062] Optionally, in a specific implementation, the above step 110 may be implemented in response to a first operation performed by a developer. The first operation is an operation of performing skinning binding of bones on the character cloth model. The character cloth model is a model that simulates the clothing or cloth on a game character.
[0063] The first number is a preset value, and this value can ensure that: the skinning data of the seam points of the cloth on the game character is consistent with the skinning data of the game character's body, and the game character will not have a leaky seam during movement. The value of the first number can be set by the developer according to work experience, or can be obtained by the developer through continuous attempts during the process of binding bones to the character cloth model.
[0064] The bones are object bones that describe the movement of the character cloth model. For details, please refer to Figure 1c , Figure 1c shows a schematic diagram of the effect of the game character's body after binding a first number of bones to the character cloth model.
[0065] 120. Adjust the preset rendering parameters for the character cloth model after skinning binding.
[0066] Optionally, in a specific implementation, step 120 can be implemented in response to a second operation performed by a developer. The second operation is an operation of adjusting preset drawing parameters of a character cloth model for which skin binding has been completed. The preset drawing parameters are parameters reflecting the movement characteristics of the cloth on the game character.
[0067] Optionally, in a specific implementation, step 120 may specifically include the following steps 121 to 122:
[0068] 121. Add the preset drawing parameters to the character cloth model after skin binding.
[0069] 122. Adjust the preset drawing parameters.
[0070] Optionally, in a specific implementation, step 121 can be implemented by a developer performing a parameter addition operation, and step 122 can be implemented by a developer performing a parameter adjustment reference. The developer can first perform the parameter addition operation to add preset drawing parameters to the character cloth model for which bone binding has been completed; then the developer can perform the parameter adjustment operation to adjust the above preset drawing parameters, so that the cloth simulated by the character cloth model can swing as naturally as possible on the game character.
[0071] Optionally, in another specific implementation, steps 121 and 122 can be sequentially executed in response to an operation of a developer. For example, in response to a parameter setting operation representing parameter setting, first add preset drawing parameters to the character cloth model for which bone binding has been completed, and then adjust the above preset drawing parameters.
[0072] Taking the example that step 121 can be implemented by a developer performing a parameter addition operation and step 122 can be implemented by a developer performing a parameter adjustment reference, the description continues: Optionally, in a specific implementation, the preset drawing parameters include one or more of the following: limit value Constraint, damping value Damping, vibration frequency Frenquency, and collision thickness Collision Thickness.
[0073] Correspondingly, step 121 may specifically include: in response to a parameter addition operation representing parameter addition, add one or more of the limit value, damping value, vibration frequency, and collision thickness to the character cloth model after skin binding.
[0074] Correspondingly, step 122 may specifically include: in response to a parameter adjustment operation representing parameter adjustment, adjust one or more of the limit value, damping value, vibration frequency, and collision thickness.
[0075] In the above-described embodiments, after adding the limit value, suppression value, vibration frequency, and collision thickness to the character cloth model, the developer can adjust the limit value, suppression value, vibration frequency, and collision thickness in sequence, so that the cloth simulated by the character cloth model can swing as naturally as possible on the game character.
[0076] 130. Add a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model.
[0077] Optionally, in a specific embodiment, the above step 130 can be implemented in response to a third operation performed by the developer. The third operation is an operation representing adding a bounding box.
[0078] The bounding box is a regular three-dimensional figure that wraps part of the body parts of the character body model. The regular three-dimensional figure can be a cuboid, a cylinder, a sphere, or a capsule-shaped cube. For details, please refer to Figure 1d , Figure 1d The spherical or capsule-shaped one outlined by the dotted line shown is the bounding box. The part of the body parts wrapped may be an irregular model with more details. Therefore, the bounding box of the part of the body parts can be determined and processed to reduce the amount of computation.
[0079] 140. Corresponding bind the character cloth model with the adjusted preset rendering parameters and the character body model with the added bounding box to render and display the game character model.
[0080] Optionally, in a specific embodiment, the above step 140 can be implemented in response to a fourth operation performed by the developer. The fourth operation is an operation representing implementing the bound model. In a specific embodiment, the fourth operation can specifically be an operation of adding the identity identifier of the character cloth model to the corresponding preset item column of the character body model; correspondingly, step 140 can include the following steps: in response to the operation of adding the identity identifier of the character cloth model to the corresponding preset item column of the character body model, corresponding bind the character cloth model and the character body model.
[0081] The identity identifier of the character cloth model is an identification code representing the uniqueness of the character cloth model. Optionally, the identity identifier may be a line naming name. The preset item bar is an item bar newly added by the developer for the character body model and used to bind to the character cloth model. If the identity identifier of the character cloth model is added to the corresponding preset item bar of the character body model, the above-mentioned binding of the character cloth model and the character body model can be achieved. Optionally, the preset item bar may be named sub item id. In the above implementation, the game character can be split into a character cloth model and a character body model, where the character cloth model is a model simulating the movement of the cloth on the game character, and the character body model is a model simulating the movement of the game character itself; then preset drawing parameters are added to the character cloth model, and a bounding box is added to the character body model; subsequently, the character cloth model is bound to the character body model, so that the character cloth model can render the collision effect of the cloth and the game character body based on the bounding box of the character body model, and render the swinging effect of the cloth on the game character based on the preset drawing parameters. Since the embodiments of the present application only render the cloth movement effect based on the bounding box and the preset drawing parameters, the movement effect of the cloth on the game character can be simulated as much as possible on the premise of saving the computing amount, which is beneficial to improving the sense of immersion of the game player during the game play.
[0082] In the above specific implementation, step 110, step 120, step 130, and step 140 may respectively correspond to the first operation, the second operation, the third operation, and the fourth operation performed by the developer, that is, each step is implemented in response to the corresponding operation performed by the developer. Optionally, steps 110 to 140 may also be executed sequentially in response to an operation performed by the developer. Therefore, the specific number of operations performed by the developer should not be construed as a limitation of the present application.
[0083] Optionally, in a specific implementation, after step 140, the embodiments of the present application may further include the following step 150:
[0084] 150. Add motion state parameters to the character body model so that the character body model can be rendered based on the motion state parameters.
[0085] The motion state parameters are parameters for making the game character reach the motion state, and the motion state may be states such as walking, running, jumping, etc. The motion state parameters may specifically be the step length of the game character, the leg-lifting height of the game character, etc. The specific parameter types of the motion state parameters should not be construed as a limitation of the present application.
[0086] Optionally, in a specific implementation, the above step 150 may be implemented in response to a fifth operation performed by the developer. The fifth operation is an operation representing adding motion state parameters to the character body model.
[0087] In the above-described embodiments, the character body model can be made to separately render the motion state of the game character based on the motion state parameters, rather than making the motion state parameters affect the rendering of the cloth on the game character, which can further reduce the computational amount of cloth rendering. Thus, it is possible to render the motion state of the game character and the cloth on the game character while saving the functions of the terminal device, improving the authenticity of the game. Optionally, in a specific embodiment, before step 140, the embodiments of the present application may further include: adding cloth materials to the character cloth model.
[0088] The cloth materials are used to reflect the material types to which the cloth belongs. For example, the cloth materials can be materials representing silk, light gauze, cotton cloth, linen cloth, etc.
[0089] Optionally, in a specific embodiment, before step 140, the embodiments of the present application may further include the following steps S1 to S4:
[0090] Step S1: Split the character cloth model into multiple cloth sub-models.
[0091] The cloth sub-models can be divided according to the parts covered by the cloth on the game character's body. For example, the cloth sub-models can include sleeve sub-models, skirt sub-models, etc.
[0092] Step S2: Split the character body model into multiple body sub-models.
[0093] The body sub-models can be divided according to different parts of the game character's body. For example, the body sub-models can include a torso (body) sub-model, a head (head) sub-model, etc.
[0094] Step S3: Add each cloth sub-model into its corresponding mesh body, and add each body sub-model into its corresponding mesh body, thereby generating and displaying a character visualization script corresponding to the game character, where the character visualization script is used to reflect the dynamic performance of the game character.
[0095] The dynamic performance includes the action performance of the game character and the cloth performance corresponding to the game character. The action performance of the game character includes the movement of the limbs. The cloth performance includes the cloth wrinkles generated with the change of the game character's actions and the cloth changes generated with the change of the environment in the game scene.
[0096] The character visualization script is a visualization script for a game character model obtained by integrating multiple meshes based on the needs of developers in a game environment. The character visualization script is used to view the dynamic performance of the game character model in real time; optionally, the character visualization script can execute actions corresponding to the operation instructions in response to the operation instructions input by the developer, so as to facilitate the developer to view the dynamic performance of the game character model in real time.
[0097] Each cloth sub-model has its own corresponding mesh. For example, the sleeve model has a corresponding sleeve mesh, and the skirt sub-model has a corresponding skirt mesh; each body sub-model also has its own corresponding mesh. For example, the torso sub-model has a corresponding body mesh, and the head sub-model has a corresponding head mesh. Adding each sub-model into its corresponding mesh can realize the generation of the character visualization script. For details, please refer to Figure 1e The shown character visualization script.
[0098] Step S4: If the character visualization script reflects that the game character has inconsistent dynamic performance, adjust the preset rendering parameters or the bounding box.
[0099] Optionally, in a specific implementation manner, the above step S4 can be implemented in response to the sixth operation performed by the developer. The sixth operation is an operation representing adjusting the preset rendering parameters or the bounding box. The sixth operation can be triggered by the developer when the character visualization script reflects that the game character has inconsistent dynamic performance.
[0100] When judging whether the character visualization script reflects that the game character has inconsistent dynamic performance, it can be judged by the developer directly observing the dynamic performance of the game character reflected by the character visualization script, or it can be judged by other means. For example, in a specific implementation manner, the following steps A1 to A3 can be used to judge whether the game character reflected by the animation blueprint has inconsistent actions:
[0101] A1: Obtain the motion image of the real character.
[0102] Wherein, the real character is the character corresponding to the game character in real life. For example, if the game character is a virtual character, the real character is a person in reality; if the game character is a virtual animal, such as a dog or a horse, the real character is a dog or a horse in reality.
[0103] A2: Compare the motion image of the real character with the dynamic performance of the game character reflected by the character visualization script.
[0104] A3. If the similarity between the dynamic performance of the game character reflected by the character visualization script and the motion image of the real character is lower than a preset threshold, it is determined that the character visualization script reflects that the game character has inconsistent dynamic performance.
[0105] The electronic device can compare the motion image corresponding to the real character with the dynamic performance of the game character reflected by the character visualization script. Specifically, the similarity between the two can be calculated and compared with the preset threshold set in advance. If the similarity is lower than the preset threshold, it can be determined that the character visualization script reflects that the game character has inconsistent dynamic performance. It should be understood that the specific method for determining whether the character visualization script reflects that the game character has inconsistent dynamic performance should not be construed as a limitation of this application.
[0106] In the game character model rendering method provided by the embodiments of this application, the game character model can be split into two independent models: a character cloth model and a character body model. For the character cloth model, a first number of bones are bound to it, and its corresponding preset rendering parameters are adjusted; where the first number can be the minimum value that satisfies that the game character model will not have penetration. For the character body model, a bounding box is added to it. Subsequently, the character cloth model and the character body model are bound, so that when rendering the game character model, the dynamic effect of the game character's cloth can be rendered based on the bounding box and the preset rendering parameters. In this application, by splitting the game character model into two independent models: a character cloth model and a character body model, and separately rendering the character cloth model based on the bounding box and the preset rendering parameters, the effect of relatively natural cloth movement can still be simulated while reducing the parameters participating in the operation.
[0107] In this application, on the premise of saving the functions of the terminal device, the authenticity of the game can be increased as much as possible, and the player's sense of immersion can be improved.
[0108] According to the method described in the above embodiments, further detailed description will be given below.
[0109] In this embodiment, taking the preset rendering parameters including a limit value, a suppression value, a vibration frequency, and a collision thickness as an example, the method of the embodiments of this application will be described in detail.
[0110] As Figure 2a shown, the specific process of a game character model rendering method is as follows:
[0111] 201. In response to an operation representing binding bones, bind a first number of bones to the character cloth model.
[0112] 202. In response to the parameter addition operation, add a limit value, a suppression value, a vibration frequency, and a collision thickness to the character cloth model to which the first quantity of bones is bound.
[0113] 203. In response to the parameter adjustment operation, adjust the limit value, the suppression value, the vibration frequency, and the collision thickness.
[0114] 204. In response to the operation of representing the addition of a bounding box, add a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model.
[0115] 205. In response to the operation of adding the identity identifier of the character cloth model to the preset item column corresponding to the character body model, bind the character cloth model to the character body model, so that the character cloth model is rendered based on the bounding box and the preset drawing parameters.
[0116] Optionally, before step 205, the embodiment of the present application may further include the following steps:
[0117] Split the character cloth model into multiple cloth sub-models;
[0118] Split the character body model into multiple body sub-models;
[0119] Add each cloth sub-model into its corresponding mesh body, and add each body sub-model into its corresponding mesh body, so as to generate and display a character visualization script corresponding to the game character, and the character visualization script is used to reflect the dynamic performance of the game character;
[0120] If the character visualization script reflects that the game character has uncoordinated dynamic performance, in response to the operation of representing adjustment, adjust the preset drawing parameters or the bounding box until the character visualization script reflects that the game character has no uncoordinated dynamic performance.
[0121] Among them, judging whether the character visualization script reflects that the game character has uncoordinated dynamic performance can be carried out in the following way:
[0122] Obtain the motion image of a real character, where the real character is the character corresponding to the game character in real life; compare the motion image of the real character with the dynamic performance of the game character reflected by the character visualization script; if the similarity between the dynamic performance of the game character reflected by the character visualization script and the motion image of the real character is lower than a preset threshold, it is determined that the character visualization script reflects that the game character has uncoordinated dynamic performance.
[0123] 206. In response to an operation representing the addition of motion state parameters, add motion state parameters to the character body model so that the character body model can be rendered based on the motion state parameters.
[0124] As can be seen from the above, the embodiments of the present application can split the game character model into two independent models: the character cloth model and the character body model. For the character cloth model, bind a first number of bones to it and adjust its corresponding preset rendering parameters; where the first number can be the minimum value that satisfies that the game character model will not have penetration. For the character body model, add a bounding box to it. Subsequently, bind the character cloth model and the character body model so that when rendering the game character model, the dynamic effect of the game character's cloth can be rendered based on the bounding box and the preset rendering parameters. In the present application, by splitting the game character model into two independent models: the character cloth model and the character body model, and separately rendering the character cloth model based on the bounding box and the preset rendering parameters, even when the parameters involved in the operation are reduced, a relatively natural cloth movement effect can still be simulated.
[0125] For details, please refer to Figure 2b , Figure 2b Figure (1) in shows a schematic diagram of a game character in the mobile game version that does not adopt the game character model rendering method provided by the embodiments of the present application; Figure 2b Figure (2) in shows a schematic diagram of a game character in the mobile game version that adopts the game character model rendering method provided by the embodiments of the present application; Figure 2b Figure (3) in shows a schematic diagram of the same game character in the PC game version. By Figure 2b Comparing Figure (1), (2), and (3) in, it can be intuitively seen that after adopting the method provided by the embodiments of the present application, although the game character is still not as natural as the same game character in the PC game version, compared with not adopting the method provided by the embodiments of the present application, the authenticity and naturalness of the game character are increased.
[0126] Therefore, in the present application, the authenticity of the game can be increased and the player's sense of immersion can be improved on the premise of saving the performance of the terminal device.
[0127] To better implement the above method, the embodiments of the present application also provide a game character model rendering device. The game character model rendering device can be specifically integrated in an electronic device, and the electronic device can be a terminal. Among them, the terminal can be a device such as a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, or a personal computer.
[0128] For example, in this embodiment, taking the game character model rendering device being specifically integrated in the terminal as an example, the device of the embodiments of the present application will be described in detail.
[0129] For example, as Figure 3 shown, the game character model rendering device may include:
[0130] A bone binding unit 301 for skinning and binding the character cloth model to a first number of bones;
[0131] A parameter adjustment unit 302 for adjusting preset rendering parameters for the character cloth model after skinning and binding;
[0132] An enclosing box unit 303 for adding an enclosing box to the character body model, where the enclosing box is used to simulate the collision effect between the character body model and the character cloth model;
[0133] A model binding unit 304 for correspondingly binding the character cloth model with the preset rendering parameters adjusted to the character body model with the enclosing box added to render and display the game character model.
[0134] In some embodiments, the parameter adjustment unit 302 includes:
[0135] A parameter addition subunit for adding the preset rendering parameters to the character cloth model after skinning and binding;
[0136] A parameter adjustment subunit for adjusting the preset rendering parameters.
[0137] In some embodiments, the preset rendering parameters include one or more of the following: a limit value, a suppression value, a vibration frequency, and a collision thickness;
[0138] The parameter addition subunit is specifically configured to, in response to a parameter addition operation characterizing adding parameters, add one or more of the limit value, the suppression value, the vibration frequency, and the collision thickness to the character cloth model after skinning and binding;
[0139] The parameter adjustment subunit is specifically configured to, in response to a parameter adjustment operation characterizing adjusting parameters, adjust one or more of the limit value, the suppression value, the vibration frequency, and the collision thickness.
[0140] In some embodiments, the model binding unit 304 is specifically configured to, in response to an operation of adding the identity identifier of the character cloth model to a preset item column corresponding to the character body model, correspondingly bind the character cloth model to the character body model.
[0141] In some embodiments, the device further includes:
[0142] A motion state unit for adding motion state parameters to the character body model so that the character body model can be rendered based on the motion state parameters.
[0143] In some embodiments, the apparatus further includes:
[0144] A first splitting unit for splitting the character cloth model into multiple cloth sub-models;
[0145] A second splitting unit for splitting the character body model into multiple body sub-models;
[0146] A visualization generation unit for adding each of the cloth sub-models into their respective corresponding meshes, and adding each of the body sub-models into their respective corresponding meshes, thereby generating and displaying a character visualization script corresponding to the game character, where the character visualization script is used to reflect the dynamic performance of the game character.
[0147] In some embodiments, the apparatus further includes:
[0148] A parameter adjustment unit for adjusting the preset rendering parameters or the bounding box when the character visualization script reflects that the game character has inconsistent dynamic performance.
[0149] In some embodiments, the apparatus further includes:
[0150] A motion image acquisition unit for acquiring the motion image of a real character, where the real character is the character corresponding to the game character in real life;
[0151] A comparison unit for comparing the motion image of the real character with the dynamic performance of the game character reflected by the character visualization script;
[0152] A result determination unit for determining that the character visualization script reflects that the game character has inconsistent dynamic performance when the similarity between the dynamic performance of the game character reflected by the character visualization script and the motion image of the real character is lower than a preset threshold.
[0153] Specifically, when implemented, the above units can be implemented as independent entities, or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation of the above units, reference can be made to the foregoing method embodiments, which will not be elaborated herein.
[0154] As can be seen from the above, the embodiments of the present application can split the game character model into two independent models: the character cloth model and the character body model. For the character cloth model, a first number of bones are bound to it, and its corresponding preset rendering parameters are adjusted; wherein, the first number can be the minimum value that satisfies that the game character model does not have penetration. For the character body model, a bounding box is added to it. Subsequently, the character cloth model and the character body model are bound so that when rendering the game character model, the dynamic effect of the game character's cloth can be rendered based on the bounding box and the preset rendering parameters. In the present application, by splitting the game character model into two independent models: the character cloth model and the character body model, and separately rendering the character cloth model based on the bounding box and the preset rendering parameters, even when the parameters involved in the operation are reduced, a relatively natural cloth movement effect can still be simulated.
[0155] In the present application, the authenticity of the game can be increased and the player's sense of immersion can be improved on the premise of saving the functions of the terminal device.
[0156] The embodiments of the present application further provide an electronic device, which can be a device such as a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers, etc.
[0157] In some embodiments, the game character model rendering device can also be integrated in multiple electronic devices. For example, the game character model rendering device can be integrated in multiple servers, and multiple servers are used to implement the game character model rendering method of the present application.
[0158] In this embodiment, the electronic device of this embodiment will be described in detail taking the electronic device as an example. For example, as Figure 4 shown, it shows a schematic structural diagram of the electronic device involved in the embodiments of the present application. Specifically:
[0159] The electronic device may include a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input module 404, a communication module 405 and other components. Those skilled in the art can understand that Figure 4 the structural diagram of the electronic device shown in does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine some components, or arrange different components. Among them:
[0160] The processor 401 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 402, and by invoking the data stored in the memory 402, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 401 either.
[0161] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.); the data storage area can store data created according to the use of the electronic device. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. Correspondingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0162] The electronic device also includes a power supply 403 that powers each component. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 403 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0163] The electronic device may also include an input module 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0164] The electronic device may also include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The electronic device can perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing users with wireless broadband Internet access. For example, the communication module 405 can be used to help users send and receive emails, browse web pages, and access streaming media, etc.
[0165] Although not shown, the electronic device may further include a display unit and the like, which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402 to implement various functions as follows: skin-bind the character cloth model to a first number of bones; adjust preset rendering parameters for the character cloth model after skin-binding; add a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model; and correspondently bind the character cloth model with the adjusted preset rendering parameters to the character body model with the added bounding box to render and display the game character model. The specific implementation of each of the above operations can be referred to the previous embodiments and will not be elaborated here.
[0166] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0167] Therefore, an embodiment of the present application provides a computer-readable storage medium, in which multiple instructions are stored, and the instructions can be loaded by a processor to execute the steps in any of the game character model rendering methods provided by the embodiments of the present application. For example, the instructions can execute the following steps:
[0168] Skin-bind the character cloth model to a first number of bones; adjust preset rendering parameters for the character cloth model after skin-binding; add a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model; and correspondently bind the character cloth model with the adjusted preset rendering parameters to the character body model with the added bounding box to render and display the game character model. Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), a magnetic disk or an optical disc, etc.
[0169] According to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various alternative implementations in the above embodiments.
[0170] Since the instructions stored in the storage medium can execute the steps in any of the game character model rendering methods provided in the embodiments of the present application, the beneficial effects achievable by any of the game character model rendering methods provided in the embodiments of the present application can be realized. For details, see the previous embodiments and will not be elaborated here.
[0171] The above has introduced in detail a game character model rendering method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for rendering a game character model, characterized in that The game character model includes a character cloth model and a character body model, and the method includes: Skin-bind the character cloth model to a first quantity of bones, where the first quantity includes the minimum value that satisfies the condition that the game character model will not have penetration; Add preset rendering parameters to the character cloth model after skin-binding, and adjust the preset rendering parameters. Among them, the preset rendering parameters indicate the motion characteristics of the character cloth model, and the preset rendering parameters include one or more of the following: limit value, suppression value, vibration frequency, and collision thickness. Adding the preset rendering parameters to the character cloth model after skin-binding includes: in response to a parameter addition operation representing adding parameters, adding one or more of the limit value, suppression value, vibration frequency, and collision thickness to the character cloth model after skin-binding; adjusting the preset rendering parameters includes: in response to a parameter adjustment operation representing adjusting parameters, adjusting one or more of the limit value, suppression value, vibration frequency, and collision thickness; Add a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model; Split the character cloth model into multiple cloth sub-models; Split the character body model into multiple body sub-models; Add each cloth sub-model into its corresponding mesh body, and add each body sub-model into its corresponding mesh body, so as to generate and display a character visualization script corresponding to the game character, and the character visualization script is used to reflect the dynamic performance of the game character; Correspondingly bind the character cloth model with the preset rendering parameters adjusted to the character body model with the bounding box added to render and display the game character model.
2. The method according to claim 1, wherein The correspondingly binding the character cloth model with the preset rendering parameters adjusted to the character body model with the bounding box added includes: In response to the operation of adding the identity identifier of the character cloth model to the corresponding preset item column of the character body model, correspondingly bind the character cloth model to the character body model.
3. The method according to claim 1, characterized in that After the correspondingly binding the character cloth model with the preset rendering parameters adjusted to the character body model with the bounding box added, the method further includes: Add motion state parameters to the character body model so that the character body model is rendered based on the motion state parameters.
4. The method according to claim 1, wherein After adding each cloth sub-model into its corresponding mesh body, and adding each body sub-model into its corresponding mesh body, so as to generate and display a character visualization script corresponding to the game character, the method further includes: If the character visualization script reflects that the game character has inconsistent dynamic performance, adjust the preset rendering parameters or the bounding box.
5. The method according to claim 4, wherein Before adjusting the preset drawing parameters or the bounding box if the character visualization script reflects inconsistent dynamic performance of the game character, the method further includes: Obtaining a motion image of a real character, where the real character is a character corresponding to the game character in real life; Comparing the motion image of the real character with the dynamic performance of the game character reflected by the character visualization script; If the similarity between the dynamic performance of the game character reflected by the character visualization script and the motion image of the real character is lower than a preset threshold, it is determined that the character visualization script reflects inconsistent dynamic performance of the game character.
6. A game character model rendering device, characterized in that, The game character model includes a character cloth model and a character body model, and the device includes: A bone binding unit for performing skinning binding on the character cloth model with a first number of bones, where the first number includes the minimum value that satisfies that the game character model will not have penetration; A parameter adjustment unit for adding preset drawing parameters to the character cloth model after skinning binding and adjusting the preset drawing parameters, where the preset drawing parameters indicate the motion characteristics of the character cloth model, and the preset drawing parameters include one or more of the following: a limit value, a suppression value, a vibration frequency, and a collision thickness. Adding the preset drawing parameters to the character cloth model after skinning binding includes: in response to a parameter addition operation representing adding parameters, adding one or more of the limit value, the suppression value, the vibration frequency, and the collision thickness to the character cloth model after skinning binding; adjusting the preset drawing parameters includes: in response to a parameter adjustment operation representing adjusting parameters, adjusting one or more of the limit value, the suppression value, the vibration frequency, and the collision thickness; A bounding box unit for adding a bounding box to the character body model, where the bounding box is used to simulate the collision effect between the character body model and the character cloth model; A first splitting unit for splitting the character cloth model into multiple cloth sub-models; A second splitting unit for splitting the character body model into multiple body sub-models; A visualization generation unit for adding each cloth sub-model into its corresponding mesh body and adding each body sub-model into its corresponding mesh body, thereby generating and displaying a character visualization script corresponding to the game character, where the character visualization script is used to reflect the dynamic performance of the game character; A model binding unit for correspondingly binding the character cloth model with the adjusted preset drawing parameters and the character body model with the added bounding box to render and display the game character model.
7. An electronic device, characterized in that, It includes a processor and a memory, and the memory stores multiple instructions; the processor loads the instructions from the memory to execute the steps in the game character model rendering method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the game character model rendering method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Skeleton-drive-based virtual garment deformation simulation method
CN108230455A