Object model control method and device and electronic equipment

By comparing the effective moving distance of the dynamic part of the second object model and the threshold distance of the first object model, the dynamic part is avoided, the problem of mold penetration between the object model is solved, and the realistic and stable display effect is improved .

CN118918138APending Publication Date: 2024-11-08NANJING OPPO SOFTWARE TECH CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310507323.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-06
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

During the display of object models, mold penetration occurs between multiple object models, resulting in mutual penetration and superposition.

Method used

By obtaining the effective moving distance of the dynamic part in the second object model after movement, and comparing it with the minimum distance (threshold distance) of multiple object parts of the first object model, if the effective moving distance is not less than the threshold distance , then the dynamic part avoids the first object model to avoid crossing the mold.

Benefits of technology

It effectively avoids the phenomenon of mold penetration between object models, improves the accuracy of distance management between object models and avoids contact during the display process, and ensures a more realistic and dynamic effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918138A_ABST
    Figure CN118918138A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an object model control method and device and electronic equipment. The method comprises the following steps: under the condition that a first object model and a second object model which are associated with each other are displayed, acquiring a corresponding effective moving distance after a dynamic part in the second object model moves, and comparing the effective moving distance with a threshold distance, the threshold distance is the minimum distance among the distances between the dynamic part and a plurality of object parts of the first object model, and if the effective moving distance is not less than the threshold distance, enabling the dynamic part to avoid the first object model so as to avoid mold penetration with the first object model. In this way, mold penetration between the object models is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to an object model control method, device and electronic device. Background Art

[0002] Nowadays, with the development of games and animations, the design and rendering of object models have integrated more and more elements, making the types of object models more diverse. For example, object models include character models, animal models, various character clothing, and various character hairstyles. However, in the display process of related object models, there is still the situation of object model penetration. Summary of the invention

[0003] In view of the above problems, the present application proposes an object model control method, device and electronic device to improve the above problems.

[0004] In a first aspect, the present application provides an object model control method, which is applied to an electronic device, and the method comprises: when displaying an associated first object model and a second object model, obtaining an effective moving distance corresponding to a dynamic part in the second object model after movement, the effective moving distance being the length of the projection of the moving distance after the dynamic part moves in a specified direction, the specified direction being the direction corresponding to a threshold distance, and the threshold distance being the minimum distance between the dynamic part and multiple object parts of the first object model; comparing the effective moving distance with the threshold distance; if the effective moving distance is not less than the threshold distance, making the dynamic part avoid the first object model to avoid penetration with the first object model.

[0005] In a second aspect, the present application provides an object model control device that runs on an electronic device, the device comprising: a moving distance acquisition unit, used to obtain the effective moving distance corresponding to the dynamic part of the second object model after the movement of the associated first object model and the second object model when the associated first object model and the second object model are displayed, the effective moving distance being the length of the moving distance after the dynamic part moves projected in a specified direction, the specified direction being the direction corresponding to a threshold distance, the threshold distance being the minimum distance between the dynamic part and multiple object parts of the first object model; a distance comparison unit, used to compare the effective moving distance with the threshold distance; a model control unit, used to make the dynamic part avoid the first object model if the effective moving distance is not less than the threshold distance, so as to avoid penetration with the first object model.

[0006] In a third aspect, the present application provides an electronic device, comprising a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the above method.

[0007] In a fourth aspect, the present application provides a computer-readable storage medium having a program code stored therein, wherein the above method is executed when the program code is started and executed by a controller.

[0008] The present application provides an object model control method, device and electronic device. When displaying a first object model and a second object model associated with the first object model, the effective moving distance corresponding to the dynamic part in the second object model after the movement can be obtained to compare the effective moving distance with the threshold distance, wherein the threshold distance is the minimum distance between the dynamic part and multiple object parts of the first object model, and then if the effective moving distance is not less than the threshold distance, the dynamic part is made to avoid the first object model. Thus, through the above method, the minimum distance between the dynamic part in the second object model and multiple object parts of the first object model can be used as a reference to compare the effective moving distance after each movement of the dynamic part with the reference, so that when the effective moving distance is not less than the threshold distance, the dynamic part is made to avoid the first object model in a timely manner, thereby avoiding the occurrence of model penetration. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A schematic diagram showing the occurrence of mold penetration between multiple object models;

[0011] Figure 2 A flow chart of an object model control method proposed in an embodiment of the present application is shown;

[0012] Figure 3 A schematic diagram of avoiding a dynamic part in an embodiment of the present application is shown;

[0013] Figure 4 Another schematic diagram of avoiding the dynamic part in the embodiment of the present application is shown;

[0014] Figure 5 A schematic diagram showing another method of avoiding the dynamic part in an embodiment of the present application is shown;

[0015] Figure 6 A flow chart of an object model control method proposed in another embodiment of the present application is shown;

[0016] Figure 7 A flow chart of an object model control method proposed in another embodiment of the present application is shown;

[0017] Figure 8 A schematic diagram of a spring-bound skeleton in an embodiment of the present application is shown;

[0018] Fig. 9 A schematic diagram of calculating a moving distance in an embodiment of the present application is shown;

[0019] Fig.10 A schematic diagram of calculating the distance between a dynamic part and an object part in an embodiment of the present application is shown;

[0020] Fig.11 Another schematic diagram of calculating the distance between the dynamic part and the object part in the embodiment of the present application is shown;

[0021] Fig.12 A schematic diagram showing the process stages included in an object model control method proposed in an embodiment of the present application;

[0022] Fig.13 A schematic diagram showing the binding of collision areas for object parts in the present application is shown;

[0023] Fig.14 A flow chart of an object model control method proposed in another embodiment of the present application is shown;

[0024] Fig.15 A structural block diagram of an object model control device proposed in an embodiment of the present application is shown;

[0025] Fig.16 A structural block diagram of an electronic device for executing an object model control method according to an embodiment of the present application is shown;

