Method, device, electronic device and storage medium for rendering linear elements in games
By setting multiple cluster controllers at fixed positions of dynamic soft body linear elements, only kinematic calculations of cluster controller positions are performed, the problem of low rendering efficiency in the prior art is solved, and a more efficient rendering process is achieved.
Patent Information
- Application Number
- CN202111592710.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2041-12-23
AI Technical Summary
When rendering dynamic soft body linear elements, the prior art needs to solve a large number of model vertices one by one, resulting in large amounts of calculation and low rendering efficiency.
By setting multiple cluster controllers at the fixed position of the target linear element, only kinematic calculations of the cluster controller position are performed during the movement of the linear element, and the model vertex position is determined by the relative position of the cluster controller and the model vertex, thereby rendering the linear element.
The calculation amount of determining the vertex position of the model is reduced, and the rendering efficiency of dynamic soft body linear elements is improved.
Smart Images

Figure CN114359444B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a method, device, electronic device and storage medium for rendering linear elements in a game. Background Art
[0002] In current 3D mobile games, dynamic soft-body linear elements are a common game element. For example, they can simulate chains, sails, fishing nets, bridge ropes, etc., or add more physical parameters to simulate the effects of wind blowing, various driving forces when characters pass through a suspension bridge, and the impact forces of various collision bodies after the suspension bridge is disconnected.
[0003] At present, in the process of rendering animation effects for dynamic soft body linear elements, it is necessary to solve the model vertices included in the dynamic soft body linear elements one by one to determine the positions of each model vertex after the dynamic soft body linear elements move, and then render the dynamic soft body linear elements. In the process of rendering dynamic soft body linear elements, it is necessary to perform kinematic solutions on a large number of model vertices, which results in a large amount of calculations and low rendering efficiency for dynamic soft body linear elements. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a rendering method, device, electronic device and storage medium for linear elements in a game. By setting multiple cluster controllers at fixed positions of the target linear elements, during the movement of the target linear elements, it is only necessary to perform kinematic calculations on the positions of each cluster controller, and then the positions of the model vertices can be determined through the relative positions between the cluster controllers and the model vertices. Then, according to the vertex positions of each model vertex, the rendering of the target linear elements is completed, thereby reducing the amount of calculation for determining the model vertex positions and improving the rendering efficiency of dynamic soft body linear elements.
[0005] In a first aspect, an embodiment of the present application provides a method for rendering linear elements in a game, the rendering method comprising:
[0006] In response to a motion condition of a target linear element in a game scene of a graphical user interface satisfying a trigger requirement, determining a first controller position of a plurality of cluster controllers in the game scene after the plurality of cluster controllers move according to motion parameters indicated by the motion condition; the plurality of cluster controllers are sequentially spaced along a length direction of the target linear element;
[0007] For each model vertex in the target linear element, the vertex position of the model vertex in the game scene is determined according to the first controller position of the cluster controller associated with the model vertex and the relative position relationship between the model vertex and the cluster controller; wherein the relative position relationship between the model vertex and the cluster controller is determined based on the position of the model vertex in the target linear element and the positions of multiple cluster controllers in the target linear element; each model vertex is associated with one cluster controller, and each cluster controller is associated with multiple model vertices;
[0008] The target linear element is rendered according to the vertex positions of each model vertex in the target linear element.
[0009] In a possible implementation manner, each cluster controller is located at a fixed position of an element segment included in the target linear element; each element segment corresponds to a cluster controller;
[0010] The element segmentation is determined by dividing the target linear element according to the element division interval condition; or;
[0011] The element segmentation is determined by dividing the target linear element into equal distances based on a preset segmentation interval.
[0012] In a possible implementation manner, the target linear element includes a linear attachment element, and when the target linear element is divided according to an element division interval condition, the same linear attachment element is in the same element segment of the target linear element.
[0013] In a possible implementation manner, the trigger requirement includes one of the following:
[0014] The rendering animation of the target linear element is switched from the current frame to the next frame, and the position of the target linear element in the game scene in the current frame is different from the position of the target linear element in the game scene in the next frame; or;
[0015] The moving distance of the target game element connected by the target linear element is greater than a preset distance threshold.
[0016] In a possible implementation manner, the relative position relationship between the model vertex and the cluster controller is determined based on the relative position between the model vertex and the cluster controller when the target linear element is in a natural placement state.
[0017] In a possible implementation, the target linear element is located in a background area in the game scene; and a rendering requirement of the background area is lower than that of other areas in the game scene.
[0018] In a possible implementation, for each model vertex in the target linear element, the cluster controller associated with the model vertex is determined by the following steps:
[0019] For each model vertex in the target linear element, based on the position of the model vertex in the target linear element, determine the target element segment to which the model vertex belongs from a plurality of element segments;
[0020] For each model vertex in the target linear element, the cluster controller that controls the segment of the target element is determined as the cluster controller associated with the model vertex.
[0021] In a possible implementation, in response to a position movement condition of a target linear element in a game scene of a graphical user interface satisfying a trigger requirement, determining a first controller position in the game scene after a plurality of cluster controllers move according to a motion parameter indicated by the position movement condition includes:
[0022] In response to a motion condition of the target linear element located in a game scene of the graphical user interface satisfying a trigger requirement, determining a first controller position of a target cluster controller near a first end of the target linear element according to the motion parameter;
[0023] According to the first controller position of the target cluster controller and the initial distance intervals between the cluster controllers, the first controller position of each cluster controller after movement is determined in sequence along the length direction of the target linear element.
[0024] In a possible implementation manner, the first controller position of the target cluster controller is determined by the following steps:
[0025] According to a preset correspondence between a cluster controller and each frame of the rendering animation of the target linear element, the position of the cluster controller corresponding to the next frame is determined as the first controller position of the target cluster controller.
[0026] In a possible implementation manner, the first controller position of the target cluster controller is determined by the following steps:
[0027] In response to the end of the movement of the target game element, the current controller position of the target cluster controller is determined according to the movement end position of the target game element and the relative position interval between the target game element and the target linear element.
[0028] In a possible implementation, determining the first controller positions of the cluster controllers after the movement in sequence along the length direction of the target linear element according to the first controller positions of the target cluster controllers and the initial distance intervals between the cluster controllers includes:
[0029] Determining a second controller position of the cluster controller in the game scene according to the moving position, moving speed, and moving acceleration of the target linear element indicated by the motion parameters;
[0030] Determine a moving distance interval between the cluster controller and the previous cluster controller according to the second moving position of the cluster controller and the first controller position of the previous cluster controller closest to the cluster controller;
[0031] Determining a position update coefficient during the scaling process of the target linear element based on a difference between the moving distance interval and the initial distance interval;
[0032] The second moving position is adjusted based on the position update coefficient, and the first controller position of the cluster controller is determined by the adjusted second controller position.
[0033] In a second aspect, an embodiment of the present application further provides a rendering device for linear elements in a game, the rendering device comprising:
[0034] A controller position determination module, configured to determine, in response to a motion condition of a target linear element in a game scene in a graphical user interface satisfying a trigger requirement, a first controller position in the game scene after a plurality of cluster controllers move according to motion parameters indicated by the motion condition; the plurality of cluster controllers are sequentially spaced along a length direction of the target linear element;
[0035] A vertex position determination module is used to determine the vertex position of the model vertex in the game scene for each model vertex in the target linear element according to the first controller position of the cluster controller associated with the model vertex and the relative position relationship between the model vertex and the cluster controller; wherein the relative position relationship between the model vertex and the cluster controller is determined based on the position of the model vertex in the target linear element and the positions of multiple cluster controllers in the target linear element; each model vertex is associated with one cluster controller, and each cluster controller is associated with multiple model vertices;
[0036] A rendering module is used to render and display the target linear element according to the vertex positions of each model vertex in the target linear element.
[0037] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for rendering linear elements in the game as described above are performed.
[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for rendering linear elements in a game as described above are executed.
[0039] The rendering method, device, electronic device and readable storage medium of linear elements in the game provided by the embodiment of the present application, in response to the movement condition of the target linear element located in the graphical user interface game scene meeting the triggering requirements, determine the first controller position of each cluster controller located in the target linear element after the movement; for each model vertex in the target linear element, determine the vertex position of each model vertex according to the relative position relationship between the model vertex and the cluster controller; render and display the target linear element according to the vertex position of each model vertex. In the embodiment of the present application, by setting a plurality of cluster controllers at a fixed position of the target linear element, during the movement of the target linear element, it is only necessary to perform kinematic calculations on the position of each cluster controller, and then determine the position of the model vertex through the relative position between the cluster controller and the model vertex, and then complete the rendering of the target linear element according to the vertex position of each model vertex, thereby reducing the amount of calculation for determining the position of the model vertex and improving the rendering efficiency of the dynamic soft body linear element.
[0040] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A flowchart of a method for rendering linear elements in a game provided by an embodiment of the present application;
[0043] Figure 2 A flowchart of another method for rendering linear elements in a game provided by an embodiment of the present application;
[0044] Figure 3 One of the schematic diagrams of cluster controller distribution on the target linear element provided in the embodiment of the present application;
[0045] Figure 4 The second schematic diagram of cluster controller distribution on the target linear element provided by the embodiment of the present application;
[0046] Figure 5 One of the structural schematic diagrams of a rendering device for linear elements in a game provided by an embodiment of the present application;
[0047] Figure 6 A second structural schematic diagram of a device for rendering linear elements in a game provided by an embodiment of the present application;
[0048] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0050] First, the application scenarios to which this application is applicable are introduced. This application can be applied in the field of game technology. In current three-dimensional mobile games, dynamic soft body linear elements are a common game element, for example, simulating chains, sails, fishing nets, bridge ropes, etc., or adding more physical parameters to simulate the effect of being blown by the wind, various driving forces when characters pass through the suspension bridge, and the impact force of various collision bodies after the suspension bridge is disconnected.
[0051] At present, three methods can be used to render animation effects for dynamic soft linear elements: skeleton skinning animation, skinned skeleton chain kinematic solution and model mesh vertex solution.
[0052] According to research, the method of using skeleton skinning animation is to make soft body linear element animation pre-made by game production artists. The animation effect produced in this way is better, but because it is a pre-made animation, it does not have the interactivity with the player, so it appears to be relatively monotonous. The method of using skinned skeleton chain kinematic solution is to perform skeleton skinning on the soft body linear element model, and then perform real-time kinematic physics solution on the animation part when the game is running. The soft body linear element animation obtained in this way can produce corresponding interactive changes according to the player's game behavior, but because the skinned skeleton chain is limited by the parent-child hierarchical relationship between bones, the movement freedom of the soft body linear element animation is low, and the skinning calculation itself has a certain performance overhead. Using the model mesh vertex solution method, the kinematic solution is directly performed on the model vertex by vertex, and the soft body linear element animation effect obtained in this way has the best quality, but it will generate a lot of computing performance overhead, which is a heavy burden for mobile games.
[0053] Based on this, an embodiment of the present application provides a method for rendering linear elements in a game to reduce the amount of calculation for determining the vertex positions of a model and improve the rendering efficiency of dynamic soft body linear elements.
[0054] See also Figure 1 , Figure 1 This is a flow chart of a method for rendering linear elements in a game provided by an embodiment of the present application. Figure 1 As shown in , the method for rendering linear elements in a game provided by an embodiment of the present application includes:
[0055] S101. In response to the motion condition of the target linear element in the game scene of the graphical user interface satisfying a trigger requirement, determine the first controller position of multiple cluster controllers in the game scene after the multiple cluster controllers move according to the motion parameters indicated by the motion condition; the multiple cluster controllers are arranged in sequence and spaced apart along the length direction of the target linear element.
[0056] S102. For each model vertex in the target linear element, determine the vertex position of the model vertex in the game scene according to the first controller position of the cluster controller associated with the model vertex and the relative position relationship between the model vertex and the cluster controller; wherein the relative position relationship between the model vertex and the cluster controller is determined based on the position of the model vertex in the target linear element and the positions of multiple cluster controllers in the target linear element; each model vertex is associated with a cluster controller, and each cluster controller is associated with multiple model vertices.
[0057] S103 . Render and display the target linear element according to the vertex positions of the model vertices in the target linear element.
[0058] A method for rendering linear elements in a game provided by an embodiment of the present application sets multiple cluster controllers at fixed positions of a target linear element. During the movement of the target linear element, it is only necessary to perform kinematic calculations on the positions of each cluster controller. Then, the positions of the model vertices can be determined through the relative positions between the cluster controllers and the model vertices. Then, according to the vertex positions of each model vertex, the rendering of the target linear element is completed, thereby reducing the amount of calculation for determining the model vertex positions and improving the rendering efficiency of dynamic soft body linear elements.
[0059] The following is a description of the exemplary steps of the present application embodiment:
[0060] S101. In response to the motion condition of the target linear element in the game scene of the graphical user interface satisfying a trigger requirement, determine the first controller position of multiple cluster controllers in the game scene after the multiple cluster controllers move according to the motion parameters indicated by the motion condition; the multiple cluster controllers are arranged in sequence and spaced apart along the length direction of the target linear element.
[0061] In a possible implementation, the target linear element is located in a background area in the game scene; and a rendering requirement of the background area is lower than that of other areas in the game scene.
[0062] Specifically, the embodiment of the present application sets a cluster controller at multiple specific positions of the target linear element, and determines the position of each model vertex by solving the position of the cluster controller. Compared with the method of calculating the position of the model vertices one by one, the amount of calculation is reduced and the calculation and rendering efficiency of the target linear element are improved. However, compared with the method of solving the position of the model vertices one by one, the accuracy of the determined model vertex position will be reduced accordingly. Therefore, in the embodiment of the present application, the rendering quality of the target linear element will be reduced accordingly. Therefore, in the embodiment of the present application, the rendering method for the target linear element is a combination of a relatively high-precision rendering method (vertex-by-vertex solving) and a faster cluster controller solving method. For the target linear elements in game scenes (game background areas, etc.) where the precision requirements are not high, the rendering method of the present application is adopted.
[0063] In one possible implementation, the target linear element in the embodiment of the present application refers to a linear element whose dynamic changes in the game scene only consider one dimension (length direction), for example, chains, sails, fishing nets, bridge ropes, etc. in the game scene. The motion scenes of the target linear elements that need to be simulated include but are not limited to: the effect of being blown by wind, various driving forces when the characters pass through the suspension bridge, and the deformation movement of the target linear elements caused by the impact force of various collision bodies after the suspension bridge is disconnected.
[0064] In the embodiment of the present application, the movement condition of the target linear element satisfying the trigger requirement indicates that the target linear element has a movement trend. This movement trend may be that the position of the target linear element in the game scene has changed, or the shape of the target linear element has changed, or the position of the target linear element in the game scene has changed and the shape of the target linear element has changed.
[0065] In a possible implementation, the movement of the target linear element may be triggered by an animation set in the background, or may be caused by a player performing a touch operation on the target linear element, thereby changing the display position of the target linear element in the graphical user interface, thereby triggering the movement of the target linear element.
[0066] Specifically, the trigger requirement includes one of the following:
[0067] The rendering animation of the target linear element is switched from the current frame to the next frame, and the position of the target linear element in the game scene in the current frame is different from the position of the target linear element in the game scene in the next frame; or;
[0068] The moving distance of the target game element connected by the target linear element is greater than a preset distance threshold.
[0069] It is worth noting that the rendering animation of the target linear element is designed for the cluster controller set at one end (top) of the target linear element. The movement trend of the target linear element during frame switching is determined by setting the position of the cluster controller in each frame of the rendered animation.
[0070] In a possible implementation, the target game element connected to the target linear element is a game element that is physically connected to the target linear element. In the game scene, the target linear element and the target game element exist as one element, and the movement direction and movement end position of the two are consistent. For example, for the hot air balloon element in the game scene, there is a rope connecting the hot air balloon below, and the movement of the two in the game scene is consistent. When the hot air balloon moves in the game scene, the rope below the hot air balloon will definitely move with it.
[0071] In an embodiment of the present application, the movement trigger of the target linear element can be a combination of animation control and player interaction control, which are used alternately. That is, first use the imported pre-made animation to move the target linear element to a certain position in the game scene, and then switch to the interactive mode to allow the player to move the target linear element or the target game element connected to the target linear element, and update the dynamic swinging animation of the target linear element connected to the target game element in real time based on the position of the new target linear element through kinematic solution.
[0072] In an embodiment of the present application, the movement control of the target linear element is determined by solving the position of the cluster controller set in the target linear element. The target linear element includes multiple cluster controllers, and the multiple cluster controllers are arranged in sequence along the length direction of the target linear element.
[0073] Specifically, each cluster controller is located at a fixed position of an element segment included in the target linear element; each element segment corresponds to a cluster controller.
[0074] When setting a cluster controller, the target linear element needs to be segmented, and a cluster controller is set at each element segment after segmentation. One cluster controller is associated with all model vertices in this element segment.
[0075] In an embodiment of the present application, the element segmentation is determined by dividing the target linear element according to an element division interval condition; or, the element segmentation is determined by dividing the target linear element with equal distances based on a preset segmentation interval.
[0076] In a possible implementation, when segmenting the target linear element, the target linear element may be divided into equal distances according to a preset segmentation interval based on the length of the target linear element; the preset segmentation interval may be determined based on the length of the target linear element and the number of cluster controllers that can be set.
[0077] In another possible implementation, the division may be performed according to the number of model vertices, that is, the number of model vertices included in each element segment is roughly the same. Since the distribution of model vertices in each segment of the target linear element is uneven, the length of each element segment may be different when the division is performed according to the number of model vertices.
[0078] In a possible implementation, there may be linear accessory elements on the target linear element, and when the target linear element is divided according to the element division interval condition, the same linear accessory element is in the same element segment of the target linear element. That is, it is ensured that all model vertices corresponding to the linear accessory elements in the target linear element are in the same element segment.
[0079] In one possible implementation, see Figure 2 , Figure 2 This is a flow chart of another method for rendering linear elements in a game provided by an embodiment of the present application. Figure 2As shown in the step of "in response to the position movement condition of the target linear element in the game scene of the graphical user interface satisfying the trigger requirement, determining the first controller position in the game scene after multiple cluster controllers move according to the motion parameters indicated by the position movement condition", includes:
[0080] S201. In response to a motion condition of the target linear element in the game scene of the graphical user interface satisfying a trigger requirement, determine a first controller position of a target cluster controller close to a first end of the target linear element according to the motion parameter.
[0081] In an embodiment of the present application, it is necessary to select a cluster controller with a fixed position in the target linear element, determine the position of the cluster controller through kinematic solution, and then solve the positions of other cluster controllers in turn according to the position of the cluster controller.
[0082] Specifically, the position of the target cluster controller may be close to one end of the target linear element, such as the uppermost position when the target linear element is placed vertically.
[0083] In the embodiment of the present application, there are two ways to control the position movement of the cluster controller, one is animation control, and the other is control through interaction with the player. Different control methods have different ways of controlling the position of the first controller of the target cluster controller, which will be introduced below respectively:
[0084] Method 1: When the control mode is animation control, the first controller position of the target cluster controller is determined by the following steps:
[0085] b1: According to a preset correspondence between a cluster controller and each frame of the rendering animation of the target linear element, the position of the cluster controller corresponding to the next frame is determined as the first controller position of the target cluster controller.
[0086] In an embodiment of the present application, it is necessary to produce an animation for the target cluster controller based on the control requirements for the movement of the target linear elements. Through the playback order of the animation, the position of the target cluster controller corresponding to each frame is used as the control basis for the position of the target cluster controller, and while switching the frames of the rendering animation, the new first controller position of the target cluster controller is determined.
[0087] Method 2: When controlling through interaction with the player, the first controller position of the target cluster controller is determined by the following steps:
[0088] c1: In response to the end of the movement of the target game element, determine the current controller position of the target cluster controller according to the movement end position of the target game element and the relative position interval between the target game element and the target linear element.
[0089] In an embodiment of the present application, according to the end of the touch action of the player controlling the target game element, according to the end position of the touch operation, and the relative position interval between the target game element and the target linear element, the end position of the touch operation is converted into a three-dimensional game scene, and the first controller position of the target cluster controller after the player performs the operation is determined through the relative position of the target game element and the target linear element.
[0090] S202 , determining the first controller position of each cluster controller after movement in sequence along the length direction of the target linear element according to the first controller position of the target cluster controller and the initial distance intervals between the cluster controllers.
[0091] In an embodiment of the present application, after determining the first controller position of the target cluster controller, it is necessary to perform kinematic calculations on the positions of other cluster controllers except the target cluster controller, and further determine the first cluster controller position of each cluster controller through the length constraint of the target linear element.
[0092] Specifically, the step of "determining the first controller positions of each cluster controller after movement in sequence along the length direction of the target linear element according to the first controller position of the target cluster controller and the initial distance intervals between each cluster controller" includes:
[0093] d1: Determine the second controller position of the cluster controller in the game scene according to the moving position, moving speed and moving acceleration of the target linear element indicated by the motion parameters.
[0094] In an embodiment of the present application, when calculating the position of each cluster controller, the position of the second controller after each cluster controller moves in the game scene can be determined by performing a kinematic solution using the moving position, moving speed, and moving acceleration of the target linear element using the Verle integration method.
[0095] Specifically, the position of the second controller is calculated by the Verle integration method as follows:
[0096]
[0097] Among them, x(t+Δt) is the next frame position of the target linear element that needs to be solved, x(t) is the current frame position of the target linear element, x(t-Δt) is the previous frame position of the target linear element, and a(t) is the acceleration (in the embodiment of the present application, it is the gravitational acceleration constant g).
[0098] Specifically, the position of each cluster controller needs to be calculated based on the position of the current frame and the position of the previous frame according to the motion parameters. The position of the current cluster controller is recorded in each frame, and then the position of the cluster controller (next frame position) is updated through the above formula (Verrett integration method). Finally, the previously recorded current frame position is assigned to the variable storing the previous frame position for use in the next frame calculation, where t is the time difference between the current frame and the previous frame.
[0099] d2: Determine the moving distance interval between the cluster controller and the previous cluster controller according to the second moving position of the cluster controller and the first controller position of the previous cluster controller closest to the cluster controller.
[0100] In an embodiment of the present application, after calculating the position of the second controller after the movement of each cluster controller, it is necessary to accurately calculate the position of each cluster controller by calculating the length constraint of the target linear element and considering the stretching of the target linear element. The basis for the calculation is the moving distance interval between each two cluster controllers.
[0101] It is worth noting that the calculation of the length constraint does not need to be calculated every time the position of the cluster controller is calculated. The kinematic solution can be performed using a fixed time length frequency (for example, 50 times per second, approximately once every 0.02 seconds). In a single kinematic solution process, the number of times the above length constraint is executed within a frame of solution can be appropriately increased while comprehensively considering the system performance overhead. After comprehensive consideration, the number of length constraint calculations can be determined.
[0102] d3: determining a position update coefficient during the scaling process of the target linear element based on a difference between the moving distance interval and the initial distance interval.
[0103] In the embodiment of the present application, the position update coefficient is determined according to the size relationship between the determined moving distance interval and the initial distance interval.
[0104] Specifically, if the moving distance interval is less than the initial distance interval, the difference between the moving distance interval and the initial distance interval is a negative value, which means that the length of the current linear element needs to be stretched, otherwise, the difference between the moving distance interval and the initial distance interval is a positive value, which means that the length of the current linear element needs to be contracted. Subsequently, the elastic coefficient variable is used as a multiplier to adjust the weight (position update coefficient) of the length constraint in this execution.
[0105] d4: adjusting the second moving position based on the position update coefficient, and determining the first controller position of the cluster controller with the adjusted second controller position.
[0106] In an embodiment of the present application, the determined position update coefficient is multiplied by the moving distance interval to determine the update distance interval, and the first controller position of the cluster controller is determined based on the update distance interval and the first controller position of the cluster control closest to the cluster control position.
[0107] S102. For each model vertex in the target linear element, determine the vertex position of the model vertex in the game scene according to the first controller position of the cluster controller associated with the model vertex and the relative position relationship between the model vertex and the cluster controller; wherein the relative position relationship between the model vertex and the cluster controller is determined based on the position of the model vertex in the target linear element and the positions of multiple cluster controllers in the target linear element; each model vertex is associated with a cluster controller, and each cluster controller is associated with multiple model vertices.
[0108] In the implementation of this application, when rendering the target linear element, it is necessary to render each model vertex. In the process of rendering according to the model vertex, it is necessary to render according to the position of the model vertex and the rendering parameters at the model vertex. When determining the first position of the model vertex in the game scene, it is determined based on the first control position of the cluster controller associated with the model vertex after movement.
[0109] It is worth noting that in the embodiment of the present application, the position of the cluster controller and the position of the model vertex can both be represented by coordinates, and the distance calculation is performed using the coordinates.
[0110] In a possible implementation, the relative position relationship between the model vertex and the cluster controller is determined before the target linear element is rendered, and the relative position relationship between the model vertex and the cluster controller is determined based on the relative position between the model vertex and the cluster controller when the target linear element is in a natural placement state (the linear element is not bent); each model vertex is associated with a cluster controller, and each cluster controller is associated with multiple model vertices.
[0111] For example, see Figure 3 , Figure 3 This is one of the schematic diagrams of cluster controller distribution on the target linear element provided in the embodiment of the present application, such as Figure 3 As shown in , taking the rope on the hot air balloon as the target linear element as an example, starting from the bottom of the hot air balloon model 310, the target rope 320 hanging at the bottom of the hot air balloon model 310 is divided according to the number of model vertices. Because it is divided according to the number of model vertices, the length of each element segment is not consistent. A cluster controller 330 is set in each element segment, and a cluster controller 330 controls all model vertices included in the corresponding element segment, as shown in FIG. Figure 3 As shown, the cluster controllers 330 are distributed sequentially along the length direction of the target rope 320 .
[0112] In a possible implementation, for each model vertex in the target linear element, the cluster controller associated with the model vertex is determined by the following steps:
[0113] e1: For each model vertex in the target linear element, based on the position of the model vertex in the target linear element, determine the target element segment to which the model vertex belongs from multiple element segments.
[0114] e2: For each model vertex in the target linear element, the cluster controller that controls the target element segment is determined as the cluster controller associated with the model vertex.
[0115] In an embodiment of the present application, after determining the cluster controller corresponding to each element segment in the target linear element, then for each model vertex, after determining the model segment to which the model vertex belongs, the cluster controller of the model segment associated with the model vertex can be determined.
[0116] For example, for a certain model vertex, calculation shows that the model vertex is located at one-third of the element segment of the target linear element, and the cluster controller corresponding to the one-third of the element segment of the target linear element is numbered 1, so the cluster controller corresponding to the model vertex is numbered 1.
[0117] In a possible implementation, each cluster controller needs to be numbered, and the number of each cluster controller is used as identification information of the cluster controller and written into the parameters of the model vertex. In a specific implementation, the number of the cluster controller can be written into the color attribute of the model vertex.
[0118] Specifically, the data format of the color attribute of the model vertex is floating point data (float4), that is, each model vertex can save 4 floating point data with a value range of [0,1] through the color attribute, and the ID number to be saved is a continuous integer data (int), so an integer value needs to be converted into a floating point number between [0,1]. Because in the conventional data storage process, floating point numbers are stored in binary exponential form, and the number of bits used for floating point numbers when saving vertex colors is not completely consistent in different situations (such as different hardware devices, different 3D software), sometimes using 32 bits with higher precision to store, sometimes using 8 bits with lower precision to store, and sometimes using 16 bits. In order to decode the floating point number between [0,1] and restore it to an integer, the originally set ID number value can be accurately obtained, and all 4 floating point values in the model vertex color attribute are used.
[0119] It can be considered that for any target linear element, the number of cluster controllers used will not exceed 625. Therefore, after comprehensively balancing the representation accuracy and the representation range, in the embodiment of the present application, a 4-bit 5-bit base-5 number can be used to represent the 625 integers between [0,624].
[0120] In the application embodiment, when writing color attributes, the quinary system is preferably used. The advantage of using the quinary system is that when converting it into a floating-point number between [0,1], there are only five possibilities (0, 0.2, 0.4, 0.6, 0.8). When the computer's internal storage precision is low and the actual floating-point value has errors, for example, 0.2 becomes 0.195, 0.21, etc., it can still be accurately restored to 0.2 in an approximate manner, so that the whole encoding method has a high tolerance for floating-point precision. Even if the floating-point number is stored and converted multiple times between different media, it can still be decoded to obtain the original integer itself, thereby improving the accuracy of data conversion.
[0121] For example, taking the integer 241 as an example, the four 5-base floating-point numbers written into the vertex after encoding conversion are [0.2, 0.8, 0.6, 0.2] (displayed as a more transparent light green).
[0122] In the process of rendering the target linear element, by solving the fixed-position value of the color parameter corresponding to the color attribute of each model vertex and then converting the base, the number of the cluster controller corresponding to each model vertex can be determined, and then the cluster controller associated with the model vertex can be located.
[0123] For the above example, the color parameters [0.2, 0.8, 0.6, 0.2], from left to right, are from high to low, and their decoding is restored to a decimal integer: 0.2*5^4+0.8*5^3+0.6*5^2+0.2*5^1=241.
[0124] To summarize, after converting the cluster controller's ID number integer into 4 5-base numbers and then dividing them by 5, you can get 4 floating-point numbers between [0,1]. In the DCC software, write these 4 floating-point numbers into the vertices as the RGBA channel values of the vertex color to record the ID number of the cluster controller corresponding to each vertex.
[0125] Specifically, see Figure 4 , Figure 4 The second schematic diagram of cluster controller distribution on the target linear element provided in the embodiment of the present application is as follows: Figure 4 As shown in , taking the rope on the hot air balloon as the target linear element as an example, starting from the bottom of the hot air balloon model 310, the target rope 320 hanging at the bottom of the hot air balloon model 310 is divided according to the number of model vertices. Because it is divided according to the number of model vertices, the length of each element segment is not consistent. A cluster controller 330 is set in each element segment, and a cluster controller 330 controls all model vertices included in the corresponding element segment, as shown in FIG. Figure 4 As shown, the cluster controllers 330 are sequentially distributed along the length direction of the target rope 320, and the cluster controller 330 located at the uppermost end of the target rope 320 is determined as the cluster controller with the starting number, and the cluster controllers on the target rope 320 are sequentially numbered, such as Figure 4 As shown in the figure, the fifth cluster controls the color parameters of the model vertices, and the floating-point numbers corresponding to "5" are uniformly set in the cluster controller number position.
[0126] S103: Render the target linear element according to the vertex positions of each model vertex in the target linear element.
[0127] In an embodiment of the present application, the target linear element is rendered based on the determined vertex positions of each model vertex in the target linear element in the game scene, as well as the rendering parameters (color, material, etc.) of each model vertex, to simulate the motion animation of the target linear element.
[0128] It is worth noting that in the embodiment of the present application, the rendering order of the model vertices is not fixed. The model vertex at position 1 may be rendered first, and then the model vertex at position 32 may be directly rendered, and so on.
[0129] The method for rendering linear elements in a game provided by the embodiment of the present application, in response to the movement condition of the target linear element located in the background area of the graphical user interface meeting the triggering requirement, determines the first controller position of each cluster controller located in the target linear element after the movement; for each model vertex in the target linear element, determines the vertex position of each model vertex according to the relative position relationship between the model vertex and the cluster controller; and renders the target linear element according to the vertex position of each model vertex. In the embodiment of the present application, by setting a plurality of cluster controllers at a fixed position of the target linear element, during the movement of the target linear element, it is only necessary to perform kinematic calculations on the position of each cluster controller, and then determine the position of the model vertex through the relative position between the cluster controller and the model vertex, and then complete the rendering of the target linear element according to the vertex position of each model vertex, thereby reducing the amount of calculation for determining the position of the model vertex and improving the rendering efficiency of the dynamic soft body linear element.
[0130] Based on the same inventive concept, the embodiment of the present application also provides a rendering device for linear elements in the game corresponding to the rendering method for linear elements in the game. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the rendering method for linear elements in the above-mentioned game in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0131] See also Figure 5 , Figure 6 , Figure 5 This is one of the structural schematic diagrams of a rendering device for linear elements in a game provided by an embodiment of the present application. Figure 5 This is a second structural diagram of a rendering device for linear elements in a game provided by an embodiment of the present application. Figure 5 As shown in , the rendering device 500 includes:
[0132] The controller position determination module 510 is used to determine the first controller position of a plurality of cluster controllers in the game scene after the plurality of cluster controllers move according to the motion parameters indicated by the motion conditions in response to the motion condition of the target linear element in the game scene in the graphical user interface satisfying the triggering requirement; the plurality of cluster controllers are sequentially arranged in intervals along the length direction of the target linear element;
[0133] The vertex position determination module 520 is used to determine the vertex position of the model vertex in the game scene for each model vertex in the target linear element according to the first controller position of the cluster controller associated with the model vertex and the relative position relationship between the model vertex and the cluster controller; wherein the relative position relationship between the model vertex and the cluster controller is determined based on the position of the model vertex in the target linear element and the positions of multiple cluster controllers in the target linear element; each model vertex is associated with one cluster controller, and each cluster controller is associated with multiple model vertices;
[0134] The rendering module 530 is used to render the target linear element according to the vertex positions of each model vertex in the target linear element.
[0135] In a possible implementation, Figure 6 As shown, the rendering device 500 further includes an association determination module 540, and the association determination module 540 is used to:
[0136] For each model vertex in the target linear element, based on the position of the model vertex in the target linear element, determine the target element segment to which the model vertex belongs from a plurality of element segments;
[0137] For each model vertex in the target linear element, the cluster controller that controls the segment of the target element is determined as the cluster controller associated with the model vertex.
[0138] In a possible implementation manner, each cluster controller is located at a fixed position of an element segment included in the target linear element; each element segment corresponds to a cluster controller;
[0139] The element segmentation is determined by dividing the target linear element according to the element division interval condition; or;
[0140] The element segmentation is determined by dividing the target linear element into equal distances based on a preset segmentation interval.
[0141] In a possible implementation manner, the target linear element includes a linear attachment element, and when the target linear element is divided according to an element division interval condition, the same linear attachment element is in the same element segment of the target linear element.
[0142] In a possible implementation manner, the trigger requirement includes one of the following:
[0143] The rendering animation of the target linear element is switched from the current frame to the next frame, and the position of the target linear element in the game scene in the current frame is different from the position of the target linear element in the game scene in the next frame; or;
[0144] The moving distance of the target game element connected by the target linear element is greater than a preset distance threshold.
[0145] In a possible implementation manner, the relative position relationship between the model vertex and the cluster controller is determined based on the relative position between the model vertex and the cluster controller when the target linear element is in a natural placement state.
[0146] In a possible implementation, the target linear element is located in a background area in the game scene; and a rendering requirement of the background area is lower than that of other areas in the game scene.
[0147] In a possible implementation, the controller position determination module 510 is used to determine the first controller position in the game scene after multiple cluster controllers move according to the motion parameters indicated by the position motion condition in response to the position motion condition of the target linear element in the game scene of the graphical user interface satisfying the trigger requirement, and the controller position determination module 510 is used to:
[0148] In response to a motion condition of the target linear element located in a scene of the graphical user interface satisfying a trigger requirement, determining a first controller position of a target cluster controller near a first end of the target linear element according to the motion parameter;
[0149] According to the first controller position of the target cluster controller and the initial distance intervals between the cluster controllers, the first controller position of each cluster controller after movement is determined in sequence along the length direction of the target linear element.
[0150] In a possible implementation manner, the controller position determination module 510 is used to determine the first controller position of the target cluster controller through the following steps:
[0151] According to a preset correspondence between a cluster controller and each frame of the rendering animation of the target linear element, the position of the cluster controller corresponding to the next frame is determined as the first controller position of the target cluster controller.
[0152] In a possible implementation manner, the controller position determination module 510 is further configured to determine the first controller position of the target cluster controller through the following steps:
[0153] In response to the end of the movement of the target game element, the current controller position of the target cluster controller is determined according to the movement end position of the target game element and the relative position interval between the target game element and the target linear element.
[0154] In a possible implementation, when the controller position determination module 510 is used to sequentially determine the first controller positions of each cluster controller after movement along the length direction of the target linear element according to the first controller position of the target cluster controller and the initial distance interval between each cluster controller, the controller position determination module 510 is used to:
[0155] Determining a second controller position of the cluster controller in the game scene according to the moving position, moving speed, and moving acceleration of the target linear element indicated by the motion parameters;
[0156] Determine a moving distance interval between the cluster controller and the previous cluster controller according to the second moving position of the cluster controller and the first controller position of the previous cluster controller closest to the cluster controller;
[0157] Determining a position update coefficient during the scaling process of the target linear element based on a difference between the moving distance interval and the initial distance interval;
[0158] The second moving position is adjusted based on the position update coefficient, and the first controller position of the cluster controller is determined by the adjusted second controller position.
[0159] The rendering device of linear elements in the game provided by the embodiment of the present application, in response to the movement condition of the target linear element located in the background area of the graphical user interface meeting the triggering requirement, determines the first controller position of each cluster controller located in the target linear element after the movement; for each model vertex in the target linear element, determines the vertex position of each model vertex according to the relative position relationship between the model vertex and the cluster controller; and renders the target linear element according to the vertex position of each model vertex. In the embodiment of the present application, by setting a plurality of cluster controllers at a fixed position of the target linear element, during the movement of the target linear element, it is only necessary to perform kinematic calculations on the position of each cluster controller, and then determine the position of the model vertex through the relative position between the cluster controller and the model vertex, and then complete the rendering of the target linear element according to the vertex position of each model vertex, thereby reducing the amount of calculation for determining the position of the model vertex and improving the rendering efficiency of the dynamic soft body linear element.
[0160] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown in , the electronic device 700 includes a processor 710 , a memory 720 and a bus 730 .
[0161] The memory 720 stores machine-readable instructions executable by the processor 710. When the electronic device 700 is running, the processor 710 communicates with the memory 720 via the bus 730. When the machine-readable instructions are executed by the processor 710, the above-mentioned Figure 1 as well as Figure 2 The steps of the method for rendering linear elements in a game in the method embodiment shown in the figure, and the specific implementation method can be found in the method embodiment, which will not be repeated here.
[0162] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 as well as Figure 2 The steps of the method for rendering linear elements in a game in the method embodiment shown in the figure, and the specific implementation method can be found in the method embodiment, which will not be repeated here.
[0163] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0164] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0165] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0166] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0167] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0168] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for rendering linear elements in a game, characterized in that: The rendering method comprises: In response to a motion condition of a target linear element in a game scene of a graphical user interface satisfying a trigger requirement, determining a first controller position of a plurality of cluster controllers in the game scene after the plurality of cluster controllers move according to motion parameters indicated by the motion condition; the plurality of cluster controllers are sequentially spaced along a length direction of the target linear element; For each model vertex in the target linear element, the vertex position of the model vertex in the game scene is determined according to the first controller position of the cluster controller associated with the model vertex and the relative position relationship between the model vertex and the cluster controller; wherein the relative position relationship between the model vertex and the cluster controller is determined based on the position of the model vertex in the target linear element and the positions of multiple cluster controllers in the target linear element; each model vertex is associated with one cluster controller, and each cluster controller is associated with multiple model vertices; Rendering and displaying the target linear element according to the vertex positions of each model vertex in the target linear element; Wherein, each cluster controller is located at a fixed position of an element segment included in the target linear element; The first controller position in the game scene after the plurality of cluster controllers move according to the motion parameters indicated by the motion condition is determined by the following steps: A cluster controller with a fixed position is selected in the target linear element, and the position of the cluster controller after the cluster controller moves according to the motion parameters indicated by the motion condition is determined through kinematic solution. Then, according to the position of the cluster controller, the positions of other cluster controllers are solved in turn to determine the position of the first controller in the game scene after multiple cluster controllers move according to the motion parameters indicated by the motion condition.
2. The rendering method according to claim 1, characterized in that: Each element segment corresponds to a cluster controller; The element segmentation is determined by dividing the target linear element according to the element division interval condition; or; The element segmentation is determined by dividing the target linear element into equal distances based on a preset segmentation interval.
3. The rendering method according to claim 2, characterized in that: The target linear element includes a linear attachment element. When the target linear element is divided according to an element division interval condition, the same linear attachment element is in the same element segment of the target linear element.
4. The rendering method according to claim 1, characterized in that: The trigger requirement includes one of the following: The rendering animation of the target linear element is switched from the current frame to the next frame, and the position of the target linear element in the game scene in the current frame is different from the position of the target linear element in the game scene in the next frame; or; The moving distance of the target game element connected by the target linear element is greater than a preset distance threshold.
5. The rendering method according to claim 1, characterized in that: The relative position relationship between the model vertices and the cluster controller is determined based on the relative position between the model vertices and the cluster controller when the target linear element is in a natural placement state.
6. The rendering method according to claim 1, characterized in that: The target linear element is located in a background area in the game scene; the rendering requirement of the background area is lower than that of other areas in the game scene.
7. The rendering method according to claim 2, characterized in that: For each model vertex in the target linear element, the cluster controller associated with the model vertex is determined by the following steps: For each model vertex in the target linear element, based on the position of the model vertex in the target linear element, determining the target element segment to which the model vertex belongs from a plurality of element segments; For each model vertex in the target linear element, the cluster controller that controls the target element segment is determined as the cluster controller associated with the model vertex.
8. The rendering method according to claim 4, characterized in that: In response to the position movement condition of the target linear element in the game scene of the graphical user interface satisfying the trigger requirement, determining the position of the first controller in the game scene after the plurality of cluster controllers move according to the movement parameters indicated by the position movement condition, comprises: In response to a motion condition of the target linear element located in a game scene of a graphical user interface satisfying a trigger requirement, determining a first controller position of a target cluster controller near a first end of the target linear element according to the motion parameter; According to the first controller position of the target cluster controller and the initial distance intervals between the cluster controllers, the first controller positions of the cluster controllers after movement are sequentially determined along the length direction of the target linear element.
9. The rendering method according to claim 8, characterized in that: The first controller position of the target cluster controller is determined by the following steps: According to a preset correspondence between a cluster controller and each frame of the rendering animation of the target linear element, the position of the cluster controller corresponding to the next frame is determined as the first controller position of the target cluster controller.
10. The rendering method according to claim 8, characterized in that: The first controller position of the target cluster controller is determined by the following steps: In response to the end of the movement of the target game element, the current controller position of the target cluster controller is determined according to the movement end position of the target game element and the relative position interval between the target game element and the target linear element.
11. The rendering method according to claim 8, characterized in that: The step of sequentially determining the first controller positions of the cluster controllers after the movement along the length direction of the target linear element according to the first controller positions of the target cluster controller and the initial distance intervals between the cluster controllers includes: Determining a second controller position of the cluster controller in the game scene according to the moving position, moving speed, and moving acceleration of the target linear element indicated by the motion parameters; Determine a moving distance interval between the cluster controller and the previous cluster controller according to the second moving position of the cluster controller and the first controller position of the previous cluster controller closest to the cluster controller; Determining a position update coefficient during the scaling process of the target linear element based on a difference between the moving distance interval and the initial distance interval; The second moving position is adjusted based on the position update coefficient, and the first controller position of the cluster controller is determined by the adjusted second controller position.
12. A rendering device for linear elements in a game, characterized in that: The rendering device comprises: A controller position determination module, configured to determine, in response to a motion condition of a target linear element in a game scene in a graphical user interface satisfying a trigger requirement, a first controller position in the game scene after a plurality of cluster controllers move according to motion parameters indicated by the motion condition; the plurality of cluster controllers are sequentially spaced along a length direction of the target linear element; A vertex position determination module is used to determine the vertex position of the model vertex in the game scene for each model vertex in the target linear element according to the first controller position of the cluster controller associated with the model vertex and the relative position relationship between the model vertex and the cluster controller; wherein the relative position relationship between the model vertex and the cluster controller is determined based on the position of the model vertex in the target linear element and the positions of multiple cluster controllers in the target linear element; each model vertex is associated with one cluster controller, and each cluster controller is associated with multiple model vertices; A rendering module, used for rendering and displaying the target linear element according to the vertex positions of each model vertex in the target linear element; Wherein, each cluster controller is located at a fixed position of an element segment included in the target linear element; The controller position determination module is used to determine the first controller position in the game scene after the plurality of cluster controllers move according to the motion parameters indicated by the motion condition through the following steps: A cluster controller with a fixed position is selected in the target linear element, and the position of the cluster controller after the cluster controller moves according to the motion parameters indicated by the motion condition is determined through kinematic solution. Then, according to the position of the cluster controller, the positions of other cluster controllers are solved in turn to determine the position of the first controller in the game scene after multiple cluster controllers move according to the motion parameters indicated by the motion condition.
13. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method for rendering linear elements in a game as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for rendering linear elements in a game as described in any one of claims 1 to 11 are executed.
Citation Information
Patent Citations
Flexible object rendering method and device, storage medium and electronic device
CN111773688A
Image processing method and device, computer equipment and storage medium
CN112933597A