Action processing method and device in game, electronic equipment and readable storage medium
By generating tubular models and crack textures with varying color depths and dynamically rendering the actions of virtual objects, the problem of monotonous ground crack effects in games is solved, achieving more realistic dynamic interactive crack effects.
Patent Information
- Application Number
- CN202411463111.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The existing ground crack effects in games are monotonous and lack realism. Most ground crack decals are static or appear randomly, lacking dynamic interactivity.
By generating tubular models whose color depth gradually changes along the trajectory curve, a ground model is constructed and assigned color attributes. Combined with crack normals, height, and mask maps, crack effects are dynamically rendered, and the dynamic crack effects are displayed when virtual objects perform actions in the game scene.
It achieves dynamic interaction between the ground crack effect and the virtual object's actions, enriching the dynamic effects of the crack generation process and improving realism.
Smart Images

Figure CN119565144B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, specifically to a method for handling actions in a game, a device for handling actions in a game, an electronic device, and a computer-readable storage medium. Background Technology
[0002] Game effects, as an important component, are technologies that enhance the gaming experience through various visual and sound effects, creating a realistic, vivid, stunning, or fantastical atmosphere, and improving the game's effects and expressiveness.
[0003] In game combat, the act of attacking with weapons, such as slashing with a knife or sword, leaves marks on the ground, commonly known as ground fissures. In related technologies, ground fissures can be achieved using ground fissure decals. However, most common ground fissure decals are static, causing the ground fissures to appear all at once, or they use noise-based dissolve maps, resulting in disordered ground fissures with limited dynamic effects and low realism. Summary of the Invention
[0004] This disclosure provides a method for handling motion in a game, a device for handling motion in a game, an electronic device, and a computer-readable storage medium to solve or at least partially solve the above-mentioned problems, as detailed below.
[0005] In a first aspect, this disclosure provides a method for handling actions in a game, the game including a virtual object equipped with a target moving part, the method comprising:
[0006] In response to game action execution commands, determine the target action to be executed;
[0007] When the virtual object uses the target motion component to perform the target action, the initial trajectory curve of the target motion component is projected onto the preset plane.
[0008] A first tubular model is generated with the trajectory curve as the central axis, and the color depth gradually changes along the direction of the trajectory curve.
[0009] Construct a first ground model, and assign the color attribute of the first tubular model to the first intersecting part of the first ground model that intersects with the first tubular model along the length direction of the first tubular model;
[0010] The first intersecting part is rendered using the color channel as the rendering output channel to obtain the crack dissolution texture.
[0011] Based on the trajectory curve, a crack normal map, a crack height map, and a crack mask map are generated respectively.
[0012] The virtual object is controlled to perform the target action in the game scene, and the corresponding action animation and crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part are displayed. The crack effect is generated based on the crack dissolution map, the crack normal map, the crack height map and the crack mask map.
[0013] Secondly, this disclosure also provides a motion processing device for a game, the game including virtual objects, the virtual objects being equipped with target motion components, the device comprising:
[0014] The action determination module is used to determine the target action to be executed in response to game action execution commands;
[0015] The curve determination module is used to determine the trajectory curve of the initial trajectory curve of the target motion component projected onto a preset plane when the virtual object performs the target action using the target motion component;
[0016] A tubular model generation module is used to generate a first tubular model with the trajectory curve as the central axis, where the color depth gradually changes along the direction of the trajectory curve.
[0017] The attribute inheritance module is used to construct a first ground model and assign the color attribute of the first tubular model to the first intersecting part of the first ground model that intersects with the first tubular model along the length direction of the first tubular model;
[0018] The first texture generation module is used to render the first intersecting part using the color channel as the rendering output channel to obtain the crack dissolution texture.
[0019] The second texture generation module is used to generate crack normal map, crack height map and crack mask map respectively according to the trajectory curve;
[0020] The special effects display module is used to control the virtual object to perform the target action in the game scene, and to display the action animation corresponding to the target action and the crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part. The crack effect is generated based on the crack dissolution map, the crack normal map, the crack height map and the crack mask map.
[0021] Thirdly, this disclosure also provides an electronic device, including: a processor, a memory, and computer program instructions stored in the memory and executable on the processor;
[0022] When the processor executes the computer program instructions, it implements the action processing method in the game as described in the first aspect above.
[0023] Fourthly, this disclosure also provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, are used to implement the action processing method in the game as described in the first aspect above.
[0024] The exemplary embodiments disclosed herein have the following beneficial effects:
[0025] The action processing method in the game disclosed herein first responds to the game action execution command and determines the target action to be executed; then, it determines the trajectory curve of the initial trajectory curve of the target motion part projected onto a preset plane when the virtual object uses the target motion part to perform the target action; it generates a first tubular model with the color depth gradually changing along the direction of the trajectory curve using the trajectory curve as the central axis; it constructs a first ground model and assigns the color attribute of the first tubular model to the first intersection part on the first ground model that intersects with the first tubular model along the length direction of the first tubular model; it renders the first intersection part using the color channel as the rendering output channel to obtain a crack dissolution map; it generates a crack normal map, a crack height map, and a crack mask map according to the trajectory curve; it controls the virtual object to perform the target action in the game scene and displays the action animation corresponding to the target action and the crack effect generated by the target motion part on the preset plane when the virtual object uses the target motion part to perform the target action, wherein the crack effect is generated based on the crack dissolution map, crack normal map, crack height map, and crack mask map. In the game, crack effects are generated by crack dissolution textures based on the trajectory curves of the target moving parts on a preset plane. This allows the crack effects to interact with the virtual object's movements. The crack effects can gradually appear along the trajectory curves of the target moving parts on the preset plane, thus combining the crack effects with the virtual object's movements. The crack effects are no longer an instantaneous or disorderly appearance, which enriches the dynamic effects of the crack generation process and improves the realism of the crack effects. Attached Figure Description
[0026] Figures 1-6 This is a schematic diagram of the ground fissure effect in related technologies;
[0027] Figure 7 This is a flowchart of a motion processing method in a game provided in one embodiment of this disclosure;
[0028] Figures 8-12 This is a schematic diagram of an intermediate result of the generation process of a crack dissolution map provided in one embodiment of this disclosure;
[0029] Figure 13This is a crack dissolution texture provided in one embodiment of the present disclosure;
[0030] Figures 14-17 This is a schematic diagram of intermediate results of the generation process of crack normal map and crack height map provided in one embodiment of this disclosure;
[0031] Figure 18 This is a crack normal map provided in one embodiment of the present disclosure;
[0032] Figure 19 This is a crack height map provided in one embodiment of the present disclosure;
[0033] Figure 20 This is a schematic diagram of an intermediate result of the generation process of a crack mask texture provided in one embodiment of this disclosure;
[0034] Figure 21 This is a crack masking texture provided in one embodiment of the present disclosure;
[0035] Figure 22 This is a schematic diagram of a crack effect generated based on a crack dissolution map, a crack normal map, a crack height map, and a crack masking map, provided in one embodiment of this disclosure;
[0036] Figure 23 This is a block diagram of a motion processing device in a game according to one embodiment of the present disclosure;
[0037] Figure 24 This is a schematic diagram of the logical structure of an electronic device for implementing action processing in a game, provided in one embodiment of this disclosure. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. Based on the embodiments of this disclosure, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this disclosure.
[0039] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.
[0040] It should be understood that in the embodiments of this disclosure, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "Containing A, B, and / or C" means containing any one, two, or three of A, B, and C.
[0041] It should be understood that in the embodiments of this disclosure, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.
[0042] The execution entity of the action processing method in the game provided in this disclosure can be a terminal device or a server. The terminal device can be a desktop computer, laptop computer, tablet computer, mobile phone, or other electronic device; this disclosure does not specifically limit it. The server is used to provide background services for the client of the application on the terminal device. For example, the server can be the background server of the aforementioned application. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms; this disclosure does not specifically limit it.
[0043] Before describing the embodiments of this disclosure in detail, the technical terms and related technologies involved in this disclosure will be further introduced first.
[0044] I. Introduction to Technical Terms
[0045] Houdini is a node-based 3D computer graphics software developed by SideFX, widely used in visual effects, animation, game development, and virtual reality.
[0046] HDA stands for Houdini DigitalAssets, which packages Houdini nodes into a node plugin that can be used by Houdini itself and other third-party DCC software and engines.
[0047] Decals are visual effects elements applied to the surface of 3D models in video games. They are typically used to add detail, texture, or markings, making in-game models look more realistic or unique. In a game environment, decals can be used to represent damaged or worn areas, such as cracks in a wall or dirt on the floor.
[0048] Normal mapping is a texture mapping technique used to simulate the details and geometry of an object's surface during rendering. It stores the normal direction information for each pixel using RGB color values. Normal mapping can render the detailed appearance of a high-polygon model while maintaining a low polygon count.
[0049] A height map is a two-dimensional image typically used to represent the height information of different areas in a three-dimensional scene. It is commonly used in terrain modeling and graphics rendering, using variations in grayscale values or colors to represent the elevation changes of the terrain.
[0050] Dissolve texture: It is typically used to describe the process of an object disappearing or transforming. Specifically, a dissolve texture simulates the effect of an object gradually disappearing, melting, or transforming into other substances by applying a special texture or pattern to the target surface.
[0051] Mask maps: Commonly used to define the visible area of an image, thereby controlling the filters, effects, or adjustments applied to the image. Mask maps allow for selective modification of specific areas of an image, achieving localized adjustments or special effects.
[0052] II. Introduction to Relevant Technologies
[0053] In related technologies, the following six types of ground fissure effects are commonly observed:
[0054] The first type: Reference Figure 1 Multi-layered ground fissures consume the least resources to create this effect, but they lack depth information and only provide surface brightness. This is one of the most commonly used methods in the game.
[0055] The second method: Reference Figure 2 Realistic cracks with normal maps: This type of crack effect has more details in terms of light and shadow. It requires a normal map and needs to be created by a professional modeler or special effects artist.
[0056] The third type: Reference Figure 3 Luxurious and realistic ground fissures: This type of ground fissure effect is quite realistic, but it has a high performance cost and is often used in important game scenarios such as PC games and dungeons.
[0057] The fourth type: reference Figure 4 Shadow offset ground fissures: This type of ground fissure effect obtains camouflaged depth information by sampling the same ground fissure map twice, making the second ground fissure map black, and then offsetting it slightly.
[0058] Fifth type: Reference Figure 5 Parallax fissures are a type of fissure effect that is not easily noticeable. The depth map and the base color map are combined into one image, but it is resource-intensive. It is often used in important NPC (Non-Player Character) scenes, such as dungeons that include bosses (a type of NPC).
[0059] Sixth type: Reference Figure 6 The ground fissure effect is usually composed of two models, and the actual ground fissure needs to be seen through the top mask.
[0060] Currently, the creation of ground fissure effects is mainly achieved through the following software and methods, including SubstanceDesigner, Photoshop, 3D Max, and Zbrush.
[0061] 1. Substance Designer: A professional material design software that can create realistic ground fissure textures. After inputting the main shape of the ground fissure, you can enhance its visual effect by adjusting material parameters through various nodes.
[0062] 2. Photoshop: A widely used image processing software that can also be used to create ground crack effects. The software is mainly used for hand-drawing and digital painting.
[0063] 3. 3ds Max: A professional 3D modeling and animation software. By adjusting materials and textures, it can simulate realistic ground fissures. Specific operations include using raytrace materials and bump map channels to create uneven surfaces on objects, and adjusting parameters to...
[0064] 4. ZBrush: A digital sculpting and painting software, primarily used to manually sculpt the shape of cracks, then adjust the materials and output textures. Suitable for high-precision, highly customized textures.
[0065] This disclosure discusses the creation of realistic crack effects, and in optional embodiments of this disclosure, Houdini software is innovatively used to create crack effects.
[0066] Figure 7 This disclosure illustrates a motion processing method in a game, one embodiment of which includes virtual objects equipped with target motion components, such as... Figure 7 As shown, the method includes the following steps S101 to S107.
[0067] Step S101: In response to the game action execution command, determine the target action to be executed.
[0068] Optionally, players can generate game action execution commands through in-game actions, such as touch operations (like clicks, long presses, swipes, etc.), gesture operations, gamepad operations, and hotkey operations. In response to these game action execution commands, the target action that the player-controlled virtual object needs to perform next can be determined, such as a downward slash or a horizontal sweep. This disclosure is not intended to impose any specific limitations on this.
[0069] Step S102: Determine the trajectory curve of the initial trajectory curve of the target motion component projected onto the preset plane when the virtual object performs the target action using the target motion component.
[0070] During the process of a virtual object performing a target action using a target moving part, the target moving part is in motion. The target moving part generates an initial trajectory curve during the virtual object's execution of the target action. The projection of this initial trajectory curve onto a preset plane is the trajectory curve of the target moving part projected onto the preset plane.
[0071] Optionally, a virtual object can be a virtual character.
[0072] Optionally, the preset plane can be a virtual ground.
[0073] In optional embodiments, the target moving part includes one or more of the following: limbs of a virtual object (e.g., arms, wings, etc.), virtual props (e.g., scepters, magic wands, etc.), and virtual weapons (e.g., knives, swords, etc.).
[0074] In an optional embodiment, the trajectory curve of the initial trajectory curve of the target moving part projected onto a preset plane when the virtual object performs the target action using the target moving part can be determined by the following steps S1021 to S1023.
[0075] Step S1021: Obtain the position sequence of the end point of the target moving part when the virtual object performs the target action using the target moving part.
[0076] The end point of the target moving part can be the end point of the target moving part away from the virtual object. For example, if the target moving part is the arm of the virtual object, the end point of the target moving part can be the top of the hand of the virtual object. If the target moving part is a longsword equipped by the virtual object, the end point of the target moving part can be the tip of the longsword.
[0077] It is possible to obtain the position of the end point of the target moving part at different time points during the movement process, and arrange them in chronological order to obtain the position sequence of the end point of the target moving part.
[0078] Step S1022: Generate the initial trajectory curve of the target moving part based on the position sequence of the end point.
[0079] In this step, particles are emitted from each position point in the position sequence of the endpoint (i.e., the position of the endpoint of the target moving part at different times during its motion) in a direction away from the target moving part, thus obtaining the particle position sequence, i.e., the sequence formed by the position of each particle. Then, the initial trajectory curve of the target moving part can be generated based on the particle position sequence.
[0080] Step S1023: Project the initial trajectory curve of the target moving part onto a preset plane to obtain the trajectory curve of the target moving part projected onto the preset plane.
[0081] In this embodiment, the positions of each particle are sequentially connected according to the order of their endpoint positions, and the resulting curve is projected onto a preset plane to obtain the trajectory curve of the target moving part projected onto the preset plane. Optionally, the curve obtained after sequentially connecting the particle positions can be smoothed and expanded to make the curve smoother and more natural.
[0082] For example, refer to Figure 8 This shows the trajectory curve of the initial trajectory curve of the target moving part determined in Houdini software projected onto a preset plane, hereinafter referred to as the trajectory curve of the target moving part on the preset plane.
[0083] Step S103: Generate a first tubular model with the trajectory curve as the central axis, where the color depth gradually changes along the direction of the trajectory curve.
[0084] In this step, a first tubular model can be generated based on the trajectory curve of the target moving part on a preset plane. This trajectory curve serves as the central axis of the first tubular model, and the color depth of the first tubular model gradually changes along the direction of the trajectory curve. Since the trajectory curve is generated based on the position sequence of the end points of the target moving part, the direction of the trajectory curve is the direction that the trajectory curve points in according to the order of the position sequence of the end points.
[0085] In an optional embodiment, the first tubular model can be generated through the following steps S1031 to S1033.
[0086] Step S1031: Determine the color attributes of the trajectory curve, including the color depth of the trajectory curve gradually changing along the direction of the trajectory curve.
[0087] In one alternative implementation, the color attribute of the trajectory curve can be determined by the color depth of the trajectory curve gradually changing from dark to light along the direction of the trajectory curve, wherein the color depth of the trajectory curve gradually changing from dark to light indicates that the crack gradually appears along the direction of the trajectory curve.
[0088] In another alternative implementation, the color attribute of the trajectory curve can be determined to include a gradual change in the color depth of the trajectory curve from light to dark along the direction of the trajectory curve, wherein the gradual change in the color depth of the trajectory curve indicates that the crack gradually appears along the direction of the trajectory curve.
[0089] For example, in Houdini software, the color attributes of a trajectory curve can be determined, including the color depth of the trajectory curve grading from dark to light along the direction of the trajectory curve, such as a gradient from black to white.
[0090] Step S1032: Loft the trajectory curve to obtain the first tubular model, so that the central axis of the first tubular model is the trajectory curve.
[0091] Lofting is a graphic processing method that uses a two-dimensional graphic as a cross-section or central axis along a certain path to form a complex three-dimensional graphic.
[0092] Lofting the trajectory curve allows for the generation of a first tubular model using the trajectory curve as its central axis. First, the thickness attribute of the trajectory curve is determined, including the first thickness attribute value, which sets the thickness of the first tubular model after lofting based on the trajectory curve. Then, based on the first thickness attribute value, the trajectory curve is lofted to obtain the first tubular model. Optionally, the first tubular model can be thin at both ends and thick in the middle.
[0093] Step S1033: Control the first tubular model to inherit the color attribute of the trajectory curve.
[0094] In this step, the color attributes of the first tubular model can be inherited from the trajectory curve, so that the first tubular model has the same color attributes as the trajectory curve. That is, the color attributes of the first tubular model include the color depth of the first tubular model gradually changing along the direction of the first tubular model, where the direction of the first tubular model is the direction of the trajectory curve, that is, the direction of the central axis of the first tubular model.
[0095] For example, refer to Figure 9 This illustrates the generation of a first tubular model in Houdini software, using the trajectory curve as the central axis to generate a color depth that gradually varies along the direction of the trajectory curve.
[0096] In an optional embodiment, the first tubular model can also be expanded to widen the extent of the crack body.
[0097] For example, refer to Figure 10 The image shows the result of inflating the first tubular model in Houdini software.
[0098] Step S104: Construct a first ground model and assign the color attribute of the first tubular model to the first intersecting part of the first ground model that intersects with the first tubular model along the length direction of the first tubular model.
[0099] In this disclosure, a first ground model can be constructed, and the first ground model can be controlled to intersect with the first tubular model along its length direction. The intersection of the first tubular model and the first ground model is the longitudinal section of the first tubular model, which reflects the shape of the first tubular model along its length direction. Then, the color attribute of the first tubular model can be assigned to the first intersection portion on the first ground model, so that the color depth of the first intersection portion gradually changes along the central axis of the first intersection portion, and then only the first intersection portion on the first ground model is retained.
[0100] For example, refer to Figure 11 This shows the first intersection point on the first ground model in Houdini software, where the ground model intersects the first tubular model along its length. (Refer to...) Figure 12 This shows the result of retaining only the first intersection portion in Houdini software.
[0101] Step S105: Render the first intersecting part using the color channel as the rendering output channel to obtain the crack dissolution texture.
[0102] In this step, the first intersecting part can be rendered, and the color channel can be used as the rendering output channel to obtain a crack dissolution map containing the color information of the first intersecting part. This crack dissolution map can control the crack effect to appear gradually according to the color depth of the first intersecting part.
[0103] For example, refer to Figure 13 The image shows a crack dissolution texture created in Houdini software.
[0104] Step S106: Based on the trajectory curve, generate the crack normal map, crack height map, and crack mask map respectively.
[0105] First, the steps for generating crack normal maps and crack height maps are introduced, including the following steps S1061 to S1064.
[0106] Step S1061: Loft the trajectory curve to obtain the second tubular model, so that the central axis of the second tubular model is the trajectory curve.
[0107] By laying out this trajectory curve, a second tubular model can be generated using this trajectory curve as the central axis. First, the thickness of the trajectory curve can be manually set to a non-uniform thickness. Then, the trajectory curve is laid out to obtain a second tubular model with a non-uniform thickness. The thickness of the second tubular model can be roughly thin at both ends and thick in the middle.
[0108] For example, refer to Figure 14 This shows the second tubular model generated in Houdini software.
[0109] Step S1062: Add noise to the second tubular model to obtain the third tubular model.
[0110] In this step, noise can be added to add detail to the second tubular model.
[0111] For example, refer to Figure 15 This shows the third tubular model generated in Houdini software.
[0112] Step S1063: Construct a terrain model and add terrain noise to the second intersection part of the terrain model that intersects with the third tubular model along the length direction of the third tubular model.
[0113] In this disclosure, a terrain model can be constructed, and the terrain model can be controlled to intersect with the third tubular model along its length. The intersection of the third tubular model and the terrain model is the longitudinal section of the third tubular model, which reflects the shape of the third tubular model along its length. Then, terrain noise can be added to the second intersection on the terrain model. Adding terrain noise can cause the main part of the crack to sink and have the shape of a realistic, uneven ground surface.
[0114] For example, refer to Figure 16This shows the second intersection point on the terrain model in Houdini software, where the terrain intersects with the third tubular model along its length. (Refer to...) Figure 17 The image shows the result of adding terrain noise to the second intersection section in Houdini software.
[0115] Step S1064: Generate crack normal map and crack height map based on the terrain model obtained after adding terrain noise to the second intersection part.
[0116] In this step, the terrain model obtained by adding terrain noise to the second intersection part can be rendered using the color channel as the rendering output channel, resulting in a crack normal map. The crack normal map can make the crack appear to have details such as bumps, pits, and undulations, making the crack effect more realistic.
[0117] For example, refer to Figure 18 The image shows a crack normal map created in Houdini software.
[0118] In this step, the terrain model obtained by adding terrain noise to the second intersection section can be rendered using the height channel as the rendering output channel, resulting in a crack height map. The crack height map can be used to represent the undulations of the crack, helping to create a three-dimensional effect and a realistic crack texture. In the height map, darker areas typically represent lower heights, while brighter areas represent higher heights.
[0119] For example, refer to Figure 19 The image shows a crack height map created in Houdini software.
[0120] The following describes the steps for generating the crack mask texture, including steps S1065 to S1067.
[0121] Step S1065: Generate a fourth tubular model with color depth gradually changing outward along the central axis, using the trajectory curve as the central axis.
[0122] In an optional embodiment, step S1065 can be implemented by the following steps S1065-1 to S1065-2.
[0123] Step S1065-1: Loft the trajectory curve to obtain the fourth tubular model, so that the central axis of the fourth tubular model is the trajectory curve.
[0124] By lofting this trajectory curve, a fourth tubular model can be generated using this trajectory curve as the central axis. First, determine the thickness attribute of this trajectory curve, including the second thickness attribute value, that is, set the thickness of the fourth tubular model after lofting based on this trajectory curve. Then, according to the second thickness attribute value, loft the trajectory curve to obtain the fourth tubular model.
[0125] Step S1065-2: Determine the color attributes of the fourth tubular model, including the color depth of the fourth tubular model gradually changing outward along the central axis of the fourth tubular model.
[0126] In one alternative implementation, the color attributes of the fourth tubular model can be determined by the color depth of the fourth tubular model gradually changing from light to dark outward along the central axis of the fourth tubular model, wherein the color depth of the fourth tubular model gradually changing from light to dark represents the crack gradually becoming blurred outward along the central axis of the fourth tubular model.
[0127] In another alternative implementation, the color attributes of the fourth tubular model can be determined by the color depth of the fourth tubular model gradually changing from dark to light outward along the central axis of the fourth tubular model, wherein the color depth of the fourth tubular model gradually changing from dark to light represents the crack gradually blurring outward along the central axis of the fourth tubular model.
[0128] For example, in Houdini software, the color attributes of the fourth tubular model can be determined by a color depth gradient from light to dark along the central axis of the fourth tubular model, such as a gradient from white to black. In Houdini software, the fourth tubular model can be composed of multiple points, and the distance between each point and the central axis of the fourth tubular model can be mapped to color; points closer to the central axis of the fourth tubular model have lighter colors, and points farther away from the central axis have darker colors.
[0129] For example, refer to Figure 20 This shows a fourth tubular model in Houdini software where the color depth gradually changes outward along the central axis.
[0130] In an optional embodiment, the fourth tubular model can also be expanded to broaden the display range of the crack.
[0131] Step S1066: Construct a second ground model and assign the color attribute of the fourth tubular model to the third intersection part of the second ground model that intersects with the fourth tubular model along the length direction of the fourth tubular model.
[0132] In this disclosure, a second ground model can be constructed, and the second ground model can be controlled to intersect with the fourth tubular model along its length direction. The intersection of the fourth tubular model and the second ground model is the longitudinal section of the fourth tubular model, which reflects the shape of the fourth tubular model along its length direction. Then, the color attribute of the fourth tubular model can be assigned to the third intersection on the second ground model, so that the color depth of the third intersection gradually changes along the central axis of the third intersection, and then only the third intersection on the second ground model is retained.
[0133] Step S1067: Render the third intersecting part using the color channel as the rendering output channel to obtain the crack mask texture.
[0134] In this step, the third intersecting part can be rendered, and the color channel can be used as the rendering output channel to obtain a crack mask map containing the color information of the third intersecting part. Converting the color in the crack mask map to transparency can make the crack edge lighter and less transparent, so that it can blend better with the ground environment where the crack is applied.
[0135] Crack masking maps are mainly used to remove invalid areas other than cracks, highlighting the crack itself.
[0136] For example, refer to Figure 21 The image shows a crack mask texture created in Houdini software.
[0137] Step S107: Control the virtual object to perform the target action in the game scene, and display the action animation corresponding to the target action and the crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part. The crack effect is generated based on the crack dissolution map, crack normal map, crack height map and crack mask map.
[0138] In an optional implementation, refer to Figure 22 The crack dissolution map, crack normal map, crack height map, and crack mask map can be imported into the game engine to generate crack effects. This crack effect is an animation in which cracks dynamically appear on a preset plane as the target moving part performs a target action on the virtual object. In this effect, the cracks can appear gradually. When the preset plane is a virtual ground, this crack effect is called the ground crack effect.
[0139] When a virtual object performs a target action in the game scene, the game's graphical user interface will display the animation of the virtual object performing the target action, as well as the effect of cracks appearing on a preset plane when the virtual object uses the target moving parts to perform the target action.
[0140] In one embodiment of this disclosure, step S107 may include: controlling a virtual object to perform a target action in a game scene, and displaying the motion animation corresponding to the target action, the crack effect generated by the target motion component on a preset plane when the virtual object performs the target action using the target motion component, and the trailing effect generated by the target motion component when the virtual object performs the target action using the target motion component, wherein the trailing effect is generated based on the initial trajectory curve.
[0141] In this embodiment, during the process of a virtual object performing a target action using a target motion component in a game scene, the target motion component can not only produce a trailing effect, but also produce a crack effect on a preset plane, so that during the process of the virtual object performing the target action, it can display rich interactive effects in combination with the movement of the target motion component.
[0142] Optionally, the trailing effect can be generated based on the initial trajectory curve through the following steps:
[0143] Based on the preset cross-sectional shape, the initial trajectory curve is laid out to obtain the trailing trajectory model;
[0144] The trailing trajectory model is rendered based on the preset effect texture, and a virtual object is generated to produce the trailing effect of the target moving part when the target moving part performs the target action.
[0145] The cross-sectional shape is a two-dimensional shape, which can be selected based on the shape or properties of the target moving part. For example, the cross-sectional shape can be a shape composed of two line segments at a certain angle, a single-line shape, a cross shape, etc., and this disclosure does not specifically limit it. In this step, the initial trajectory curve of the target moving part is lofted using the preset cross-sectional shape as the longitudinal section, and a three-dimensional trailing trajectory model can be obtained. The longitudinal section of the trailing trajectory model is the cross-sectional shape.
[0146] The effect texture can be selected based on factors such as the shape and attributes of the target moving part, the target action (e.g., a move), and the faction to which the virtual object belongs (e.g., the sect to which the virtual object belongs). By rendering the trail trajectory model using the preset effect texture, the trail effect produced by the target moving part when the virtual object performs the target action can be generated.
[0147] In this step, different cross-sectional shapes and / or different effect maps can be used to achieve different trailing effects.
[0148] The action processing method in the game disclosed herein first responds to the game action execution command and determines the target action to be executed; then, it determines the trajectory curve of the initial trajectory curve of the target motion part projected onto a preset plane when the virtual object uses the target motion part to perform the target action; it generates a first tubular model with the color depth gradually changing along the direction of the trajectory curve using the trajectory curve as the central axis; it constructs a first ground model and assigns the color attribute of the first tubular model to the first intersection part on the first ground model that intersects with the first tubular model along the length direction of the first tubular model; it renders the first intersection part using the color channel as the rendering output channel to obtain a crack dissolution map; it generates a crack normal map, a crack height map, and a crack mask map according to the trajectory curve; it controls the virtual object to perform the target action in the game scene and displays the action animation corresponding to the target action and the crack effect generated by the target motion part on the preset plane when the virtual object uses the target motion part to perform the target action, wherein the crack effect is generated based on the crack dissolution map, crack normal map, crack height map, and crack mask map. In the game, crack effects are generated by crack dissolution textures based on the trajectory curves of the target moving parts on a preset plane. This allows the crack effects to interact with the virtual object's movements. The crack effects can gradually appear along the trajectory curves of the target moving parts on the preset plane, thus combining the crack effects with the virtual object's movements. The crack effects are no longer an instantaneous or disorderly appearance, which enriches the dynamic effects of the crack generation process and improves the realism of the crack effects.
[0149] Corresponding to the action processing method in games provided in this disclosure, this disclosure also provides an action processing device in games. For example... Figure 23 As shown, the device 700 includes:
[0150] The action determination module 701 is used to determine the target action to be executed in response to the game action execution command;
[0151] The curve determination module 702 is used to determine the trajectory curve of the initial trajectory curve of the target motion component projected onto a preset plane when the virtual object performs the target action using the target motion component;
[0152] The tubular model generation module 703 is used to generate a first tubular model with the trajectory curve as the central axis, and the color depth gradually changes along the direction of the trajectory curve.
[0153] The attribute inheritance module 704 is used to construct a first ground model and assign the color attribute of the first tubular model to the first intersecting part of the first ground model that intersects with the first tubular model along the length direction of the first tubular model;
[0154] The first texture generation module 705 is used to render the first intersecting part using the color channel as the rendering output channel to obtain a crack dissolution texture.
[0155] The second texture generation module 706 is used to generate a crack normal map, a crack height map, and a crack mask map respectively based on the trajectory curve.
[0156] The special effects display module 707 is used to control the virtual object to perform the target action in the game scene, and to display the action animation corresponding to the target action and the crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part. The crack effect is generated based on the crack dissolution map, the crack normal map, the crack height map and the crack mask map.
[0157] In an optional embodiment, controlling the virtual object to perform the target action in the game scene, and displaying the motion animation corresponding to the target action and the crack effect generated by the target motion component on the preset plane when the virtual object performs the target action using the target motion component, includes:
[0158] The virtual object is controlled to perform the target action in the game scene, and the action animation corresponding to the target action is displayed, the crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part, and the trailing effect generated by the target motion part when the virtual object performs the target action using the target motion part, wherein the trailing effect is generated according to the initial trajectory curve.
[0159] In an optional embodiment, generating the trailing effect based on the initial trajectory curve includes:
[0160] The initial trajectory curve is laid out according to the preset cross-sectional shape to obtain the trailing trajectory model;
[0161] The trailing trajectory model is rendered according to the preset effect texture, and the trailing effect produced by the target moving part when the virtual object performs the target action using the target moving part is generated.
[0162] In an optional embodiment, generating a first tubular model with a color depth that gradually changes along the direction of the trajectory curve, using the trajectory curve as the central axis, includes:
[0163] Determining the color attribute of the trajectory curve includes the color depth of the trajectory curve gradually changing along the direction of the trajectory curve;
[0164] Lofting the trajectory curve yields a first tubular model, such that the central axis of the first tubular model is the trajectory curve;
[0165] Control the first tubular model to inherit the color attribute of the trajectory curve.
[0166] In an optional embodiment, determining the color attribute of the trajectory curve includes a gradual change in the color depth of the trajectory curve along the direction of the trajectory curve, comprising:
[0167] Determining the color attribute of the trajectory curve includes the color depth of the trajectory curve gradually changing from dark to light along the direction of the trajectory curve, wherein the color depth of the trajectory curve gradually changing from dark to light indicates that the crack gradually appears along the direction of the trajectory curve;
[0168] or,
[0169] Determining the color attribute of the trajectory curve includes the color depth of the trajectory curve gradually changing from light to dark along the direction of the trajectory curve, wherein the color depth of the trajectory curve gradually changing from light to dark indicates that the crack gradually appears along the direction of the trajectory curve.
[0170] In an optional embodiment, lofting the trajectory curve to obtain the first tubular model includes:
[0171] The thickness attribute of the trajectory curve is determined by a first thickness attribute value;
[0172] Based on the first thickness attribute value, the trajectory curve is lofted to obtain the first tubular model.
[0173] In an optional embodiment, the device is further configured to:
[0174] The first tubular model is expanded.
[0175] In an optional embodiment, generating a crack normal map and a crack height map based on the trajectory curve includes:
[0176] Lofting the trajectory curve yields a second tubular model, such that the central axis of the second tubular model is the trajectory curve;
[0177] Add noise to the second tubular model to obtain the third tubular model;
[0178] Construct a terrain model and add terrain noise to the second intersection portion of the terrain model that intersects with the third tubular model along the length direction of the third tubular model;
[0179] Based on the terrain model obtained by adding terrain noise to the second intersection portion, a crack normal map and a crack height map are generated.
[0180] In an optional embodiment, generating a crack normal map and a crack height map based on the terrain model obtained after adding terrain noise to the second intersecting portion includes:
[0181] The terrain model obtained by adding terrain noise to the second intersection part is rendered using the color channel as the rendering output channel, and a crack normal map is obtained.
[0182] In an optional embodiment, generating a crack normal map and a crack height map based on the terrain model obtained after adding terrain noise to the second intersecting portion includes:
[0183] The terrain model obtained by adding terrain noise to the second intersecting part is rendered using the height channel as the rendering output channel, resulting in a crack height map.
[0184] In an optional embodiment, the step of generating a crack mask texture based on the trajectory curve includes:
[0185] A fourth tubular model is generated with the trajectory curve as the central axis, and the color depth gradually changes outward along the central axis.
[0186] Construct a second ground model, and assign the color attribute of the fourth tubular model to the third intersection portion of the second ground model that intersects with the fourth tubular model along the length direction of the fourth tubular model;
[0187] The third intersecting part is rendered using the color channel as the rendering output channel to obtain a crack mask texture.
[0188] In an optional embodiment, generating a fourth tubular model with a color depth that gradually changes outward along the central axis using the trajectory curve as the central axis includes:
[0189] Lofting the trajectory curve yields a fourth tubular model, such that the central axis of the fourth tubular model is the trajectory curve;
[0190] Determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing outward along the central axis of the fourth tubular model.
[0191] In an optional embodiment, determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing outward along the central axis of the fourth tubular model, comprising:
[0192] Determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing from light to dark outward along the central axis of the fourth tubular model, wherein the color depth of the fourth tubular model gradually changes from light to dark, representing that the crack gradually becomes blurred outward along the central axis of the fourth tubular model;
[0193] or,
[0194] Determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing from dark to light outward along the central axis of the fourth tubular model, wherein the color depth of the fourth tubular model gradually changing from dark to light represents the crack gradually becoming blurred outward along the central axis of the fourth tubular model.
[0195] In an optional embodiment, the lofting of the trajectory curve to obtain a fourth tubular model includes:
[0196] The thickness attribute of the trajectory curve is determined, including the second thickness attribute value;
[0197] Based on the second thickness attribute value, the trajectory curve is lofted to obtain the fourth tubular model.
[0198] In an optional embodiment, the device is further configured to:
[0199] The fourth tubular model is expanded.
[0200] In an optional embodiment, determining the trajectory curve of the initial trajectory curve of the target motion component projected onto a preset plane when the virtual object performs the target action using the target motion component includes:
[0201] Obtain the position sequence of the end points of the target motion component when the virtual object performs the target action using the target motion component;
[0202] Based on the position sequence of the endpoints, an initial trajectory curve of the target moving part is generated;
[0203] The initial trajectory curve of the target moving part is projected onto a preset plane to obtain the trajectory curve of the initial trajectory curve of the target moving part projected onto the preset plane.
[0204] In an optional embodiment, generating the initial trajectory curve of the target moving part based on the position sequence of the endpoints includes:
[0205] Using each position point in the position sequence of the terminal point as an emission source, particles are emitted in a direction away from the target moving part to obtain the position sequence of the particles;
[0206] Based on the position sequence of the particles, an initial trajectory curve of the target moving part is generated.
[0207] In an optional embodiment, the target moving part includes one or more of the following: the limbs of the virtual object, virtual props, and virtual weapons.
[0208] The motion processing device in the game disclosed herein first responds to the game action execution command and determines the target action to be executed; then determines the trajectory curve of the initial trajectory curve of the target motion part projected onto a preset plane when the virtual object uses the target motion part to perform the target action; generates a first tubular model with the color depth gradually changing along the direction of the trajectory curve using the trajectory curve as the central axis; constructs a first ground model and assigns the color attribute of the first tubular model to the first intersection part on the first ground model that intersects with the first tubular model along the length direction of the first tubular model; renders the first intersection part using the color channel as the rendering output channel to obtain a crack dissolution map; generates a crack normal map, a crack height map, and a crack mask map according to the trajectory curve; controls the virtual object to perform the target action in the game scene and displays the motion animation corresponding to the target action and the crack effect generated by the target motion part on the preset plane when the virtual object uses the target motion part to perform the target action, wherein the crack effect is generated based on the crack dissolution map, crack normal map, crack height map, and crack mask map. In the game, crack effects are generated by crack dissolution textures based on the trajectory curves of the target moving parts on a preset plane. This allows the crack effects to interact with the virtual object's movements. The crack effects can gradually appear along the trajectory curves of the target moving parts on the preset plane, thus combining the crack effects with the virtual object's movements. The crack effects are no longer an instantaneous or disorderly appearance, which enriches the dynamic effects of the crack generation process and improves the realism of the crack effects.
[0209] The following describes an electronic device provided by an embodiment of this disclosure. Please refer to [link / reference]. Figure 24 , Figure 24 This is a schematic diagram of an electronic device provided in an embodiment of the present disclosure. The electronic device 800 may be equipped with an action processing device from a game as described in this embodiment, used to implement the functions of this embodiment. Specifically, the electronic device 800 includes: a receiver 801, a transmitter 802, a processor 803, and a memory 804 (wherein the electronic device 800 may have one or more processors 803). Figure 23 (Taking a processor as an example), the processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of this disclosure, the receiver 801, transmitter 802, processor 803, and memory 804 may be connected via a bus or other means.
[0210] Memory 804 may include read-only memory and random access memory, and provides instructions and data to processor 803. A portion of memory 804 may also include non-volatile random access memory (NVRAM). Memory 804 stores processor and operation instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0211] The processor 803 controls the operation of the execution device. In specific applications, the various components of the execution device are coupled together through a bus system, which may include not only the data bus but also power buses, control buses, and status signal buses. However, for clarity, all buses in the diagram are referred to as the bus system.
[0212] The methods disclosed in the above embodiments of this disclosure can be applied to or implemented by processor 803. Processor 803 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the hardware of processor 803 or by instructions in software form. Processor 803 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor, or a microcontroller, and may further include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Processor 803 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 804, and processor 803 reads the information from memory 804 and, in conjunction with its hardware, completes the steps of the above method.
[0213] Receiver 801 can be used to receive input digital or character information, and to generate signal inputs related to the settings and function control of the execution device. Transmitter 802 can be used to output digital or character information through the first interface; transmitter 802 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; transmitter 802 may also include a display device such as a display screen.
[0214] In this embodiment of the disclosure, the application processor 8031 in the processor 803 is used to execute the action processing method in the game according to this embodiment of the disclosure. It should be noted that the specific way in which the application processor 8031 executes each step is based on the same concept as the various method embodiments in this disclosure, and the resulting technical effects are the same as those in the various method embodiments in this disclosure. For details, please refer to the description in the method embodiments shown above in this disclosure, which will not be repeated here.
[0215] This disclosure also provides a chip for executing instructions, which is used to execute the action processing method in the game described above.
[0216] This disclosure also provides a computer-readable storage medium storing computer instructions that, when executed on a processor, cause the processor to perform the action processing method in the game described above.
[0217] This disclosure also provides a computer program product, including a computer program, which, when executed by a processor, is used to perform the action processing method in the game described above.
[0218] The aforementioned computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to general-purpose or special-purpose servers.
[0219] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
[0220] While this disclosure is presented above with reference to preferred embodiments, it is not intended to limit this disclosure. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope defined in the claims of this disclosure.
Claims
1. A method for handling actions in a game, characterized in that, The game includes virtual objects, which are equipped with target moving parts. The method includes: In response to game action execution commands, determine the target action to be executed; When the virtual object uses the target motion component to perform the target action, the initial trajectory curve of the target motion component is projected onto the preset plane. A first tubular model is generated with the trajectory curve as the central axis, and the color depth gradually changes along the direction of the trajectory curve. Construct a first ground model, and assign the color attribute of the first tubular model to the first intersecting part of the first ground model that intersects with the first tubular model along the length direction of the first tubular model; The first intersecting part is rendered using the color channel as the rendering output channel to obtain the crack dissolution texture. Based on the trajectory curve, a crack normal map, a crack height map, and a crack mask map are generated respectively. The virtual object is controlled to perform the target action in the game scene, and the corresponding action animation and crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part are displayed. The crack effect is generated based on the crack dissolution map, the crack normal map, the crack height map and the crack mask map.
2. The method according to claim 1, characterized in that, The control of the virtual object to perform the target action in the game scene, and the display of the motion animation corresponding to the target action and the crack effect generated by the target motion component on the preset plane when the virtual object performs the target action using the target motion component, includes: The virtual object is controlled to perform the target action in the game scene, and the action animation corresponding to the target action is displayed, the crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part, and the trailing effect generated by the target motion part when the virtual object performs the target action using the target motion part, wherein the trailing effect is generated according to the initial trajectory curve.
3. The method according to claim 2, characterized in that, The trailing effect is generated based on the initial trajectory curve, including: The initial trajectory curve is laid out according to the preset cross-sectional shape to obtain the trailing trajectory model; The trailing trajectory model is rendered according to the preset effect texture, and the trailing effect produced by the target moving part when the virtual object performs the target action using the target moving part is generated.
4. The method according to claim 1, characterized in that, The first tubular model, which generates a color depth that gradually changes along the direction of the trajectory curve with the trajectory curve as its central axis, includes: Determining the color attribute of the trajectory curve includes the color depth of the trajectory curve gradually changing along the direction of the trajectory curve; Lofting the trajectory curve yields a first tubular model, such that the central axis of the first tubular model is the trajectory curve; Control the first tubular model to inherit the color attribute of the trajectory curve.
5. The method according to claim 4, characterized in that, Determining the color attribute of the trajectory curve includes the gradual change in color depth of the trajectory curve along its direction, including: Determining the color attribute of the trajectory curve includes the color depth of the trajectory curve gradually changing from dark to light along the direction of the trajectory curve, wherein the color depth of the trajectory curve gradually changing from dark to light indicates that the crack gradually appears along the direction of the trajectory curve; or, Determining the color attribute of the trajectory curve includes the color depth of the trajectory curve gradually changing from light to dark along the direction of the trajectory curve, wherein the color depth of the trajectory curve gradually changing from light to dark indicates that the crack gradually appears along the direction of the trajectory curve.
6. The method according to claim 4, characterized in that, The lofting of the trajectory curve to obtain the first tubular model includes: The thickness attribute of the trajectory curve is determined by a first thickness attribute value; Based on the first thickness attribute value, the trajectory curve is lofted to obtain the first tubular model.
7. The method according to claim 1, characterized in that, The method further includes: The first tubular model is expanded.
8. The method according to claim 1, characterized in that, Based on the trajectory curve, a crack normal map and a crack height map are generated, including: Lofting the trajectory curve yields a second tubular model, such that the central axis of the second tubular model is the trajectory curve; Add noise to the second tubular model to obtain the third tubular model; Construct a terrain model and add terrain noise to the second intersection portion of the terrain model that intersects with the third tubular model along the length direction of the third tubular model; Based on the terrain model obtained by adding terrain noise to the second intersection portion, a crack normal map and a crack height map are generated.
9. The method according to claim 8, characterized in that, The step of generating crack normal maps and crack height maps based on the terrain model obtained after adding terrain noise to the second intersecting portion includes: The terrain model obtained by adding terrain noise to the second intersection part is rendered using the color channel as the rendering output channel, and a crack normal map is obtained.
10. The method according to claim 8, characterized in that, The step of generating crack normal maps and crack height maps based on the terrain model obtained after adding terrain noise to the second intersecting portion includes: The terrain model obtained by adding terrain noise to the second intersecting part is rendered using the height channel as the rendering output channel, resulting in a crack height map.
11. The method according to claim 1, characterized in that, Based on the trajectory curve, a crack mask texture is generated, including: A fourth tubular model is generated with the trajectory curve as the central axis, and the color depth gradually changes outward along the central axis. Construct a second ground model, and assign the color attribute of the fourth tubular model to the third intersection portion of the second ground model that intersects with the fourth tubular model along the length direction of the fourth tubular model; The third intersecting part is rendered using the color channel as the rendering output channel to obtain a crack mask texture.
12. The method according to claim 11, characterized in that, The fourth tubular model, which generates a color depth that gradually changes outward along the central axis using the trajectory curve as its central axis, includes: Lofting the trajectory curve yields a fourth tubular model, such that the central axis of the fourth tubular model is the trajectory curve; Determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing outward along the central axis of the fourth tubular model.
13. The method according to claim 12, characterized in that, Determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing outward along the central axis of the fourth tubular model, including: Determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing from light to dark outward along the central axis of the fourth tubular model, wherein the color depth of the fourth tubular model gradually changes from light to dark, representing that the crack gradually becomes blurred outward along the central axis of the fourth tubular model; or, Determining the color attributes of the fourth tubular model includes the color depth of the fourth tubular model gradually changing from dark to light outward along the central axis of the fourth tubular model, wherein the color depth of the fourth tubular model gradually changing from dark to light represents the crack gradually becoming blurred outward along the central axis of the fourth tubular model.
14. The method according to claim 12, characterized in that, The lofting of the trajectory curve yields the fourth tubular model, including: The thickness attribute of the trajectory curve is determined, including the second thickness attribute value; Based on the second thickness attribute value, the trajectory curve is lofted to obtain the fourth tubular model.
15. The method according to claim 11, characterized in that, The method further includes: The fourth tubular model is expanded.
16. The method according to claim 1, characterized in that, When determining that the virtual object uses the target motion component to perform the target action, the trajectory curve of the initial trajectory curve of the target motion component projected onto the preset plane includes: Obtain the position sequence of the end points of the target motion component when the virtual object performs the target action using the target motion component; Based on the position sequence of the endpoints, an initial trajectory curve of the target moving part is generated; The initial trajectory curve of the target moving part is projected onto a preset plane to obtain the trajectory curve of the initial trajectory curve of the target moving part projected onto the preset plane.
17. The method according to claim 16, characterized in that, The step of generating the initial trajectory curve of the target moving part based on the position sequence of the endpoints includes: Using each position point in the position sequence of the terminal point as an emission source, particles are emitted in a direction away from the target moving part to obtain the position sequence of the particles; Based on the position sequence of the particles, an initial trajectory curve of the target moving part is generated.
18. The method according to claim 1, characterized in that, The target moving parts include one or more of the following: the limbs of the virtual object, virtual props, and virtual weapons.
19. A motion processing device for a game, characterized in that, The game includes virtual objects, each equipped with target moving parts, and the device includes: The action determination module is used to determine the target action to be executed in response to game action execution commands; The curve determination module is used to determine the trajectory curve of the initial trajectory curve of the target motion component projected onto a preset plane when the virtual object performs the target action using the target motion component; A tubular model generation module is used to generate a first tubular model with the trajectory curve as the central axis, where the color depth gradually changes along the direction of the trajectory curve. The attribute inheritance module is used to construct a first ground model and assign the color attribute of the first tubular model to the first intersecting part of the first ground model that intersects with the first tubular model along the length direction of the first tubular model; The first texture generation module is used to render the first intersecting part using the color channel as the rendering output channel to obtain the crack dissolution texture. The second texture generation module is used to generate crack normal map, crack height map and crack mask map respectively according to the trajectory curve; The special effects display module is used to control the virtual object to perform the target action in the game scene, and to display the action animation corresponding to the target action and the crack effect generated by the target motion part on the preset plane when the virtual object performs the target action using the target motion part. The crack effect is generated based on the crack dissolution map, the crack normal map, the crack height map and the crack mask map.
20. An electronic device, characterized in that, include: Processor, memory, and computer program instructions stored in said memory and executable on the processor; When the processor executes the computer program instructions, it implements the action processing method in the game as described in any one of claims 1 to 18.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, are used to implement the action processing method in a game as described in any one of claims 1 to 18.
Citation Information
Patent Citations
Model rendering method and device, electronic equipment and computer readable storage medium
CN116258806A
Crack effect display method and device, electronic equipment and storage medium
CN117392286A