[0026] Fig.17 It is a storage unit of an embodiment of the present application for storing or carrying a program code for implementing the object model control method according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] In an image screen (for example, a game screen or an animation screen), many object models may be included. For example, there are many character models in a game. In addition to character models, there may also be animal models in an animation. Nowadays, with the development of games and animations, the types of object models are becoming more and more abundant. For example, in addition to character models and animal models, there may also be various clothing models and various hairstyle models.

[0029] The inventors discovered during their research on related object models that during the display process of related object models, object models may interpenetrate each other. Interpenetration refers to the phenomenon of mutual penetration and superposition caused by intersection between object models. The inventors discovered that when related object models are displayed, multiple object models may be displayed together, but the multiple object models displayed together are usually driven independently of each other, which results in a lack of constraints between the multiple object models. When the distance is close, they are more likely to overlap and interpenetrate each other. For example, Figure 1 As shown, the hair model in the dotted box in the figure penetrates the character model, so that the hair model that was originally on the back of the character model is displayed on the chest.

[0030] Therefore, the inventor proposes an object model control method, device and electronic device in the present application that can improve the above-mentioned problem. When displaying a first object model and a second object model associated with the first object model, the effective moving distance corresponding to the dynamic part in the second object model after moving can be obtained to compare the effective moving distance with the threshold distance, wherein the threshold distance is the minimum distance between the dynamic part and multiple object parts of the first object model, and then if the effective moving distance is not less than the threshold distance, the dynamic part is made to avoid the first object model. Thus, through the above method, the minimum distance between the dynamic part in the second object model and multiple object parts of the first object model can be used as a reference to compare the effective moving distance after each movement of the dynamic part with the reference, so that when the effective moving distance is not less than the threshold distance, the dynamic part is made to avoid the first object model in a timely manner, thereby avoiding the occurrence of model penetration.

[0031] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0032] See also Figure 2 , an object model control method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0033] S110: When displaying the associated first object model and the second object model, obtain the effective moving distance corresponding to the dynamic part in the second object model after the movement, the effective moving distance is the length of the movement distance after the dynamic part moves projected in the specified direction, the specified direction is the direction corresponding to the threshold distance, and the threshold distance is the minimum distance between the dynamic part and multiple object parts of the first object model.

[0034] In the embodiment of the present application, the object model (Mesh) is a model that represents the corresponding object. For example, the character model represents the character, the animal model represents the animal, the hair model represents the hair, and the clothing model represents the clothing.

[0035] There may be multiple object models in the displayed image. For example, the displayed image may include a first object model and a second object model. Optionally, the first object model and the second object model are interrelated object models. Interrelated object models may be understood as object models that are displayed together. For example, the second object model may be understood as an object model used to decorate the first object model. Exemplarily, the second object model may be a flexible object model. In one embodiment, for a character model, a hair model may be configured to be associated, and then, when the character model is displayed, the associated hair model will also be displayed together, so that the user can perceive the hairstyle corresponding to the character model. For another example, for a character model, a clothing model may also be configured to be associated, and then, when the character model is displayed, the associated clothing model will also be displayed together, so that the user can perceive that the character is wearing clothes.

[0036] The dynamic part of the object model can be understood as a part whose contents can be changed dynamically. The dynamic part can move relative to the position before each dynamic change during the dynamic change to change the position of the dynamic part displayed in the screen. Optionally, some areas of the object model can be dynamic parts, or all areas of the object model can be dynamic parts. Exemplarily, taking a hair model as an example, the hair model can have the effect of fluttering in the wind during the display process, wherein the hair model will correspond to the movement of the display position during the fluttering process. Moreover, the entire hair model is a dynamic part, or it can also be understood that the hair model includes multiple dynamic parts. Alternatively, for a clothing model, the area of ​​the clothing model that fits closely with the character model may be fixed, while the area that does not fit closely with the character model (for example, the sleeves or the trouser legs) can flutter with the movement of the character model, or flutter with the wind.

[0037] The moving distance corresponding to the dynamic part in the second object model after the movement can be understood as: the distance between the position of the dynamic part after the movement and the position before the movement.

[0038] Optionally, in the case where the first object model and the second object model are object models in a screen displayed by an electronic device, when the associated first object model and second object model are displayed, the effective moving distance corresponding to the dynamic part in the second object model after the movement can be obtained once for each frame displayed. In this case, the obtained moving distance can be the distance between the position of the dynamic part in the currently displayed frame and its position in the previous frame.

[0039] It should be noted that the shape of the dynamic part can be a three-dimensional shape. In this case, the moving distance of a certain point in the dynamic part can be obtained as the moving distance of the dynamic part. For example, the moving distance of the center point of the dynamic part can be obtained as the moving distance of the dynamic part. For another example, the moving distance of any point on the outer surface of the dynamic part can also be used as the moving distance of the dynamic part.

[0040] In an embodiment of the present application, the effective moving distance can be understood as the length of the projection of the moving distance after the dynamic part moves in the specified direction. The specified direction is the direction corresponding to the threshold distance, and the threshold distance is the minimum distance between the dynamic part and the multiple object parts of the first object model. In an embodiment of the present application, the object model may include multiple object parts, or it can also be understood that the object model is composed of multiple object parts. For example, if the first object model is a character model, then the multiple object parts of the first object model may include the head, neck, shoulders, chest, thighs, knees, calves, ankles, arms, and palms, etc.

[0041] As a method, the distance between the dynamic part and multiple object parts of the first object model can be calculated in advance, and then the distance between the dynamic part and the multiple object parts can be used as a reference distance to obtain multiple reference distances, and then the smallest distance is selected from the multiple reference distances as the threshold distance. It should be noted that if the distance moved by the dynamic part during the dynamic transformation is less than the threshold distance, it means that the dynamic part will not contact any object part to cause penetration. However, if the moving distance of the dynamic part is not less than the threshold distance, the dynamic part may contact a certain object part. Therefore, by comparing the moving distance of the dynamic part with the threshold distance, it can be determined whether the dynamic part needs to avoid the first object model.

