Method for realizing muscle twitch deformation of virtual character
By using mask areas and material settings, GPU rendering is used to realize the muscle shaking deformation of virtual characters, which solves the problems of high CPU resource consumption and high manual cost in existing technologies, and achieves realistic muscle shaking effects and smooth game screen.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENGQU INFORMATION TECH SHANGHAI
- Filing Date
- 2025-01-03
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies for achieving muscle tremors and deformations in virtual characters suffer from problems such as high CPU resource consumption, limitations on the number of skeletons on the hardware platform, and high labor costs, making it difficult to meet the requirements of game development costs and operation.
The method of using mask regions and material settings is adopted to realize the muscle shaking deformation of virtual characters using GPU rendering. The mask region is created by UV mapping or vertex color channel, the motion setting parameters of muscle shaking deformation are set, and the shaking deformation of the target muscle is rendered in the rendering engine.
It achieves realistic muscle tremor effects without consuming CPU resources, reducing game development costs and improving screen smoothness.
Smart Images

Figure CN122336086A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of virtual angle animation effects implementation in the development of projects (especially game, animation and film development projects), specifically to a method for realizing the muscle shaking and deformation of virtual characters. Background Technology
[0002] In game development, the animation effects of virtual characters have always been a key focus. Virtual characters typically need to have their muscles vibrate and deform during movement to make their actions more realistic and three-dimensional.
[0003] Currently, there are three main ways that 3D software and game engines can implement virtual character muscle animation (jitter deformation):
[0004] 1. Physics jiggle: By adding extra bones to the muscle part through the engine, and then adding physical constraints, limiting the rotation range and angular velocity of these bones, the engine renders the relevant muscles to achieve physics jiggle.
[0005] 2. Soft simulation: Using the soft simulation function of the engine or 3D software, the muscle parts are transformed into soft meshes (usually proxy models generated by deformable objects). The mesh points of the soft mesh are physically simulated and then transmitted back to the virtual character for rendering in the engine.
[0006] 3. Musculoskeletal keyframe animation: When creating animations of walking, running, jumping, and other actions for virtual characters, the muscles and bones are animated frame by frame as they perform these actions.
[0007] The aforementioned methods for implementing virtual character muscle animation (jittering deformation) all have shortcomings, failing to meet the requirements of game development costs and reduced CPU resource consumption during game operation. For example, the physics-based jittering method requires adding extra bones to represent muscles and binding weights, necessitating the addition of physical bone constraints or springs in the engine, and requiring significant CPU resources to calculate physical collisions and compressions during real-time runtime. The software simulation method, due to the need to convert the entire character model into a proxy model or mesh array required for software simulation and simultaneously calling software mesh plugins for processing, requires even more physical computing resources than simple physics-based jittering. For hardware platforms with limited physical computing resources, both of these methods are not cost-effective compared to the physical computing resources consumed by these muscle jittering deformation animations, and may even be unacceptable. Furthermore, some hardware platforms have limitations on the number of bones in a virtual character (the basic number of bones in a virtual human's body from head to toe is generally limited to around 100), and adding additional muscle bones can easily cause the corresponding hardware platform to fail to execute. Finally, the musculoskeletal keyframe animation method requires additional muscle animation for each movement, meaning that all animations need to be manually created, which is too costly and often leads to excessive project development expenses. Summary of the Invention
[0008] To overcome the aforementioned shortcomings of existing methods for implementing virtual character muscle animation (jitter deformation), this application provides a technical solution for implementing virtual character muscle jitter deformation. While this solution is not as precise and detailed as physical simulation, it can directly utilize GPU rendering without consuming CPU resources. Compared to software simulation and physical simulation, it significantly reduces CPU resource consumption during game runtime, improving screen smoothness. Furthermore, compared to keyframe animation of muscles and bones, this solution eliminates the need for manually adding muscle jitter deformation animation effects frame by frame, greatly reducing game development costs.
[0009] On one hand, the technical solution provided in this application is a method for realizing muscle shaking deformation in a virtual character. The method includes: creating a mask region for the target muscle of the virtual character to be shaken and deformed; creating a material matching the mask region; setting motion setting parameters describing the shaking deformation of the target muscle and the corresponding range of action in the material according to the position and movement of the bones associated with the target muscle at the virtual angle; covering the matching mask region with the material; and rendering the virtual character using a rendering engine (e.g., Unreal or Unity engine) to realize the shaking deformation of the target muscle.
[0010] In the DCC (Digital Content Creation) platform, the mask area can be created using either UV mapping or the vertex color channel of the virtual character model.
[0011] Furthermore, when using UV mapping to create the Mask region, if the model itself has multiple target muscles, different Mask regions, i.e. different target muscles, are distinguished by the multiple color levels of the texture; the degree of attenuation change of the color value of each Mask region within its respective color level is used as the degree to which the target muscle is affected when the virtual character moves.
[0012] Furthermore, when the Mask region is created using the vertex color channels of the virtual character model, the color level to which the color value of any one of the three channels of vertex color R, G, and B belongs represents the corresponding target muscle, and the degree of decay change of the color value in its corresponding color level is used as the control weight of the corresponding target muscle when the virtual character moves.
[0013] Furthermore, based on the position and movement of the bone associated with the target muscle at the virtual angle, motion setting parameters describing the shaking deformation of the target muscle are set in the material, including: setting the rotation axis point, rotation angle, shaking simulation function, speed and amplitude of the target muscle shaking according to the position of the target muscle, and setting the scope of the motion setting parameters to cover all GPU vertices of the target muscle.
[0014] The step of setting the rotation axis point based on the position of the target muscle includes: if the target muscle is on the corresponding axis point of the virtual character's skeleton, taking that corresponding axis point as the rotation axis point; if the target muscle is between two bones, taking the center of the position of the target muscle's accessory bone and the position of the next-level bone of the target muscle's accessory bone as the rotation axis point. By rotating the target muscle to achieve deformation during the shaking process, the movement of the target muscle can be made more realistic and lifelike.
[0015] Furthermore, to make the muscle tremors more closely resemble real physical tremors, the simulation function, speed, and amplitude of the target muscle tremor deformation are set, including: using a compressed Sin function to simulate the tremor deformation of the target muscle (which can gradually weaken and eliminate the muscle tremors, making the muscle tremors caused by the virtual character's movements closer to real physical conditions). Using the left-right direction as the X-axis and the up-down direction as the Z-axis, the engine obtains the position of the secondary bone to which the target muscle belongs. The X-axis tremor speed of the target muscle is obtained by subtracting the X-axis position of the previous frame from the current frame's X-axis position of the secondary bone and dividing by the engine's frame time. The Z-axis tremor speed of the target muscle is obtained by subtracting the Z-axis position of the previous frame from the current frame's Z-axis position of the secondary bone and dividing by the engine's frame time. The X-axis tremor amplitude of the target muscle is set according to the X-axis swing amplitude of the secondary bone (for example, multiplying or dividing the swing amplitude on the corresponding axis of the secondary bone by a coefficient to obtain the tremor amplitude of the target muscle along the corresponding axis), and the Z-axis tremor amplitude of the target muscle is set according to the Z-axis swing amplitude of the secondary bone.
[0016] Corresponding to the above-described method for implementing muscle twitching and deformation of a virtual character, a second aspect of this application also provides a computer-readable medium. The computer-readable medium stores program code; when the program code is executed by a processor, it implements the above-described method for implementing muscle twitching and deformation of a virtual character.
[0017] The technical solution provided in this application can achieve muscle shaking and deformation during virtual character special effects movements without consuming CPU resources (using only GPU resources), and the effect is close enough to real physical situations. Compared with existing methods for achieving muscle shaking and deformation of virtual characters, the technical solution provided in this application can greatly save CPU resource consumption during game runtime and improve the smoothness of the screen; at the same time, it will not bring additional labor costs to game development. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 A flowchart of one embodiment of the method for implementing muscle shaking and deformation of a virtual character provided in this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] like Figure 1 As shown, in one embodiment of the method for implementing muscle trembling deformation of a virtual character provided in this application, the steps include:
[0022] S1. Create a mask area for the target muscle of the virtual character that is to be shaken and deformed, and create a material that matches the mask area.
[0023] This step can be achieved using a Digital Content Creation (DCC) platform. Commonly used DCC platforms include 3ds Max, Maya, and Blender. 3ds Max is a professional 3D modeling, rendering, and animation software developed by Autodesk. It is PC-based and widely used in advertising, film and television, industrial design, architectural design, 3D animation, multimedia production, games, and engineering visualization. Maya is a world-class 3D animation software developed by Autodesk, widely used in film and television advertising, character animation, and film special effects. Blender is a free and open-source 3D graphics software that provides a complete solution for creating animated short films, from modeling, animation, materials, and rendering to audio processing and video editing.
[0024] In digital content creation platforms, the mask area can be created using either UV mapping or the vertex color channel of the virtual character model. Vertex color refers to the color information of each vertex in a 3D model; it has wide applications in 3D modeling and game development. This color information is typically used for texture mapping and material blending, rather than directly for the final rendered color of the model.
[0025] When using UV mapping to create the mask region, if the model itself has multiple target muscles, different mask regions, i.e., different target muscles, are distinguished by the multiple color levels of the texture. The degree of attenuation change within the color level of each mask region's color value represents the degree to which the target muscle is affected when the virtual character moves. That is, the color level of the mask region's color value is mapped to the range of (0-1) (because the weight of each different muscle region is between (0-1)). The mapped value of each mask region's color value corresponding to this range represents the proportion of the corresponding target muscle affected when the virtual character moves.
[0026] For example, if you need to simulate 5 target muscles, divide the color range from white to black (0-1) into five levels: 0-0.2, 0.2-0.4, 0.4-0.6, 0.6-0.8, and 0.8-1. Map each level to the range of values (0-1), and represent the weight controlled by the target muscle by the mapped color value of each mask area. If one texture is not enough to store enough areas, you can continue to use a second and third texture in the same way, as long as the corresponding processing is done in the material.
[0027] When the Mask region is created using the vertex color channels of the virtual character model, the color level of any one of the three vertex color channels R, G, and B represents the corresponding target muscle. The degree of decay of the color value in its corresponding color level is used as the control weight of the corresponding target muscle when the virtual character moves.
[0028] For example, if you need to simulate 9 muscles, you can set 3 color levels relative to the color value ranges of the R, G, and B channels, with each color level representing a target muscle. The degree of attenuation of the color value of each mask area within its respective color level serves as the control weight for the corresponding target muscle during the virtual character's movement.
[0029] S2. Based on the position and movement of the target muscle associated with the bone at the virtual angle, set motion setting parameters and corresponding range of action in the material to describe the shaking and deformation of the target muscle.
[0030] This step is crucial, as it determines whether the shaking and deformation of the target muscle are coordinated with the virtual character's movements. To achieve this, it is necessary to set the motion parameters and range of action of the target muscle based on the position and movement of the bones associated with it in the virtual angle.
[0031] Furthermore, the step of setting motion setting parameters in the material to describe the shaking deformation of the target muscle based on the position and movement of the bone associated with the target muscle at the virtual angle includes: setting the rotation axis point, rotation angle, shaking deformation simulation function, speed and amplitude of the shaking deformation of the target muscle based on the position of the target muscle, and setting the scope of the motion setting parameters to cover all GPU vertices of the target muscle.
[0032] Furthermore, the step of setting the rotation axis point (i.e., the axis point of the target muscle tremor) according to the position of the target muscle includes: if the target muscle is on the axis point of the virtual character skeleton, take the axis point as the rotation axis point; if the target muscle is between two bones (for example, the calf muscle is between the knee and the ankle), take the center of the position of the target muscle's accessory bone and the position of the secondary bone of the target muscle's accessory bone as the rotation axis point.
[0033] It's important to note that some films or games have very detailed skeletal structures, including a central bone segment. In these cases, the axis of rotation can be directly used as the pivot point of that central bone. Games typically omit this central bone segment to save on the number of bones. By linking the central bone segment with the corresponding skeleton, the shaking and deformation of the target muscle can be made more realistic and lifelike.
[0034] To make the muscle tremor deformation more closely resemble real physical tremors, the simulation function, speed, and amplitude of the target muscle tremor deformation are set, including: using a compressed Sin function (Y = Sin(f*t)). 2 The simulation uses a sine function (where is the tremor frequency and t is the time parameter) to simulate the tremor deformation of the target muscle. By employing a compressed sine function to simulate tremor deformation, the muscle tremors can be gradually reduced and eventually eliminated, making the muscle tremor deformation caused by the virtual character's movements more closely resemble real-world physical conditions.
[0035] Using the left-right direction as the X-axis and the up-down direction as the Z-axis, the engine obtains the position of the secondary bone to which the target muscle belongs. The X-axis jitter speed of the target muscle is obtained by subtracting the X-axis position of the previous frame from the current frame's X-axis position of the secondary bone and dividing by the engine's frame time. Similarly, the Z-axis jitter speed of the target muscle is obtained by subtracting the Z-axis position of the previous frame from the current frame's Z-axis position of the secondary bone and dividing by the engine's frame time. The X-axis jitter amplitude of the target muscle is set based on the X-axis oscillation amplitude of the secondary bone (usually by multiplying or dividing the oscillation amplitude of the secondary bone on the corresponding axis by a coefficient). The Z-axis jitter amplitude of the target muscle is also set based on the Z-axis oscillation amplitude of the secondary bone.
[0036] S3. Cover the matching mask area with the material, and render the virtual character using a rendering engine to achieve the shaking deformation of the target muscle. Preferably, the rendering engine is Unreal Engine or Unity Engine.
[0037] Corresponding to the above-described method for implementing muscle twitching and deformation of a virtual character, a second aspect of this application also provides a computer-readable medium. The computer-readable medium stores program code; when executed by a processor, the program code implements the above-described method for implementing muscle twitching and deformation of a virtual character. The computer-readable medium may be, but is not limited to, various types of flash memory, hard disks, optical disks, and network storage devices.
[0038] Finally, it should be noted that the above descriptions are merely some embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for implementing a muscle jiggle morph for a virtual character, the method comprising: The method includes: creating a mask region for the target muscle of the virtual character to be shaken and deformed; creating a material that matches the mask region; setting motion setting parameters and corresponding range of action of the material to describe the shaking and deformation of the target muscle according to the position and movement of the bones associated with the target muscle at the virtual angle; covering the mask region with the material; and rendering the virtual character using a rendering engine to achieve the shaking and deformation of the target muscle.
2. The method of claim 1, wherein, Create a mask region for the target muscle area of the virtual character to be shaken and deformed, including: creating the mask region using UV mapping or the vertex color channel of the virtual character model.
3. The method of claim 2, wherein, When using UV mapping to create the Mask region, if the model itself has multiple target muscles, different Mask regions, i.e. different target muscles, are distinguished by the multiple color levels of the texture; the degree of decay of the color value of each Mask region within its respective color level is used as the degree to which the corresponding target muscle is affected when the virtual character moves.
4. The method of claim 2, wherein, When the Mask region is created using the vertex color channels of the virtual character model, the color level of any one of the three vertex color channels R, G, and B represents the corresponding target muscle. The degree of decay of the color value in its corresponding color level is used as the control weight of the corresponding target muscle when the virtual character moves.
5. The method as described in claim 1, characterized in that, Based on the position and movement of the target muscle associated with the bone at the virtual angle, motion setting parameters describing the shaking deformation of the target muscle are set in the material, including: setting the rotation axis point, rotation angle, shaking deformation simulation function, speed and amplitude of the shaking deformation of the target muscle according to the position of the target muscle, and setting the scope of the motion setting parameters to cover all GPU vertices of the target muscle.
6. The method as described in claim 5, characterized in that, Setting the rotation axis center point includes: if the target muscle is on the corresponding axis center point of the virtual character skeleton, taking the corresponding axis center point as the rotation axis center point; if the target muscle is between two bones, taking the center point between the position of the target muscle's attached bone and the position of the next-level bone of the target muscle's attached bone as the rotation axis center point.
7. The method as described in claim 5 or 6, characterized in that, The setting of the simulation function, speed, and amplitude of the target muscle tremor includes: The tremor deformation of the target muscle is simulated by using a compressed sine function; Using the left-right direction as the X-axis and the up-down direction as the Z-axis, the engine obtains the position of the secondary bone of the bone to which the target muscle belongs. The X-axis position of the secondary bone in the current frame is subtracted from the X-axis position of the previous frame, and then divided by the frame time of the engine to obtain the X-axis jitter speed of the target muscle. The Z-axis position of the secondary bone in the current frame is subtracted from the Z-axis position of the previous frame, and then divided by the frame time of the engine to obtain the Z-axis jitter speed of the target muscle. The target muscle's X-axis shaking amplitude is set according to the X-axis swing amplitude of the secondary bone, and the target muscle's Z-axis shaking amplitude is set according to the Z-axis swing amplitude of the secondary bone.
8. A computer-readable medium, characterized in that, The computer-readable medium stores program code; when the program code is executed by a processor, it implements the method for realizing the muscle trembling and deformation of a virtual character as described in any one of claims 1-7.