CALCULATION METHOD, MEDIUM AND SYSTEM FOR REAL-TIME PHYSICAL ENGINE ENHANCEMENT BASED ON NEURAL NETWORK

20230086956 · 2023-03-23

    Inventors

    Cpc classification

    International classification

    Abstract

    A calculation method for real-time physical engine enhancement based on a neural network includes: dynamically constructing a multi-layer and multi-surface pre-collision shell according to key concave and convex vertices of an object to be subjected to collision detection; obtaining an initial collision detection correspondence matrix according to the multi-layer and multi-surface pre-collision shell; and setting a collision detection condition, inputting a relevant parameter of the collision detection condition into the neural network for parameter screening, and determining whether a collision condition satisfies a safety condition after the parameter screening. When the collision condition satisfies the safety condition, a collision detection correspondence matrix is not updated. When the collision condition does not satisfy the safety condition, the matrix is updated, and the multi-layer and multi-surface pre-collision shell is reconstructed according to the updated matrix. A calculation system for the real-time physical engine enhancement based on a neural network is further provided.

    Claims

    1. A calculation method for a real-time physical engine enhancement based on a neural network, comprising the following steps: a multi-layer and multi-surface pre-collision shell constructing step: dynamically constructing a multi-layer and multi-surface pre-collision shell according to key concave and convex vertices of an object to be subjected to collision detection; a relation matrix acquisition step: obtaining an initial collision detection correspondence matrix according to the multi-layer and multi-surface pre-collision shell; and a screening and determining step: setting a collision detection condition, inputting a relevant parameter of the collision detection condition into the neural network for parameter screening, and determining whether a collision condition satisfies a safety condition after screening; wherein when the collision condition satisfies the safety condition, a collision detection correspondence matrix is not updated; and when the collision condition does not satisfy the safety condition, a current collision detection correspondence matrix is updated, and the multi-layer and multi-surface pre-collision shell constructing step is triggered according to the updated collision detection correspondence matrix to reconstruct the multi-layer and multi-surface pre-collision shell.

    2. The calculation method for the real-time physical engine enhancement based on the neural network of claim 1, wherein the screening and determining step comprises the following steps: obtaining a developing velocity of a collision and an angle in each direction by calculating a distance between objects of the collision and a time when the collision occurs to obtain vertices of a moment T after the collision occurs, and deducing a developing displacement of vertices of a moment T+1; marking and extracting vertices with a Euclidean distance smaller than a collision warning distance to obtain marked vertices, wherein the Euclidean distance is between the vertices of the moment T and the vertices of the moment T+1; constructing triangular surfaces according to the marked vertices, and marking and extracting triangular surfaces with a distance smaller than the collision warning distance to obtain marked vertex faces, wherein the distance is between the surfaces; and using the neural network to calculate and obtain a correspondence matrix of a distance change of each marked vertex according to a set safety distance, positions and displacements of each marked vertex at the moment T-1 and the moment T-2 before the collision occurs, and determining whether the distance change satisfies the warning distance; wherein when the distance change is larger than the warning distance, the collision condition satisfies the safety condition; when the distance change is smaller than or equal to the warning distance, the collision condition does not satisfy the safety condition.

    3. The calculation method for the real-time physical engine enhancement based on the neural network of claim 2, wherein the multi-layer and multi-surface pre-collision shell comprises a first outer pre-collision shell layer, a sub-surface pre-collision shell layer, and a collision detection layer, wherein the first outer pre-collision shell layer, the sub-surface pre-collision shell layer, and the collision detection layer are arranged successively from outside to inside, and a distance between the sub-surface pre-collision shell layer and the first outer pre-collision shell layer is smaller than a distance between the collision detection layer and the first outer pre-collision shell layer; the number of vertices and the number of surfaces of the sub-surface pre-collision shell layer are more than the number of vertices and the number of surfaces of the first outer pre-collision shell layer, and the number of vertices and the number of surfaces of the collision detection layer are more than the number of vertices and the number of surfaces of the sub-surface pre-collision shell layer; a moment when the sub-surface pre-collision shell layer of an object is collided by vertices of the first outer pre-collision shell layer of another object is defined as the moment T, and the vertices of the first outer pre-collision shell layer of another object are defined as the vertices of the moment T; and a velocity vector of the vertices of the moment T has a velocity sub-vector moving toward the object.

    4. The calculation method for the real-time physical engine enhancement based on the neural network of claim 1, wherein the relevant parameter of the collision detection condition comprises at least one selected from the group of a collision distance, a collision velocity, a shape of a collision body, a number of surfaces of the collision body, and a safety distance.

    5. A non-transitory computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium; the computer program is configured to be processed and executed to implement the steps of the calculation method for the real-time physical engine enhancement based on the neural network of claim 1.

    6. A calculation system for real-time physical engine enhancement based on a neural network, comprising: a multi-layer and multi-surface pre-collision shell constructing module, wherein the multi-layer and multi-surface pre-collision shell constructing module is configured to dynamically construct a multi-layer and multi-surface pre-collision shell according to key concave and convex vertices of an object to be subjected to collision detection; a relation matrix acquisition module, wherein the relation matrix acquisition module is configured to obtain an initial collision detection correspondence matrix according to the multi-layer and multi-surface pre-collision shell; and a screening and determining module, wherein the screening and determining module is configured to set a collision detection condition, input a relevant parameter of the collision detection condition into the neural network for parameter screening, and determine whether a collision condition satisfies a safety condition after screening; wherein when the collision condition satisfies the safety condition, a collision detection correspondence matrix is not updated; and when the collision condition does not satisfy the safety condition, a current collision detection correspondence matrix is updated, and a multi-layer and multi-surface pre-collision shell constructing step is triggered according to the updated collision detection correspondence matrix to reconstruct the multi-layer and multi-surface pre-collision shell.

    7. The calculation system for the real-time physical engine enhancement based on the neural network of claim 6, wherein the screening and determining module is further configured to: obtain a developing velocity of a collision and an angle in each direction by calculating a distance between objects of the collision and a time when the collision occurs to obtain vertices of a moment T after the collision occurs, and deduce a developing displacement of vertices of a moment T+1; mark and extract vertices with a Euclidean distance smaller than a collision warning distance to obtain marked vertices, wherein the Euclidean distance is between the vertices of the moment T and the vertices of the moment T+1; construct triangular surfaces according to the marked vertices, and mark and extract triangular surfaces with a distance smaller than the collision warning distance to obtain marked vertex faces, wherein the distance is between the surfaces; and use the neural network to calculate and obtain a correspondence matrix of a distance change of each marked vertex according to a set safety distance, positions and displacements of each marked vertex at the moment T-1 and the moment T-2 before the collision occurs, and determine whether the distance change satisfies the warning distance; wherein when the distance change is larger than the warning distance, the collision condition satisfies the safety condition; when the distance change is smaller than or equal to the warning distance, the collision condition does not satisfy the safety condition.

    8. The calculation system for the real-time physical engine enhancement based on the neural network of claim 6, wherein the multi-layer and multi-surface pre-collision shell comprises a first outer pre-collision shell layer, a sub-surface pre-collision shell layer, and a collision detection layer, wherein the first outer pre-collision shell layer, the sub-surface pre-collision shell layer, and the collision detection layer are arranged successively from outside to inside, and a distance between the sub-surface pre-collision shell layer and the first outer pre-collision shell layer is smaller than a distance between the collision detection layer and the first outer pre-collision shell layer.

    9. The calculation system for the real-time physical engine enhancement based on the neural network of claim 7, wherein the number of vertices and the number of surfaces of the sub-surface pre-collision shell layer are more than the number of vertices and the number of surfaces of the first outer pre-collision shell layer, and the number of vertices and the number of surfaces of the collision detection layer are more than the number of vertices and the number of surfaces of the sub-surface pre-collision shell layer; a moment when the sub-surface pre-collision shell layer of an object is collided by vertices of the first outer pre-collision shell layer of another object is defined as the moment T, and the vertices of the first outer pre-collision shell layer of another object are defined as the vertices of the moment T; and a velocity vector of the vertices of the moment T has a velocity sub-vector moving toward the object.

    10. The calculation system for the real-time physical engine enhancement based on the neural network of claim 6, wherein the relevant parameter of the collision detection condition comprises at least one selected from the group of a collision distance, a collision velocity, a shape of a collision body, a number of surfaces of the collision body, and a safety distance.

    11. The computer-readable storage medium of claim 5, wherein the screening and determining step comprises: obtaining a developing velocity of a collision and an angle in each direction by calculating a distance between objects of the collision and a time when the collision occurs to obtain vertices of a moment T after the collision occurs, and deducing a developing displacement of vertices of a moment T+1; marking and extracting vertices with a Euclidean distance smaller than a collision warning distance to obtain marked vertices, wherein the Euclidean distance is between the vertices of the moment T and the vertices of the moment T+1; constructing triangular surfaces according to the marked vertices, and marking and extracting triangular surfaces with a distance smaller than the collision warning distance to obtain marked vertex faces, wherein the distance is between the surfaces; and using the neural network to calculate and obtain a correspondence matrix of a distance change of each marked vertex according to a set safety distance, positions and displacements of each marked vertex at the moment T-1 and the moment T-2 before the collision occurs, and determining whether the distance change satisfies the warning distance; wherein when the distance change is larger than the warning distance, the collision condition satisfies the safety condition; when the distance change is smaller than or equal to the warning distance, the collision condition does not satisfy the safety condition.

    12. The computer-readable storage medium of claim 11, wherein the multi-layer and multi-surface pre-collision shell comprises a first outer pre-collision shell layer, a sub-surface pre-collision shell layer, and a collision detection layer, wherein the first outer pre-collision shell layer, the sub-surface pre-collision shell layer, and the collision detection layer are arranged successively from outside to inside, and a distance between the sub-surface pre-collision shell layer and the first outer pre-collision shell layer is smaller than a distance between the collision detection layer and the first outer pre-collision shell layer; the number of vertices and the number of surfaces of the sub-surface pre-collision shell layer are more than the number of vertices and the number of surfaces of the first outer pre-collision shell layer, and the number of vertices and the number of surfaces of the collision detection layer are more than the number of vertices and the number of surfaces of the sub-surface pre-collision shell layer; a moment when the sub-surface pre-collision shell layer of an object is collided by vertices of the first outer pre-collision shell layer of another object is defined as the moment T, and the vertices of the first outer pre-collision shell layer of another object are defined as the vertices of the moment T; and a velocity vector of the vertices of the moment T has a velocity sub-vector moving toward the object.

    13. The computer-readable storage medium of claim 5, wherein the relevant parameter of the collision detection condition comprises at least one selected from the group of a collision distance, a collision velocity, a shape of a collision body, a number of surfaces of the collision body, and a safety distance.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0047] By reading the detailed description of the non-restrictive embodiments with reference to the following drawings, other features, objectives and advantages of the present invention will become more obvious.

    [0048] FIG. 1 schematically shows a flow chart of a calculation method for real-time physical engine enhancement based on a neural network according to an embodiment of the present invention.

    [0049] FIG. 2 schematically shows a structural framework of a calculation system for real-time physical engine enhancement based on a neural network according to an embodiment of the present invention.

    [0050] FIG. 3 schematically shows a flow chart of a calculation system for real-time physical engine enhancement based on a neural network according to an embodiment of the present invention.

    [0051] FIG. 4 schematically shows a screening and determining step of a calculation system for real-time physical engine enhancement based on a neural network according to an embodiment of the present invention.

    [0052] FIG. 5 illustrates a flowchart showing the vertices selection mechanism according to an embodiment of the present invention.

    DETAILED DESCRIPTION OF THE EMBODIMENTS

    [0053] The present invention is described in detail in combination with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention but do not limit the present invention in any form. It should be pointed out that some modifications and improvements may be made by those having ordinary skill in the art without departing from the idea of the present invention, but all these modifications and improvements shall fall within the scope of protection of the present invention.

    [0054] In the various embodiment of the instant invention, the term “shell” refers to a three-dimensional (3D) computer model (i.e. an electronic model) for simulating a physical object of a motor vehicle.

    Embodiment I

    [0055] FIG. 1 schematically shows a flow chart of a calculation method for real-time physical engine enhancement based on a neural network according to Embodiment I of the present invention.

    [0056] As shown in FIG. 1, in this embodiment, the calculation method of the real-time physical engine enhancement based on the neural network includes the following steps.

    [0057] Multi-layer and multi-surface pre-collision shell constructing step: a multi-layer and multi-surface pre-collision shell is dynamically constructed according to key concave and convex vertices of an object to be subjected to collision detection.

    [0058] To be more specific, the multi-layer and multi-surface pre-collision shell contains three-dimensional coordinates of the vertices of corresponding outer surfaces of the three-dimensional object. Each layer of the shell describes a layer of vertices of the three-dimensional object, and is recorded in a matrix format as:

    [00001]Shell1=V1X1,Y1,Z1,V2X2,Y2,Z2,...,VnXn,Yn,Zn

    wherein Shell.sub.1 is a first layer of a shell, V.sub.1 ... V.sub.n each represents a vertex of the three-dimensional physical object, and X.sub.1 ... X.sub.n, Y.sub.1 ... Y.sub.n, and Z.sub.1 ... Z.sub.n, are the spatial coordinates of the vertices.

    [0059] These vertices included in the shell are selected from a group of neighbor vertices. The vertices selection mechanism, as shown in FIG. 5, includes: (1) determining the normal direction of each vertex of the group of neighbor vertices, (2) determining the maximum Euclidean distance between each vertex and the other vertices, (3) using the maximum Euclidean distance as radius to determine a circumference V.sub.m1 , and (4) electing a vertex as a representing vertex of the group of neighbor vertices by merging the group of neighbor vertices with:

    [00002]VmMaxXm,Xma,Xmb,Xmc,MaxYm,Yma,Ymb,Ymc,MaxZm,Zma,Zmb,Zmc

    wherein V.sub.m represents the elected vertex, X.sub.ma satisfies |X.sub.m - X.sub.ma| < V.sub.m1, X.sub.mb satisfies |X.sub.m - X.sub.mb| < V.sub.m1, and X.sub.mc satisfies |X.sub.m - X.sub.mc| < V.sub.m1. Similarly, Y.sub.ma satisfies |Y.sub.m - Y.sub.ma| < V.sub.m1, Y.sub.mb satisfies |Y.sub.m - Y.sub.mb| < V.sub.m1, and Y.sub.mc satisfies |Y.sub.m - Y.sub.mc| < V.sub.m1 . Also, Z.sub.ma satisfies |Z.sub.m - Z.sub.ma| < V.sub.m1, Z.sub.mb satisfies |Z.sub.m - Z.sub.mb| < V.sub.m1, and Z.sub.mc satisfies |Z.sub.m - Z.sub.mc| < V.sub.m1. Here, since the value V.sub.m1 is a vertex is selected from the outermost surface of the three-dimensional physical object, the generated Shell.sub.1 represents the first layer of collision detection shell.

    [0060] Next, the other layers of the shell can be generated by increase the value of V.sub.m1. For instance, the second layer of the shell (Shell.sub.2) can be generated by using the above mechanism with V.sub.m2 instead of V.sub.m1, wherein V.sub.m2 > V.sub.m1. It is noted that since V.sub.m2 is larger than V.sub.m1, more vertices are merged into one, therefore, the number of vertices in Shell.sub.2 is less than the number of vertices in Shell.sub.1. The number of layers in the shell can be further extended with further increasing the number V.sub.m2 .

    [0061] With each increase of V.sub.m1, a new pre-collision vertex matrix is generated along the normal direction of V.sub.m, resulting a new pre-collision vertex V.sub.n to have an increasing value of (X.sub.n, Y.sub.n, Z.sub.n) + ( V.sub.m1, V.sub.m1, V.sub.m1 )”. Therefore, the form of the shell is a multi-dimensional matrix with normals and three-dimensional coordinates representing vertices on the outer surface for collision judgment. As a result, the structure of the shell contains three-dimensional information of vertex coordinates, three-dimensional information of normal direction, V.sub.m1 Euclidean distance representing the vertex to determine the circumference length, and information about the current number of layers.

    [0062] Relation matrix acquisition step: an initial collision detection correspondence matrix is obtained according to the multi-layer and multi-surface pre-collision shell.

    [0063] Here, a collision detection correspondence matrix is a mathematical representation of the generated shell above. Initial values of the collision detection correspondence matrix are from the determined shell before a collision. The number of collision can be set from 1 to m. If the three-dimensional object is a rigid body (i.e. the shape of the object is fixed), the values of the collision detection correspondence matrix stay the same after a collision. On the other hand, if the object is not a rigid body (i.e. the shape of the object deforms), the values of the collision detection correspondence matrix are updated after each collision. The update includes updating the three-dimensional coordinate information, the V.sub.m1 distance, and the number of layers. Furthermore, a new value of V.sub.m1 can be determined based on, but is not limited to, “average value of step size” and “non-average value of surface type”. Here, a neural network is used to calculate and assign new V.sub.m1 values.

    [0064] Screening and determining step: a collision detection condition is set, a relevant parameter of the collision detection condition is input into the neural network for parameter screening, and it is determined whether a collision condition satisfies a safety condition after screening.

    [0065] When the collision condition satisfies the safety condition, a collision detection correspondence matrix is not updated.

    [0066] When the collision condition does not satisfy the safety condition, a current collision detection correspondence matrix is updated, and the multi-layer and multi-surface pre-collision shell constructing step is triggered according to the updated collision detection correspondence matrix to reconstruct the multi-layer and multi-surface pre-collision shell.

    [0067] The neural network is used for the assigning a value for V.sub.m1. Regarding to the value range of V.sub.m1, the minimum value for V.sub.m1 is the minimum adjacent distance between global vertices in the three-dimensional object, and the maximum value for V.sub.m1 is N times the maximum adjacent distance, wherein N depends on the computing performance and Convergence Mode presets. Neural network computations are used to speed up the decision to classify local surfaces and then provide the corresponding best-fit value for V.sub.m1. The source of the training set is a local angle surface of a random shell model. Without considering the performance and time, the training of the neural network includes iterating calculations to convergence with the minimum adjacent distance, so that a V.sub.m1 value where the performance and convergence tend to be stable can be obtained. The neural network is continued to be trained with new random surfaces and iterate till a corresponding best-fit V.sub.m1 is generated. The neural network, after numerous times of training, is used to identify a trend between a type of a surface and a best-fit V.sub.m1, thereby the determination of V.sub.m1 can be achieved by the neural network performing classification of the type of the surface. For example, the general framework and neural network of Tensorflow or Caffe can be used, and the automatic association of surface classification and V.sub.m1 corresponding convergence numbers can be determined by a neural network. The neural network can be implemented with different centralized network models on mobile and non-mobile terminals. Since the training data uses randomly generated surface segments, and the output is the stepping V.sub.m1 values corresponding to the vertex positions on different surface segments, the training result data is stored in a database and used in the assignment of V.sub.m1 when the matrix of the shell layer of the specific object modeling is updated.

    [0068] With the V.sub.m1 representing the vertices, by constructing the pre-collision vertex matrix generated near-to-far from the normal direction of the object surface, these surfaces with fewer vertices can accelerate the convergence efficiency before reaching the Shell.sub.1 collision layer. All objects colliding with each other can adopt this method to speed up the convergence efficiency of collision. The basic two-sided/two-point collision determination is still the surface distance determination, which has not changed, only the representative vertex and the representative surface formed by the representative vertex have changed. For example, for two rigid bodies, or one rigid body and one non-rigid body, the conventional collision requires the distance judgment of all vertices and surfaces at all times, but the current method starts to model the collision only after the collision contact between the two parties occurs. The collision calculation and detection of different shell layers are carried out in the area. The determination starts with collisions in some parts of the Shell.sub.3 layer, then the collisions that progressed to the Shell.sub.2 layer, and then finally some parts of the collision that have reached the Shell.sub.1 layer, until the collision convergence of Shell.sub.1 is complete.

    [0069] Correspondingly, this embodiment also provides a calculation system for real-time physical engine enhancement based on a neural network, and its structure is schematically shown in FIG. 2. FIG. 2 schematically shows a structural framework of a calculation system for real-time physical engine enhancement based on a neural network according to an embodiment of the present invention.

    [0070] As shown in FIG. 2, a calculation system for real-time physical engine enhancement based on a neural network includes a multi-layer and multi-surface pre-collision shell constructing module, a relation matrix acquisition module, and a screening and determining module. Specifically, the multi-layer and multi-surface pre-collision shell constructing module is configured to dynamically construct a multi-layer and multi-surface pre-collision shell according to key concave and convex vertices of an object to be subjected to collision detection. The relation matrix acquisition module is configured to obtain an initial collision detection correspondence matrix according to the multi-layer and multi-surface pre-collision shell. The screening and determining module is configured to set a collision detection condition, input a relevant parameter of the collision detection condition into the neural network for parameter screening, and determine whether a collision condition satisfies a safety condition after screening. When the collision condition satisfies the safety condition, a collision detection correspondence matrix is not updated. When the collision condition does not satisfy the safety condition, a current collision detection correspondence matrix is updated, and a multi-layer and multi-surface pre-collision shell constructing step is triggered according to the updated collision detection correspondence matrix to reconstruct the multi-layer and multi-surface pre-collision shell.

    [0071] In this embodiment, the screening and determining step further includes the following steps. A developing velocity of a collision and an angle in each direction are obtained by calculating a distance between objects of the collision and a time when the collision occurs to obtain vertices of the moment T after the collision occurs, and a developing displacement of vertices of the moment T+1 is deduced.

    [0072] Vertices with a Euclidean distance smaller than a collision warning distance are marked and extracted to obtain marked vertices, wherein the Euclidean distance is between the vertices of the moment T and the vertices of the moment T+1.

    [0073] Triangular surfaces are constructed according to the marked vertices, and triangular surfaces with a distance smaller than the collision warning distance are marked and extracted to obtain marked vertex faces, wherein the distance is between the surfaces.

    [0074] The neural network is used to calculate and obtain a correspondence matrix of a distance change of each marked vertex according to a set safety distance, positions and displacements of each marked vertex at the moment T-1 and the moment T-2 before the collision occurs, and it is determined whether the distance change satisfies the warning distance. When the distance change satisfies the warning distance, it is considered that the collision condition satisfies the safety condition. When the distance change does not satisfy the warning distance, it is considered that the collision condition does not satisfy the safety condition.

    [0075] In addition, it should be noted that the multi-layer and multi-surface pre-collision shell includes a first outer pre-collision shell layer, a sub-surface pre-collision shell layer, and a collision detection layer, wherein the first outer pre-collision shell layer, the sub-surface pre-collision shell layer, and the collision detection layer are arranged successively from outside to inside, and a distance between the sub-surface pre-collision shell layer and the first outer pre-collision shell layer is smaller than a distance between the collision detection layer and the first outer pre-collision shell layer.

    [0076] The number of vertices and the number of surfaces of the sub-surface pre-collision shell layer are more than the number of vertices and the number of surfaces of the first outer pre-collision shell layer, and the number of vertices and the number of surfaces of the collision detection layer are more than the number of vertices and the number of surfaces of the sub-surface pre-collision shell layer.

    [0077] The moment when the sub-surface pre-collision shell layer of an object is collided by vertices of the first outer pre-collision shell layer of another object is defined as the moment T, and the vertices of the first outer pre-collision shell layer of another object are defined as the vertices of the moment T.

    [0078] The velocity vector of the vertices of the moment T has a velocity sub-vector moving toward the object.

    [0079] Moreover, the relevant parameter of the collision detection condition includes at least one selected from the group of a collision distance, a collision velocity, a shape of a collision body, the number of surfaces of the collision body, and a safety distance.

    Embodiment II

    [0080] FIG. 3 schematically shows a flow chart of a calculation system for real-time physical engine enhancement based on a neural network according to Embodiment II of the present invention.

    [0081] As shown in FIG. 3, in this embodiment, according to the model size and shape of an object to be subjected to collision detection, a pre-collision polyhedron is generated based on the shape of the object at a current moment. However, in this case, the generated pre-collision polyhedron has a relatively small number of surfaces, and it is similar to a rough and invisible safety shell that needs to be transformed into an approximate multi-layer pre-collision body (i.e. the multi-layer and multi-surface pre-collision body in the present invention) by using a calculation method of a neural network according to the accuracy requirement. Since each object surface has two layers of safety distance, namely a maximum safety distance and a minimum safety distance, the minimum safety distance is defined as the safety distance of the first outer pre-collision shell layer. The minimum safety distance has a relatively large number of surfaces and is closer to the object surface (i.e. collision detection layer). The accuracy of collision calculation is determined by the number of surfaces of the safe distance of the sub-surface pre-collision shell layer and the angle between the normal of the surfaces. The maximum safety distance is the distance between shells of the first outer collision polyhedron. In this way, the multi-layer collision vertices and vertex faces are extracted and marked. The first outer pre-collision shell layer and the sub-surface pre-collision shell layer are obtained after the neural network extracts the surfaces of the polyhedron to be collided and performs multiple sampling calculations.

    [0082] When the collision of the first outer pre-collision shell layer is not triggered between objects, the detection, scanning and calculation of the collision are not be performed according to the present invention. Before the vertices of first outer pre-collision shell layer collide the sub-surface pre-collision shell layer, the detection, scanning and calculation of the collision are also not be performed. When the vertices of first outer pre-collision shell layer collide the sub-surface pre-collision shell layer, a developing velocity of the collision is calculated according to a distance between the two shells and a time. At this time, vertices with a uniform velocity (without considering short-distance friction deceleration) are defined as the vertices of the moment T, and then the developing displacement of the vertices of the moment T+1 is deduced.

    [0083] The vertex extraction, vertex displacement prediction and vertex movement velocity are all calculation variables in the neural network. For the vertex faces whose normal angle is more than 45 degrees (thus limiting the angle between the surfaces), in the vertex displacement prediction, it is necessary to decompose the velocity into components along three coordinate axes to obtain a more accurate displacement prediction.

    [0084] After the sub-surface pre-collision shell layer is collided, the collision enters the collision detection layer. The collision detection layer is composed of the number of surfaces and the number of vertices of real objects of 1/10-2/10 of irregular objects having more than 500 vertices and surfaces. Moreover, the detection of the object surface (that is, the collision detection layer) composed of the non-uniform points will be regarded as the result of collision detection.

    [0085] It should be noted that the collision, vertex selection and point displacement estimation between the first outer pre-collision shell layer, the sub-surface pre-collision shell layer and the collision detection layer are all calculated by using the neural network. The sampling, convolution, normalization, weight and Election and Recommendation algorithm that may be involved in the calculation process are all known to those skilled in the art, and are not described repeatedly herein.

    [0086] When two objects reciprocate and repeatedly collide between the collision detection layer and the sub-surface pre-collision shell layer, the velocity between the two surfaces is updated as the velocity between the two objects. Hence, before the collision detection occurs, there exists a collision detection correspondence matrix between each object and all objects that are likely to be collided in the space of the coordinate system. The group of collision detection correspondence matrices will be processed provided that the safety collision of the first outer pre-collision shell layer occurs.

    [0087] The above collision detection correspondence matrix and the decomposition can be calculated according to the Euclidean distance mathematical method, and the specific calculation process is known to those skilled in the art, and is not described repeatedly herein.

    [0088] It should be noted that if an object is deformed after a single collision between objects, it is necessary to reconstruct a new multi-layer and multi-surface pre-collision shell according to the neural network because the vertices of the real object will change permanently. The reconstructing step thereof can be referred to the multi-layer and multi-surface pre-collision shell constructing step.

    [0089] After the collision between objects occurs, if the collision occurs twice, the collision detection correspondence matrix needs to be updated to recalculate the collision condition. The collision condition is calculated provided that the safety collision of the first outer pre-collision shell layer is triggered.

    [0090] In this embodiment, the definition of the safety distance is alterable. For a single collision, the safety distance is within the first outer pre-collision shell layer, and the corresponding calculation of the collision and distance relationship is not initiated outside the distance. For multiple collisions, the safety distance means a pre-collision of the first outer pre-collision shell layer and the sub-surface pre-collision shell layer. The multiple collisions involve normal decomposition, angle decomposition, prediction of velocity of vertices under the sub-surface, and the calculations of vertex displacement and vertex selection of the sub-surface and the collision surface that are caused by the displacement of vertices of the deformed surface.

    [0091] It should be pointed out that the collision accuracy and density, whether it is multiple collisions and whether the deformation occurs after the collision are all the parameters capable of affecting the occurrence of the collision. Therefore, the shape and the detection density of the real object are one of the factors considered in the present invention.

    [0092] In addition, the accuracy requirement refers to the definition of the number of collision surfaces colliding the object and the density of vertex selection, that is, the requirement for the collision accuracy.

    [0093] An appropriate neural network is established by the collision mode in which the vertices and the vertex faces have the specified mode of motion and velocity. The appropriate neural network is configured to screen the collision vertex model data set so as to accelerate the collision vertex screening of similar objects.

    [0094] Considering that the settings of collision distance and velocity, shape and surface number of collision body and safety distance are all related to the final calculation results, a suitable classified collision distance matrix is established according to the above conditions, and is used in the calculation of dynamic real-time collision detection deducing.

    [0095] It should be noted that the above deducing process may be performed by a hierarchical calculation of a standard neural network, and the calculation object is the vertex. Classification and selection are used to calculate the corresponding matrix adopting the movement of fixed points and vertices and the angle decomposition, so as to achieve an efficient network pre-calculation and calculation process.

    [0096] During the process, Euclidean distance dispersion, vector three-dimensional coordinate system decomposition calculation, matrix normalization selection, relation matrix convolution, eigenvector sampling and other involved calculation processes belong to the calculation methods known to those skilled in the art, and thus are not described repeatedly herein.

    [0097] FIG. 4 schematically shows a screening and determining step of a calculation system for real-time physical engine enhancement based on a neural network according to another embodiment of the present invention.

    [0098] As shown in FIG. 4, in this embodiment, the screening and determining step includes the following steps. A developing velocity of a collision and an angle in each direction are obtained by calculating a distance between objects of the collision and a time when the collision occurs to obtain vertices of the moment T after the collision occurs. A developing displacement of vertices of the moment T+1 is deduced. Vertices with a Euclidean distance smaller than a collision warning distance are marked and extracted to obtain marked vertices, wherein the Euclidean distance is between the vertices of the moment T and the vertices of the moment T+1. Triangular surfaces are constructed according to the marked vertices, and triangular surfaces with a distance smaller than the collision warning distance are marked and extracted to obtain marked vertex faces, wherein the distance is between the surfaces. A correspondence matrix of a distance change of each marked vertex is obtained and calculated by using the neural network according to a set safety distance, positions and displacements of each marked vertex at the moment T-1 and the moment T-2 before the collision occurs, and it is determined whether the distance change satisfies the warning distance. When the distance change satisfies the warning distance, it is considered that the collision condition satisfies the safety condition. When the distance change does not satisfy the warning distance, it is considered that the collision condition does not satisfy the safety condition.

    [0099] For those skilled in the art, the system and its devices, modules and units provided by the present invention is achieved by means of a pure computer-readable program code, and also, the steps of the method of the present invention may be logically programmed to enable the system and its devices, modules and units provided by the present invention to achieve the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers and the likes. Therefore, the system and its devices, modules and units provided by the present invention may be regarded as a hardware component, and the devices, modules and units included in the system to realize various functions may also be regarded as the structures in the hardware component. The devices, modules and units used to realize various functions may also be regarded as both the software modules of the implementation method and the structures in the hardware component.

    [0100] It should be noted that the content of the prior art in the scope of protection of the present invention is not limited to the embodiments given in this application document, and all prior arts that do not contradict the solutions of the present invention, including, but not limited to, prior patent documents, prior public publications, prior public use and others shall fall within the scope of protection of the present invention.

    [0101] In addition, the combination of the technical features in the present invention is not limited to the combination recorded in the claim or the combination recorded in the specific embodiment, and all the technical features recorded in the present invention may be freely combined in any way, unless there is a contradiction therebetween.

    [0102] It should also be noted that the embodiments listed above are only specific embodiments of the present invention. It is obvious that the present invention is not limited to the above embodiments. Other similar changes or deformations that may be directly derived or easily associated by those skilled in the art from the contents disclosed by the present invention all shall fall within the scope of protection of the present invention.

    [0103] Specific embodiments of the present invention are described above. It should be understood that the present invention is not limited to the aforementioned specific embodiments. Those skilled in the art may make various changes or modifications within the scope of the claim, which does not affect the substance of the present invention. Without conflict, the embodiments and the features of embodiments of the present invention may be arbitrarily combined with each other.