[0042] Optionally, in an embodiment of the present application, the distance between the dynamic part and multiple object parts can be calculated based on the SDF (Signed Distance Field). In this case, the distance between the dynamic part and multiple object parts (multiple reference distances) will have a corresponding direction, and the threshold distance finally determined will also have a corresponding direction. In this case, the direction corresponding to the threshold value can be used as the designated direction in the embodiment of the present application.

[0043] In an embodiment of the present application, the first object model may be of multiple types, and the multiple object parts of different types of first object models may be different. Moreover, for the first object model, the parts specifically included in the multiple object parts are not specifically limited. For example, in the case where the first object model is composed of multiple object parts, the multiple object parts of the first object model may include all object parts of the first object model, and then, the aforementioned multiple reference distances may include the distance between the dynamic part and all object parts of the first object model. Alternatively, the multiple object parts of the first object model may include multiple key parts of the first object model, wherein the multiple key parts are some parts of all object parts of the first object model. In this case, the aforementioned multiple reference distances may include the distance between the dynamic part and the multiple key parts of the first object model.

[0044] S120: Compare the effective moving distance with the threshold distance.

[0045] S130: If the effective moving distance is not less than the threshold distance, the dynamic part avoids the first object model to avoid penetrating the first object model.

[0046] When the moving distance of the dynamic part is not less than the threshold distance, the dynamic part may contact a certain object part in the first object model, thereby causing penetration. In this case, the dynamic part can be made to avoid. Among them, making the dynamic part avoid can be understood as making the dynamic part avoid relative to the first object model, so that the dynamic part will not further contact the first object model to a greater extent to avoid penetration. In the embodiment of the present application, there can be multiple ways to make the dynamic part avoid.

[0047] As a way, making the dynamic part avoid may include: moving the dynamic part in the opposite direction of the moving direction. Wherein, if the dynamic part may have a model penetration with the object part of the first object model due to the previous movement, moving the dynamic part in the opposite direction of the movement can make the dynamic part away from the object part that may have a model penetration. For example, Figure 3As shown, if the dynamic part 10 (represented by a line segment) moves in the direction indicated by the solid arrow, because the effective moving distance is greater than the threshold distance, it may come into contact with the object part 20 (represented by a sphere), and the dynamic part 10 can be moved in the direction indicated by the dotted arrow (opposite to the direction indicated by the solid arrow) so that the dynamic part 10 and the object part 20 will not penetrate each other. Exemplarily, taking the first object model as a character model and the second object model as a hair model as an example, if a dynamic part of the hair model moves toward the shoulder of the character model, and it is detected that the effective moving distance of the dynamic part of the hair model is greater than the threshold distance, the dynamic part of the hair model can be moved in a direction away from the shoulder, so as to avoid penetration between the hair model and the shoulder of the character model.

[0048] As another way, making the dynamic part evade may include: making the dynamic part return to the position before the current movement. In this way, the electronic device can record the position of the dynamic part of the second object model after each movement, so that when the effective movement distance of the dynamic part is greater than the threshold distance, it can return to the position before the movement according to the record. For example, Figure 4 As shown, Figure 4 The left image of shows the situation before the dynamic part 10 is moved. Figure 4 The right image shows the situation after the dynamic part 10 moves. If the effective moving distance of the dynamic part 10 after moving is greater than the threshold distance, the dynamic part 10 can be returned to Figure 4 Position shown in the image on the left.

[0049] As another way, making the dynamic part avoid may include: making the dynamic part staggered with the first object model. Wherein, making the dynamic part staggered with the first object model may also be understood as making the dynamic part staggered with the object part in the first object model that may contact the dynamic part. For example, Figure 5 FIG. 1 shows the situation after the dynamic part 10 is moved. In this case, the dynamic part can be moved toward Figure 5 Move in the direction indicated by any arrow in order to be offset from the object part 20.

[0050] It should be noted that in the embodiments of the present application, there are multiple situations in which the dynamic part is avoided. The electronic device can determine the specific method to be used to make the dynamic part avoid the first object model according to the actual situation. Optionally, the electronic device can determine the method to make the dynamic part avoid the first object model according to the number of object models in the image screen where the first object model and the second object model are located. For example, in the case where there are a large number of object models in the image screen, the dynamic part can be moved in the opposite direction of the moving direction or the dynamic part can be returned to the position before the current movement, so as to make the dynamic part avoid the first object model, thereby avoiding the dynamic part from contacting other object models (object models other than the first object model) by staggering the dynamic part with the first object model. Among them, if the number of object models is greater than the preset number threshold, it is determined that the number of object models in the image screen is large.

[0051] The object model control method provided in this embodiment can obtain the effective moving distance corresponding to the dynamic part in the second object model after the movement when displaying the first object model and the second object model associated with the first object model, so as to compare the effective moving distance with the threshold distance, wherein the threshold distance is the minimum distance between the dynamic part and multiple object parts of the first object model, and then if the effective moving distance is not less than the threshold distance, the dynamic part is evaded. Thus, through the above method, the minimum distance between the dynamic part in the second object model and multiple object parts of the first object model can be used as a reference to compare the effective moving distance after each movement of the dynamic part with the reference, so that when the effective moving distance is not less than the threshold distance, the dynamic part can be timely evaded to the first object model, thereby avoiding the occurrence of model penetration.

[0052] See also Figure 6 , an object model control method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0053] S210: When displaying the associated first object model and second object model, obtain an effective moving distance corresponding to the dynamic part in the second object model after the movement.

[0054] S220: Compare the effective moving distance with the threshold distance.

[0055] S230: If the effective moving distance is not less than the threshold distance, detect whether any object part among the multiple object parts is in contact with the dynamic part.

[0056] Among them, when the effective moving distance of the dynamic part is not less than the threshold distance, the dynamic part has a high probability of contacting a certain object part of the first object model, thereby causing penetration. In this case, when it is detected that the effective moving distance is not less than the threshold distance, it can be detected whether there is an object part in multiple object parts that contacts the dynamic part. When it is determined that there is an object part in contact with the dynamic part, the dynamic part is made to avoid the first object model. Optionally, the spatial area occupied by the dynamic part after the movement can be compared with the spatial areas occupied by multiple object parts in the first object model to determine whether there is an object part in multiple object parts that contacts the dynamic part.

[0057] In an embodiment of the present application, the spatial region occupied by the object model can be identified by spatial coordinates. Furthermore, the spatial region occupied by a certain part or a certain part of the object model can also be identified by spatial coordinates. Exemplarily, taking the first object model as a character model, the spatial region occupied by the character model in space can be identified by the spatial coordinates of a certain point or multiple points in the character model. Correspondingly, the spatial region occupied by the object part in space can also be identified by the spatial coordinates of a certain point or multiple points in the object part of the character model. In this case, if it is detected that a spatial region occupied by an object part among multiple object parts of the first object model overlaps with the spatial region occupied by the dynamic part, it is determined that the object part whose occupied spatial region overlaps with the dynamic part is in contact with the dynamic part.

[0058] It should be noted that, when the first object model and the second object model are object models in the displayed image, the moving distance of the dynamic part in the second object model can be detected each time a frame is displayed, and the effective moving distance can be compared with the threshold distance. Moreover, only when the effective moving distance is not less than the threshold distance, it can be detected whether there is any contact between the object part in the first object model and the dynamic part, thereby eliminating the need to detect whether there is any contact between the object part in the first object model and the dynamic part each time a frame is displayed, thereby reducing the number of contact detections and thus reducing the power consumption of the image display.

[0059] S231: If any object part contacts the dynamic part, the dynamic part is made to avoid the first object model to avoid penetration of the first object model.

[0060] S240: If no object part is in contact with the dynamic part, the distances to multiple object parts are calculated based on the current position of the dynamic part to obtain multiple reference distances.

[0061] S241: Taking the smallest reference distance among the multiple reference distances as a new threshold distance.

[0062] It should be noted that after determining the threshold distance, the activity range corresponding to the dynamic part can be determined according to the determined threshold distance. For example, the activity range in which the moving distance is not greater than the threshold distance can be used as the activity range, or the activity range in which the moving distance is equal to the threshold distance can be used as the maximum activity range. When the dynamic part moves within the maximum activity range, the moving distance of the dynamic part is always less than the threshold distance, and thus will not contact any object part in the first object model to cause penetration. Furthermore, the maximum activity range can also be understood as the safe activity range of the dynamic part.

[0063] Among them, the dynamic part may not be fixed in one position, and the distance between the dynamic part and multiple object parts in the first object model will actually change dynamically. For example, taking the first object model as a character model and the second object model as a clothing model, the sleeve part of the clothing model (a dynamic part) can float with the time, and the distance from multiple object parts of the character model will actually change during the floating process. Therefore, when the effective moving distance of the dynamic part is not less than the threshold distance, if it is detected that no object part in the first object model contacts the dynamic part, it means that the dynamic part can actually have a larger or different maximum range of movement. Furthermore, a new threshold distance can be recalculated based on the current position of the dynamic part. After the new threshold distance is calculated, if the dynamic part is detected to have moved again, after the moving distance is obtained, the moving distance will be compared with the new threshold distance.

[0064] The present embodiment provides an object model control method, so that through the above method, the minimum distance between the dynamic part in the second object model and the multiple object parts of the first object model can be used as a reference, so as to compare the effective moving distance after each movement of the dynamic part with the reference, so that when the effective moving distance is not less than the threshold distance, the dynamic part can be timely evaded from the first object model, thereby avoiding the occurrence of model penetration. In addition, in the present embodiment, when it is detected that the effective moving distance of the dynamic part is not less than the threshold distance, it is triggered to detect whether some of the multiple object parts are in contact with the dynamic part, so as to further determine whether there is a possibility of sending model penetration, and because it is triggered to detect whether some of the multiple object parts are in contact with the dynamic part only when the effective moving distance is not less than the threshold distance, it is not necessary to detect whether the multiple object parts are in contact with the dynamic part after each movement of the dynamic part, so as to reduce the number of contact detections. Alternatively, if no object part is in contact with the dynamic part, the target threshold value will be recalculated based on the current position of the dynamic part to obtain a new target threshold value, thereby making the obtained target threshold value more accurate.

[0065] See also Figure 7 , an object model control method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0066] S310: When displaying the associated first object model and the second object model, obtain the movement mode of the spring skeleton corresponding to the dynamic part in the second object model, and obtain the effective movement distance corresponding to the dynamic part in the second object model after the movement according to the movement mode, wherein the dynamic part moves synchronously with the corresponding spring skeleton, and the position of the spring skeleton represents the position of the dynamic part.

[0067] It should be noted that in the embodiment of the present application, a spring bone (SpringBone) can be bound to a part of the object model, so that the part bound to the spring bone can be dynamically transformed to serve as a dynamic part. Among them, when a part of the object model is bound to a spring bone, the bound spring bone can also be understood as the spring bone corresponding to the part.

[0068] For example, Figure 8 As shown, in order to make Figure 8 The cape model 30 shown in the figure can have dynamic effects, for example, the cape 30 can swing with the wind, or can swing with the movement of the character model, and the spring skeleton can be bound to the cape model 30. Figure 8 In the middle right image, the line segments 31, 32, 33, 34 and 35 shown in the cloak 30 can each be understood as representing a spring skeleton. It should be noted that Figure 8 The multiple spring bones shown in the figure are only exemplary, and the area in the object model where the spring bones are specifically bound is not specifically limited in the embodiment of the present application.

[0069] For example, in order to make the dynamic effect of the object model more realistic, when the object model includes multiple parts, a corresponding spring skeleton can be bound to each part, and the movement of the parts corresponding to each spring skeleton can not affect each other. For example, when the part corresponding to the spring skeleton represented by line segment 35 is moving, the part corresponding to the spring skeleton represented by line segment 34 may not move.

[0070] S320: Compare the effective moving distance with a threshold distance, where the threshold distance is a minimum distance between the dynamic part and a plurality of object parts of the first object model.

[0071] S330: If the effective moving distance is not less than the threshold distance, the dynamic part avoids the first object model to avoid penetrating the first object model.

[0072] As a method, if the spring skeleton corresponding to the dynamic part in the second object model is rotated and moved, the projection distances of the moving distances of the two endpoints of the spring skeleton in the direction perpendicular to the spring skeleton are used as the two effective moving distances corresponding to the dynamic part in the second object model after the movement. Correspondingly, in the process of distance comparison, the two moving distances corresponding to the dynamic part after the movement can be compared with the threshold distance respectively. If one of the two moving distances is not less than the threshold distance, the dynamic part avoids the first object model to avoid penetration with the first object model.

[0073] For example, Fig. 9 As shown, the spring skeleton 40 has moved. The spring skeleton 40 in dotted line form represents the position of the spring skeleton 40 before the movement, and the spring skeleton 40 in solid line form represents the position of the spring skeleton 40 after the movement. The spring skeleton 40 corresponds to an endpoint 41 and an endpoint 42. The dotted line 51 identifies the moving distance of the endpoint 41 after the movement, and the dotted line 52 identifies the length of the projection of the moving distance of the endpoint 41 after the movement in the specified direction. In this case, the length identified by the dotted line 52 can be used as an effective moving distance of the dynamic part corresponding to the spring skeleton 40 after the movement. Similarly, the length of the projection of the moving distance of the endpoint 42 after the movement in the direction perpendicular to the spring skeleton 40 can also be obtained as another effective moving distance of the dynamic part corresponding to the spring skeleton 40 after the movement.

[0074] As another way, if the spring bone moves in a straight line, the length of the projection of the moving distance of any point in the spring bone in the specified direction is used as the effective moving distance corresponding to the dynamic part after the movement.

[0075] As a method, multiple object parts of the first object model each correspond to a collision area, and the collision area is used to characterize the range of the corresponding object part. In this way, the distance between the dynamic part and each of the multiple object parts can be equivalent to the distance between the dynamic part and each of the collision areas corresponding to the multiple object parts. Optionally, the distance between the dynamic part and the multiple object parts of the first object model can be obtained based on the position of the center point of the collision area corresponding to each of the multiple object parts relative to the dynamic part. Optionally, in an embodiment of the present application, the distance between the dynamic part and the collision area corresponding to the object part can be calculated based on the SDF (Signed DistanceField, directed field distance).

[0076] Optionally, if the vertical line from the center point of the collision area currently being acquired to the spring skeleton intersects the spring skeleton, the difference between the length of the vertical line and the first distance value is used as the distance between the object part represented by the collision area currently being acquired and the dynamic part, and the first distance value is the distance between the center point and the target intersection point, and the target intersection point is the intersection point of the vertical line and the outer surface of the collision area currently being acquired. For example, Fig.10 As shown, the vertical line 53 from the center point 21 of the collision area 20 to the spring skeleton 60 intersects the spring skeleton 60, and the difference between the vertical line 53 and the first distance value can be used as the distance between the object part represented by the collision area 20 and the dynamic part (spring skeleton 60). Among them, the intersection of the vertical line 53 and the outer surface of the collision area 20 currently obtaining the distance is the target intersection.

[0077] Optionally, if the vertical line from the center point of the collision area currently being acquired to the spring bone does not intersect the spring bone, the smallest distance between the center point and the two endpoints of the spring bone is used as the distance between the object part represented by the collision area currently being acquired and the dynamic part. Fig.11 As shown, the vertical line 54 from the center point 23 of the collision area 22 to the spring skeleton 60 does not intersect with the spring skeleton 60, but intersects with the extension line 61 of the spring skeleton 60. Then, the distance between the center point 23 and the two end points of the spring skeleton 60 (the distance indicated by the dotted line 55 and the dotted line 56) can be obtained, and then the smallest distance between the center point 23 and the two end points of the spring skeleton 60 is used as the distance between the object part represented by the collision area 22 and the dynamic part (spring skeleton 60).

[0078] like Fig.12 As shown, as a way, the object model control method involved in the embodiment of the present application can be divided into three stages, which may include a data preparation stage, an application stage, and a rendering stage. Among them, in the data preparation stage, the corresponding spring skeleton can be bound to the dynamic part of the object model. For example, the corresponding spring skeleton can be bound to the flexible object model so that the flexible object model can be dynamically transformed. Alternatively, the corresponding collision area can be bound to the object part of the object model. In the application stage, distance detection and determination of the range of activity can be performed to avoid the dynamic part when it is detected that the dynamic part may penetrate the model with other object models. Afterwards, the object model can be rendered according to the control result of the dynamic part.

[0079] As a method, different object parts correspond to different collision areas, and the shapes of the collision areas correspond to the corresponding object parts. Fig.13As shown, taking the first object model as a character model as an example, the thigh of the character model can correspond to a spherical collision area, the knee and calf can correspond to a cylindrical collision area, and the ankle can correspond to a cubic collision area.

[0080] The present embodiment provides an object model control method, so that through the above method, the minimum distance between the dynamic part in the second object model and the multiple object parts of the first object model can be used as a reference to compare the effective moving distance after each movement of the dynamic part with the reference, so that when the effective moving distance is not less than the threshold distance, the dynamic part can avoid the first object model in time to avoid the occurrence of model penetration. Moreover, in this embodiment, a spring skeleton is configured for the dynamic part, and the movement of the dynamic part can be detected by detecting the spring skeleton. Moreover, when the spring skeleton corresponding to the dynamic part has different movement modes, there will be different ways to calculate the moving distance, so as to more accurately determine in advance whether the model penetration occurs.

[0081] In addition, in this embodiment, a dynamic bone can be bound to the dynamic part, and then the spring bone bound to the dynamic part can be used as its corresponding spring bone. Because the spring bone can represent the position of the corresponding dynamic part, the position of the dynamic part corresponding to the spring bone can be determined by detecting the position of the spring bone, and then the threshold distance calculated based on the SDF method can be used to detect whether there is contact between the dynamic part and the object part, thereby improving the problem of object model penetration by combining the spring bone and SDF.

[0082] See also Fig.14 , an object model control method provided by an embodiment of the present application is applied to an electronic device, and the method includes:

[0083] S410: When displaying the associated first object model and second object model, obtain corresponding effective moving distances of each of the multiple dynamic parts in the second object model after the movement, and obtain multiple effective moving distances.

[0084] Wherein, when the second object model includes multiple dynamic parts, in order to control each dynamic part separately, the effective moving distance can be acquired for each dynamic part separately. The method for determining the effective moving distance of the dynamic part in the embodiment is the same as that in the above embodiment.

[0085] S420: Compare the effective moving distance with threshold distances corresponding to each of the multiple dynamic parts, where the threshold distance is the minimum distance between the corresponding dynamic part and the multiple object parts of the first object model.

[0086] S430: If there is a target dynamic part, the target dynamic part is made to avoid the first object model to avoid penetration of the target dynamic part and the first object model, and the target dynamic part is a dynamic part whose corresponding effective moving distance is not less than the corresponding threshold distance.

[0087] As a way, a movable range is configured for the dynamic part according to the physical properties of the dynamic part, wherein the movable ranges corresponding to the dynamic parts with different physical properties are different. The physical property may include at least one of material, weight and volume. For example, taking the physical property of weight as an example, for objects of different weights, the amplitude of movement under the action of the same external force may be different. For example, if a character is in a windy environment and the clothes worn by the character are relatively light, the clothes can move more significantly, while if the pendants worn by the character are relatively heavier, the amplitude of movement is smaller than that of the clothes. In an embodiment of the present application, by dividing the movable range for the dynamic part according to the different physical properties of the dynamic part, it is beneficial to make the display effect more realistic during the display of the picture, so as to enhance the user's visual experience.

[0088] The movable range can be understood as the range in which the dynamic part can be dynamically transformed. When the dynamic part is within the corresponding movable range, it can be dynamically transformed to move its position. When the dynamic part is outside the corresponding movable range, it cannot be moved. The movable range corresponding to the dynamic part can be smaller than the maximum range of movement determined in the above embodiment, thereby avoiding the dynamic part from penetrating with other object models (e.g., the first object model).

[0089] The object model control method provided in this embodiment allows the minimum distance between the dynamic part in the second object model and multiple object parts of the first object model to be used as a reference, so that the effective moving distance after each movement of the dynamic part is compared with the reference, so that when the effective moving distance is not less than the threshold distance, the dynamic part can avoid the first object model in time, thereby avoiding the occurrence of model penetration. In addition, in this embodiment, when the second object model has multiple dynamic parts, each dynamic part can be controlled separately, thereby improving the flexibility of control.

[0090] See also Fig.15 The object model control device 500 provided in the embodiment of the present application is operated on an electronic device, and the device 500 includes:

[0091] The moving distance acquisition unit 510 is used to obtain the effective moving distance corresponding to the dynamic part of the second object model after the movement when displaying the associated first object model and the second object model. The effective moving distance is the length of the projection of the moving distance of the dynamic part after the movement in a specified direction. The specified direction is the direction corresponding to the threshold distance. The threshold distance is the minimum distance between the dynamic part and multiple object parts of the first object model.

[0092] The distance comparison unit 520 is used to compare the effective moving distance with the threshold distance.

[0093] The model control unit 530 is used to make the dynamic part avoid the first object model if the effective moving distance is not less than the threshold distance, so as to avoid penetrating the first object model.

[0094] As a method, the model control unit 530 is specifically used to detect whether any object part among multiple object parts is in contact with the dynamic part if the effective moving distance is not less than the threshold distance. If any object part is in contact with the dynamic part, the dynamic part avoids the first object model to avoid penetration with the first object model.

[0095] As a method, the model control unit 530 is also used to calculate the distances to multiple object parts based on the current position of the dynamic part if no object part is in contact with the dynamic part, and obtain multiple reference distances; and use the smallest reference distance among the multiple reference distances as the new threshold distance.

[0096] As a method, the dynamic part is pre-corresponded to a line segment spring skeleton, and the dynamic part moves synchronously with the corresponding spring skeleton, and the position of the spring skeleton represents the position of the dynamic part. The distance comparison unit 520 is specifically used to project the length of the movement distance of each of the two endpoints of the spring skeleton in the specified direction as the two effective movement distances corresponding to the dynamic part in the second object model after the movement if the spring skeleton is rotated. In this way, the distance comparison unit 520 is specifically used to compare the two movement distances corresponding to the dynamic part after the movement with the threshold distance respectively.

[0097] Optionally, the distance comparison unit 520 is specifically used to use the length of the projection of the moving distance of any point in the spring skeleton in the specified direction as the effective moving distance corresponding to the dynamic part after the movement if the spring skeleton moves in a straight line.

[0098] As a method, each of the multiple object parts corresponds to a collision area, and the collision area is used to characterize the range of the corresponding object part. The moving distance acquisition unit 510 is specifically used to obtain the distance between the dynamic part and the multiple object parts of the first object model according to the position of the center point of the collision area corresponding to each of the multiple object parts relative to the dynamic part.

[0099] Optionally, the mobile distance acquisition unit 510 is specifically used to use the difference between the length of the vertical line and the first distance value as the distance between the object part represented by the collision area currently performing distance acquisition and the dynamic part if the vertical line of the center point of the collision area currently performing distance acquisition intersects with the spring bone. The first distance value is the distance between the center point and the target intersection point, and the target intersection point is the intersection point of the vertical line with the outer surface of the collision area currently performing distance acquisition.

[0100] Optionally, the moving distance acquisition unit 510 is specifically used to use the smallest distance between the center point and the two endpoints of the spring skeleton as the distance between the object part represented by the collision area currently performing distance acquisition and the dynamic part if the vertical line from the center point of the collision area currently performing distance acquisition toward the spring skeleton does not intersect the spring skeleton.

[0101] Optionally, the shapes of the collision regions corresponding to different object parts are different, and the shapes of the collision regions correspond to the corresponding object parts.

[0102] As a method, the moving distance acquisition unit 510 is specifically used to obtain the effective moving distances corresponding to each of the multiple dynamic parts in the second object model after the movement, and obtain multiple moving distances. In this method, the distance comparison unit 520 is specifically used to compare the moving distance with the threshold distances corresponding to each of the multiple dynamic parts. The model control unit 530 is specifically used to avoid the target dynamic part if there is a target dynamic part, so as to avoid the target dynamic part from penetrating the model with the first object model. The target dynamic part is a dynamic part whose corresponding effective moving distance is not less than the corresponding threshold distance.

[0103] Optionally, a movable range is configured for the dynamic part according to the physical properties of the dynamic part, wherein the movable ranges corresponding to dynamic parts with different physical properties are different.

[0104] The object model control device provided in this embodiment allows the minimum distance between the dynamic part in the second object model and multiple object parts of the first object model to be used as a reference, so as to compare the effective moving distance after each movement of the dynamic part with the reference, so as to enable the dynamic part to avoid the first object model in time when the effective moving distance is not less than the threshold distance, thereby avoiding the occurrence of model penetration.

[0105] It should be noted that the device embodiment in the present application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment and will not be repeated here.

[0106] The following will be combined Fig.16 An electronic device provided by the present application is described.

[0107] See also Fig.16 Based on the object model control method and device described above, the embodiment of the present application also provides another electronic device 1000 that can execute the object model control method described above. The electronic device 1000 includes one or more (only one is shown in the figure) processors 102, a memory 104, a network module 106, a sensor module 108, and an audio acquisition device 110 that are coupled to each other. The memory 104 stores a program that can execute the content of the above embodiments, and the processor 102 can execute the program stored in the memory 104.

[0108] Among them, the processor 102 may include one or more processing cores. The processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 104, and calling data stored in the memory 104. Optionally, the processor 102 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA), or the processor 102 can be an application processor (Application Processor). The processor 102 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but may be implemented separately through a communication chip.

[0109] The memory 104 may include a random access memory (RAM) or a read-only memory (ROM). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.

[0110] The network module 106 is used to implement information exchange between the electronic device 1000 and other devices, for example, to transmit device control instructions, operation request instructions, and status information acquisition instructions, etc. When the electronic device 1000 is specifically a different device, the corresponding network module 106 may be different.

[0111] The sensor module 108 may include at least one sensor. Specifically, the sensor module 108 may include but is not limited to: a light sensor, a motion sensor, a pressure sensor, an infrared heat sensor, a distance sensor, an acceleration sensor, and other sensors.

[0112] Among them, the pressure sensor can be a sensor that detects the pressure generated by pressing on the electronic device 1000. That is, the pressure sensor detects the pressure generated by the contact or pressing between the user and the audio playback device, such as the pressure generated by the contact or pressing between the user's ear and the mobile terminal. Therefore, the pressure sensor can be used to determine whether contact or pressing occurs between the user and the electronic device 1000, and the magnitude of the pressure.

[0113] Among them, the acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary, and can be used for applications that recognize the posture of the electronic device 1000 (such as horizontal and vertical screen conversion, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. In addition, the electronic device 1000 can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, etc., which will not be repeated here.

[0114] The audio acquisition device 110 is used to acquire audio signals. Optionally, the audio acquisition device 110 includes a plurality of audio acquisition devices. The audio acquisition device may be a microphone.

[0115] As a method, the network module of the electronic device 1000 is a radio frequency module, which is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The radio frequency module may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, etc. For example, the radio frequency module can exchange information with an external device through the electromagnetic waves sent or received, and then receive audio signals sent by the external device.

[0116] Alternatively, the electronic device 1000 may also include an image acquisition device for image acquisition. For example, a video, a static picture, or a dynamic picture may be taken by the image acquisition device. In addition, the electronic device 1000 may also include a motor driver IC and a motor. The motor may drive the electronic device 1000 to switch the device state. For example, when the electronic device 1000 includes a scroll screen, the motor may drive the scroll screen to shrink or expand, so that the electronic device 1000 switches the device state.

[0117] Please refer to Fig.17 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 1100 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0118] The computer readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer readable storage medium 1100 has storage space for program code 1110 that executes any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 1110 can be compressed, for example, in an appropriate form.

[0119] In summary, the object model control method, device and electronic device provided by the present application can obtain the effective moving distance corresponding to the dynamic part in the second object model after the movement when displaying the first object model and the second object model associated with the first object model, so as to compare the effective moving distance with the threshold distance, wherein the threshold distance is the minimum distance between the dynamic part and multiple object parts of the first object model, and then if the effective moving distance is not less than the threshold distance, the dynamic part is made to avoid the first object model. Therefore, through the above method, the minimum distance between the dynamic part in the second object model and multiple object parts of the first object model can be used as a reference to compare the effective moving distance after each movement of the dynamic part with the reference, so that when the effective moving distance is not less than the threshold distance, the dynamic part is made to avoid the first object model in a timely manner, thereby avoiding the occurrence of model penetration.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical feature diagrams therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An object model control method, characterized in that: Applied to electronic equipment, the method comprises: When displaying the associated first object model and the second object model, obtaining an effective moving distance corresponding to the movement of the dynamic part in the second object model, wherein the effective moving distance is the length of the projection of the moving distance of the dynamic part after the movement in a specified direction, wherein the specified direction is the direction corresponding to the threshold distance, and the threshold distance is the minimum distance between the dynamic part and multiple object parts of the first object model; Comparing the effective moving distance with the threshold distance; If the effective moving distance is not less than the threshold distance, the dynamic part is made to avoid the first object model to avoid penetration with the first object model.

2. The method according to claim 1, characterized in that The step of causing the dynamic part to avoid the first object model comprises: causing the dynamic portion to move in a direction opposite to the direction of the movement; Alternatively, the dynamic part is returned to the position before the current movement; Alternatively, the dynamic part is offset from the first object model.

3. The method according to claim 1, characterized in that If the effective moving distance is not less than the threshold distance, making the dynamic part avoid the first object model includes: If the effective moving distance is not less than the threshold distance, detecting whether any object part among the plurality of object parts is in contact with the dynamic part; If any object part contacts the dynamic part, the dynamic part is made to avoid the first object model.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If no object part is in contact with the dynamic part, the distances to the multiple object parts are calculated based on the current position of the dynamic part to obtain multiple reference distances; The smallest reference distance among the multiple reference distances is used as a new threshold distance.

5. The method according to claim 1, characterized in that The dynamic part is pre-corresponded to a line segment spring skeleton, the dynamic part moves synchronously with the corresponding spring skeleton, and the position of the spring skeleton represents the position of the dynamic part, and the obtaining of the effective moving distance corresponding to the dynamic part in the second object model after the movement includes: The moving mode of the spring skeleton is obtained, and according to the moving mode, an effective moving distance corresponding to the dynamic part in the second object model after the movement is obtained.

6. The method according to claim 5, characterized in that The obtaining, according to the movement mode, an effective movement distance corresponding to the movement of the dynamic part in the second object model includes: If the spring bone is rotated, the lengths of the projections of the movement distances of the two endpoints of the spring bone in the specified direction are used as the two effective movement distances corresponding to the dynamic part of the second object model after the movement; The comparing the effective moving distance with the threshold distance includes: The two effective moving distances are respectively compared with the threshold distance.

7. The method according to claim 5, characterized in that The obtaining, according to the movement mode, an effective movement distance corresponding to the movement of the dynamic part in the second object model includes: If the spring skeleton moves in a straight line, the length of the projection of the moving distance of any point in the spring skeleton in the specified direction is used as the effective moving distance corresponding to the dynamic part after the movement.

8. The method according to claim 1, characterized in that Each of the plurality of object parts corresponds to a collision area, and the collision area is used to characterize the range of the corresponding object part. The method further includes: According to the positions of the center points of the collision regions corresponding to the multiple object parts respectively relative to the dynamic part, the distances between the dynamic part and the multiple object parts of the first object model are acquired.

9. The method according to claim 8, characterized in that The dynamic part is pre-corresponded to a spring skeleton in the form of a line segment, the position of the spring skeleton represents the position of the dynamic part, and the distance between the dynamic part and the multiple object parts of the first object model is obtained according to the position of the center point of the collision area corresponding to each of the multiple object parts relative to the dynamic part, including: If the vertical line pointing from the center point of the collision area currently being acquired for distance intersects the spring bone, the difference between the length of the vertical line and the first distance value is used as the distance between the object part represented by the collision area currently being acquired for distance and the dynamic part. The first distance value is the distance between the center point and the target intersection point, and the target intersection point is the intersection point of the vertical line with the outer surface of the collision area currently being acquired for distance.

10. The method according to claim 9, characterized in that The method further comprises: If the vertical line from the center point of the collision area currently being acquired to the spring skeleton does not intersect the spring skeleton, the smallest distance between the center point and the two endpoints of the spring skeleton is used as the distance between the object part represented by the collision area currently being acquired and the dynamic part.

11. The method according to claim 8, characterized in that The shapes of the collision regions corresponding to different object parts are different, and the shapes of the collision regions correspond to the corresponding object parts.

12. The method according to claim 1, characterized in that There are multiple dynamic parts in the second object model, and obtaining the effective moving distance corresponding to the dynamic part in the second object model after the movement includes: Acquire effective moving distances corresponding to each of the multiple dynamic parts in the second object model after the movement, to obtain multiple moving distances; The comparing the effective moving distance with the threshold distance includes: comparing the moving distance with threshold distances corresponding to each of the plurality of dynamic parts; If the effective moving distance is not less than the threshold distance, making the dynamic part avoid the first object model to avoid penetrating the first object model, comprises: If there is a target dynamic part, the target dynamic part is made to avoid the first object model to avoid penetration of the target dynamic part with the first object model. The target dynamic part is a dynamic part whose corresponding effective moving distance is not less than the corresponding threshold distance.

13. The method according to claim 12, characterized in that The method further comprises: A movable range is configured for the dynamic part according to the physical properties of the dynamic part, wherein the movable ranges corresponding to dynamic parts with different physical properties are different.

14. An object model control device, characterized in that: Running on an electronic device, the device comprises: a moving distance acquisition unit, configured to acquire, when displaying the associated first object model and second object model, an effective moving distance corresponding to the movement of the dynamic part in the second object model, wherein the effective moving distance is a length of a projection of the moving distance of the dynamic part in a specified direction, wherein the specified direction is a direction corresponding to a threshold distance, and the threshold distance is a minimum distance between the dynamic part and a plurality of object parts of the first object model; a distance comparison unit, configured to compare the effective moving distance with the threshold distance; The model control unit is used to make the dynamic part avoid the first object model if the effective moving distance is not less than the threshold distance, so as to avoid penetration with the first object model.

15. An electronic device, characterized in that: including a processor and a memory; One or more programs are stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-13.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 13 is executed.